Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 249396 - [version bump] games-strategy/widelands-0.0.13
Summary: [version bump] games-strategy/widelands-0.0.13
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-30 15:44 UTC by vp
Modified: 2010-01-06 06:12 UTC (History)
3 users (show)

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


Attachments
ebuild file for widelands-0.0.13 (widelands-0.0.13.ebuild,2.15 KB, text/plain)
2009-01-24 04:31 UTC, Eric "me262" Mason
Details
Accompanying patch file. Modified for 0.0.13 (widelands-0.0.13-build.patch,1.87 KB, patch)
2009-01-24 04:34 UTC, Eric "me262" Mason
Details | Diff
Working ebuild using scons, but with debug information. (widelands-0.0.13.ebuild,2.89 KB, text/plain)
2009-01-26 00:54 UTC, Eric "me262" Mason
Details
Fully working ebuild for widelands-0.0.13 (widelands-0.0.13.ebuild,2.73 KB, text/plain)
2009-01-26 19:31 UTC, Eric "me262" Mason
Details
Patch file accompanying the ebuild. (widelands-0.0.13-build-dont_prestrip_binary.patch,206 bytes, patch)
2009-01-26 19:33 UTC, Eric "me262" Mason
Details | Diff
Updated ebuild, per IRC comments. (widelands-0.0.13.ebuild,2.97 KB, text/plain)
2009-01-26 22:54 UTC, Eric "me262" Mason
Details
ebuild proposal (not complete, yet) (widelands-0.0.13.ebuild,2.81 KB, text/plain)
2009-02-21 20:00 UTC, Martin Walch
Details
basically working ebuild (widelands-0.0.13.ebuild,3.58 KB, text/plain)
2009-02-23 03:31 UTC, Martin Walch
Details
games-strategy/widelands-0.0.13.ebuild (widelands-0.0.13.ebuild,4.60 KB, text/plain)
2009-02-24 02:13 UTC, Martin Walch
Details
widelands-0.0.13.ebuild (widelands-0.0.13.ebuild,4.75 KB, text/plain)
2009-02-24 02:43 UTC, Martin Walch
Details
games-strategy/widelands/widelands-0.0.13.ebuild (widelands-0.0.13.ebuild,4.75 KB, text/plain)
2009-03-03 00:21 UTC, Martin Walch
Details
games-strategy/widelands/widelands-0.0.13.ebuild (widelands-0.0.13.ebuild,4.45 KB, text/plain)
2009-03-06 18:46 UTC, Martin Walch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vp 2008-11-30 15:44:32 UTC
request version bump (to 0.0.13)

Reproducible: Always

Steps to Reproduce:
1. emerge widelands
2.
3.
Comment 1 Eric "me262" Mason 2009-01-24 04:31:13 UTC
Created attachment 179503 [details]
ebuild file for widelands-0.0.13

Here's the ebuild file, there were a number of changes that accompany this ebuild, such as file structure changes (it's their fault!), and an updated patch file (uploading soon).

*** AS OF RIGHT NOW THIS DOES NOT COMPILE ***
There are currently multiple undefined references to the build_id() function which is preventing the linker from completing.

