I have tested with GCC-3.4.5 and it works there, but with gcc-4.0.2-r3 it fails and has a _crazy_ amount of warnings. This failure appears to be due to an invalid lvalue in assignment: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../src/include -I/usr/include/freetype2 -pipe -O2 -march=k8 -I/usr/include/SDL -D_REENTRANT -pipe -O2 -march=k8 -c directfb_driver.c sdl_driver.c: In function 'sdl_init_specific': sdl_driver.c:174: warning: passing argument 4 of '_SCI_MALLOC' discards qualifiers from pointer target type sdl_driver.c:174: error: invalid lvalue in assignment sdl_driver.c: In function 'sdl_create_cursor_rawdata': sdl_driver.c:862: warning: passing argument 5 of '_SCI_CALLOC' discards qualifiers from pointer target type xlib_driver.c: In function 'xlib_init_specific': xlib_driver.c:312: warning: passing argument 4 of '_SCI_MALLOC' discards qualifiers from pointer target type xlib_driver.c:312: error: invalid lvalue in assignment xlib_driver.c:462: warning: passing argument 4 of '_SCI_MALLOC' discards qualifiers from pointer target type xlib_driver.c:553: warning: passing argument 4 of '_SCI_MALLOC' discards qualifiers from pointer target type xlib_driver.c:603: warning: passing argument 4 of '_SCI_FREE' discards qualifiers from pointer target type make[4]: *** [sdl_driver.o] Error 1 make[4]: *** Waiting for unfinished jobs.... xlib_driver.c: In function 'xlib_exit': xlib_driver.c:737: warning: passing argument 4 of '_SCI_FREE' discards qualifiers from pointer target type xlib_driver.c:751: warning: passing argument 4 of '_SCI_FREE' discards qualifiers from pointer target type xlib_driver.c:752: error: invalid lvalue in assignment xlib_driver.c: In function 'xlib_grab_pixmap': xlib_driver.c:956: warning: passing argument 4 of '_SCI_FREE' discards qualifiers from pointer target type xlib_driver.c: In function 'xlib_create_cursor_data': xlib_driver.c:1033: warning: passing argument 5 of '_SCI_CALLOC' discards qualifiers from pointer target type xlib_driver.c: In function 'xlib_set_pointer': xlib_driver.c:1078: warning: passing argument 4 of '_SCI_FREE' discards qualifiers from pointer target type xlib_driver.c:1115: warning: passing argument 4 of '_SCI_FREE' discards qualifiers from pointer target type xlib_driver.c:1116: warning: passing argument 4 of '_SCI_FREE' discards qualifiers from pointer target type make[4]: *** [xlib_driver.o] Error 1 make[4]: Leaving directory `/var/tmp/portage/freesci-0.6.1b/work/freesci-0.6.1b/src/gfx/drivers' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/var/tmp/portage/freesci-0.6.1b/work/freesci-0.6.1b/src/gfx' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/freesci-0.6.1b/work/freesci-0.6.1b/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/freesci-0.6.1b/work/freesci-0.6.1b' make: *** [all-recursive-am] Error 2 emerge --info: Portage 2.1_pre4-r1 (!/usr/portage/profiles/default-linux/amd64/2005.1, gcc-4.0.2, glibc-2.3.6-r2, 2.6.16-rc3 x86_64) ================================================================= System uname: 2.6.16-rc3 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ Gentoo Base System version 1.12.0_pre15 distcc[17606] (dcc_mkdir) ERROR: mkdir /var/tmp/portage/.distcc//state failed: No such file or directory [disabled] dev-lang/python: 2.3.5, 2.4.2-r1 sys-apps/sandbox: 1.2.17 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-r1 sys-devel/binutils: 2.16.1-r1 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="-pipe -O2 -march=k8" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-pipe -O2 -march=k8" DISTDIR="/usr/distfiles" FEATURES="autoconfig collision-protect digest distlocks nostrip sandbox sfperms strict userpriv" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/mnt/shapeshifter/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 64bit 7zip X a52 aac acpi aim alsa ao audiofile avi bash-completion berkdb bitmap-fonts bzip2 c++ cairo calendar cddb cdparanoia crypt css cups dbus debug dvd dvdr eds encode ext-png ext-zlib fam ffmpeg firefox flac foomaticdb fortran ftp gcj gdb gif glut glx gmail gpm grammar gstreamer gtalk gzip hal id3 image imlib imlib2 input_devices_keyboard input_devices_mouse java javascript joystick jpeg jpeg2k kde lame libsamplerate linuxkeys linuxthreads-tls live lzw lzw-tiff mmap mouse mozilla mozsvg mp3 mpeg mpeg2 mplayer ncurses net nforce2 nfs nntp no-old-linux nptl nptlonly nvidia objc offensive ogg opengl openssh oscar pam pdf pdflib perl png python qt quicktime rar readline real reiser4 reiserfs rss rtc scp screen sdl session smp sockets speedo speex spell ssl svg svgz symlink sysfs syslog szip t1lib theora threads tiff truetype truetype-fonts type1 type1-fonts udev unicode usb userlocales utf8 video_cards_nv video_cards_nvidia vim vim-with-x web wma wma123 wmf wordperfect xinerama xpm xrandr xscreensaver xv xvmc zip zlib elibc_glibc kernel_linux userland_GNU" Unset: ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG, LC_ALL, LDFLAGS, LINGUAS
It appears this bug can be fixed with a bump to 0.6.2, wfm.
confirm fixed in 0.6.2.
0.6.2 is in portage