[GRASSLIST:4723] Re: opengl compile problem

Eric G. Miller egm2 at jps.net
Sun Oct 13 23:43:34 EDT 2002


On Sun, Oct 13, 2002 at 09:08:16PM -0600, Richard Greenwood wrote:
[snip]
> Thanks for the ideas, I see where you are going. Here's what I have found:
> For 1, above, grep indicates that gluBeginCurve is present in libGLU.so
> For 2, above, I get:
> 
> [rich at Moab lib]$ ldd libGLU.so
>         libGL.so.1 => /usr/X11R6/lib/libGL.so.1 (0x4009c000)
>         libc.so.6 => /lib/i686/libc.so.6 (0x4011b000)
>         libpthread.so.0 => /lib/i686/libpthread.so.0 (0x4023b000)
>         libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x4024f000)
>         libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x4025f000)
>         libdl.so.2 => /lib/libdl.so.2 (0x4032a000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

Hmm, I thought libGLU was supposed to be independent of X...

$ ldd /usr/lib/libGLU.so
	libc.so.6 => /lib/libc.so.6 (0x40020000)
	/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

That is mesa 3, though...

> My original lib directive was:
>         --with-opengl-libs='/usr/lib /usr/X11R6/lib'
> So I added /lib/i686 and /lib, but unfortunately, I am getting exactly the 
> same error:
>         checking for location of OpenGL library...
>         checking for glBegin in -lGL... yes
>         checking for gluBeginCurve in -lGLU... no
>         configure: error: *** Unable to locate GLU library.
> 
> Any other suggestions?

The configure directive will need -L/<paths> for each of the paths *and*
-l<lib> for each library.  The test probably creates something like:

int main (void) {
    int gluBeginCurve();
    gluBeginCurve();
}

And needs something like:

$ cc -o configtest configtest.c -L/usr/X11R6/lib -L/lib/i686 -lGL \
   -lpthread -lXext -lX11 -ldl

There's not really any way to make that happen without hacking the
configure script to get the additional -l<lib> arguments...

-- 
static const char copyright[] = 
	"Copyright (c) 2002 Eric G. Miller <egm2 at jps.net>";



More information about the grass-user mailing list