Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 398211 - app-emulation/wine-1.2.3 build fail: 'ld: i386 architecture of input file `...' is incompatible with i386:x86-64 output'
Summary: app-emulation/wine-1.2.3 build fail: 'ld: i386 architecture of input file `.....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-09 04:25 UTC by Vu Tran Kien
Modified: 2012-01-09 09:57 UTC (History)
1 user (show)

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


Attachments
the complete build log (wine.bugs.build.log.bz2,101.09 KB, application/x-bzip)
2012-01-09 04:25 UTC, Vu Tran Kien
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vu Tran Kien 2012-01-09 04:25:24 UTC
Created attachment 298383 [details]
the complete build log

like the summary: wine failed to build when ld'ing, like: 
make[1]: entering directory « /var/tmp/portage/app-emulation/wine-1.2.3/work/wine32/dlls/aclui »
../../../wine64/tools/winebuild/winebuild -m32  -w --def -o libaclui.def --export /var/tmp/portage/app-emulation/wine-1.2.3/work/wine-1.2.3/dlls/aclui/aclui.spec
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: i386 architecture of input file `c_10006.o' is incompatible with i386:x86-64 output

emerge --info:
Portage 2.1.10.41 (default/linux/amd64/10.0/desktop/gnome, gcc-4.5.3, glibc-2.13-r4, 3.1.6-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.1.6-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E7400_@_2.80GHz-with-gentoo-2.0.3
Timestamp of tree: Thu, 05 Jan 2012 06:45:01 +0000
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.1.4-r3
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.39 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo desktop-effects foo-overlay
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -mcx16 -msahf -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=core2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=core2 -mcx16 -msahf -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=core2"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.in.th/ http://archive.mmu.edu.my/gentoo http://ftp.ncnu.edu.tw/Linux/Gentoo/ http://mirrors.xmu.edu.cn/gentoo http://gentoo.idrepo.or.id/gentoo http://gentoo.cs.nctu.edu.tw/gentoo/ ftp://ftp.ncnu.edu.tw/Linux/Gentoo/ ftp://gentoo.cs.nctu.edu.tw/gentoo/ http://ftp.twaren.net/Linux/Gentoo/ ftp://mirrors.xmu.edu.cn/gentoo ftp://ftp.iij.ad.jp/pub/linux/gentoo/ http://ftp.iij.ad.jp/pub/linux/gentoo/ http://ftp.jaist.ac.jp/pub/Linux/Gentoo/ ftp://ftp.jaist.ac.jp/pub/Linux/Gentoo/ http://ftp.daum.net/gentoo/ ftp://ftp.kaist.ac.kr/gentoo/ http://ftp.kaist.ac.kr/pub/gentoo/ http://mirrors.163.com/gentoo/  http://ftp.swin.edu.au/gentoo ftp://ftp.swin.edu.au/gentoo ftp://mirrors.stuhome.net/gentoo/ http://mirrors.stuhome.net/gentoo/ http://gentoo.aditsu.net:8000/ http://gentoo.channelx.biz/ http://gentoo.gg3.net/ ftp://gg3.net/pub/linux/gentoo/ ftp://ftp.lecl.net/pub/gentoo/ http://ftp.lecl.net/pub/gentoo/ ftp://ftp.twaren.net/Linux/Gentoo/ ftp://gentoo.in.th/ rsync://mirrors.xmu.edu.cn/gentoo/ rsync://mirrors.stuhome.net/gentoo/ rsync://ftp.jaist.ac.jp/pub/Linux/Gentoo/ rsync://ftp.iij.ad.jp/pub/linux/gentoo/ "
LANG="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="vi en"
MAKEOPTS="-j5"
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="/var/lib/layman/desktop-effects /var/lib/layman/foo-overlay"
SYNC="rsync://rsync.sg.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa amd64 amr avahi bash-completion berkdb bluetooth branding bzip2 cairo cdda cdr cli colord compiz consolekit cracklib crypt cups curl cxx dbus dri dts dvd dvdr eds emboss emerald encode evo exif fam fat fbcondecor ffmpeg firefox flac fortran freetype gconf gdbm gdu gif glut gmp gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gtk3 gzip hal iconv ipv6 java jpeg lcms ldap libcaca libnotify lirc mad mail matroska midi mmx mmxext mng modules mozilla mp3 mp4 mpeg mplayer mudflap multilib musicbrainz nautilus ncurses network-monitor networkmanager nls nptl nptlonly nsplugin ntfs ogg opengl openmp pam pango pcre pdf perl plugins png policykit powermanager ppds pppd pulseaudio python python2 python3 qt3support qt4 readline remote-access samba scim sdl session smp socialweb spell sqlite sse sse2 sse3 ssl ssse3 startup-notification svg sysfs tcpd terminal tiff truetype udev unicode upnp usb vim-syntax vorbis webkit x264 xcb xcomposite xml xorg xulrunner xv xvid xvmc yahoo zeroconf 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="plymouth" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="vi en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Vu Tran Kien 2012-01-09 05:16:05 UTC
just some hopeless try, lowering MAKEOPTS='-j1' doesn't work
Comment 2 Vu Tran Kien 2012-01-09 05:18:35 UTC
now it ends up with another error:

x86_64-pc-linux-gnu-gcc -m32 -c -I/var/tmp/portage/app-emulation/wine-1.2.3/work/wine-1.2.3/dlls/acledit -I. -I/var/tmp/portage/app-emulation/wine-1.2.3/work/wine-1.2.3/include -I../../include  -D__WINESRC__  -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wstrict-prototypes -Wtype-limits -Wwrite-strings -Wpointer-arith  -march=core2 -mtune=core2 -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0  -o main.o /var/tmp/portage/app-emulation/wine-1.2.3/work/wine-1.2.3/dlls/acledit/main.c
../../../wine64/tools/winegcc/winegcc -m32 -B../../../wine64/tools/winebuild --sysroot=../.. -fasynchronous-unwind-tables -shared /var/tmp/portage/app-emulation/wine-1.2.3/work/wine-1.2.3/dlls/acledit/acledit.spec main.o        -o acledit.dll.so  -lkernel32  ../../libs/port/libwine_port.a  -Wl,-O1 -Wl,--as-needed 
/usr/bin/ld: Relocatable linking with relocations from format elf64-x86-64 (main.o) to format elf32-i386 (acledit.jo1SRD.o) is not supported
winebuild: /usr/bin/ld -m elf_i386 -r failed with status 256
winegcc: ../../../wine64/tools/winebuild/winebuild failed
make[1]: *** [acledit.dll.so] Lỗi 2
Comment 3 Vu Tran Kien 2012-01-09 09:57:33 UTC
after hours of googling and reading I actually fixed the error.
It's not a bug in portage but it happen if you are on amd64 with icecc set up for cross-compile on other i686 systems. It seems like the '-m32' option of the cross-compiler for the x86_64 target have no effects, so it ends up with mixture of 32bit .o file and 64bit which come from other machine. (that's what ld and gcc complains about)
FYI I created the cross-compiler using crossdev tool with target x86_64-gentoo-linux-gnu.

So if you guy having this issue unset PREROOTPATH variable and lower the MAKEOPTS option to -j2 or -j1 then everything is fine!