Hi, i'm getting an undefined reference to `atexit' when building xfree86-4.2.0-r9 -- (snip many thounsand lines of build output) -- installing in programs/xdpyinfo... make[3]: Entering directory `/mnt/oldgentoo/tmp/portage/xfree-4.2.0-r9/work/xc/programs/xdpyinfo' rm -f xdpyinfo gcc -o xdpyinfo -march=i686 -O3 -pipe -ansi -L../../exports/lib xdpyinfo.o -lXtst -lXi -lXIE -lXrender -lXinerama -lXxf86vm -lXxf86dga -lXxf86misc -lXext -lX11 -lm -Wl,-rpath-link,../../exports/lib ../../exports/lib/libXxf86dga.a(XF86DGA.o): In function `XF86DGAGetVideo': XF86DGA.o(.text+0xaac): undefined reference to `atexit' collect2: ld returned 1 exit status make[3]: *** [xdpyinfo] Error 1 make[3]: Leaving directory `/mnt/oldgentoo/tmp/portage/xfree-4.2.0-r9/work/xc/programs/xdpyinfo' make[2]: *** [install] Error 2 make[2]: Leaving directory `/mnt/oldgentoo/tmp/portage/xfree-4.2.0-r9/work/xc/programs' make[1]: *** [install] Error 2 make[1]: Leaving directory `/mnt/oldgentoo/tmp/portage/xfree-4.2.0-r9/work/xc' make: *** [install] Error 2 !!! ERROR: The ebuild did not complete successfully. !!! Function src_install, Line 2, Exitcode 2 !!! (no error message) !!! emerge aborting on /usr/portage/x11-base/xfree/xfree-4.2.0-r9.ebuild . (btw, the /mnt/oldgentoo/tmp/portage is my PORTAGE_TMPDIR)
Are you using gcc3?
This bug was due to invalid libraries on my machine, i had run strip on a few files in /lib and apparantly that wasn't such a good idea. Rebuilding gcc, glibc and a bunch of other libraries solved the problem.