System-wide installed profile build cannot load libHSghc-prim.0.5.2.0.so
Steps to reproduce:
- Make a pristine git checkout
- Follow the steps outlined in https://ghc.haskell.org/trac/ghc/wiki/Building/QuickStart, uncommenting the
BuildFlavour = prof
line inbuild.mk
, to build and install ghc. - Check ghc version to verify that this ghc build is the one in
/usr/local/bin
- Try to compile the following
hello.hs
:
{-# LANGUAGE TemplateHaskell #-}
import Language.Haskell.TH
main = putStrLn $(litE (stringL "Hello"))
It should fail with an error message similar to:
<no location info>: error:
ghc: panic! (the 'impossible' happened)
(GHC version 8.3.20171120 for x86_64-unknown-linux):
Dynamic linker not initialised
CallStack (from -prof):
Linker.CAF (<entire-module>)
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
and:
<no location info>: error:
<command line>: can't load .so/.DLL for: libHSghc-prim-0.5.2.0.so (libHSghc-prim-0.5.2.0.so: cannot open shared object file: No such file or directory)
By contrast, the following do *not* trigger the error:
- Building GHC without uncommenting the
BuildFlavour
line inbuild.mk
- Compiling with the
inplace/bin/ghc-stage2
in the GHC source tree - Compiling a
hello.hs
that does not use TemplateHaskell
Further system info:
- Debian 9
- Cabal version 1.24
- GHC 8.0.1
Trac metadata
Trac field | Value |
---|---|
Version | 8.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Build System |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |