[GHC] #12684: GHC panic due to bindnow linker flag

GHC ghc-devs at haskell.org
Mon Oct 10 18:55:29 UTC 2016


#12684: GHC panic due to bindnow linker flag
-------------------------------------+-------------------------------------
           Reporter:  basvandijk     |             Owner:
               Type:  bug            |            Status:  new
           Priority:  low            |         Milestone:
          Component:  Compiler       |           Version:  8.0.1
           Keywords:                 |  Operating System:  Linux
       Architecture:                 |   Type of failure:  Compile-time
  Unknown/Multiple                   |  crash
          Test Case:                 |        Blocked By:  11238
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 As [https://ghc.haskell.org/trac/ghc/ticket/10458#comment:45 explained in
 #10458] our `haskell-opencv` library failed to build on NixOS-16.09 due to
 its recently introduced [https://nixos.org/nixpkgs/manual/#sec-hardening-
 in-nixpkgs hardening features]. Specifically the problem is that NixOS is
 setting the `-z bindnow` linker flag which causes the build to fail with:

 {{{
 ...
 [33 of 64] Compiling OpenCV.Internal.Core.Types.Mat (
 src/OpenCV/Internal/Core/Types/Mat.hs,
 dist/build/OpenCV/Internal/Core/Types/Mat.o )

 <no location info>: error:
     ghc: panic! (the 'impossible' happened)
   (GHC version 8.0.1 for x86_64-unknown-linux):
         Loading temp shared object failed:
 /run/user/1001/ghc8697_0/libghc_200.so: undefined symbol:
 inline_c_OpenCV_Internal_Exception_1_2402dbf3aea4f7f79392b71ed42618962a22e9aa
 }}}

 Fortunately this flag can be [https://github.com/LumiGuide/haskell-
 opencv/commit/5ea490af7662fe74b3740619963d37f1fd91e3d4 disabled] so I'm
 now able to build the library successfully. However, it would be nice if
 GHC is able to work around this.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12684>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list