Thread: [Plib-users] ./configure opengl problem
Brought to you by:
sjbaker
From: McEvoy, N. <nic...@ds...> - 2002-11-07 00:14:46
|
Ok so I decided to make the big switch from Windoze to Linux ! Its been something I've been wanting to do for ages ... so I decided to go with RedHat 8.0 ... well just because ... lets not get into a big discussion about this eh ! :) Now that I've made the switch I want to get back into my games development hobby with plib & ode. But I've hit a problem (already) trying to build plib-1.6.0 ! I have installed required software eg. opengl & glut3.7 ... but ./configure says "configure: error: could not find working GL library" ... whats going on ? (nb. I installed XFree86-devel ... the RPM says it provides Mesa-devel ... I seem to have all the right libraries) ----- my error ----- ./configure --with-GL=/usr <...snip...> checking for glNewList in -lGL... no checking for glNewList in -lMesaGL... no configure: error: could not find working GL library ----- config.log (lots cut out) ----- <...snip...> configure:2596: checking for glNewList in -lGL configure:2615: gcc -o conftest -g -O2 -I/usr/include -L/usr/lib -L/usr/X11R6/lib conftest.c -lGL -lSM -lICE -lXi -lXmu -lXext -lX11 -lm 1>&5 cc1: warning: changing search order for system directory "/usr/include" cc1: warning: as it has already been specified as a non-system directory /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: failed program was: #line 2604 "configure" <...snip...> configure:2644: checking for glNewList in -lMesaGL configure:2663: gcc -o conftest -g -O2 -I/usr/include -L/usr/lib -L/usr/X11R6/lib conftest.c -lMesaGL -lSM -lICE -lXi -lXmu -lXext -lX11 -lm 1>&5 cc1: warning: changing search order for system directory "/usr/include" cc1: warning: as it has already been specified as a non-system directory /usr/bin/ld: cannot find -lMesaGL collect2: ld returned 1 exit status configure: failed program was: #line 2652 "configure" <...snip...> -------------------- I have the following: /usr/include/GL/glext.h /usr/include/GL/gl.h /usr/include/GL/glu.h /usr/include/GL/GLwDrawA.h /usr/include/GL/GLwDrawAP.h /usr/include/GL/GLwMDrawA.h /usr/include/GL/GLwMDrawAP.h /usr/include/GL/glx.h /usr/include/GL/glxint.h /usr/include/GL/glxmd.h /usr/include/GL/glxproto.h /usr/include/GL/glxtokens.h /usr/include/GL/osmesa.h /usr/lib/libGLcore.so.1 /usr/lib/libGLcore.so.1.0.3123 /usr/lib/libGL.so.1 /usr/lib/libGL.so.1.0.3123 /usr/lib/libGLU.so /usr/lib/libGLU.so.1 /usr/lib/libglut.so.3 Any ideas ? Nick |
From: Steve B. <sjb...@ai...> - 2002-11-07 00:42:37
|
McEvoy, Nick wrote: > But I've hit a problem (already) trying to build plib-1.6.0 ! > > I have installed required software eg. opengl & glut3.7 ... but ./configure says "configure: error: could not find working GL library" ... whats going on ? > > (nb. I installed XFree86-devel ... the RPM says it provides Mesa-devel ... I seem to have all the right libraries) > ----- my error ----- > ./configure --with-GL=/usr ^^^^^^^^^^^^^^ Why this? > /usr/X11R6/lib/libGL.a(glthread.o): In function `_glthread_InitTSD': > glthread.o(.text+0x28): undefined reference to `pthread_key_create' It seems to be missing Pthreads (-lpthread) Some versions of Mesa need it - and are not pre-linked with it...so OpenGL applications under Linux are recommended to link to pthreads even if they don't explicitly need it. I've never seen this be a problem with ./configure though. Does a straight "./configure" without the "--with-GL=/usr" work? ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://web2.airmail.net/sjbaker1 Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net |
From: Sebastian U. <ud...@ha...> - 2002-11-07 12:35:08
|
On Thu, 7 Nov 2002, nic...@ds... (McEvoy, Nick) wrote: > Date: Thu, 7 Nov 2002 10:39:50 +1030 > To: "'pli...@li...'" > <pli...@li...> > From: nic...@ds... (McEvoy, Nick) > Reply-To: pli...@li... > Subject: [Plib-users] ./configure opengl problem > > Ok so I decided to make the big switch from Windoze to Linux ! Its been > something I've been wanting to do for ages ... so I decided to go with > RedHat 8.0 ... well just because ... lets not get into a big discussion > about this eh ! :) > > Now that I've made the switch I want to get back into my games > development hobby with plib & ode. > > But I've hit a problem (already) trying to build plib-1.6.0 ! [...] > ----- config.log (lots cut out) ----- > <...snip...> > configure:2596: checking for glNewList in -lGL > configure:2615: gcc -o conftest -g -O2 -I/usr/include -L/usr/lib > -L/usr/X11R6/lib conftest.c -lGL -lSM -lICE -lXi -lXmu -lXext -lX11 > -lm 1>&5 > cc1: warning: changing search order for system directory "/usr/include" > cc1: warning: as it has already been specified as a non-system > directory > /usr/X11R6/lib/libGL.a(glthread.o): In function `_glthread_InitTSD': > glthread.o(.text+0x28): undefined reference to `pthread_key_create' Known bug - the configure script does not link against the pthread library, which is necessary for certain Mesa versions. Didn't I intend to change that prior to the 1.6.0 release ? Hmm ... seems like I did not. Anyhow - for now, search for the following line in configure.in: AC_CHECK_LIB(GL, glNewList) .. and add this line prior to it: AC_CHECK_LIB(pthread, pthread_create) Then, while in the root of the plib source tree, run /autogen.sh and /configure (which should work flawlessly now). - Sebastian |