You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ nix-build -A haskell.packages.ghc842.opencv
...
[76 of 77] Compiling OpenCV.Juicy ( src/OpenCV/Juicy.hs, dist/build/OpenCV/Juicy.p_o )
[77 of 77] Compiling OpenCV.VideoIO.VideoWriter ( src/OpenCV/VideoIO/VideoWriter.hs, dist/build/OpenCV/VideoIO/VideoWriter.p_o )
/nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/ld: cannot find -lm
/nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/ld: cannot find -lgcc_s
/nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/ld: cannot find -lc
/nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/ld: cannot find -lgcc_s
collect2: error: ld returned 1 exit status
The build succeeds if I run it manually:
$ nix-shell -A haskell.packages.ghc842.opencv.env
$ cd opencv
$ ghc --make Setup.hs
$ ./Setup configure --enable-tests
$ ./Setup build
$ ./Setup test
Running 2 test suites...
Test suite test-opencv: RUNNING...
Test suite test-opencv: PASS
Test suite logged to: dist/test/opencv-0.0.2.1-test-opencv.log
Test suite doc-images-opencv: RUNNING...
Test suite doc-images-opencv: PASS
Test suite logged to: dist/test/opencv-0.0.2.1-doc-images-opencv.log
2 of 2 test suites (2 of 2 test cases) passed.
The text was updated successfully, but these errors were encountered:
"cannot find -lm" is quite surprising, it's like it's trying to open -lm as a file. It would be nice to find out how ld is being invoked. Maybe write a wrapper script for ld?
@zimbatm Thanks, that's an excellent idea. In the process of implementing it I removed the --with-ld c++ override in Setup.hs and then the build suddenly succeeded.
Uh oh!
There was an error while loading. Please reload this page.
I get the following on the cabal-2.2 branch:
The build succeeds if I run it manually:
The text was updated successfully, but these errors were encountered: