x86_64-pc-linux-gnu-g++ -O2 -march=athlon64 -pipe -Wall -W -Wpointer-arith -Wcast-qual -Wcast-align -Woverloaded-virtual -Wconversion -Wshadow -o fillets Application.o GameAgent.o main.o ../menu/libmenu.a ../level/liblevel.a ../state/libstate.a ../option/liboption.a ../plan/libplan.a ../widget/libwidget.a ../effect/libeffect.a ../gengine/libgengine.a ../SDL_gfx/libSDL_gfx.a -lSDL_ttf -lSDL_image -lSDL_mixer -lSDL -lpthread -L/usr -llua -llualib -L/usr/local/lib -lm ../gengine/libgengine.a(SysVideo.o): In function `SysVideo::setCaption(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': SysVideo.cpp:(.text+0xba): undefined reference to `Xutf8TextListToTextProperty' SysVideo.cpp:(.text+0x1ce): undefined reference to `XSetWMName' SysVideo.cpp:(.text+0x1d8): undefined reference to `XFree' collect2: ld returned 1 exit status and here's the emerge --info Portage 2.1_rc3-r1 (default-linux/amd64/2006.0, gcc-4.1.1, glibc-2.4-r3, 2.6.15-gentoo-r5 x86_64) ================================================================= System uname: 2.6.15-gentoo-r5 x86_64 AMD Athlon(tm) 64 Processor 3200+ Gentoo Base System version 1.12.0 dev-lang/python: 2.3.5, 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=athlon64 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-O2 -march=athlon64 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks fixpackages metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X a52 aac acl acpi alsa arts bash-completion berkdb bitmap-fonts cairo cdr cli crypt cups dri dts dv dvd dvdr dvdread emboss encode esd exif fam ffmpeg foomaticdb fortran gif gstreamer gtk gtk2 ieee1394 imagemagick imlib ipv6 isdnlog jpeg lirc lzw lzw-tiff mad matroska mime mp3 mpeg musicbrainz mysql mythtv ncurses nls nptl nptlonly nvidia ogg oggvorbis opengl oss pam pcre pdflib perl png postgres pppd python qt quicktime readline reflection sdl session spell spl ssl subversion tcpd tetex theora tiff transcode truetype-fonts type1-fonts ukcid usb v4l vcd vorbis x264 xine xorg xosd xpm xv xvid xvmc zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux userland_GNU video_cards_nvidia" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
This works for me. Please follow the GCC Upgrading guide and see if you can still reproduce the problem. http://www.gentoo.org/doc/en/gcc-upgrading.xml