compiling nvidia driver, error when ld obj from elf64-x86-64 to elf32-i386 Reproducible: Always Steps to Reproduce: 1. install 64-bits OS 2. download the nvidia-drivers-190.42-r3.ebuild 3. emerge nvidia-drivers Kernel: linux-2.6.31-gentoo-r6 ebuild: nvidia-drivers-190.42-r3.ebuild uname -a: Linux 2.6.32-24-generic #39-Ubuntu SMP Wed Jul 28 05:14:15 UTC 2010 x86_64 GNU/Linux I want to compile the nvidia.ko for my 32-bits X86 based target board. So I try to emerge the nvidia, I can compile the files, but when we try to ld the obj, there's error, it says:"i686-pc-linux-gnu-ld: Relocatable linking with relocations from format elf64-x86-64 (/build/x86-generic/tmp/portage/x11-drivers/nvidia-drivers-190.42-r3/work/NVIDIA-Linux-x86-190.42-pkg0/usr/src/nv/nv.o) to format elf32-i386 (/build/x86-generic/tmp/portage/x11-drivers/nvidia-drivers-190.42-r3/work/NVIDIA-Linux-x86-190.42-pkg0/usr/src/nv/nvidia.o) is not supported". I type the i686-pc-linux-gnu-ld --help, they told me the tool support both elf32 and elf64, but why can mixed link these kinds of obj together? Actual Results: i686-pc-linux-gnu-ld complain it can not do these job. Expected Results: We can use i686-pc-linux-gnu-ld to link both 32-bits obj and 64bits obj into one obj. Actually I run on the ChromesOS which is gentoo customize OS, HOST is ubuntu-64bits. CROSS_COMPILE is i686-pc-linux-gnu-ld, HOSTCC=x86_64-pc-linux-gnu-gcc. (cros-chroot) archermind@rdcdz10355 /build/x86-generic/tmp/portage/chromeos-base/kernel-9999/work/kernel-9999 $ emerge-x86-generic --info Portage 2.1.7.17-r15 (!/usr/local/portage/chromiumos//profiles/default/linux/x86/10.0/chromeos/, gcc-4.4.3, unavailable, 2.6.32-24-generic x86_64) ================================================================= System uname: Linux-2.6.32-24-generic-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E7500_@_2.93GHz-with-gentoo-1.12.13 Timestamp of tree: Wed, 10 Mar 2010 07:00:01 +0000 ccache version 2.4 [disabled] app-shells/bash: 4.0_p35 dev-java/java-config: 2.1.10 dev-lang/python: 2.6.4 dev-util/ccache: 2.4-r7 dev-util/cmake: 2.6.4-r3 sys-apps/baselayout: 2.0.1-r209 sys-apps/sandbox: 1.6-r3 sys-devel/autoconf: 2.63-r1 sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.1 sys-devel/binutils: 2.18-r3 sys-devel/gcc: 4.3.4-r4 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6b virtual/os-headers: 2.6.30-r1 ACCEPT_KEYWORDS="x86" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-m32 -march=i386 -mtune=i386" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc/make.globals" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-O2 -pipe -march=atom -mtune=atom -mfpmath=sse -I/build/x86-generic/usr/include/ -I/build/x86-generic/include/ -ggdb" DISTDIR="/var/lib/portage/distfiles-target" FEATURES="assume-digests buildpkg distlocks fixpackages news nodoc noinfo noman parallel-fetch protect-owned sandbox sfperms splitdebug unmerge-logs unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="http://gsdview.appspot.com/chromeos-mirror/gentoo" LANG="C" LDFLAGS="-L/build/x86-generic/lib -L/build/x86-generic/usr/lib" MAKEOPTS="-j2" PKGDIR="/build/x86-generic/packages/" PORTAGE_CONFIGROOT="/build/x86-generic/" 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="/build/x86-generic/tmp/" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage /usr/local/portage/chromiumos /home/archermind/trunk/src/overlays/overlay-x86-generic" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acpi berkdb bindist bzip2 cairo cli compat_wireless cros-debug crypt dri gdbm hardened iconv isdnlog make-symlinks mmx modules mudflap ncurses nls nptl nptlonly opengl pam pcre pppd pulseaudio readline reflection session spl sse sse2 ssl sysfs tcpd unicode usb x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="intel vmware vesa" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
please not add in the future arch teams, it is wrangler's job
Please attach the entire build log as a file. Please paste your `emerge --info =x11-drivers/nvidia-drivers-190.42-r3' output in a comment.
Created attachment 260622 [details] emerge --info =x11-drivers/nvidia-drivers-190.42-r3
(In reply to comment #2) > Please attach the entire build log as a file. ..
Created attachment 261142 [details] build log
Created attachment 261143 [details] enviroment