#12198 closed bug (duplicate)

Stack fails to compile using GHC 8.0.1 on MacOS 10.12

Reported by: mistydemeo Owned by:
Priority: normal Milestone:
Component: Compiler Version: 8.0.1
Keywords: Cc:
Operating System: MacOS X Architecture: x86_64 (amd64)
Type of failure: Compile-time crash Test Case:
Blocked By: Blocking:
Related Tickets: #12479 Differential Rev(s):
Wiki Page:


GHC failed when trying to build stack from source on MacOS 10.12 using GHC 8.0.1.

The relevant part of the error is here:

[ 1 of 87] Compiling Stack.FileWatch  ( src/Stack/FileWatch.hs, dist/dist-sandbox-68bf8d9c/build/Stack/FileWatch.o )
[ 2 of 87] Compiling System.Process.PagerEditor ( src/System/Process/PagerEditor.hs, dist/dist-sandbox-68bf8d9c/build/System/Process/PagerEditor.o )
[ 3 of 87] Compiling System.Process.Log ( src/System/Process/Log.hs, dist/dist-sandbox-68bf8d9c/build/System/Process/Log.o )
[ 4 of 87] Compiling System.Process.Read ( src/System/Process/Read.hs, dist/dist-sandbox-68bf8d9c/build/System/Process/Read.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 8.0.1 for x86_64-apple-darwin):
	Loading temp shared object failed: dlopen(/var/folders/4d/rttdp_9d2s7f36zplgwnqrgr0000gn/T/ghc94633_0/libghc_44.dylib, 5): no suitable image found.  Did find:
	/var/folders/4d/rttdp_9d2s7f36zplgwnqrgr0000gn/T/ghc94633_0/libghc_44.dylib: malformed mach-o: load commands size (40192) > 32768

Full build logs (includes dependency installation via cabal-install): https://gist.github.com/8e005710eab17139c02267bac3029e33

This occurred when installing stack, but reporting here because of the "Please report this as a GHC bug" message in the failed build output.

Change History (4)

comment:1 Changed 16 months ago by mistydemeo

Architecture: Unknown/Multiplex86_64 (amd64)
Operating System: Unknown/MultipleMacOS X
Type of failure: None/UnknownCompile-time crash

comment:2 Changed 13 months ago by bgamari

Status: newinfoneeded

Is this reproducible? It sounds like the dylib may be corrupted.

comment:3 in reply to:  2 Changed 13 months ago by bgamari

Replying to bgamari:

Is this reproducible? It sounds like the dylib may be corrupted.

Never mind; corruption actually isn't likely. It sounds like there are simply too many "load commands". Is it possible that the you compiled libghc with -split-sections? It would be helpful to get a dump of libghc_44.dylib.

comment:4 Changed 13 months ago by bgamari

Resolution: duplicate
Status: infoneededclosed

I believe this may be a duplicate of #12479.

Note: See TracTickets for help on using tickets.