Linking error with OpenMP support (hugin 2021.0.0): missing DSO / libgomp.so

345 views
Skip to first unread message

Ludo

unread,
Mar 3, 2022, 2:03:50 AM3/3/22
to hugin and other free panoramic software
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:
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

T. Modes

unread,
Mar 3, 2022, 11:16:18 AM3/3/22
to hugin and other free panoramic software
Hi Ludo,

Ludo schrieb am Donnerstag, 3. März 2022 um 08:03:50 UTC+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]

These packages are not related with OpenMP. These are other libraries.
On Ubuntu OpenMP is in the package libgomp1 (https://packages.ubuntu.com/bionic/libgomp1 )

If installing this package does not help, please attach the complete log and not only the last error. There should be more diagnostic output which OpenMP libraries are found.

Thomas
Reply all
Reply to author
Forward
0 new messages