I'm trying to build a minimalist Linux system with self-compiled
XFree86 4.0.2, Qt 2.3.0, Mesa3.4.1, and KDE 2.1.1, using GCC 2.95.3,
which I also compiled myself. I may be making things unnecessarily
hard for myself by doing this, but I've learned more in the past four
days about this stuff than I did the whole past year I've been using
First I built GCC 2.95.3 from RedHat's rpm distribution of the
unofficial GCC 2.96, then removed 2.96. Next I built XFree86, despite
the warnings about GNU ld and as not being supported. I have the
binary distributions anyway if I need them, so I'm not too worried
about X. I compiled and installed Mesa next, putting the libraries
directly into /usr/lib and the headers directly into /usr/include/GL.
When I went to build Qt, the configure script found the right
libraries and such, and the build goes fine up to the tutorials
directory, where the following occurs:
make: Entering directory `/usr/local/qt-2.3.0/tutorial/t1'
g++ -c -I/usr/local/qt/include -pipe -O2 -o main.o main.cpp
g++ -L/usr/local/qt/lib -Wl,-rpath,/usr/local/qt/lib -o ./t1 main.o
/usr/lib/libGLU.so.1: undefined reference to `atexit'
collect2: ld returned 1 exit status
make: *** [t1] Error 1
I know what the atexit function does, but the fact that production
code doesn't compile here means that I have done something wrong, and
I am completely clueless as to where I could have screwed this up.
Could someone pick this error apart for me and explain exactly what ld
is complaining about? Is it not finding libGLU.so.1? I ran ldconfig...
Is atexit supposed to be supplied by another library that never got
compiled? Haven't tried any other builds to see... Or is atexit
actually supplied by libGLU.so.1 and it just got configured wrong when
it was compiled?