GHC panic due to bindnow linker flag
As explained in #10458 our
haskell-opencv library failed to build on NixOS-16.09 due to its recently introduced 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 disabled so I'm now able to build the library successfully. However, it would be nice if GHC is able to work around this.