Skip to content

Libdir does not contain include/ path when built with Hadrian

Summary

It seems that $libdir does not contain /include path when GHC was built with Hadrian whereas the GHC docs says:

--print-libdir

  Print the path to GHC’s library directory. This is the top of the directory tree containing GHC’s libraries,
  interfaces, and include files (usually something like /usr/local/lib/ghc-5.04 on Unix).
  This is the value of $libdir in the package configuration file (see Packages).

I relied on this when configuring a C project that included HsFFI.h.

See also https://bugzilla.redhat.com/show_bug.cgi?id=2083958

Steps to reproduce

Downoad a tarball, say, https://downloads.haskell.org/ghc/9.4.1-alpha1/ghc-9.4.0.20220501-x86_64-fedora33-linux.tar.lz, install it and check that

ls $(ghc --print-libdir)

does nor contain include/ - the path will be some levels up, actually.

Expected behavior

I expect that ghc --print-libdir contains include/HsFFI.h

Environment

  • GHC version used: 9.4

Optional:

  • Operating System:
  • System Architecture:
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information