Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 420961

Summary: =games-strategy/widelands-0.17 fails to compile with gcc 4.7
Product: Gentoo Linux Reporter: Bernard Cafarelli <voyageur>
Component: [OLD] GamesAssignee: Gentoo Games <games>
Status: RESOLVED FIXED    
Severity: normal CC: jlp.bugs, mgorny
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://launchpad.net/bugs/976551
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 390247    
Attachments: Patch from bzr

Description Bernard Cafarelli gentoo-dev 2012-06-13 10:54:23 UTC
cd /var/tmp/portage/games-strategy/widelands-0.17/work/widelands-0.17_build/src && /usr/bin/x86_64-pc-linux-gnu-g++  -DUSE_OPENGL  -march=native -O2 -pipe  -DNDEBUG -I/var/tmp/portage/games-strategy/widelands-0.17/work/widelands-build17-src/src -I/var/tmp/portage/games-strategy/widelands-0.17/work/widelands-0.17_build/src -I/usr/include/SDL    -o CMakeFiles/widelands.dir/main.cc.o -c /var/tmp/portage/games-strategy/widelands-0.17/work/widelands-build17-src/src/main.cc
/var/tmp/portage/games-strategy/widelands-0.17/work/widelands-build17-src/src/main.cc: In function ‘int main(int, char**)’:
/var/tmp/portage/games-strategy/widelands-0.17/work/widelands-build17-src/src/main.cc:72:19: error: ‘fork’ was not declared in this scope
/var/tmp/portage/games-strategy/widelands-0.17/work/widelands-build17-src/src/main.cc:77:11: error: ‘setsid’ was not declared in this scope
/var/tmp/portage/games-strategy/widelands-0.17/work/widelands-build17-src/src/main.cc:79:10: error: ‘STDIN_FILENO’ was not declared in this scope
/var/tmp/portage/games-strategy/widelands-0.17/work/widelands-build17-src/src/main.cc:79:22: error: ‘close’ was not declared in this scope
/var/tmp/portage/games-strategy/widelands-0.17/work/widelands-build17-src/src/main.cc:80:10: error: ‘STDOUT_FILENO’ was not declared in this scope
/var/tmp/portage/games-strategy/widelands-0.17/work/widelands-build17-src/src/main.cc:81:10: error: ‘STDERR_FILENO’ was not declared in this scope
/var/tmp/portage/games-strategy/widelands-0.17/work/widelands-build17-src/src/main.cc:84:20: error: ‘dup’ was not declared in this scope

The usual #include <unistd.h> in main.cc works, see upstream bug
Comment 1 Dan Johnson 2012-07-05 04:56:29 UTC
Upstream appears to have decided to push the fix to widelands-0.18. Their launchpad  seems to suggest that 0.18-rc1 is targeted for Jan 2013, which seems a bit late to unmask gcc 4.7. We should probably consider patching the include in locally in the ebuild until then?

From the upstream bug:
"The distros will need to hotpatch this if it is a problem."

Should I work on trying to backport (grab a patch of) the upstream commit, or is that already done?
Comment 2 Emmanuel Andry 2012-08-01 17:26:06 UTC
The patch should be trivial :

http://wl.widelands.org/forum/topic/1043/
Comment 3 Emmanuel Andry 2012-08-04 09:50:43 UTC
Here's a patch from Fedora :

http://pkgs.fedoraproject.org/cgit/widelands.git/tree/widelands-build17-src-includes.patch
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-08-04 09:54:36 UTC
Created attachment 320258 [details, diff]
Patch from bzr

Stripped the relevant part of the patch off bzr.
Comment 5 Mr. Bones. (RETIRED) gentoo-dev 2012-08-04 14:39:14 UTC
in portage.

thanks for the bug report and patch.