Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 131856 - freeglut-2.4.0 doesn't compile with GCC 4.2
Summary: freeglut-2.4.0 doesn't compile with GCC 4.2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-30 19:05 UTC by Ryan Hill (RETIRED)
Modified: 2006-07-29 11:04 UTC (History)
0 users

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


Attachments
freeglut-2.4.0-warnings-arent-errors.patch (freeglut-2.4.0-warnings-arent-errors.patch,398 bytes, patch)
2006-04-30 19:07 UTC, Ryan Hill (RETIRED)
Details | Diff
freeglut-gcc42.patch (freeglut-gcc42.patch,283 bytes, patch)
2006-07-25 20:22 UTC, Joshua Baergen (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-04-30 19:05:50 UTC
freeglut-2.4.0 builds with -Werror, causing it to fail when building with GCC 4.2 

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -O2 -march=nocona -fomit-frame-pointer -pipe -fno-ident -g -Wall -pedantic -Werror -c freeglut_menu.c -MT libglut_la-freeglut_menu.lo -MD -MP -MF .deps/libglut_la-freeglut_menu.TPlo  -fPIC -DPIC -o .libs/libglut_la-freeglut_menu.lo
cc1: warnings being treated as errors
freeglut_joystick.c: In function 'fgJoystickDetect':
freeglut_joystick.c:1687: warning: the address of 'fgJoystick', will always evaluate as 'true'
make[2]: *** [libglut_la-freeglut_joystick.lo] Error 1

attached is a patch to prevent this and other warnings from causing unnecessary build failures.
Comment 1 Ryan Hill (RETIRED) gentoo-dev 2006-04-30 19:07:14 UTC
Created attachment 85893 [details, diff]
freeglut-2.4.0-warnings-arent-errors.patch
Comment 2 Joshua Baergen (RETIRED) gentoo-dev 2006-05-02 08:44:29 UTC
I'd rather fix the code than dropping Werror.  It'd probably take very little effort.
Comment 3 Donnie Berkholz (RETIRED) gentoo-dev 2006-06-20 23:11:32 UTC
Upping to critical since we're already on 4.1, 4.2 isn't too far off.
Comment 4 Ryan Hill (RETIRED) gentoo-dev 2006-06-23 17:04:12 UTC
4.2 hasn't branched yet, and the final won't be released til ~3 months after that, so we have some time yet. ;)
Comment 5 Joshua Baergen (RETIRED) gentoo-dev 2006-07-25 20:22:47 UTC
Created attachment 92754 [details, diff]
freeglut-gcc42.patch

Don't check the pointer of a statically allocated structure.
Comment 6 Joshua Baergen (RETIRED) gentoo-dev 2006-07-25 20:23:12 UTC
Ryan, give that patch a try if you have a chance.
Comment 7 Ryan Hill (RETIRED) gentoo-dev 2006-07-28 18:59:49 UTC
looks good.  (ebuild needs a cd ${S} in src_unpack to use as-is.)
Comment 8 Joshua Baergen (RETIRED) gentoo-dev 2006-07-29 11:04:40 UTC
Committed to CVS, thanks for testing.