[Digikam-devel]  [Bug 257329] New: build fails - openmp flags
    tropikhajma 
    tropikhajma at gmail.com
       
    Fri Nov 19 14:55:09 GMT 2010
    
    
  
https://bugs.kde.org/show_bug.cgi?id=257329
           Summary: build fails - openmp flags
           Product: digikam
           Version: unspecified
          Platform: Compiled Sources
        OS/Version: Solaris
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: libkdcraw
        AssignedTo: digikam-devel at kde.org
        ReportedBy: tropikhajma at gmail.com
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
-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
    
    
More information about the Digikam-devel
mailing list