Skip to content

GHC fails to compile if source is in /ghc

I was building GHC in a docker image and was ignorant what the $PWD is (it is / in case you were wondering). So I cloned GHC into /ghc, and attempted to build it from there.

Eventually the build fails because there is a sed expression 's|$(TOP)/|...' which rewrites some include paths to nonesense: /usr/lib/ghc/include/... -> /usr/libinclude/...

Anchoring the expression ('s|^$(TOP)/|...') helped the build process to continue past that point, but I haven't completed it due to other issue, so there may be other places where $(TOP) == /ghc breaks the build.

Trac metadata
Trac field Value
Version 7.10.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information