Skip to content

GHC panic when installing haskell-opencv with nix

I installed https://github.com/LumiGuide/haskell-opencv using their recommended build system "nix", i.e. starting nix-shell in the cloned repository, waiting half an hour for several builds to complete and then doing the following from within the nix-shell:

[nix-shell:~/haskell-opencv]$ cabal build
Package has never been configured. Configuring with default flags. If this
fails, please run configure manually.
Resolving dependencies...
[1 of 1] Compiling Main             ( dist/setup/setup.hs, dist/setup/Main.o )
Linking ./dist/setup/setup ...
Configuring opencv-0.0.0...
Building opencv-0.0.0...
Preprocessing library opencv-0.0.0...
In file included from Types.hsc:96:0:
/nix/store/ybmw9vbx8s8791lc7iggf8yd88kgwmxs-bindings-DSL-1.0.23/lib/ghc-8.0.1/bindings-DSL-1.0.23/include/bindings.dsl.h:191:3: Warnung: »bc_fielddata« definiert, aber nicht verwendet [-Wunused-variable]
 } bc_fielddata;
   ^
In file included from Features2d.hsc:69:0:
/nix/store/ybmw9vbx8s8791lc7iggf8yd88kgwmxs-bindings-DSL-1.0.23/lib/ghc-8.0.1/bindings-DSL-1.0.23/include/bindings.dsl.h:191:3: Warnung: »bc_fielddata« definiert, aber nicht verwendet [-Wunused-variable]
 } bc_fielddata;
   ^
In file included from HighGui.hsc:87:0:
/nix/store/ybmw9vbx8s8791lc7iggf8yd88kgwmxs-bindings-DSL-1.0.23/lib/ghc-8.0.1/bindings-DSL-1.0.23/include/bindings.dsl.h:191:3: Warnung: »bc_fielddata« definiert, aber nicht verwendet [-Wunused-variable]
 } bc_fielddata;
   ^
In file included from ColorMaps.hsc:28:0:
/nix/store/ybmw9vbx8s8791lc7iggf8yd88kgwmxs-bindings-DSL-1.0.23/lib/ghc-8.0.1/bindings-DSL-1.0.23/include/bindings.dsl.h:191:3: Warnung: »bc_fielddata« definiert, aber nicht verwendet [-Wunused-variable]
 } bc_fielddata;
   ^
	In file included from Drawing.hsc:52:0:
/nix/store/ybmw9vbx8s8791lc7iggf8yd88kgwmxs-bindings-DSL-1.0.23/lib/ghc-8.0.1/bindings-DSL-1.0.23/include/bindings.dsl.h:191:3: Warnung: »bc_fielddata« definiert, aber nicht verwendet [-Wunused-variable]
 } bc_fielddata;
   ^
In file included from GeometricImgTransform.hsc:81:0:
/nix/store/ybmw9vbx8s8791lc7iggf8yd88kgwmxs-bindings-DSL-1.0.23/lib/ghc-8.0.1/bindings-DSL-1.0.23/include/bindings.dsl.h:191:3: Warnung: »bc_fielddata« definiert, aber nicht verwendet [-Wunused-variable]
 } bc_fielddata;
   ^
In file included from ImgFiltering.hsc:72:0:
/nix/store/ybmw9vbx8s8791lc7iggf8yd88kgwmxs-bindings-DSL-1.0.23/lib/ghc-8.0.1/bindings-DSL-1.0.23/include/bindings.dsl.h:191:3: Warnung: »bc_fielddata« definiert, aber nicht verwendet [-Wunused-variable]
 } bc_fielddata;
   ^
In file included from ObjectDetection.hsc:36:0:
/nix/store/ybmw9vbx8s8791lc7iggf8yd88kgwmxs-bindings-DSL-1.0.23/lib/ghc-8.0.1/bindings-DSL-1.0.23/include/bindings.dsl.h:191:3: Warnung: »bc_fielddata« definiert, aber nicht verwendet [-Wunused-variable]
 } bc_fielddata;
   ^
In file included from StructuralAnalysis.hsc:47:0:
/nix/store/ybmw9vbx8s8791lc7iggf8yd88kgwmxs-bindings-DSL-1.0.23/lib/ghc-8.0.1/bindings-DSL-1.0.23/include/bindings.dsl.h:191:3: Warnung: »bc_fielddata« definiert, aber nicht verwendet [-Wunused-variable]
 } bc_fielddata;
   ^
