Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 352647 - x11-drivers/nvidia-drivers-190.42-r3 - error when ld obj from elf64-x86-64 to elf32-i386
Summary: x11-drivers/nvidia-drivers-190.42-r3 - error when ld obj from elf64-x86-64 to...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-25 01:50 UTC by Leo
Modified: 2011-01-31 02:31 UTC (History)
0 users

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


Attachments
emerge --info =x11-drivers/nvidia-drivers-190.42-r3 (emerge.info.output,3.57 KB, text/plain)
2011-01-25 02:27 UTC, Leo
Details
build log (build.log,22.69 KB, text/plain)
2011-01-31 01:52 UTC, Leo
Details
enviroment (environment,161.23 KB, text/plain)
2011-01-31 02:31 UTC, Leo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leo 2011-01-25 01:50:33 UTC
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
Comment 1 Agostino Sarubbo gentoo-dev 2011-01-25 01:59:24 UTC
please not add in the future arch teams, it is wrangler's job
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2011-01-25 02:17:01 UTC
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.
Comment 3 Leo 2011-01-25 02:27:01 UTC
Created attachment 260622 [details]
emerge --info =x11-drivers/nvidia-drivers-190.42-r3
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2011-01-30 18:30:33 UTC
(In reply to comment #2)
> Please attach the entire build log as a file.

..
Comment 5 Leo 2011-01-31 01:52:52 UTC
Created attachment 261142 [details]
build log
Comment 6 Leo 2011-01-31 02:31:29 UTC
Created attachment 261143 [details]
enviroment