Re: OpenEXR 1.6.1 build problem (Linux): "configure: error: Could not compile IlmBase test program"

Frank Thommen <[email protected]> Sun, 30 Aug 2009 19:14:22 +0200
Newsgroups gmane.comp.video.openexr.user
Message-ID <[email protected]>
Hi Ger,

thanks a lot

> Off the cuff, by only looking at the functions that are reported
> missing by the linker, my first guess would be that the configure
> script couldn't find a viable pthread library. This most probably
> happened to the ./configure for IlmBase as IlmThread wraps those, the
> effect becoming 'visible' once you compile&link OpenEXR itself..

There is  libpthread.so in /usr/lib and /usr/lib64.  I assume these 
should be found by configure ;-).  Setting LD_LIBRARY_PATH to /usr/lib64 
didn't help.


> Also, check to make sure IlmBase and OpenEXR are both build with
> '--enable-threading' turned on (this is the default).

I made sure by adding this option to my configure commands, but the 
error is still there.


> configure:20491: g++ -o conftest -g -O2
>> -I/usr/struct/pack/openexr-1.6/include/OpenEXR
>> -L/usr/struct/pack/openexr-1.6/lib -L/usr/lib64 -L/usr/local/lib conftest.cc
>>  -lImath -lHalf -lIex -lIlmThread >&5
>> /usr/struct/pack/openexr-1.6/lib/libIlmThread.so: undefined reference to
>> `sem_init'
>> /usr/struct/pack/openexr-1.6/lib/libIlmThread.so: undefined reference to
>> `sem_destroy'
>> /usr/struct/pack/openexr-1.6/lib/libIlmThread.so: undefined reference to
>> `pthread_create'
>> /usr/struct/pack/openexr-1.6/lib/libIlmThread.so: undefined reference to
>> `sem_post'
>> /usr/struct/pack/openexr-1.6/lib/libIlmThread.so: undefined reference to
>> `sem_trywait'
>> /usr/struct/pack/openexr-1.6/lib/libIlmThread.so: undefined reference to
>> `sem_getvalue'
>> /usr/struct/pack/openexr-1.6/lib/libIlmThread.so: undefined reference to
>> `sem_wait'
>> /usr/struct/pack/openexr-1.6/lib/libIlmThread.so: undefined reference to
>> `pthread_join'

I have no software development knowledge and therefore these error 
messages are somehow cryptic to me.  But I see, that libIlmThread.so 
does not refer (link?) to pthread.so at all:

openexr-1.6 > ldd ../../lib/libIlmThread.so
         libIex.so.6 => /usr/struct/pack/openexr-1.6/lib/libIex.so.6 
(0x00002ae626943000)
         libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00002ae626b60000)
         libm.so.6 => /lib64/libm.so.6 (0x00002ae626e80000)
         libc.so.6 => /lib64/libc.so.6 (0x00002ae627104000)
         libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002ae62745a000)
         /lib64/ld-linux-x86-64.so.2 (0x00000031e8c00000)
openexr-1.6 >


Could that be the problem and is there a way to fix it?


frank