In file included from Video.hsc:32:0:
/nix/store/ybmw9vbx8s8791lc7iggf8yd88kgwmxs-bindings-DSL-1.0.23/lib/ghc-8.0.1/bindings-DSL-1.0.23/include/bindings.dsl.h:191:3: Warnung: »bc_fielddata« definiert, aber nicht verwendet [-Wunused-variable]
 } bc_fielddata;
   ^
In file included from MotionAnalysis.hsc:44:0:
/nix/store/ybmw9vbx8s8791lc7iggf8yd88kgwmxs-bindings-DSL-1.0.23/lib/ghc-8.0.1/bindings-DSL-1.0.23/include/bindings.dsl.h:191:3: Warnung: »bc_fielddata« definiert, aber nicht verwendet [-Wunused-variable]
 } bc_fielddata;
   ^
In file included from Constants.hsc:9:0:
/nix/store/ybmw9vbx8s8791lc7iggf8yd88kgwmxs-bindings-DSL-1.0.23/lib/ghc-8.0.1/bindings-DSL-1.0.23/include/bindings.dsl.h:191:3: Warnung: »bc_fielddata« definiert, aber nicht verwendet [-Wunused-variable]
 } bc_fielddata;
   ^
In file included from ArrayOps.hsc:19:0:
/nix/store/ybmw9vbx8s8791lc7iggf8yd88kgwmxs-bindings-DSL-1.0.23/lib/ghc-8.0.1/bindings-DSL-1.0.23/include/bindings.dsl.h:191:3: Warnung: »bc_fielddata« definiert, aber nicht verwendet [-Wunused-variable]
 } bc_fielddata;
   ^
In file included from Constants.hsc:9:0:
/nix/store/ybmw9vbx8s8791lc7iggf8yd88kgwmxs-bindings-DSL-1.0.23/lib/ghc-8.0.1/bindings-DSL-1.0.23/include/bindings.dsl.h:191:3: Warnung: »bc_fielddata« definiert, aber nicht verwendet [-Wunused-variable]
 } bc_fielddata;
   ^
In file included from Marshal.hsc:21:0:
/nix/store/ybmw9vbx8s8791lc7iggf8yd88kgwmxs-bindings-DSL-1.0.23/lib/ghc-8.0.1/bindings-DSL-1.0.23/include/bindings.dsl.h:191:3: Warnung: »bc_fielddata« definiert, aber nicht verwendet [-Wunused-variable]
 } bc_fielddata;
   ^
In file included from ImgCodecs.hsc:31:0:
/nix/store/ybmw9vbx8s8791lc7iggf8yd88kgwmxs-bindings-DSL-1.0.23/lib/ghc-8.0.1/bindings-DSL-1.0.23/include/bindings.dsl.h:191:3: Warnung: »bc_fielddata« definiert, aber nicht verwendet [-Wunused-variable]
 } bc_fielddata;
   ^
In file included from MiscImgTransform.hsc:14:0:
/nix/store/ybmw9vbx8s8791lc7iggf8yd88kgwmxs-bindings-DSL-1.0.23/lib/ghc-8.0.1/bindings-DSL-1.0.23/include/bindings.dsl.h:191:3: Warnung: »bc_fielddata« definiert, aber nicht verwendet [-Wunused-variable]
 } bc_fielddata;
   ^
In file included from Types.hsc:18:0:
/nix/store/ybmw9vbx8s8791lc7iggf8yd88kgwmxs-bindings-DSL-1.0.23/lib/ghc-8.0.1/bindings-DSL-1.0.23/include/bindings.dsl.h:191:3: Warnung: »bc_fielddata« definiert, aber nicht verwendet [-Wunused-variable]
 } bc_fielddata;
   ^
In file included from Constants.hsc:9:0:
/nix/store/ybmw9vbx8s8791lc7iggf8yd88kgwmxs-bindings-DSL-1.0.23/lib/ghc-8.0.1/bindings-DSL-1.0.23/include/bindings.dsl.h:191:3: Warnung: »bc_fielddata« definiert, aber nicht verwendet [-Wunused-variable]
 } bc_fielddata;
   ^
In file included from Constants.hsc:11:0:
/nix/store/ybmw9vbx8s8791lc7iggf8yd88kgwmxs-bindings-DSL-1.0.23/lib/ghc-8.0.1/bindings-DSL-1.0.23/include/bindings.dsl.h:191:3: Warnung: »bc_fielddata« definiert, aber nicht verwendet [-Wunused-variable]
 } bc_fielddata;
   ^
