Hi, scummvm-0.7.0 fails to build on amd64 and i think it's because of x86 assembly routines being used. Reproducible: Always Steps to Reproduce: 1.emerge scummvm 2. 3. Actual Results: compilation failure Expected Results: compilation success emerge info: Portage 2.0.51-r3 (default-linux/amd64/2004.3, gcc-3.4.3, glibc-2.3.4.20040808-r1, 2.6.9-gentoo-r9 x86_64) ================================================================= System uname: 2.6.9-gentoo-r9 x86_64 AMD Athlon(tm) 64 Processor 3000+ Gentoo Base System version 1.4.16 Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.90.0.1.1-r3 Headers: sys-kernel/linux26-headers-2.6.8.1-r1 Libtools: sys-devel/libtool-1.5.2-r7 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CFLAGS="-march=athlon64 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon64 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox" GENTOO_MIRRORS="ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://gentoo.zie.pg.gda.pl http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://mirror.nutsmaas.nl/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X aalib acpi alsa berkdb bitmap-fonts cdr crypt dvd dvdr esd f77 fam flac fortran gdbm gif gnome gpm gstreamer gtk gtk2 imlib ipv6 java joystick jp2 jpeg junit libwww lzw lzw-tiff matroska mozilla mpeg multilib ncurses nls nptl offensive oggvorbis opengl oss pam perl png python readline sdl speex ssl tcpd tetex theora tiff truetype usb userlocales xml2 xpm xrandr xv xvid zlib" beginning of ebuild output: Calculating dependencies ...done! >>> emerge (1 of 1) games-engines/scummvm-0.7.0 to / >>> md5 src_uri ;-) scummvm-0.7.0.tar.bz2 >>> Unpacking source... >>> Unpacking scummvm-0.7.0.tar.bz2 to /var/tmp/portage/scummvm-0.7.0/work >>> Source unpacked. sdl Running ScummVM configure... Looking for C++ compiler... g++ Checking for compiler version... tail: `-1' option is obsolete; use `-n 1' since this will be removed in the future 3.4.3, ok Checking hosttype... linux-gnu Checking endianness... little Running on x86... no Alignment required... no Type with 1 byte... char Type with 2 bytes... short Type with 4 bytes... int Checking for Plugin support... no Checking for Ogg Vorbis... yes Checking for FLAC >= 1.0.1... yes Checking for MAD... no Checking for ALSA >= 0.9... yes Checking for zlib... yes Checking for libmpeg2 >= 0.3.2... yes Checking for nasm... /usr/bin/nasm Engines: SCUMM Simon the Sorcerer Beneath a Steel Sky Broken Sword I (w/ mpeg2 cutscenes) Broken Sword II (w/ mpeg2 cutscenes) Flight of the Amazon Queen Backend... sdl, assembly routines Looking for sdl-config... /usr/bin/sdl-config Creating config.h tail of the compilation output: ar cru backends/midi/mt32/libmt32.a backends/midi/mt32/mt32_file.o backends/midi/mt32/i386.o backends/midi/mt32/part.o backends/midi/mt32/partial.o backends/midi/mt32/partialManager.o backends/midi/mt32/synth.o backends/midi/mt32/tables.o backends/midi/mt32/freeverb.o ar cru common/libcommon.a common/config-manager.o common/file.o common/md5.o common/str.o common/stream.o common/timer.o common/util.o common/savefile.o common/system.o common/scaler.o common/scaler/2xsai.o common/scaler/aspect.o common/scaler/hq2x.o common/scaler/hq3x.o common/scaler/scale2x.o common/scaler/scale3x.o common/scaler/scalebit.o common/scaler/hq2x_i386.o common/scaler/hq3x_i386.o ranlib backends/midi/mt32/libmt32.a ranlib common/libcommon.a mkdir -p base/.deps g++ -Wp,-MMD,"base/.deps/main.d",-MQ,"base/main.o",-MP -Wall -march=athlon64 -O2 -pipe -march=athlon64 -O2 -pipe -ansi -W -Wno-unused-parameter -O -Wuninitialized -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -pedantic -Wpointer-arith -Wcast-qual -Wconversion -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor -Wno-reorder -Wwrite-strings -fcheck-new -Wctor-dtor-privacy -DHAVE_CONFIG_H -DUNIX -DDISABLE_SAGA -DDISABLE_KYRA -I. -I. -I./common -I./backends/midi/mt32 -I/usr/include/SDL -D_REENTRANT -Itest/cxxtest -c base/main.cpp -o base/main.o rm -f base/libbase.a ar cru base/libbase.a base/engine.o base/gameDetector.o base/main.o base/plugins.o ranlib base/libbase.a g++ backends/sdl/events.o backends/sdl/graphics.o backends/sdl/sdl.o base/libbase.a scumm/libscumm.a simon/libsimon.a sky/libsky.a sword1/libsword1.a sword2/libsword2.a queen/libqueen.a gui/libgui.a graphics/libgraphics.a sound/libsound.a backends/libbackends.a common/libcommon.a backends/midi/mt32/libmt32.a -lvorbisfile -lvorbis -logg -lFLAC -lasound -lz -lmpeg2 -L//usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread -o scummvm /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: warning: i386 architecture of input file `common/libcommon.a(hq2x_i386.o)' is incompatible with i386:x86-64 output /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: warning: i386 architecture of input file `common/libcommon.a(hq3x_i386.o)' is incompatible with i386:x86-64 output /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: BFD 2.15.90.0.1.1 20040303 internal error, aborting at reloc.c line 4274 in bfd_generic_get_relocated_section_contents /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: Please report this bug. collect2: ld returned 1 exit status make: *** [scummvm] Error 1 !!! ERROR: games-engines/scummvm-0.7.0 failed. !!! Function src_compile, Line 51, Exitcode 2 !!! emake failed !!! If you need support, post the topmost build error, NOT this status message.
I just downloaded version 0.7.0 from the scummvm site and it had the same problem. But using './configure --disable-nasm' (instead of autodetecting if assembly should be used) works fine. So a quick fix might be to add this switch when compiling for amd64 in the ebuild. The proper solution would be to make autodetection work on amd64 as well, though.
added $(use_enable x86 nasm) to the ebuild thanks for the research ! :)