src/native-release/graphic.o: In function `Graphic::Graphic(int, int, int, bool)':
graphic.cc:(.text+0x162f): undefined reference to `build_id()'
src/native-release/graphic.o: In function `Graphic::Graphic(int, int, int, bool)':
graphic.cc:(.text+0x1ccf): undefined reference to `build_id()'
src/native-release/main.o: In function `main':
main.cc:(.text+0xf7): undefined reference to `build_id()'
main.cc:(.text+0x21f): undefined reference to `build_id()'
main.cc:(.text+0x388): undefined reference to `build_id()'
src/native-release/network_lan_promotion.o:network_lan_promotion.cc:(.text+0x96c): more undefined references to `build_id()' follow
collect2: ld returned 1 exit status
make: *** [src/native-release/widelands] Error 1
Comment 2 Eric "me262" Mason 2009-01-24 04:34:31 UTC
Created attachment 179505 [details, diff]
Accompanying patch file. Modified for 0.0.13

Accompanying patch file.
They changed their build script to include doxygen I think.
Also, at line 219, they took out the src/build_id.h part (I put it back in for the moment, it gives the same error with or without it).
Comment 3 Martin Walch 2009-01-25 04:37:04 UTC
Building widelands with make is not supported any more. Using scons is the preferred way and builds without any patch. The ebuild should be changed accordingly.
Comment 4 Eric "me262" Mason 2009-01-26 00:54:32 UTC
Created attachment 179733 [details]
Working ebuild using scons, but with debug information.

Rewrote the ebuild to use the scons compiler, and the regular installer.
This was tested and verified to run on an amd64 machine.

The current problem now is that when build=release, scons strips out the binary itself, resulting in a pre-stripped binary. When build=profile or build=debug, the binary strips fine, but includes debug information.
I'm going to try to ask the devs where this is, I'm no good at figuring out scons.

If someone wants a crack at it, go ahead.

It's ready for upstream despite this little hitch.
Comment 5 Eric "me262" Mason 2009-01-26 19:31:03 UTC
Created attachment 179797 [details]
Fully working ebuild for widelands-0.0.13

Working ebuild for widelands-0.0.13

Ready for upstream.
Comment 6 Eric "me262" Mason 2009-01-26 19:33:59 UTC
Created attachment 179800 [details, diff]
Patch file accompanying the ebuild.

scons will strip the binary before gentoo's system does.
This removes the strip flag from the build script located in build/scons-tools/scons-configure.py
Comment 7 Eric "me262" Mason 2009-01-26 22:54:31 UTC
Created attachment 179820 [details]
Updated ebuild, per IRC comments.

A few suggestions on the ebuild from the #gentoo-games irc channel.
S is now workdir/pn-b13 and uses sed to remove the strip flag instead of a patch.

Ready for downstream.
Comment 8 Mr. Bones. (RETIRED) gentoo-dev 2009-01-27 06:17:26 UTC
Still installs the locales under GAMES_DATADIR instead of /usr/share locale.  I see it also installs scons files in the image as well which probably aren't needed for the game to run.
Comment 9 Martin Walch 2009-02-21 19:57:56 UTC
Based on attachment #179820 [details] from comment #7, I have made further changes. The ebuild has become smaller and should install everything in the right folder and omit unnecessary files.

The USE flag nls is currently removed, because it seems a bit tricky to create a clean implementation for it. Furthermore it should respect LINGUAS settings from make.conf.

Another problem is:  ccache is not active. I do not know if this is for all scons builds or only for widelands, but it should be fixed.

The new use flag shrink is for using pngrewrite and optipng to compress the png files (many) of widelands. Throws a warning when activated, because it is extremly time consuming.

(Installs fine on my machine and also seems to run fine. But more testing is needed.)
Comment 10 Martin Walch 2009-02-21 20:00:20 UTC
Created attachment 182756 [details]
ebuild proposal (not complete, yet)

Still needs some things to be done concerning nls, ccache , omit-frame-pointer, etc.

(and also will need a cleanup then)
Comment 11 Martin Walch 2009-02-23 03:31:03 UTC
Created attachment 182847 [details]
basically working ebuild

An update to my version. nls and ccache are now implemented and working. Made some cleanups in the ebuild.

Still many TODOs, made some ugly hacks to get things working the way it should be.

Any suggestions for improving this ebuild appreciated.
Comment 12 Martin Walch 2009-02-24 02:13:30 UTC
Created attachment 182980 [details]
games-strategy/widelands-0.0.13.ebuild

Resolved most of the TODOs. Don't know how to fix the remaining ones:

- install only the locales, the user has activated (widelands uses only codes of the form xy_XY. I don't know how to handle this correctly.)
- sed command for activating ccache is ugly, and what it does is ugly, too (I do not have much experience with ebuilds, patching and so on...)

The ebuild now uses the parallel build option of $MAKEOPTS for scons. Exception: if MAKEOPTS="-j", it is passed as -j 256 to scons, because scons does not know unlimited thread spawning (it would spawn threads at initialisation until EAGAIN and then crash, anyway. Either because the task table has no id left or memory is low). I chose the number 256, because there are about 300 commands that may be parallelized and 256 is the next lower power of two (let's see how many supercomputers will run Widelands on Gentoo ;)).

The extraction of the -j/--jobs setting from MAKEOPTS is permissive with its actual formatting, but if MAKEOPTS is a mess, things will break (e. g. MAKEOPTS="--hurt-myself=' -j 1048576'" would probably eat up all system resources and finally crash). If you have a proper way to get this setting safe and easy, please tell me.

The default CXXFLAGS from upstream are now not used anymore, but replaced by the CXXFLAGS from the ebuild environment. Any explicit -fomit-frame-pointer is filtered, -fno-omit-frame-pointer is being added.

Actually, I was hoping to reduce the ebuild size, but now it has grown to about 4.6 KB.
Comment 13 Martin Walch 2009-02-24 02:43:30 UTC
Created attachment 182982 [details]
widelands-0.0.13.ebuild

Sorry. Accidentally uploaded an old version before. This one should be fine.
Comment 14 Martin Walch 2009-03-03 00:21:53 UTC
Created attachment 183726 [details]
games-strategy/widelands/widelands-0.0.13.ebuild

minor bug in sed expression found and removed
Comment 15 Martin Walch 2009-03-06 18:46:33 UTC
Created attachment 184161 [details]
games-strategy/widelands/widelands-0.0.13.ebuild

cleanup, no functional changes
Comment 16 Teh Tuxusah 2009-04-09 19:15:34 UTC
Unfortunately, fails to build on my AMD-64.


-------------
-------------
Errors from build log:

scons: done building targets.
>>> Source compiled.
>>> Test phase [not enabled]: games-strategy/widelands-0.0.13

>>> Install widelands-0.0.13 into /var/tmp/portage/games-strategy/widelands-0.0.13/image/ category games-strategy
[?1034hscons: Reading SConscript files ...


scons: warning: The Options class is deprecated; use the Variables class instead.
File "/var/tmp/portage/games-strategy/widelands-0.0.13/work/widelands-b13/SConstruct", line 76, in cli_options

scons: warning: The BoolOption() function is deprecated; use the BoolVariable() function instead.
File "/var/tmp/portage/games-strategy/widelands-0.0.13/work/widelands-b13/SConstruct", line 90, in cli_options
Searching for ctags:       not found. Tags will not be built
Searching for pngrewrite:  not found. PNG compatification disabled.
Searching for optipng:     not found. PNG compatification disabled.
Searching for astyle:      not found. Cannot perform source indenting.

Platform:          posix
Build type:        release
Build ID:          0.0.13


scons: done reading SConscript files.
scons: Building targets ...
scons: *** [installtarget] AttributeError : 'NoneType' object has no attribute 'genstring'
scons: building terminated because of errors.
 [31;01m*[0m 
 [31;01m*[0m ERROR: games-strategy/widelands-0.0.13 failed.
 [31;01m*[0m Call stack:
 [31;01m*[0m               ebuild.sh, line   48:  Called src_install
 [31;01m*[0m             environment, line 3153:  Called die
 [31;01m*[0m The specific snippet of code:
 [31;01m*[0m       scons localedir="${D}/usr/share/locale" install || die "scons install failed";
 [31;01m*[0m  The die message:
 [31;01m*[0m   scons install failed
 [31;01m*[0m 
 [31;01m*[0m If you need support, post the topmost build error, and the call stack if relevant.
 [31;01m*[0m A complete build log is located at '/var/tmp/portage/games-strategy/widelands-0.0.13/temp/build.log'.
 [31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/games-strategy/widelands-0.0.13/temp/environment'.
 [31;01m*[0m This ebuild is from an overlay named 'soofman-overlay': '/usr/local/portage/myebuilds/'
 [31;01m*[0m 



-------------
-------------
emerge --info
Portage 2.2_rc28 (default/linux/amd64/2008.0, gcc-4.3.2, glibc-2.8_p20080602-r0, 2.6.28.7-soofx x86_64)
=================================================================
System uname: Linux-2.6.28.7-soofx-x86_64-AMD_Phenom-tm-_9850_Quad-Core_Processor-with-glibc2.2.5
Timestamp of tree: Thu, 09 Apr 2009 07:45:01 +0000
app-shells/bash:     3.2_p48
dev-java/java-config: 1.3.7-r1, 2.1.6-r1
dev-lang/python:     2.5.2-r8
dev-util/cmake:      2.6.3
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.3.0-r1
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.1/env /usr/kde/4.1/share/config /usr/kde/4.1/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://gentoo.chem.wisc.edu/gentoo/ http://gentoo.zie.pg.gda.pl "
LANG="pl_PL.UTF-8"
LC_ALL="pl_PL.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="pl en"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/yarik-overlay /usr/local/portage/myebuilds"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow X aac acl acpi alsa amd64 asf avahi berkdb bzip2 caps cdr cli cracklib crypt css cups curl dbus dri dvd dvdr flac fontconfig fortran gadu gd gdbm gif gimp gnome gpm gtk hal iconv ipv6 isdnlog jpeg kde kdeprefix libcaca lm_sensors mad matroska mdnsresponder-compat midi mmx modplug mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly nsplugin ogg openal opengl openmp oss pam pcre pdf perl php png ppds pppd python qt3 qt4 quicktime readline reflection scanner sdl session spl sqlite sqlite3 sse sse2 ssl subversion sysfs tcpd theora truetype unicode usb userlocales v4l vcd vorbis x264 xcb xine xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl en" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 17 Martin Walch 2009-04-09 20:08:09 UTC
Thanks for the report. This problem appears with the newest scons release 1.2.0. As a quick workaround you can switch back to scons-1.0.0. I will look into this when I find the time for it. (Maybe it needs to be fixed upstream. I don't know, yet.)
Comment 18 Teh Tuxusah 2009-04-10 16:51:10 UTC
Seems you were right.

It builds fine with scons-1.0.0.

Thx for help !
Comment 19 Martin Walch 2009-05-04 12:28:17 UTC
It is indeed an upstream problem. Bug report on sf is:

https://sourceforge.net/tracker/index.php?func=detail&aid=2603683&group_id=40163&atid=427221

Widelands uses its own scons version for building, that can be run with the build-widelands.sh script. However, using this is not a satisfying solution as it will add the expense of maintaining an old non-Gentoo version of scons within the widelands ebuild. If upstream will fix it, I prefer waiting for their fix.
Comment 20 Mr. Bones. (RETIRED) gentoo-dev 2009-05-04 15:00:59 UTC
Me too.  We'll pick up 0.0.14 if it has a better build system.
Comment 21 vp 2009-05-05 23:13:00 UTC
upstream talking here: is this an amd64 only issue or do people on the 'old' x86 architectures also experience problems?