[ 1 of 70] Compiling OpenCV.Internal.VideoIO.Constants ( dist/build/OpenCV/Internal/VideoIO/Constants.hs, dist/build/OpenCV/Internal/VideoIO/Constants.o )
[ 2 of 70] Compiling OpenCV.Internal.VideoIO.Types ( src/OpenCV/Internal/VideoIO/Types.hs, dist/build/OpenCV/Internal/VideoIO/Types.o )
[ 3 of 70] Compiling OpenCV.VideoIO.Types ( src/OpenCV/VideoIO/Types.hs, dist/build/OpenCV/VideoIO/Types.o )
[ 4 of 70] Compiling OpenCV.Internal.Photo.Constants ( dist/build/OpenCV/Internal/Photo/Constants.hs, dist/build/OpenCV/Internal/Photo/Constants.o )
[ 5 of 70] Compiling OpenCV.Internal.ImgProc.MiscImgTransform ( dist/build/OpenCV/Internal/ImgProc/MiscImgTransform.hs, dist/build/OpenCV/Internal/ImgProc/MiscImgTransform.o )
[ 6 of 70] Compiling OpenCV.Internal.ImgCodecs ( dist/build/OpenCV/Internal/ImgCodecs.hs, dist/build/OpenCV/Internal/ImgCodecs.o )
[ 7 of 70] Compiling OpenCV.Internal.Core.Types.Constants ( dist/build/OpenCV/Internal/Core/Types/Constants.hs, dist/build/OpenCV/Internal/Core/Types/Constants.o )
[ 8 of 70] Compiling OpenCV.Internal.C.PlacementNew ( src/OpenCV/Internal/C/PlacementNew.hs, dist/build/OpenCV/Internal/C/PlacementNew.o )
[ 9 of 70] Compiling OpenCV.Internal.C.PlacementNew.TH ( src/OpenCV/Internal/C/PlacementNew/TH.hs, dist/build/OpenCV/Internal/C/PlacementNew/TH.o )
[10 of 70] Compiling OpenCV.Internal.Mutable ( src/OpenCV/Internal/Mutable.hs, dist/build/OpenCV/Internal/Mutable.o )
[11 of 70] Compiling OpenCV.Internal.Core.ArrayOps ( dist/build/OpenCV/Internal/Core/ArrayOps.hs, dist/build/OpenCV/Internal/Core/ArrayOps.o )
[12 of 70] Compiling OpenCV.Internal  ( src/OpenCV/Internal.hs, dist/build/OpenCV/Internal.o )
[13 of 70] Compiling OpenCV.Internal.Calib3d.Constants ( dist/build/OpenCV/Internal/Calib3d/Constants.hs, dist/build/OpenCV/Internal/Calib3d/Constants.o )
[14 of 70] Compiling OpenCV.Internal.C.Types ( src/OpenCV/Internal/C/Types.hs, dist/build/OpenCV/Internal/C/Types.o )
[15 of 70] Compiling OpenCV.Internal.Core.Types.Matx ( src/OpenCV/Internal/Core/Types/Matx.hs, dist/build/OpenCV/Internal/Core/Types/Matx.o )
[16 of 70] Compiling OpenCV.Internal.Core.Types.Matx.TH ( src/OpenCV/Internal/Core/Types/Matx/TH.hs, dist/build/OpenCV/Internal/Core/Types/Matx/TH.o )
[17 of 70] Compiling OpenCV.Internal.Core.Types.Point ( src/OpenCV/Internal/Core/Types/Point.hs, dist/build/OpenCV/Internal/Core/Types/Point.o )
[18 of 70] Compiling OpenCV.Internal.Core.Types.Point.TH ( src/OpenCV/Internal/Core/Types/Point/TH.hs, dist/build/OpenCV/Internal/Core/Types/Point/TH.o )
[19 of 70] Compiling OpenCV.Internal.Core.Types.Size ( src/OpenCV/Internal/Core/Types/Size.hs, dist/build/OpenCV/Internal/Core/Types/Size.o )
[20 of 70] Compiling OpenCV.Internal.Core.Types.Size.TH ( src/OpenCV/Internal/Core/Types/Size/TH.hs, dist/build/OpenCV/Internal/Core/Types/Size/TH.o )
[21 of 70] Compiling OpenCV.Internal.Core.Types.Vec ( src/OpenCV/Internal/Core/Types/Vec.hs, dist/build/OpenCV/Internal/Core/Types/Vec.o )
[22 of 70] Compiling OpenCV.Internal.Core.Types.Vec.TH ( src/OpenCV/Internal/Core/Types/Vec/TH.hs, dist/build/OpenCV/Internal/Core/Types/Vec/TH.o )
[23 of 70] Compiling OpenCV.Internal.C.Inline ( src/OpenCV/Internal/C/Inline.hs, dist/build/OpenCV/Internal/C/Inline.o )
[24 of 70] Compiling OpenCV.Core.Types.Size ( src/OpenCV/Core/Types/Size.hs, dist/build/OpenCV/Core/Types/Size.o )
[25 of 70] Compiling OpenCV.Core.Types.Vec ( src/OpenCV/Core/Types/Vec.hs, dist/build/OpenCV/Core/Types/Vec.o )
[26 of 70] Compiling OpenCV.TypeLevel ( src/OpenCV/TypeLevel.hs, dist/build/OpenCV/TypeLevel.o )
[27 of 70] Compiling OpenCV.Internal.ImgProc.MiscImgTransform.TypeLevel ( src/OpenCV/Internal/ImgProc/MiscImgTransform/TypeLevel.hs, dist/build/OpenCV/Internal/ImgProc/MiscImgTransform/TypeLevel.o )
[28 of 70] Compiling OpenCV.Internal.ImgProc.MiscImgTransform.ColorCodes ( src/OpenCV/Internal/ImgProc/MiscImgTransform/ColorCodes.hs, dist/build/OpenCV/Internal/ImgProc/MiscImgTransform/ColorCodes.o )
[29 of 70] Compiling OpenCV.ImgProc.MiscImgTransform.ColorCodes ( src/OpenCV/ImgProc/MiscImgTransform/ColorCodes.hs, dist/build/OpenCV/ImgProc/MiscImgTransform/ColorCodes.o )
[30 of 70] Compiling OpenCV.Internal.Core.Types.Mat.Depth ( src/OpenCV/Internal/Core/Types/Mat/Depth.hs, dist/build/OpenCV/Internal/Core/Types/Mat/Depth.o )
[31 of 70] Compiling OpenCV.Internal.Exception ( src/OpenCV/Internal/Exception.hs, dist/build/OpenCV/Internal/Exception.o )
[32 of 70] Compiling OpenCV.Exception ( src/OpenCV/Exception.hs, dist/build/OpenCV/Exception.o )
[33 of 70] Compiling OpenCV.Internal.Core.Types.Mat.Marshal ( dist/build/OpenCV/Internal/Core/Types/Mat/Marshal.hs, dist/build/OpenCV/Internal/Core/Types/Mat/Marshal.o )
[34 of 70] Compiling OpenCV.Core.Types.Point ( src/OpenCV/Core/Types/Point.hs, dist/build/OpenCV/Core/Types/Point.o )
[35 of 70] Compiling OpenCV.Internal.Core.Types ( src/OpenCV/Internal/Core/Types.hs, dist/build/OpenCV/Internal/Core/Types.o )
[36 of 70] 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/1000/ghc26419_0/libghc_275.so: undefined symbol: inline_c_OpenCV_Internal_Exception_1_2402dbf3aea4f7f79392b71ed42618962a22e9aa

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

[39 of 70] Compiling OpenCV.Internal.Core.Types.Rect ( src/OpenCV/Internal/Core/Types/Rect.hs, dist/build/OpenCV/Internal/Core/Types/Rect.o )
[40 of 70] Compiling OpenCV.Internal.Core.Types.Rect.TH ( src/OpenCV/Internal/Core/Types/Rect/TH.hs, dist/build/OpenCV/Internal/Core/Types/Rect/TH.o )
[41 of 70] Compiling OpenCV.Core.Types.Rect ( src/OpenCV/Core/Types/Rect.hs, dist/build/OpenCV/Core/Types/Rect.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/1000/ghc26419_0/libghc_281.so: undefined symbol: inline_c_OpenCV_Core_Types_Point_19_5c3d561e8841e5271fd465bfb109504b1d56b3f6

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

[42 of 70] Compiling OpenCV.Core.Types.Matx ( src/OpenCV/Core/Types/Matx.hs, dist/build/OpenCV/Core/Types/Matx.o )
Trac metadata
Trac field Value
Version 8.0.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information