On ubuntu 18.04, cmake finds my installed OpenMP, the compilation goes well 
but linking stops with this error:
[ 80%] Linking CXX executable calibrate_lens_gui
[ 80%] Building CXX object 
src/hugin1/hugin/CMakeFiles/hugin.dir/CPImageCtrl.cpp.o
/usr/bin/ld: CMakeFiles/calibrate_lens_gui.dir/LensCalImageCtrl.cpp.o: 
undefined reference to symbol 
'GOMP_loop_nonmonotonic_guided_start@@GOMP_4.5'
//usr/lib/x86_64-linux-gnu/libgomp.so.1: error adding symbols: DSO missing 
from command line

*gcc*: 9.3.0 (Ubuntu 9.3.0-11ubuntu0~18.04.1)
*openMP* related installed libraries:
libopenmpi2/bionic,now 2.1.1-8 amd64 [installed,automatic]
libopenmpt-modplug1/bionic,now 0.3.6-1 amd64 [installed,automatic]
libopenmpt0/bionic,now 0.3.6-1 amd64 [installed,automatic]
openmpi-bin/bionic,now 2.1.1-8 amd64 [installed,automatic]
openmpi-common/bionic,bionic,now 2.1.1-8 all [installed,automatic]
*cmake* options:
cmake -DENABLE_LAPACK=YES -DDISABLE_DPKG=ON -DCPACK_BINARY_NSIS:BOOL=OFF \
   -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF 
-DCPACK_BINARY_TBZ2:BOOL=OFF \
   -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF 
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
   -DBUILD_HSI:BOOL=ON

The missing DSO issue has also been reported here:
https://groups.google.com/g/hugin-ptx/c/OY2Js9XAFT4/m/ZrERmT80CgAJ 
An answer in the same thread states that the missing DSO error arises 
because "the order of the file names in the linker's command line is wrong".
Having used cmake, and executed the Makefile created by that very cmake, I 
have no (easy) way to modify the order of the file names in the linker's 
command.

Could the problem come from the version of gcc, or openMP?
Should I set a particular C++ standard (and which one)?
 Is this a bug in the CMakeLists.txt and the corresponding generated 
Makefile, or should particular options be set in cmake?

In order for hugin to build, I have commented out the findOpenMP and 
related compiler linking flags in the CMakeLists.txt. I can run hugin all 
right but without parallel support.

Thanks for any help,

Ludo

-- 
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
--- 
You received this message because you are subscribed to the Google Groups 
"hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/547aca64-525f-4129-b273-9c0e3635e28bn%40googlegroups.com.

Reply via email to