Bug 381766

Summary: Problem compiling digikam from GIT repository
Product: [Applications] digikam Reporter: Christopher Tanner <christann404>
Component: Portability-CompilationAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles
Priority: NOR    
Version: 5.6.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.7.0
Sentry Crash Report:
Attachments: bug report file

Description Christopher Tanner 2017-06-28 16:18:02 UTC
Created attachment 106358 [details]
bug report file

When I try to compile digikam obtained from the git repository I get the following:
Scanning dependencies of target digikamcore
[ 86%] Building CXX object core/app/CMakeFiles/digikamcore.dir/digikamcore_autogen/moc_compilation.cpp.o
[ 86%] Building CXX object core/app/CMakeFiles/digikamcore.dir/utils/digikam_debug.cpp.o
[ 86%] Linking CXX shared library libdigikamcore.so
/usr/bin/ld: warning: ../libs/rawengine/libraw/liblibraw.a(demosaic_packs.cpp.o): multiple common of '.gomp_critical_user_.var'
/usr/bin/ld: ../libs/rawengine/libraw/liblibraw.a(libraw_cxx.cpp.o): previous definition here
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/src/libraw_xtrans_compressed.cpp:130: error: undefined reference to '__kmpc_global_thread_num'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/src/libraw_xtrans_compressed.cpp:136: error: undefined reference to '__kmpc_critical'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/src/libraw_xtrans_compressed.cpp:151: error: undefined reference to '__kmpc_end_critical'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/src/libraw_xtrans_compressed.cpp:151: error: undefined reference to '__kmpc_end_critical'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/src/libraw_xtrans_compressed.cpp:744: error: undefined reference to '__kmpc_fork_call'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/src/libraw_xtrans_compressed.cpp:746: error: undefined reference to '__kmpc_for_static_init_4'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/src/libraw_xtrans_compressed.cpp:744: error: undefined reference to '__kmpc_for_static_fini'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/src/libraw_cxx.cpp:2938: error: undefined reference to '__kmpc_fork_call'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/src/libraw_cxx.cpp:2940: error: undefined reference to '__kmpc_for_static_init_4'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/src/libraw_cxx.cpp:2969: error: undefined reference to '__kmpc_critical'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/src/libraw_cxx.cpp:2974: error: undefined reference to '__kmpc_end_critical'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/src/libraw_cxx.cpp:2938: error: undefined reference to '__kmpc_for_static_fini'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/src/libraw_cxx.cpp:2984: error: undefined reference to '__kmpc_fork_call'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/src/libraw_cxx.cpp:2986: error: undefined reference to '__kmpc_for_static_init_4'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/src/libraw_cxx.cpp:3004: error: undefined reference to '__kmpc_critical'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/src/libraw_cxx.cpp:3009: error: undefined reference to '__kmpc_end_critical'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/src/libraw_cxx.cpp:2984: error: undefined reference to '__kmpc_for_static_fini'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/internal/dcraw_common.cpp:4288: error: undefined reference to '__kmpc_fork_call'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/internal/dcraw_common.cpp:4294: error: undefined reference to '__kmpc_for_static_init_4'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/internal/dcraw_common.cpp:4294: error: undefined reference to '__kmpc_for_static_fini'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/internal/dcraw_common.cpp:4294: error: undefined reference to '__kmpc_barrier'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/internal/dcraw_common.cpp:4301: error: undefined reference to '__kmpc_barrier'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/internal/dcraw_common.cpp:4309: error: undefined reference to '__kmpc_barrier'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/internal/dcraw_common.cpp:4318: error: undefined reference to '__kmpc_barrier'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/internal/dcraw_common.cpp:5425: error: undefined reference to '__kmpc_dispatch_init_4'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/internal/dcraw_common.cpp:5425: error: undefined reference to '__kmpc_dispatch_next_4'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/internal/dcraw_common.cpp:5431: error: undefined reference to 'omp_get_thread_num'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/internal/dcraw_common.cpp:5425: error: undefined reference to '__kmpc_dispatch_next_4'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/internal/./dht_demosaic.cpp:234: error: undefined reference to '__kmpc_dispatch_init_4'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/internal/./dht_demosaic.cpp:234: error: undefined reference to '__kmpc_dispatch_next_4'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/internal/./dht_demosaic.cpp:234: error: undefined reference to '__kmpc_dispatch_next_4'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/internal/./dht_demosaic.cpp:353: error: undefined reference to '__kmpc_dispatch_init_8'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/internal/./dht_demosaic.cpp:0: error: undefined reference to '__kmpc_dispatch_next_8'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/internal/./dht_demosaic.cpp:370: error: undefined reference to '__kmpc_dispatch_init_4'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/internal/./dht_demosaic.cpp:388: error: undefined reference to '__kmpc_dispatch_init_4'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/internal/./dht_demosaic.cpp:810: error: undefined reference to '__kmpc_global_thread_num'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/internal/./dht_demosaic.cpp:840: error: undefined reference to '__kmpc_dispatch_init_8'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/internal/./dht_demosaic.cpp:840: error: undefined reference to '__kmpc_dispatch_next_8'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/internal/./dht_demosaic.cpp:840: error: undefined reference to '__kmpc_dispatch_next_8'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/internal/./dht_demosaic.cpp:0: error: undefined reference to '__kmpc_global_thread_num'
/home/christanner/Work/Photos/dk/core/libs/rawengine/libraw/demosaic-pack-GPL3/cfa_linedn_new.c:129: error: undefined reference to '__kmpc_critical'
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [core/app/CMakeFiles/digikamcore.dir/build.make:1490: core/app/libdigikamcore.so.5.7.0] Error 1
make[1]: *** [CMakeFiles/Makefile2:13073: core/app/CMakeFiles/digikamcore.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
Comment 1 caulier.gilles 2017-06-28 16:31:50 UTC
Problem come from your linker with libgomp :

../libs/rawengine/libraw/liblibraw.a(demosaic_packs.cpp.o): multiple common of
'.gomp_critical_user_.var'

Typically, at linking time, it found 2 symbols from this library. 

Check your system

Gilles Caulier
Comment 2 Christopher Tanner 2017-06-28 17:21:36 UTC
Thanks Gilles. I was compiling with clang which I think has its own built-in version of libgomp. I switched to compiling with gcc and it works. 

This bug can be closed.