Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 196538 - games-strategy/scorched3d-41 amd64 compilation issues
Summary: games-strategy/scorched3d-41 amd64 compilation issues
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: AMD64 Linux
: High normal with 1 vote (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-20 16:48 UTC by Arttu Valo
Modified: 2008-01-15 22:12 UTC (History)
3 users (show)

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


Attachments
Build log from one of the amd64 machines (build.log,30.96 KB, text/plain)
2007-10-20 16:50 UTC, Arttu Valo
Details
emerge --info (emerge.info,3.51 KB, text/plain)
2007-10-20 16:52 UTC, Arttu Valo
Details
patch end ebuild proposal for 64Bit systems (scorched3d-fix.tar.bz2,1.87 KB, application/octet-stream)
2007-11-01 15:00 UTC, ths
Details
backtrace complaining about a corrupted doubly-linked list (scorch3d-backtrace.txt,20.48 KB, text/plain)
2007-11-01 17:19 UTC, Arttu Valo
Details
patch and ebuild proposal for scorched3d-41.1 (tar.bz2) (scorched3d-41.1-fix.tar.bz2,1.69 KB, application/octet-stream)
2007-11-01 20:20 UTC, ths
Details
emerge.info (emerge.info,5.81 KB, text/plain)
2007-11-01 20:28 UTC, ths
Details
scorched3d-41.1-amd64.patch (scorched3d-41.1-amd64.patch,22.02 KB, patch)
2007-11-08 22:19 UTC, Rémy DUPONT
Details | Diff
ebuild with scorched3d-41.1-amd64.patch included (scorched3d-41.1.ebuild,1.57 KB, text/plain)
2007-11-17 12:49 UTC, Rémy DUPONT
Details
scorched3d-41.1-r1.ebuild (scorched3d-41.1-r1.ebuild,1.68 KB, text/plain)
2007-12-18 19:00 UTC, Arttu Valo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arttu Valo 2007-10-20 16:48:39 UTC
games-strategy/scorched3d-41 might need some extra patches to make it compile on amd64. At least when I tried emerging it on two separate machines (one k8 and one athlon64 arch) the compilation ended up with the following size_t-related error on both:

x86_64-pc-linux-gnu-g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\
"scorched3d\" -DVERSION=\"41\" -DHAVE_OGG=1 -DHAVE_VSNPRINTF=1 -DHAVE_SNPRINTF=1 -DHAVE_VASPRINTF=1 -DHAVE_ASPRINTF=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TY
PES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UN
ISTD_H=1 -DHAVE_UNISTD_H=1 -I.  -I../porting -I.. -I/usr/lib64/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WX
GTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA  -I/usr/include/freetype2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/X11R6/i
nclude -I/usr/X11R6 -I/usr/local/include  -O2 -march=k8 -fomit-frame-pointer -pipe -DS3D_DOCDIR=\"/usr/share/doc/scorched3d-41\" -DS3D_DATADIR=\"/us
r/share/games/scorched3d\" -DS3D_BINDIR=\"/usr/games/bin\" -c -o Logger.o `test -f '../common/Logger.cpp' || echo './'`../common/Logger.cpp
x86_64-pc-linux-gnu-g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\
"scorched3d\" -DVERSION=\"41\" -DHAVE_OGG=1 -DHAVE_VSNPRINTF=1 -DHAVE_SNPRINTF=1 -DHAVE_VASPRINTF=1 -DHAVE_ASPRINTF=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TY
PES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UN
ISTD_H=1 -DHAVE_UNISTD_H=1 -I.  -I../porting -I.. -I/usr/lib64/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WX
GTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA  -I/usr/include/freetype2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/X11R6/i
nclude -I/usr/X11R6 -I/usr/local/include  -O2 -march=k8 -fomit-frame-pointer -pipe -DS3D_DOCDIR=\"/usr/share/doc/scorched3d-41\" -DS3D_DATADIR=\"/us
r/share/games/scorched3d\" -DS3D_BINDIR=\"/usr/games/bin\" -c -o LoggerI.o `test -f '../common/LoggerI.cpp' || echo './'`../common/LoggerI.cpp
x86_64-pc-linux-gnu-g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\
"scorched3d\" -DVERSION=\"41\" -DHAVE_OGG=1 -DHAVE_VSNPRINTF=1 -DHAVE_SNPRINTF=1 -DHAVE_VASPRINTF=1 -DHAVE_ASPRINTF=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TY
PES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UN
ISTD_H=1 -DHAVE_UNISTD_H=1 -I.  -I../porting -I.. -I/usr/lib64/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WX
GTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA  -I/usr/include/freetype2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/X11R6/i
nclude -I/usr/X11R6 -I/usr/local/include  -O2 -march=k8 -fomit-frame-pointer -pipe -DS3D_DOCDIR=\"/usr/share/doc/scorched3d-41\" -DS3D_DATADIR=\"/us
r/share/games/scorched3d\" -DS3D_BINDIR=\"/usr/games/bin\" -c -o NumberParser.o `test -f '../common/NumberParser.cpp' || echo './'`../common/NumberP
arser.cpp
../common/NumberParser.cpp: In member function 'fixed NumberParser::getValue(ScorchedContext&)':
../common/NumberParser.cpp:131: error: call of overloaded 'fixed(size_t)' is ambiguous
../common/fixed.h:66: note: candidates are: fixed::fixed(const char*) <near match>
../common/fixed.h:61: note:                 fixed::fixed(int)
../common/fixed.h:56: note:                 fixed::fixed(long int)
../common/fixed.h:51: note:                 fixed::fixed(unsigned int)
../common/fixed.h:41: note:                 fixed::fixed(const fixed&)
make[2]: *** [NumberParser.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/games-strategy/scorched3d-41/work/scorched/src/scorched'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/games-strategy/scorched3d-41/work/scorched/src'
make: *** [all-recursive] Error 1
 *
 * ERROR: games-strategy/scorched3d-41 failed.
 * Call stack:
 *   ebuild.sh, line 1654:   Called dyn_compile
 *   ebuild.sh, line 990:   Called qa_call 'src_compile'
 *   ebuild.sh, line 44:   Called src_compile
 *   scorched3d-41.ebuild, line 54:   Called die
Comment 1 Arttu Valo 2007-10-20 16:50:31 UTC
Created attachment 133967 [details]
Build log from one of the amd64 machines
Comment 2 Arttu Valo 2007-10-20 16:52:53 UTC
Created attachment 133968 [details]
emerge --info
Comment 3 James Ausmus 2007-10-21 06:33:37 UTC
Same problem here, amd64 syste, gcc 4.2.2, glibc 2.6.1, wxGTK 2.6.4.0
Comment 4 Rémy DUPONT 2007-10-21 08:13:15 UTC
same here on two amd64 box, info for one :

Portage 2.1.3.9 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.22-gentoo-r8 x86_64)
=================================================================
System uname: 2.6.22-gentoo-r8 x86_64 Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz
Timestamp of tree: Sat, 20 Oct 2007 07:20:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r5
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
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/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb bitmap-fonts bluetooth cairo caps cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds encode fam ffmpeg firefox gdbm gif gpm gtk hal iconv iee1394 ipv6 isdnlog java joystick jpeg kde kdeenablefinal logrotate mad matroska midi mikmod mmx mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pcre pdf perl png pppd python qt3 qt3support qt4 quicktime readline reflection sdl session smp spell spl sse sse2 ssl svg tcpd tiff truetype truetype-fonts type1-fonts unicode v4l v4l2 vorbis wifi xml xorg xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="fglrx vesa"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


compilation fix discussed here but weird graphical result (as in topic below)

http://www.scorched3d.co.uk/phpBB2/viewtopic.php?t=4702
http://www.scorched3d.co.uk/phpBB2/viewtopic.php?t=4705
Comment 5 ths 2007-11-01 15:00:32 UTC
Created attachment 134895 [details]
patch end ebuild proposal for 64Bit systems

Please find attached an ebuild and patch proposal to fix the issue of this Bug.
The patch just corrects some int types and conversions that do not work on a 64Bit system because here (int) != (void *) . With this patch scorched3d compiles under gentoo-x86_64 and gentoo-ppc64 using gcc-4.2.2. 
I tested scorched3d on gentoo-x86_64 and it worked (AMD64-X2, nvidia GeForce 7300 GT running xorg-x11-7.3 and nvidia-drivers-100.14.19). It also runs (SLOWLY) under the ppc64-system (Sony PS3 , xorg-x11-7.3 , Mesa-7.0.1).
Therefore i added ~ppc64 in the ebuild and hope you reconsider removing the ~x86_64 bit flag.

have a nice day
ths
Comment 6 Arttu Valo 2007-11-01 17:17:20 UTC
> Therefore i added ~ppc64 in the ebuild and hope you reconsider removing the
> ~x86_64 bit flag.

That was just me typing a bad title for the bug when I filed it and I didn't know how much was broken, sorry about that. I tried to tidy up the title a bit.

Yes, scorch3d compiles with the patches, but the gameplay and visual issues remain: everything seems to be hanging in the air, whatever I or one of the bots shoot will explode immediately, and if you try to zoom onto the area over the ground, the view will jump underground(?).

But now I got a weird stack dump complaining about a corrupted double-linked list (attaching below).
Comment 7 Arttu Valo 2007-11-01 17:19:23 UTC
Created attachment 134921 [details]
backtrace complaining about a corrupted doubly-linked list
Comment 8 Tristan Heaven (RETIRED) gentoo-dev 2007-11-01 17:27:21 UTC
try 41.1
Comment 9 ths 2007-11-01 20:20:28 UTC
Created attachment 134953 [details]
patch and ebuild proposal for scorched3d-41.1 (tar.bz2)

I cannot confirm the "corrupted double-linked list" error on my system. But this may be an nvidia driver related issue. The scorched3d team recommends using the
latest graphic drivers and as far as i can see you are using version 100.14.09 and i am using 100.14.19. 

Meanwhile ... a new scorched3d version and ebuild, same bugs, slightly different. So you can find the updated ebuild and patch proposal for the new version 41.1. I tested in on x86_64 only.

ths
Comment 10 ths 2007-11-01 20:28:58 UTC
Created attachment 134960 [details]
emerge.info

FIY
Comment 11 Arttu Valo 2007-11-01 23:10:47 UTC
(In reply to comment #9)
> But this may be an nvidia driver related issue.

True. The backtrace dumping seemed to happen when the terrain got drawn "upside down" on the ceiling. When the terrain was not drawn at all, no corruption-complaining backtrace got printed on the console either.

> as far as i can see you are using version 100.14.09 and i am using 100.14.19.

Thanks for the advice, tried the latest ones too, no luck. Same "visual" issues remain, as they call them on the scorched3d's forums. I'll try to write to the upstream bug forums with some of these more specific details over the weekend.
Comment 12 Rémy DUPONT 2007-11-07 22:32:25 UTC
CVS version works OK on amd64 : no more visual issues
Comment 13 Rémy DUPONT 2007-11-08 22:19:55 UTC
Created attachment 135525 [details, diff]
scorched3d-41.1-amd64.patch

Patch from CVS to fix issues on amd64 arch. Tested on local only
Comment 14 Rémy DUPONT 2007-11-17 12:49:57 UTC
Created attachment 136155 [details]
ebuild with scorched3d-41.1-amd64.patch included
Comment 15 Arttu Valo 2007-12-18 14:46:31 UTC
Sorry for my slow response, if it is my input you have been waiting.

Rémy Dupont's latest fixed pretty much everything I had on the issue. The game is now working nicely (tried local games only, too), things drawn as they should be, ammunition flying almost where it should go ;), etc.

Thank you! I'd be happy to get this bug closed and the files in Portage -- unless someone else still has some of these issues.
Comment 16 Rémy DUPONT 2007-12-18 15:53:04 UTC
I'm not sure it's the right thing to do : scorched3d project release a new source tar.gz aimed at 64bit arch :

http://sourceforge.net/project/showfiles.php?group_id=85144

I have not tested it on amd64 (but it should be the same as 41.1 with scorched3d-41.1-amd64.patch) but I can't on other arch.

Comment 17 Arttu Valo 2007-12-18 19:00:46 UTC
Created attachment 138844 [details]
scorched3d-41.1-r1.ebuild

An ebuild based on Dupont's latest November ebuild with following changes:

(1) conditional source clauses added (amd64 and non-amd64)
(2) dropped the 64-bit patch from src_unpack (no longer needed)
(3) scooped the contents of the upstream provided autogen.sh into the pkg_compile phase for amd64

Played successfully one single local simple game on an amd64 and compiled on a x86 (didnt' play), so "it works" is a bold statement, but it actually felt faster(sic!?) on amd64 than the games with the x86+amd64-patches version. Must be just my imagination doing tricks.

Todo:
pkg_compile contents could probably use some better "gentooifying" by changing the commands to start with e-something or the other. And (esp. x86) testing.
Comment 18 Rémy DUPONT 2008-01-15 21:05:52 UTC
Version 41.2 is out and is OK for amd64. Will changing amd64 arch keywording for 41.1 and closing as "won't fix" a good solution ??
Comment 19 Tristan Heaven (RETIRED) gentoo-dev 2008-01-15 22:12:53 UTC
Call it "fixed in 41.2".