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

Ofri Sadowsky ofri@cs.jhu.edu
Wed, 19 Mar 2003 10:02:10 -0500


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.

Luis Ibanez wrote:

> Interesting,...
>
> Without libfltk_gl.a,
>
> programs like ThinPlateSplines should not link....
>
> This doesn't seem to have changed in FLTK.
>
> In my build of FLTK 1.1.3 the library libfltk_gl.a
> is still created. And verifying with "nm -C" it is
> the only one, out of the four libraries, that contains
> the symbol "Fl_Gl_Window".
>
> There seems to be something very particular about
> your system...
>
> Is this a recent Linux ?
> Do you use Mesa to provide OpenGL functionalities ?
> Is the system file: Gl/gl.h   in a visible place ?
>
> You may want to double check the log generated by
> ./configure in the FLTK directory. It may have happend
> that it reported and error that prevents it from
> building the OpenGL related library.
>
> We have build FLTK in a variety of systems ranging
> from SGI, SUN, Windows, Linux and Mac.... the opengl
> library is created in all of them.
>
> Please let us know if you find any hints,
>
> Thanks
>
> Luis
>
> -----------------------------
>
> Ofri Sadowsky wrote:
> > I ran find -name "*libfltk*" on my root directory, and all I found was the
> > three libraries, without libfltk_gl.a . In fact, it seems that my fltk does not
> > build libfltk_gl.a at all, even when I write --with-gl .
> > It is funny that ITK does not complain when building about the absence of
> > libfltk_gl.
> >
> > Is it possible that they changed the library structure of fltk to include the
> > gl functionality somewhere else?
> >
> >
>
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users