GHC version 8.10.4 panic! (the 'impossible' happened, indeed)
Summary
GHC panic while building cardano-node
(on github), error message displayed :
ghc: panic! (the 'impossible' happened)
(GHC version 8.10.4:
Loading temp shared object failed: /tmp/ghc54158_0/libghc_10.so: failed to map segment from shared object
Steps to reproduce
- Have
/tmp
filesystem mounted with flags `noexec,nosuid,nodev
' (protection against exploit execution, I believenoexec
is the only culprit here) - Get
cardano-node
source code and checkout tag1.27.0
(detailed guide here) - Launch compilation with
$ cabal -v build cardano-node
fromcardano-node
src directory on/home
filesystem - Wait for the GHC panic
- Eventually do it over again, after
$ sudo mount -o remount,exec /tmp
Hic sunt dracones
Component build order: library
/usr/local/bin/ghc-pkg-8.10.4 init dist/package.conf.inplace
creating dist/build
creating dist/build/autogen
creating dist/build/autogen
Preprocessing library for th-orphans-0.13.11..
Building library for th-orphans-0.13.11..
creating dist/build
/usr/local/bin/ghc-8.10.4 --make -fbuilding-cabal-package -O -static -dynamic-too -dynosuf dyn_o -dynhisuf dyn_hi -outputdir dist/build -odir dist/build -hidir dist/build -stubdir dist/build -i -idist/build -isrc -idist/build/autogen -idist/build/global-autogen -Idist/build/autogen -Idist/build/global-autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -this-unit-id th-orphans-0.13.11-bc6d1defe77cbdee4ce1b13900dfcf7bfa6a03e0c1b75296ae151bc8951da94f -hide-all-packages -Wmissing-home-modules -no-user-package-db -package-db /home/raph/.cabal/store/ghc-8.10.4/package.db -package-db dist/package.conf.inplace -package-id base-4.14.1.0 -package-id mtl-2.2.2 -package-id template-haskell-2.16.0.0 -package-id th-compat-0.1.2-d27ac856dec8c28ef3a10ee6e1b5096cccb90c3b120cf83a7ec953297d678a7f -package-id th-lift-0.8.2-3df3c85ae4b51b59aa779ddfd371e1ef04a08fea56c6bc0d3f4eb3244e5f00f5 -package-id th-lift-instances-0.1.18-c922ba81f113bb068dd922d8caecc87c25b143d38851baca3fbac63b2544806d -package-id th-reify-many-0.1.9-409fd9217fb040a8a61c2933f9703291ff548974de219f262c8b5188db52835b -XHaskell2010 Language.Haskell.TH.Instances Language.Haskell.TH.Instances.Internal -Wall -Wno-star-is-type -hide-all-packages
[1 of 2] Compiling Language.Haskell.TH.Instances.Internal ( src/Language/Haskell/TH/Instances/Internal.hs, dist/build/Language/Haskell/TH/Instances/Internal.o, dist/build/Language/Haskell/TH/Instances/Internal.dyn_o )
[2 of 2] Compiling Language.Haskell.TH.Instances ( src/Language/Haskell/TH/Instances.hs, dist/build/Language/Haskell/TH/Instances.o, dist/build/Language/Haskell/TH/Instances.dyn_o )
ghc: panic! (the 'impossible' happened)
(GHC version 8.10.4:
Loading temp shared object failed: /tmp/ghc54158_0/libghc_10.so: failed to map segment from shared object
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
cabal: Failed to build byron-spec-chain-0.1.0.0 because it depends on
byron-spec-chain-0.1.0.0 which itself failed to build.
Failed to build byron-spec-ledger-0.1.0.0 because it depends on
byron-spec-ledger-0.1.0.0 which itself failed to build.
Failed to build cardano-api-1.27.0 because it depends on cardano-api-1.27.0
which itself failed to build.
Expected behavior
No panic. Maybe some nice and useful message displaying.
Environment
- GHC version used:
8.10.4
Optional:
- Operating System: GNU/Linux Debian 10
- System Architecture:
amd64