idiap / multicamera-calibration

Multi-Camera Calibration Suite
GNU General Public License v3.0
184 stars 50 forks source link

Error when building the project (libgomp.so.1) #4

Closed mg515 closed 6 years ago

mg515 commented 6 years ago

Hi. I'm trying to build the project, but run into error when calling 'make'. This is the output:

[ 33%] Linking CXX executable ../bin/bundle_adjuster /usr/bin/x86_64-linux-gnu-ld: CMakeFiles/bundle_adjuster.dir/main.cpp.o: undefined reference to symbol 'omp_get_max_threads@@OMP_1.0' //usr/lib/x86_64-linux-gnu/libgomp.so.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status src/CMakeFiles/bundle_adjuster.dir/build.make:139: recipe for target 'bin/bundle_adjuster' failed make[2]: *** [bin/bundle_adjuster] Error 1 CMakeFiles/Makefile2:85: recipe for target 'src/CMakeFiles/bundle_adjuster.dir/all' failed make[1]: *** [src/CMakeFiles/bundle_adjuster.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2

Can you help me out here? All of the dependencies installed fine. After googling around, I suspect that libgomp1 does not get linked properly. What can I do about it?

SalimKayal commented 6 years ago

I found that -fopenmp is not added by cmake in the flags. I will investigate why. In the mean time just add manually the -fopenmp flag in CMAKE_CXX_FLAGS and it should build.

mg515 commented 6 years ago

Thanks for the fast response, that fixes it. :)

SalimKayal commented 6 years ago

https://github.com/idiap/multicamera-calibration/commit/3fb7aa7d230c71a9612cd096c899eadc8e186a19 fixes