[Insight-users] ITK build for Linux crashes : second thought

Luis Ibanez luis.ibanez@kitware.com
Wed, 19 Mar 2003 11:03:39 -0500


Hi Ofri,

It interesting to see that your libGL.a is linking
with "pthreads".

If this your personal machine ?
or do you depend on a systems administrator ?

Possible suspects

1) you don't have pthreads
2) you enabled --with-threads in ./configure
3) you have some PTHREADS related enviroment variable


Since this is not an ITK related issue,
we can just....

          wish you good luck !


Regards,


  Luis


------------------------
Ofri Sadowsky wrote:
> I do have read access to /usr/include/GL/gl.h .
> 
> I checked the log file fltk-1.1.3/config.log and it does report gl-related error:
> 
> <<BOQ>>
> configure:8312: gcc -o conftest  -I/usr/X11R6/include   -L/usr/X11R6/lib  conftest.c
> -lGL       -lm -lm  -lXext -lX11  >&5
> /usr/X11R6/lib/libGL.a(glxext.o): In function `__glXGetCurrentContext':
> glxext.o(.text+0x1f): undefined reference to `pthread_key_create'
> glxext.o(.text+0x3e): undefined reference to `pthread_getspecific'
> /usr/X11R6/lib/libGL.a(glxext.o): In function `__glXSetCurrentContext':
> glxext.o(.text+0x6f): undefined reference to `pthread_setspecific'
> glxext.o(.text+0x87): undefined reference to `pthread_key_create'
> /usr/X11R6/lib/libGL.a(glthread.o): In function `_glthread_InitTSD':
> glthread.o(.text+0x28): undefined reference to `pthread_key_create'
> /usr/X11R6/lib/libGL.a(glthread.o): In function `_glthread_GetTSD':
> glthread.o(.text+0x83): undefined reference to `pthread_getspecific'
> /usr/X11R6/lib/libGL.a(glthread.o): In function `_glthread_SetTSD':
> glthread.o(.text+0xc5): undefined reference to `pthread_setspecific'
> collect2: ld returned 1 exit status
> configure:8315: $? = 1
> configure: failed program was:
> #line 8286 "configure"
> #include "confdefs.h"
> 
> /* Override any gcc2 internal prototype to avoid an error.  */
> #ifdef __cplusplus
> extern "C"
> #endif
> /* We use char because int might match the return type of a gcc2
>    builtin and then its argument prototype would still apply.  */
> char glXMakeCurrent ();
> #ifdef F77_DUMMY_MAIN
> #  ifdef __cplusplus
>      extern "C"
> #  endif
>    int F77_DUMMY_MAIN() { return 1; }
> #endif
> int
> main ()
> {
> glXMakeCurrent ();
>   ;
>   return 0;
> }
> configure:8332: result: no
> configure:8341: checking for glXMakeCurrent in -lMesaGL
> configure:8375: gcc -o conftest  -I/usr/X11R6/include   -L/usr/X11R6/lib  conftest.c
> -lMesaGL    -lm -lm  -lXext -lX11  >&5
> /usr/bin/ld: cannot find -lMesaGL
> collect2: ld returned 1 exit status
> configure:8378: $? = 1
> configure: failed program was:
> #line 8349 "configure"
> #include "confdefs.h"
> 
> /* Override any gcc2 internal prototype to avoid an error.  */
> #ifdef __cplusplus
> extern "C"
> #endif
> /* We use char because int might match the return type of a gcc2
>    builtin and then its argument prototype would still apply.  */
> char glXMakeCurrent ();
> #ifdef F77_DUMMY_MAIN
> #  ifdef __cplusplus
>      extern "C"
> #  endif
>    int F77_DUMMY_MAIN() { return 1; }
> #endif
> int
> main ()
> {
> glXMakeCurrent ();
>   ;
>   return 0;
> }
> <<EOQ>>
> 
> I don't have libMesa installed at all,  but I do have /usr/X11R6/lib/libGL.a .
> However, the graphics-hw driver configuration on my computer is not complete yet,
> and that may lead to some problems.
> 
> I rebuilt the fltk-1.1.2 libraries, just to compare the results with fltk-1.1.3, and
> the same problem occurs there too. The funny thing is, everything used to work a few
> weeks ago, and I am not sure what has changed in my system.
> 
>