Version: unspecified (using Devel) OS: Solaris build of kdegraphics with the Sun Studio 12.1 compiler fails with ... Undefined first referenced symbol in file __mt_WorkSharing_cxt_ CMakeFiles/unprocessed_raw.dir/__/libraw/internal/dcraw_common.o __mt_get_next_chunk_invoke_mfunc_once_int_ CMakeFiles/unprocessed_raw.dir/__/libraw/internal/dcraw_common.o omp_get_thread_num CMakeFiles/unprocessed_raw.dir/__/libraw/internal/dcraw_common.o __mt_MasterFunction_cxt_ CMakeFiles/unprocessed_raw.dir/__/libraw/internal/dcraw_common.o ld: fatal: symbol referencing errors. No output written to unprocessed_raw (http://my.cdash.org/viewBuildError.php?buildid=116203) this is because Sun Studio uses different flags for OpenMP the below patch fixes it: Index: libs/libkdcraw/CMakeLists.txt =================================================================== --- libs/libkdcraw/CMakeLists.txt (revision 1198513) +++ libs/libkdcraw/CMakeLists.txt (working copy) @@ -106,9 +106,12 @@ IF(OPENMP_FOUND) ADD_DEFINITIONS(${OpenMP_CXX_FLAGS}) - IF(CMAKE_COMPILER_IS_GNUCXX) + IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL GNU ) SET(OPENMP_LDFLAGS "-lgomp") - ENDIF(CMAKE_COMPILER_IS_GNUCXX) + ENDIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL GNU ) + IF("${CMAKE_C_COMPILER_ID}" STREQUAL SunPro ) + SET(OPENMP_LDFLAGS "-xopenmp") + ENDIF("${CMAKE_C_COMPILER_ID}" STREQUAL SunPro ) ENDIF(OPENMP_FOUND) # Flag to debug LibRaw (the same failure in libs/libkdcraw/test/raw2png remains) Reproducible: Always
SVN commit 1199532 by cgilles: apply patch to compile fine libkdcraw with openmp under Solaris BUGS: 257329 M +5 -2 CMakeLists.txt WebSVN link: http://websvn.kde.org/?view=rev&revision=1199532
SVN commit 1199679 by cgilles: same similar patch need to be applied to ExpoBlending tool about openmp. CCBUGS: 257329 M +7 -3 CMakeLists.txt WebSVN link: http://websvn.kde.org/?view=rev&revision=1199679
SVN commit 1199681 by cgilles: do not handle openmp under macosx CCBUGS: 257329 M +2 -2 CMakeLists.txt WebSVN link: http://websvn.kde.org/?view=rev&revision=1199681
the below patch fixes the mentioned raw2png failure: --- libs/libkdcraw/test/CMakeLists.txt.orig 2010-11-30 20:49:46.096351324 +0100 +++ libs/libkdcraw/test/CMakeLists.txt 2010-11-30 20:50:45.080015887 +0100 @@ -30,7 +30,7 @@ SET(raw2png_SRCS raw2png.cpp) KDE4_ADD_EXECUTABLE(raw2png NOGUI ${raw2png_SRCS}) -TARGET_LINK_LIBRARIES(raw2png kdcraw ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY}) +TARGET_LINK_LIBRARIES(raw2png kdcraw ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${OPENMP_LDFLAGS} ) LIBKDCRAW_BUILD_TEST(simple_dcraw) LIBKDCRAW_BUILD_TEST(mem_image)
SVN commit 1202426 by cgilles: compile under Solaris with OpenMP CCBUGS: 257329 M +1 -1 CMakeLists.txt WebSVN link: http://websvn.kde.org/?view=rev&revision=1202426