Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 124993 - quakeforge-0.5.5 fails (gcc4)
Summary: quakeforge-0.5.5 fails (gcc4)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-04 11:05 UTC by Patrizio Bassi
Modified: 2006-05-06 15:12 UTC (History)
2 users (show)

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


Attachments
0.5.5-gcc4.patch (0.5.5-gcc4.patch,10.66 KB, patch)
2006-03-28 12:23 UTC, Charles Pence
Details | Diff
0.5.5-gcc4.patch (v2) (0.5.5-gcc4.patch,11.61 KB, patch)
2006-03-29 17:01 UTC, Charles Pence
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrizio Bassi 2006-03-04 11:05:00 UTC
there are a lot of errors i manually fixed due to static/non-static.

ok...easy to fix...but at the end that's:

if /bin/sh ../../libtool --mode=compile i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include   -prefer-pic -O3 -mtune=pentium3 -march=pentium3 -pipe -fomit-frame-pointer -mmmx -msse -ffast-math -pipe -Wall -fno-common -MT gib_classes.lo -MD -MP -MF ".deps/gib_classes.Tpo" -c -o gib_classes.lo gib_classes.c; \
then mv -f ".deps/gib_classes.Tpo" ".deps/gib_classes.Plo"; else rm -f ".deps/gib_classes.Tpo"; exit 1; fi
 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -O3 -mtune=pentium3 -march=pentium3 -pipe -fomit-frame-pointer -mmmx -msse -ffast-math -pipe -Wall -fno-common -MT gib_classes.lo -MD -MP -MF .deps/gib_classes.Tpo -c gib_classes.c  -fPIC -DPIC -o .libs/gib_classes.o
gib_classes.c: In function 'Object_Class_Children_f':
gib_classes.c:197: error: invalid storage class for function 'iterator'
gib_classes.c: In function 'GIB_Classes_Build_Scripted':
gib_classes.c:615: error: invalid storage class for function 'mtabfree'
gib_classes.c:621: error: invalid storage class for function 'fname'
make[2]: *** [gib_classes.lo] Error 1
make[2]: Leaving directory `/var/tmp/portage/quakeforge-0.5.5/work/quakeforge-0.5.5/libs/gib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/quakeforge-0.5.5/work/quakeforge-0.5.5/libs'
make: *** [all-recursive] Error 1


i've no idea about that.
Comment 1 Charles Pence 2006-03-28 12:01:08 UTC
I'm getting the same issue, and will provide a patch momentarily.
Comment 2 Charles Pence 2006-03-28 12:23:29 UTC
This patch allows it to build with GCC4.  I'm currently in the middle of a full-system re-emerge with GCC4 (hence how I discovered the build), so the patch is as-of-yet untested.  I'll be able to test it this evening, and will report back my results.
Comment 3 Charles Pence 2006-03-28 12:23:59 UTC
Created attachment 83322 [details, diff]
0.5.5-gcc4.patch
Comment 4 Charles Pence 2006-03-28 20:09:48 UTC
That is confirmed, the patch produces a functional quakeforge on gcc 4.0.3.
Comment 5 Patrizio Bassi 2006-03-29 00:44:12 UTC
charles seems not completly fixed here:

i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../../../include -I../../../include -O3 -mtune=pentium3 -march=pentium3 -pipe -fomit-frame-pointer -mmmx -msse -ffast-math -pipe -Wall -fno-common -MT libvid_x11_la-context_x11.lo -MD -MP -MF .deps/libvid_x11_la-context_x11.Tpo -c context_x11.c -o .libs/libvid_x11_la-context_x11.o
context_x11.c:100: error: static declaration of 'x_gamma' follows non-static declaration
../../../include/context_x11.h:54: error: previous declaration of 'x_gamma' was here
make[3]: *** [libvid_x11_la-context_x11.lo] Error 1
make[3]: Leaving directory `/var/tmp/portage/quakeforge-0.5.5/work/quakeforge-0.5.5/libs/video/targets'
make[2]: *** [all-recursive] Error 1

....

vid_x11.c:89: error: static declaration of 'doShm' follows non-static declaration
../../../include/context_x11.h:59: error: previous declaration of 'doShm' was here


i'm running gcc 4.1.0. can you update patch to 4.1.0 compatibility?
Comment 6 Charles Pence 2006-03-29 06:36:12 UTC
My mistake!  The patch I submitted will compile the SDL, SDL32, and SGL clients---but apparently not the X11 clients.  I'll give it another go tonight and enable building all the clients.
Comment 7 Patrizio Bassi 2006-03-29 06:56:13 UTC
my use flags are:
USE="X alsa dga fbcon ncurses opengl oss sdl svga vorbis xmms xv zlib -3dfx -cdinstall -debug -ipv6" 0 kB


however your patch seems just to remove static statement.
may be ok...or may not.

check a note in bug http://bugs.gentoo.org/show_bug.cgi?id=123616

ok...that's a static/extern change...but....worth a look.
Comment 8 Charles Pence 2006-03-29 07:17:38 UTC
I don't think that's going to be a problem here.  What appears to be happening in this case is that the QuakeForge developers had a lot of variables that were supposedly global API vars, and included in header files, but then declared static upon declaration in the C files.  Not a good way to fly---and gcc4 recognizes that they're confused.  The "static" implies they can't be accessed outside the individual C file, but then they're marked global...

I'll try to get a build with all USE flags enabled for QF tonight (egh, means I have to install svgalib...).
Comment 9 Charles Pence 2006-03-29 07:20:35 UTC
Oh, and I forgot to add---if you just want to play quake, you can

USE="alsa ncurses opengl sdl vorbis mms zlib -3dfx -X -cdinstall -debug -dga -fbcon -ipv6 -oss -svga -xv" emerge quakeforge

and it should build and run the sgl, sdl, and sdl32 clients.
Comment 10 Charles Pence 2006-03-29 17:01:21 UTC
Got it, here's an updated patch.
Comment 11 Charles Pence 2006-03-29 17:01:46 UTC
Created attachment 83406 [details, diff]
0.5.5-gcc4.patch (v2)
Comment 12 Patrizio Bassi 2006-03-30 00:20:12 UTC
works perfectly.

please add to portage and close this bug
Comment 13 Tupone Alfredo gentoo-dev 2006-05-06 15:12:54 UTC
Patch applied to portage, thanks.