This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: GCC >= 3 problems
- From: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
- To: "H . J . Lu" <hjl at lucon dot org>
- Cc: Steve Marotta <Stephen dot J dot Marotta at lmco dot com>, binutils at sources dot redhat dot com
- Date: Wed, 23 Jan 2002 18:43:45 +0100 (MET)
- Subject: Re: GCC >= 3 problems
- Organization: Technical University of Gdansk
- Reply-to: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
On Wed, 23 Jan 2002, H . J . Lu wrote:
> > I'm also running into another problem when it comes to compiling C code
> > using the Mesa 3D libraries. Here is the error I receive:
> >
> > /usr/lib/libglut.so: undefined reference to `atexit'
> > collect2: ld returned 1 exit status
> > make: *** [maze] Error 1
>
> If you use Linux and glibc 2.2, it can be caused by a linker bug. Which
> binutils are you using? My Linux binutils has a fix for that.
It may not necessarily be a linker bug. It's a result of crtendS.o
referencing atexit() in older versions of gcc. But there is no atexit()
in libc.so -- it's only defined in libc_nonshared.a (thus it may be pulled
in and provided by executables). A recompilation of libglut.so with the
new gcc should fix the problem.
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +