Hello! I'm having the same problem.
This is what "./configure" says:
Code:
checking for gluBuild2DMipmaps in -lGLU... no
configure: error: glu required
This is the related config.log section:
Code:
configure:5488: checking for gluBuild2DMipmaps in -lGLU
configure:5523: gcc -o conftest -g -O2 conftest.c -lGLU -lbz2 -lpng -ljpeg -lz -lsqlite3 >&5
/usr/bin/ld: cannot find -lGLU
collect2: ld returned 1 exit status
configure:5529: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "xmoto"
| #define VERSION "0.3.0"
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define XMOTO_LITTLE_ENDIAN 1
| #define HAVE_SQLITE3_H 1
| #define HAVE_LIBSQLITE3 1
| #define HAVE_LIBZ 1
| #define HAVE_LIBJPEG 1
| #define HAVE_LIBPNG 1
| #define HAVE_LIBBZ2 1
| /* end confdefs.h. */
|
| /* Override any GCC internal prototype to avoid an error.
| Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern "C"
| #endif
| char gluBuild2DMipmaps ();
| int
| main ()
| {
| return gluBuild2DMipmaps ();
| ;
| return 0;
| }
configure:5547: result: no
configure:5557: error: glu required
libGLU.so and libGLU.a are in /usr/X11R6/lib, and this path is in ld.so.conf.
"ldd libGLU.so" says:
Code:
ldd /usr/X11R6/lib/libGLU.so
linux-gate.so.1 => (0x40000000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x4008d000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x4009c000)
libGL.so.1 => /usr/X11R6/lib/libGL.so.1 (0x40166000)
libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x40206000)
libm.so.6 => /lib/libm.so.6 (0x402bd000)
libc.so.6 => /lib/libc.so.6 (0x402e0000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x403fd000)
libdl.so.2 => /lib/libdl.so.2 (0x40407000)
libpthread.so.0 => /lib/libpthread.so.0 (0x4040b000)
/lib/ld-linux.so.2 (0x80000000)
Now look at this:
Code:
root@simone-nb:/usr/X11R6/lib# gcc -lGLU
/usr/bin/ld: cannot find -lGLU
collect2: ld returned 1 exit status
Code:
root@simone-nb:/usr/X11R6/lib# gcc -L/usr/X11R6/lib -lGLU
/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../../crt1.o(.text+0x18): In function `_start':
../sysdeps/i386/elf/start.S:115: undefined reference to `main'
collect2: ld returned 1 exit status
It looks like "ld" doesn't look inside /usr/X11R6/lib...
This is my ld.so.conf:
Code:
/usr/X11R6/lib
/opt/kde/lib
/usr/i486-slackware-linux/lib
/usr/lib/qt/lib
/usr/lib
/usr/local/lib
(by the way, does order matter inside this file?)
Why does this happen?
I'll try and edit "configure" in order to explicitly pass the -L/usr/X11R6/lib argument to gcc, but i would like "ld" to do this automatically..!
Thanks!
(edit: i've set LDFLAGS=/usr/X11R6/lib, and "configure" works)