dice icon indicating copy to clipboard operation
dice copied to clipboard

Build error on Ubuntu 21.04

Open Nidish96 opened this issue 4 years ago • 6 comments

I'm unable to build DICe on Ubuntu 21.04. Here's the exact error I'm getting: `[ 4%] Completed 'hypercine'

[ 6%] Built target hypercine [ 7%] Building CXX object src/ioutils/CMakeFiles/diceioutils.dir/DICe_ImageIO.cpp.o /home/nidish/Software/DICe/dice/src/ioutils/DICe_ImageIO.cpp: In function ‘void DICe::utils::undistort_intensities(DICe::int_t, DICe::int_t, S*, const Teuchos::RCPTeuchos::ParameterList&)’: /home/nidish/Software/DICe/dice/src/ioutils/DICe_ImageIO.cpp:534:7: error: ‘undistort’ is not a member of ‘cv’ 534 | cv::undistort(img,out_img,intrinsics,dist_coeffs); | ^~~~~~~~~ make[2]: *** [src/ioutils/CMakeFiles/diceioutils.dir/build.make:82: src/ioutils/CMakeFiles/diceioutils.dir/DICe_ImageIO.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:540: src/ioutils/CMakeFiles/diceioutils.dir/all] Error 2 make: *** [Makefile:149: all] Error 2`

I setup Cmake with cmake -DCMAKE_INSTALL_PREFIX=${HOME}/mysw ... I installed opencv directly from apt; I have libopencv version 4.5.1.

Here's the cmake log : cmakebuild.log Here's the make log (I used make -j4) : makelog.log

This is probably an issue with the version of opencv but I hope this can be fixed so I can build dice on my machine.

Thank You

Nidish96 avatar Sep 15 '21 20:09 Nidish96

You might have to build against OpenCV v 3. It looks like support for undistort was depricated with version 4.

dicengine avatar Sep 15 '21 22:09 dicengine

Well, undistort is still available in "opencv2/calib3d.hpp" .

I was facing problems building opencv v3 too... Would it be possible for you to publish pre-built packages for Linux just like you do for Windows & Mac OS ? That would be very helpful.

Thank You!

Nidish96 avatar Sep 15 '21 22:09 Nidish96

I'm having issues as well on both fronts following the build guide - compiling cv2 3.2.0 doesn't appear to work with current CUDA versions (11.2). It's probably a bigger ask than I realize, but is there any chance we can get binaries distributed via apt-get?

Really appreciate your work, thank you!

J-C-Haley avatar Sep 16 '21 22:09 J-C-Haley

Unfortunately binary installers for linux is not on the current development priority list, but it's helpful to know that people are interested in this. We'll do some scoping to see how hard this would be.

dicengine avatar Sep 16 '21 22:09 dicengine

Following up on this - undistort is still supported in current cv (4.5.3). I can confirm its callable in 4.4.0 in python, and it imports and builds in DICe_ImageIO.cpp if I add #include <opencv2/opencv.hpp>. Still having other build issues, if I get it fully running and there's no other issues with current cv I can put in a merge request.

J-C-Haley avatar Sep 17 '21 12:09 J-C-Haley

Following up on this - undistort is still supported in current cv (4.5.3). I can confirm its callable in 4.4.0 in python, and it imports and builds in DICe_ImageIO.cpp if I add #include <opencv2/opencv.hpp>. Still having other build issues, if I get it fully running and there's no other issues with current cv I can put in a merge request.

Any luck on this?

Nidish96 avatar Oct 13 '21 18:10 Nidish96