From: Brian P. <br...@va...> - 2001-05-23 16:47:56
|
"Sven M. Hallberg" wrote: > > On Wed, May 23, 2001 at 09:40:49AM -0600, Brian Paul wrote: > > > mkdir .libs > > > gcc -O -mcpu=k6 -mpreferred-stack-boundary=2 -malign-functions=4 > > > -fschedule-insns2 -fexpensive-optimizations -Wall -fomit-frame-pointer > > > -ffast-math -fexpensive-optimizations -fstrict-aliasing -malign-loops=2 > > > -malign-jumps=2 -malign-functions=2 -D_REENTRANT -DPTHREADS -o .libs/aaindex > > > aaindex.o ../src-glut/.libs/libglut.so -L../si-glu -L/usr/X11R6/lib -lSM > > > -lICE -lXmu -lXext -lXi -lX11 ../si-glu/.libs/libGLU.so -L../src -lGL > > > ../src/.libs/libGL.so -lSM -lICE -lXmu -lXext -lXi -lX11 -lpthread -lm > > > -Wl,--rpath -Wl,/opt/Mesa/lib > > > ../src-glut/.libs/libglut.so: undefined reference to > > > `glXBindChannelToWindowSGIX' > > > ../src-glut/.libs/libglut.so: undefined reference to > > > `glXCreateContextWithConfigSGIX' > > > ../src-glut/.libs/libglut.so: undefined reference to > > > `glXGetFBConfigAttribSGIX' > > > ../src-glut/.libs/libglut.so: undefined reference to > > > `glXQueryChannelDeltasSGIX'../src-glut/.libs/libglut.so: undefined reference > > > to `glXChannelRectSyncSGIX' > > > ../src-glut/.libs/libglut.so: undefined reference to `glXChannelRectSGIX' > > > ../src-glut/.libs/libglut.so: undefined reference to `glXQueryChannelRectSGIX' > > > ../src-glut/.libs/libglut.so: undefined reference to > > > `glXGetFBConfigFromVisualSGIX' > > > collect2: ld returned 1 exit status > > > make[2]: *** [aaindex] Error 1 > > > make[2]: Leaving directory `/opt/Mesa/book' > > > make[1]: *** [check-am] Error 2 > > > make[1]: Leaving directory `/opt/Mesa/book' > > > make: *** [check-recursive] Error 1 > > > > Those undefined functions are part of the SGIX_video_resize extension. > > They're referenced in src-glut/glut_vidresize.c. Mesa has stubs for > > these functions so I don't know why you're getting 'undefined reference'. > > Strange, this works fine for me, too. However, in my compilation command, the > order of the libraries is different, namely libGL.so comes before any others. > Maybe that's the cause. I wonder if Dieter has another older libGL somewhere on his system that doesn't have the video_resize functions. If that libGL is getting picked up instead of the local version that could explain things. > > Personally, compilation is failing for me on demos/osdemo because > > it's not getting linked with libOSMesa.so: > > > > gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../util -I./src/X86 -g -O2 -Wall > > -fomit-frame-pointer -ffast-math -fexpensive-optimizations -fstrict-aliasing > > -malign-loops=2 -malign-jumps=2 -malign-functions=2 -D_REENTRANT -DPTHREADS -c osdemo.c > > osdemo.c:179: warning: `write_ppm' defined but not used > > /bin/sh ../libtool --mode=link gcc -g -O2 -Wall -fomit-frame-pointer -ffast-math > > -fexpensive-optimizations -fstrict-aliasing -malign-loops=2 -malign-jumps=2 > > -malign-functions=2 -D_REENTRANT -DPTHREADS -o osdemo osdemo.o ../si-glu/libGLU.la > > -lglut ../src/libGL.la -lm > > gcc -g -O2 -Wall -fomit-frame-pointer -ffast-math -fexpensive-optimizations > > -fstrict-aliasing -malign-loops=2 -malign-jumps=2 -malign-functions=2 -D_REENTRANT > > -DPTHREADS -o .libs/osdemo osdemo.o ../si-glu/.libs/libGLU.so -L../src -lGL -lglut > > ../src/.libs/libGL.so -L/usr/X11R6/lib -lSM -lICE -lXmu -lXext -lXi -lX11 -lpthread -lm > > -Wl,--rpath -Wl,/tmp/Mesa/lib > > osdemo.o: In function `main': > > /home/brian/5/demos/osdemo.c:231: undefined reference to `OSMesaCreateContextExt' > > /home/brian/5/demos/osdemo.c:248: undefined reference to `OSMesaMakeCurrent' > > /home/brian/5/demos/osdemo.c:277: undefined reference to `OSMesaDestroyContext' > > collect2: ld returned 1 exit status > > Hm.. src/OSMesa/Makefile.am builds a convenience library, not a shared one. > Should this be different? What's a convenience library? There should be a libOSMesa.so library. Using the Makefile.X11 process, I'm making a libOSMesa.so.3.5.030500 The reason for this new, separate library has to do with XFree86. The XFree86 libGL knows nothing about the OSMesa interface. Instead, the OSMesa interface (and renderer) are a separate library. I want to do the same thing with stand-alone Mesa for consistancy. -Brian |