games-emulation/psemu-peopssoftgpu-1.16 fails with GCC 4.0 and 4.1 with this error: gcc -Wall -fPIC -O2 -march=prescott -fomit-frame-pointer -pipe -fno-ident -I/usr/local/include `gtk-config --cflags` -DUSE_XF86VM -c -o draw.o draw.c In file included from draw.c:96: gpu.h:66:27: warning: no newline at end of file In file included from draw.c:98: prim.h:33:23: warning: no newline at end of file In file included from draw.c:99: menu.h:36:23: warning: no newline at end of file In file included from cfg.c:114: gpu.h:66:27: warning: no newline at end of file gcc -Wall -fPIC -O2 -march=prescott -fomit-frame-pointer -pipe -fno-ident -I/usr/local/include `gtk-config --cflags` -DUSE_XF86VM -c -o fps.o fps.c In file included from /usr/include/X11/extensions/xf86vmode.h:39, from draw.c:3727: /usr/include/X11/Xmd.h:157: error: two or more data types in declaration specifiers /usr/include/X11/Xmd.h:157: error: two or more data types in declaration specifiers draw.c: In function 'CreateDisplay': draw.c:4093: warning: pointer targets in passing argument 6 of 'XCreateImage' differ in signedness draw.c: In function 'XStretchBlt16': draw.c:5032: error: invalid lvalue in increment make: *** [draw.o] Error 1 make: *** Waiting for unfinished jobs.... In file included from fps.c:42: gpu.h:66:27: warning: no newline at end of file In file included from gpu.c:125: gpu.h:66:27: warning: no newline at end of file In file included from gpu.c:128: prim.h:33:23: warning: no newline at end of file In file included from gpu.c:129: psemu.h:36:31: warning: no newline at end of file In file included from gpu.c:130: menu.h:36:23: warning: no newline at end of file !!! ERROR: games-emulation/psemu-peopssoftgpu-1.16 failed. !!! Function src_compile, Line 50, Exitcode 2 !!! x11 build failed GCC 3.4.5 and 3.3.6 succeed building. Portage 2.1_pre3-r1 (default-linux/x86/2005.1, gcc-4.1.0-beta20051230, glibc-2.3.6-r1, 2.6.15-rc7-ck1 i686) ================================================================= System uname: 2.6.15-rc7-ck1 i686 Mobile Intel(R) Pentium(R) 4 CPU 3.06GHz Gentoo Base System version 1.12.0_pre12 ccache version 2.4 [enabled] dev-lang/python: 2.4.2 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.91.0.5 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=prescott -fomit-frame-pointer -pipe -fno-ident" CHOST="i686-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/init.d /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=prescott -fomit-frame-pointer -pipe -fno-ident -fvisibility-inlines-hidden" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache digest distlocks parallel-fetch prelink sandbox sfperms splitdebug" GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo/" LDFLAGS="-Wl,-O1" LINGUAS="en_GB" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/home/dirtyepic/overlay" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X a52 aac acpi alsa arts audiofile avi bash-completion berkdb bitmap-fonts bzip2 cairo cdr crypt curl dbus dri dts dvd dvdr dvdread eds emboss encode exif expat fam ffmpeg firefox flac foomaticdb fortran gdbm gif glut gmp gnutls gtk gtk2 hal idn ieee1394 imagemagick imlib java jikes jpeg kde lcms libg++ libwww mad mmx mng mp3 mpeg mpi ncurses nsplugin ogg oggvorbis opengl pam pcmcia pcre pdflib perl pic png python qt quicktime readline ruby sdl sndfile spell sqlite sse ssl svg tcltk tcpd threads tiff truetype truetype-fonts type1-fonts udev usb vcd vorbis win32codecs xine xml xml2 xv xvid zlib elibc_glibc kernel_linux linguas_en_GB userland_GNU" Unset: ASFLAGS, CTARGET, LANG, LC_ALL
Created attachment 76279 [details, diff] psemu-peopssoftgpu-1.17-gcc41.patch This should solve gcc-4.1 issues in psemu-peopssoftgpu's side. It will still get stuck, however, in line 157 of /usr/include/X11/Xmd.h (x11-base/xorg-x11). Wiping line 157 out of that file will permit compilation. Note: I am runing =x11-base/xorg-x11-6.8.2-r6.
Created attachment 76280 [details, diff] psemu-peopssoftgpu-1.17.ebuild.diff
cc'ing x11.
btw, CARD8 has been declared as BOOL and BYTE in Xmd.h since at least 1994. that's as far back as i could find. :P http://cvsweb.xfree86.org/cvsweb/xc/include/Xmd.h?rev=1.1&content-type=text/vnd.viewcvs-markup
I'm not sure what the difference between gcc 3 and 4 would be, since this is sitting in the psemu source: ./src/externals.h:#define BOOL unsigned short Which will obviously interfere with donnie@supernova test $ grep BOOL /usr/include/X11/Xmd.h typedef CARD8 BOOL; The psemu program might be doing some weird thing dependent on gcc version.
The problem is that BOOL is #define'd in the psemu source, so we end up with something like this when its done being preprocessed: typedef CARD8 BYTE; typedef CARD8 unsigned short; The second line is obviously wrong. We might be able to get away with just adding an #undef BOOL right before the include on line 3727 in draw.c. I'll look more closely later.
Created attachment 76302 [details, diff] updated gcc-4.1 patch Yup, that looks like the easiest way to "fix" it.
Added to the tree, thanks.