[GHC] #14512: System-wide installed profile build cannot load libHSghc-prim.0.5.2.0.so

#14512: System-wide installed profile build cannot load libHSghc-prim.0.5.2.0.so -------------------------------------+------------------------------------- Reporter: tdammers | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.3 Keywords: | Operating System: Linux Architecture: x86_64 | Type of failure: Compile-time (amd64) | crash or panic Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Steps to reproduce: 1. Make a pristine git checkout 2. Follow the steps outlined in https://ghc.haskell.org/trac/ghc/wiki/Building/QuickStart, uncommenting the `BuildFlavour = prof` line in `build.mk`, to build and install ghc. 3. Check ghc version to verify that this ghc build is the one in `/usr/local/bin` 4. Try to compile the following `hello.hs`: {{{#!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 in `build.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 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14512 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14512: System-wide installed profile build cannot load libHSghc-prim.0.5.2.0.so -------------------------------------+------------------------------------- Reporter: tdammers | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.4.1 Component: Build System | Version: 8.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Compile-time | (amd64) crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: => 8.4.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14512#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14512: System-wide installed profile build cannot load libHSghc-prim.0.5.2.0.so -------------------------------------+------------------------------------- Reporter: tdammers | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Build System | Version: 8.3 (make) | Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Compile-time | (amd64) crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by _deepfire): I didn't go all the way to narrow down the reproduction, but here is another potential case for this: https://github.com/goldfirere/th- desugar/issues/96 To quote: {{{ [11 of 11] Compiling Language.Haskell.TH.Desugar.Lift ( Language/Haskell/TH/Desugar/Lift.hs, dist/build/Language/Haskell/TH/Desugar/Lift.p_o ) Preprocessing test suite 'spec' for th-desugar-1.8.. Building test suite 'spec' for th-desugar-1.8.. [1 of 4] Compiling Splices ( Test/Splices.hs, dist/build/spec /spec-tmp/Splices.o ) [2 of 4] Compiling DsDec ( Test/DsDec.hs, dist/build/spec/spec- tmp/DsDec.o ) <no location info>: error: ghc: panic! (the 'impossible' happened) (GHC version 8.6.1 for x86_64-unknown-linux): Dynamic linker not initialised Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug [3 of 4] Compiling Dec ( Test/Dec.hs, dist/build/spec/spec- tmp/Dec.o ) <no location info>: error: <command line>: can't load .so/.DLL for: /run/user/1000/nix-build-th- desugar-1.8.drv-0/source/dist/build/libHSth-desugar-1.8 -KFOywxTzF8CA5cwAvr5NgA-ghc8.6.1.so (/run/user/1000/nix-build-th- desugar-1.8.drv-0/source/dist/build/libHSth-desugar-1.8 -KFOywxTzF8CA5cwAvr5NgA-ghc8.6.1.so: undefined symbol: thzmdesugarzm1zi8zmKFOywxTzzF8CA5cwAvr5NgA_LanguageziHaskellziTHziDesugarziAST_DAppPr_closure) builder for '/nix/store/yn634096vg0ih9mk35f2kx3hv80rx71v-th- desugar-1.8.drv' failed with exit code 1 error: build of '/nix/store/yn634096vg0ih9mk35f2kx3hv80rx71v-th- desugar-1.8.drv' failed [nix-shell:~/holotype]$ cat pkgs/def/github/th-desugar.rev 1d164b669079fe57181af95bbbe4749dbf08ab78 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14512#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14512: System-wide installed profile build cannot load libHSghc-prim.0.5.2.0.so -------------------------------------+------------------------------------- Reporter: tdammers | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Build System | Version: 8.3 (make) | Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Compile-time | (amd64) crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): I suspect that this is a duplicate of #13531. Can you try this again with GHC HEAD and see if you still experience this issue? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14512#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC