Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 137917 - eselect compiler mixes crossbuild libraries into ld.so.conf
Summary: eselect compiler mixes crossbuild libraries into ld.so.conf
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Jeremy Huddleston (RETIRED)
URL:
Whiteboard:
Keywords:
: 143096 (view as bug list)
Depends on:
Blocks: 143697
  Show dependency tree
 
Reported: 2006-06-25 02:07 UTC by Torsten Kaiser
Modified: 2007-03-13 06:35 UTC (History)
9 users (show)

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


Attachments
unset COMPILER_CONFIG_LDPATH when not the native ctarget (compiler.eselect.patch,555 bytes, patch)
2006-08-05 23:57 UTC, Steven Newbury
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Torsten Kaiser 2006-06-25 02:07:54 UTC
I emerge arm-softfloat-linux-gnu-gcc in version 4.1.1 and 3.4.6 onto an ~x86 system.
After using eselect compiler to switch between these two arm-gccs some programs no longer work:

ariolc ~ # eix -e glibc
eix: error while loading shared libraries:
/usr/lib/gcc/arm-softfloat-linux-gnu/4.1.1/libgcc_s.so.1: ELF file OS ABI
invalid

The cause of this error is, that ld.so.conf contains:
...
/usr/lib/gcc/arm-softfloat-linux-gnu/4.1.1
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1
...

So ld.so will try to load the wrong library first.

The cause of this seems to be, that [a]rm comes before [i]686 when eselect rebuilds /etc/env.d/05compiler and then /etc/ld.so.conf.

/etc/env.d/gcc contains the following files:
arm-softfloat-linux-gnu-3.4.6
arm-softfloat-linux-gnu-3.4.6-hardenednopiessp
arm-softfloat-linux-gnu-4.1.1
config
config-
config-i686-pc-linux-gnu
i686-pc-linux-gnu-3.4.6
i686-pc-linux-gnu-3.4.6-hardened
i686-pc-linux-gnu-3.4.6-hardenednopie
i686-pc-linux-gnu-3.4.6-hardenednopiessp
i686-pc-linux-gnu-3.4.6-hardenednossp
i686-pc-linux-gnu-4.0.3
i686-pc-linux-gnu-4.1.1
Comment 1 Steven Newbury 2006-08-05 23:20:55 UTC
(In reply to comment #0)
> I emerge arm-softfloat-linux-gnu-gcc in version 4.1.1 and 3.4.6 onto an ~x86
> system.
> After using eselect compiler to switch between these two arm-gccs some programs
> no longer work:
> 
> ariolc ~ # eix -e glibc
> eix: error while loading shared libraries:
> /usr/lib/gcc/arm-softfloat-linux-gnu/4.1.1/libgcc_s.so.1: ELF file OS ABI
> invalid
> 
> The cause of this error is, that ld.so.conf contains:
> ...
> /usr/lib/gcc/arm-softfloat-linux-gnu/4.1.1
> /usr/lib/gcc/i686-pc-linux-gnu/4.1.1
> ...
> 
> So ld.so will try to load the wrong library first.
> 
> The cause of this seems to be, that [a]rm comes before [i]686 when eselect
> rebuilds /etc/env.d/05compiler and then /etc/ld.so.conf.
> 
> /etc/env.d/gcc contains the following files:
> arm-softfloat-linux-gnu-3.4.6
> arm-softfloat-linux-gnu-3.4.6-hardenednopiessp
> arm-softfloat-linux-gnu-4.1.1
> config
> config-
> config-i686-pc-linux-gnu
> i686-pc-linux-gnu-3.4.6
> i686-pc-linux-gnu-3.4.6-hardened
> i686-pc-linux-gnu-3.4.6-hardenednopie
> i686-pc-linux-gnu-3.4.6-hardenednopiessp
> i686-pc-linux-gnu-3.4.6-hardenednossp
> i686-pc-linux-gnu-4.0.3
> i686-pc-linux-gnu-4.1.1
> 

I've been having the same problem here for a ages.  I have been working with experimental cross-arm-eabi toolchains, emerging directly with an overlay so I wasn't sure if it was something I did wrong somewhere.  Given you're having the same problem I think it needs fixing here in eselect compiler.  Only "native" gcc libraries should be merged into the LDPATH entry in 05compiler.

I'll see if I can make a patch for it...
Comment 2 Steven Newbury 2006-08-05 23:57:17 UTC
Created attachment 93574 [details, diff]
unset COMPILER_CONFIG_LDPATH when not the native ctarget
Comment 3 SpanKY gentoo-dev 2006-08-07 09:20:58 UTC
*** Bug 143096 has been marked as a duplicate of this bug. ***
Comment 4 solar (RETIRED) gentoo-dev 2006-08-12 10:12:45 UTC
eradicator, I'm going to p.mask this package if you dont fix this like real soon. 
It's been sitting here for two months untouched.
Comment 5 Andrew Gaffney (RETIRED) gentoo-dev 2006-08-12 12:03:00 UTC
This thing just needs to be p.mask'd anyway until it can be proven to not be a steaming pile of crap.
Comment 6 solar (RETIRED) gentoo-dev 2006-08-14 07:04:57 UTC
>=sys-devel/gcc-config-2 and app-admin/eselect-compiler masked till these 
bugs are resolved.
Comment 7 Peter Read 2006-08-14 08:38:21 UTC
Of course, now it's masked and emerge -auvDN world is giving a nice friendly error;

!!! All ebuilds that could satisfy "app-admin/eselect-compiler" have been masked.
!!! One of the following masked packages is required to complete your request:
- app-admin/eselect-compiler-2.0.0_rc1-r6 (masked by: package.mask)
# Ned Ludd <solar/gentoo.org> (Aug 14 2006)
# This this breaks working systems and eradicator
# has gone MIA yet again. Bug 137917

- app-admin/eselect-compiler-2.0.0_rc2 (masked by: package.mask)
- app-admin/eselect-compiler-2.0.0_rc2-r1 (masked by: package.mask)

For more information, see MASKED PACKAGES section in the emerge man page or
refer to the Gentoo Handbook.
(dependency required by "sys-libs/glibc-2.4-r3" [ebuild])

On ~amd64 at least.  I looked at the glibc ebuild to see exactly what it depends on and am guessing the recommendation would be going back to gcc-config-1.3.13-r3 ?  If so might be worth adding that to the comments for the mask so a load of unnecessary bugs don't get logged...
Comment 8 solar (RETIRED) gentoo-dev 2006-08-14 08:40:55 UTC
So downgrade gcc-config and unmerge eselect-compiler.
Comment 9 Andrew Gaffney (RETIRED) gentoo-dev 2006-08-14 08:44:39 UTC
Solar, this is the bug I was telling you about. It can be "fixed" by just p.mask'ing gcc-config-2 and leaving eselect-compiler alone. In most cases, this is enough.
Comment 10 Peter Read 2006-08-14 09:12:02 UTC
(In reply to comment #8)
> So downgrade gcc-config and unmerge eselect-compiler.
> 

Of course, I was suggesting mentioning it in the package.mask comments might prevent unnecessary bugs being logged ....  TBH I'll just be unmasking what you masked, but figured it'd be in everyones interest to prevent silly bugs being opened.
Comment 11 Steven Newbury 2006-08-17 11:02:30 UTC
I take it the patch I posted above is unacceptable?  OK it is a little hacky, it does do the job nicely though.
Comment 12 solar (RETIRED) gentoo-dev 2006-08-17 11:13:06 UTC
Steven, see bug #143697 for a more complete list of problems.
Comment 13 SpanKY gentoo-dev 2007-03-13 06:35:04 UTC
eselect-compiler is dead for the time being