Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 143096 - ldconfig sets ld-2.4.so to use arm libstdc++.so.6 instead of emul-linux-x86-compat one on x86_64
Summary: ldconfig sets ld-2.4.so to use arm libstdc++.so.6 instead of emul-linux-x86-c...
Status: RESOLVED DUPLICATE of bug 137917
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-07 08:36 UTC by Yuri Vasilevski (RETIRED)
Modified: 2006-08-07 09:20 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Vasilevski (RETIRED) gentoo-dev 2006-08-07 08:36:28 UTC
My unix dynamic loader knowledge is null, so please bear with me if I have miss interpreted something, but the problem as I see it is the folowing:

After I emerged with the aid of crossdev an arm-unknown-linux-gnu crosscompiler, skype stoped working with this error:

/opt/skype/skype: error while loading shared libraries: /usr/lib/gcc/arm-unknown-linux-gnu/4.1.1/libstdc++.so.6: ELF file OS ABI invalid

I investigated my /etc/ld.so.conf and /usr/lib/gcc/arm-unknown-linux-gnu/4.1.1 appears way before /emul/linux/x86/usr/lib (where the correct libstdc++.so.6 is). And if I move /emul/linux/x86/usr/lib before /usr/lib/gcc/arm-unknown-linux-gnu/4.1.1 and run ldconfig the problem gets fixed (obviously until the next time portage runs env-update and /etc/ld.so.conf is regenerated).

So I see this possible solutions:

1) Probably the best one would be for the dynamic loader to check if it is his arches lib before loading it or skipping it it is not.

2) A good one would be for ldconfig not to add the libs of incompatible arches to /etc/ld.so.cache (but this may present a problem with multiarch systems like x86_64+x86, hppa+x86, ...).

3) This is probably the easiest one, to enforce the right order when env-update generates /etc/ld.so.conf

Yuri.

$ qfile -Cv libstdc++.so.6
sys-devel/gcc-4.1.1 (/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/32/libstdc++.so.6)
sys-devel/gcc-4.1.1 (/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/libstdc++.so.6)
sys-devel/gcc-3.4.6-r1 (/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/32/libstdc++.so.6)
sys-devel/gcc-3.4.6-r1 (/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/libstdc++.so.6)
x11-misc/googleearth-4_beta (/opt/googleearth/libstdc++.so.6)
app-emulation/emul-linux-x86-compat-1.0-r1 (/emul/linux/x86/usr/lib/libstdc++.so.6)
cross-arm-unknown-linux-gnu/gcc-4.1.1 (/usr/lib/gcc/arm-unknown-linux-gnu/4.1.1/libstdc++.so.6)

# emerge --info
Portage 2.1.1_pre4-r3 (default-linux/amd64/2006.0, gcc-3.4.6/amd64-vanilla, glibc-2.4-r3, 2.6.15-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.15-gentoo-r7 x86_64 Intel(R) Pentium(R) D CPU 3.00GHz
Gentoo Base System version 1.12.4
ccache version 2.4 [disabled]
app-admin/eselect-compiler: 2.0.0_rc2-r1
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r2
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17, 1.2.18.1
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.17
sys-devel/gcc-config: 2.0.0_rc1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.16
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O3 -fomit-frame-pointer -mfpmath=sse -pipe"
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/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=nocona -O3 -fomit-frame-pointer -mfpmath=sse -pipe"
DISTDIR="/exports/distfiles"
FEATURES="autoconfig cvs distlocks metadata-transfer sandbox sfperms sign strict"
GENTOO_MIRRORS="http://mirrors.tds.net/gentoo http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
MAKEOPTS="-j5"
PKGDIR="/var/tmp/build/packages.get"
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'"
PORTAGE_TMPDIR="/var/tmp/build"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/overlay.corssdev /home/yvasilev/portage/overlay.glibc /home/yvasilev/portage/overlay.sunrise /home/yvasilev/portage/xgl-coffee"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X a52 aac acpi alsa amr apache2 avahi avi bash-completion beagle bitmap-fonts bzip2 cairo cdparanoia clamav cli crypt cups daap dbus djvu dlloader dmi dri dts dv dvd dvdr dvdread dvi elibc_glibc emboss encode enscript exif ffmpeg firefox flac foomaticdb gd gdbm gdl gif glitz gnome gnutls gpm graphviz gs gtk gtk2 hal hddtemp howl-compat i8x0 id3 imagemagick imap imlib inherit-graph input_devices_evdev input_devices_keyboard input_devices_mouse isdnlog ithreads jit jpeg jpeg2k kernel_linux kqemu lame libnotify linguas_en live lzw lzw-tiff mad maildir math matroska mono mp3 mp4live mpeg mpeg2 musepack na_dd na_icons nautilus ncurses network new-login nfs nls nptl nptlonly nsplugin nvidia ogg opengl pam pam_chroot pam_console pam_timestamp pango pcre pdf pdflib perl png ppds pppd python quicktime quinnstorm readline reflection rle rtc samba sdl session smime smp speex spell spl ssl startup-notification subversion sudo svg tcpd tetex theora thesaurus threads tiff truetype truetype-fonts type1-fonts uclibc-compat unicode usb userland_GNU v4l2 video_cards_i810 video_cards_nv video_cards_nvidia vorbis wmf x264 xml xml2 xorg xpm xprint xv xvid xvmc zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 SpanKY gentoo-dev 2006-08-07 09:20:58 UTC

*** This bug has been marked as a duplicate of 137917 ***