Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 117536 - [gcc4] psemu-peopssoftgp doesn't build with GCC4
Summary: [gcc4] psemu-peopssoftgp doesn't build with GCC4
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 117482
  Show dependency tree
 
Reported: 2006-01-02 21:30 UTC by Ryan Hill (RETIRED)
Modified: 2006-01-06 20:59 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
psemu-peopssoftgpu-1.17-gcc41.patch (psemu-peopssoftgpu-1.17-gcc41.patch,2.16 KB, patch)
2006-01-05 15:05 UTC, Marcelo Goes (RETIRED)
Details | Diff
psemu-peopssoftgpu-1.17.ebuild.diff (psemu-peopssoftgpu-1.17.ebuild.diff,515 bytes, patch)
2006-01-05 15:05 UTC, Marcelo Goes (RETIRED)
Details | Diff
updated gcc-4.1 patch (psemu-peopssoftgpu-1.17-gcc41.patch,2.16 KB, patch)
2006-01-06 00:24 UTC, Mark Loeser (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Hill (RETIRED) gentoo-dev 2006-01-02 21:30:49 UTC
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
Comment 1 Marcelo Goes (RETIRED) gentoo-dev 2006-01-05 15:05:05 UTC
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.
Comment 2 Marcelo Goes (RETIRED) gentoo-dev 2006-01-05 15:05:27 UTC
Created attachment 76280 [details, diff]
psemu-peopssoftgpu-1.17.ebuild.diff
Comment 3 Ryan Hill (RETIRED) gentoo-dev 2006-01-05 18:46:30 UTC
cc'ing x11.

Comment 4 Ryan Hill (RETIRED) gentoo-dev 2006-01-05 18:51:26 UTC
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
Comment 5 Donnie Berkholz (RETIRED) gentoo-dev 2006-01-05 22:23:09 UTC
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.
Comment 6 Mark Loeser (RETIRED) gentoo-dev 2006-01-05 22:57:32 UTC
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.
Comment 7 Mark Loeser (RETIRED) gentoo-dev 2006-01-06 00:24:54 UTC
Created attachment 76302 [details, diff]
updated gcc-4.1 patch

Yup, that looks like the easiest way to "fix" it.
Comment 8 Mark Loeser (RETIRED) gentoo-dev 2006-01-06 20:59:49 UTC
Added to the tree, thanks.