
#16063: ghc-8.6.3 + Mac OSX + FFI dependency causes 'impossible happened' compiler failure -------------------------------------+------------------------------------- Reporter: benselfridge | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Compile-time | (amd64) crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5462 Wiki Page: | -------------------------------------+------------------------------------- Changes (by harpocrates): * status: infoneeded => patch * differential: => Phab:D5462 Comment: Here's what I think is happening: starting in 3d17f1f10fc00540ac052f2fd03182906aa47e35, when told to find an archive for `softfloat`, GHC no longer looks for just `libsoftfloat.a` and `softfloat.a`, it also looks for `libsoftfloat` and `softfloat`. GHC's method for "looking" for an archive is to make a bunch of calls to GCC. Something like {{{ gcc -fno-stack-protector -DTABLES_NEXT_TO_CODE -B/Users/atheriault/Code/grift/dist-newstyle/build/x86_64-osx/ghc-8.6.3 /softfloat-hs-0.1.0/build --print-file-name libsoftfloat.a ... gcc -fno-stack-protector -DTABLES_NEXT_TO_CODE -B/Users/atheriault/Code/grift/dist-newstyle/build/x86_64-osx/ghc-8.6.3 /softfloat-hs-0.1.0/build --print-file-name softfloat }}} We "find" a library when the path that GCC prints out is a full path (instead of just the path we pass in). And there's the problem: GCC will print out a full path to a //folder// if an appropriately named folder is found in the base location. In this case, GHC ends up finding the `Users/atheriault/Code/grift/dist-newstyle/build/x86_64-osx/ghc-8.6.3 /softfloat-hs-0.1.0/build/SoftFloat` folder and thinking that this is the `softfloat` library it has been asked to find. One workaround is to name the `softfloat` library to `softfloat1`. Or rename the `SoftFloat` directory. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16063#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler