OH, I'm stupid, must have sent that before the coffee this morning. It's not 
-ldl, it's -lpthread, right?

Hang on, different fix. Forget what I said before, instead try this:


--- a/src/cmake/modules/FindOpenEXR.cmake
+++ b/src/cmake/modules/FindOpenEXR.cmake
@@ -87,6 +87,11 @@ find_library (OPENEXR_HALF_LIBRARY 
${OPENEXR_CUSTOM_LIB_PREFIX}Half
               PATHS ${GENERIC_LIBRARY_PATHS} NO_DEFAULT_PATH)
 find_library (OPENEXR_HALF_LIBRARY ${OPENEXR_CUSTOM_LIB_PREFIX}Half)

+# Link with pthreads if required
+find_package (Threads)
+if (CMAKE_USE_PTHREADS_INIT)
+    set (ILMBASE_PTHREADS ${CMAKE_THREAD_LIBS_INIT})
+endif ()

 # Set the FOUND, INCLUDE_DIR, and LIBRARIES variables.
 if (ILMBASE_INCLUDE_PATH AND OPENEXR_INCLUDE_PATH AND
@@ -96,7 +101,7 @@ if (ILMBASE_INCLUDE_PATH AND OPENEXR_INCLUDE_PATH AND
     set (ILMBASE_FOUND TRUE)
     set (ILMBASE_INCLUDE_DIR ${ILMBASE_INCLUDE_PATH} CACHE STRING "The include 
paths needed to use IlmBase")
     set (OPENEXR_INCLUDE_DIR ${OPENEXR_INCLUDE_PATH} CACHE STRING "The include 
paths needed to use OpenEXR")
-    set (ILMBASE_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_IEX_LIBRARY} 
${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} CACHE STRING "The 
libraries needed to use IlmBase")
+    set (ILMBASE_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_IEX_LIBRARY} 
${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${ILMBASE_PTHREADS} CACHE 
STRING "The libraries needed to use IlmBase")
     set (OPENEXR_LIBRARIES ${OPENEXR_ILMIMF_LIBRARY} ${ILMBASE_LIBRARIES} 
${ZLIB_LIBRARY} CACHE STRING "The libraries needed to use OpenEXR")
 endif ()



> On Mar 1, 2016, at 1:55 PM, Richard Shaw <[email protected]> wrote:
> 
> Hmm... Not quite. I went into the build directory and grepped after running 
> cmake but it doesn't look right:
> 
> Checking for -lpthread...
> 
> [build@hobbes linux]$ grep -r "\-lpthread" .
> ./CMakeCache.txt:_FFMPEG_AVCODEC_STATIC_LDFLAGS:INTERNAL=-L/usr//usr/lib64;-lavcodec;-lXv;-lX11;-lXext;-ldl;-lva;-lva-x11;-lva;-lxcb;-lxcb-shm;-lxcb;-lxcb-xfixes;-lxcb-render;-lxcb-shape;-lxcb;-lxcb-shape;-lxcb;-lX11;-lcdio_paranoia;-lcdio_cdda;-lcdio;-lasound;-lSDL;-lpthread;-ldc1394;-lnettle;-lhogweed;-lgmp;-lGL;-lOpenCL;-lopenal;-lxvidcore;-lx265;-lx264;-lwebp;-lvpx;-lvorbisenc;-lvorbis;-logg;-lvo-amrwbenc;-lvo-aacenc;-lv4l2;-ltwolame;-ltheoraenc;-ltheoradec;-logg;-lspeex;-lssh;-lsoxr;-lschroedinger-1.0;-lrtmp;-lz;-lgmp;-lgnutls;-lhogweed;-lnettle;-lpulse;-lopus;-lopenjpeg;-DOPJ_STATIC;-lopenh264;-lopencore-amrwb;-lopencore-amrnb;-lmp3lame;-lmfx;-lstdc++;-ldl;-lva-drm;-lva;-lva-x11;-lva;-lgsm;-lfribidi;-lfreetype;-lfontconfig;-lfreetype;-lfdk-aac;-lfaac;-lbluray;-lass;-laacplus;-lgnutls;-lm;-lbz2;-lz;-pthread;-lswresample;-lm;-lavutil;-lm
> ./CMakeCache.txt:_FFMPEG_AVFORMAT_STATIC_LDFLAGS:INTERNAL=-L/usr//usr/lib64;-lavformat;-lXv;-lX11;-lXext;-ldl;-lva;-lva-x11;-lva;-lxcb;-lxcb-shm;-lxcb;-lxcb-xfixes;-lxcb-render;-lxcb-shape;-lxcb;-lxcb-shape;-lxcb;-lX11;-lcdio_paranoia;-lcdio_cdda;-lcdio;-lasound;-lSDL;-lpthread;-ldc1394;-lnettle;-lhogweed;-lgmp;-lGL;-lOpenCL;-lopenal;-lxvidcore;-lx265;-lx264;-lwebp;-lvpx;-lvorbisenc;-lvorbis;-logg;-lvo-amrwbenc;-lvo-aacenc;-lv4l2;-ltwolame;-ltheoraenc;-ltheoradec;-logg;-lspeex;-lssh;-lsoxr;-lschroedinger-1.0;-lrtmp;-lz;-lgmp;-lgnutls;-lhogweed;-lnettle;-lpulse;-lopus;-lopenjpeg;-DOPJ_STATIC;-lopenh264;-lopencore-amrwb;-lopencore-amrnb;-lmp3lame;-lmfx;-lstdc++;-ldl;-lva-drm;-lva;-lva-x11;-lva;-lgsm;-lfribidi;-lfreetype;-lfontconfig;-lfreetype;-lfdk-aac;-lfaac;-lbluray;-lass;-laacplus;-lgnutls;-lm;-lbz2;-lz;-pthread;-lavcodec;-lXv;-lX11;-lXext;-ldl;-lva;-lva-x11;-lva;-lxcb;-lxcb-shm;-lxcb;-lxcb-xfixes;-lxcb-render;-lxcb-shape;-lxcb;-lxcb-shape;-lxcb;-lX11;-lcdio_paranoia;-lcdio_cdda;-lcdio;-lasound;-lSDL;-lpthread;-ldc1394;-lnettle;-lhogweed;-lgmp;-lGL;-lOpenCL;-lopenal;-lxvidcore;-lx265;-lx264;-lwebp;-lvpx;-lvorbisenc;-lvorbis;-logg;-lvo-amrwbenc;-lvo-aacenc;-lv4l2;-ltwolame;-ltheoraenc;-ltheoradec;-logg;-lspeex;-lssh;-lsoxr;-lschroedinger-1.0;-lrtmp;-lz;-lgmp;-lgnutls;-lhogweed;-lnettle;-lpulse;-lopus;-lopenjpeg;-DOPJ_STATIC;-lopenh264;-lopencore-amrwb;-lopencore-amrnb;-lmp3lame;-lmfx;-lstdc++;-ldl;-lva-drm;-lva;-lva-x11;-lva;-lgsm;-lfribidi;-lfreetype;-lfontconfig;-lfreetype;-lfdk-aac;-lfaac;-lbluray;-lass;-laacplus;-lgnutls;-lm;-lbz2;-lz;-pthread;-lswresample;-lm;-lavutil;-lm
> 
> Checking for CMAKE_DL_LIBS being defined:
> 
> [build@hobbes linux]$ grep -r "CMAKE_DL_LIBS" .
> [build@hobbes linux]$
> 
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

--
Larry Gritz
[email protected]


_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to