Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 427210

Summary: bootstrap: libgcc_s not found on OpenSuSE
Product: Gentoo/Alt Reporter: Martin Höfling <martin.hoefling>
Component: Prefix SupportAssignee: Gentoo Prefix <prefix>
Status: RESOLVED DUPLICATE    
Severity: normal CC: jackhill
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Martin Höfling 2012-07-19 11:33:01 UTC
I am following guide:
http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-solaris.xml
to install prefixed gentoo on a Opensuse 12.1 Workstation with x86-64 arch.

"Code Listing 1.16: doing the final system installation" (emerge -e system) fails.

When emerging the first package (xz-utils), I get:

configure: error: in `/home/mhoefli/local/pfgentoo/var/tmp/portage/app-arch/xz-utils-5.0.3/work/xz-5.0.3':
configure: error: C compiler cannot create executables
See `config.log' for more details

and the relevant part of the config.log is

configure:4926: checking whether the C compiler works
configure:4948: x86_64-pc-linux-gnu-gcc -O2 -pipe  -Wl,-O1 conftest.c  >&5
/home/mhoefli/local/pfgentoo/usr/lib64/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status

but libgcc_s.so.1 is in $EPREFIX/lib.

Thsi only happens if I use the 4.6.3 gcc instead of 4.2.4:
 [1] x86_64-pc-linux-gnu-4.2.4 
 [2] x86_64-pc-linux-gnu-4.6.3 *

Binutils config also fails with 4.6.3 enabled 

 * Switching to x86_64-pc-linux-gnu-2.22 ...
/home/mhoefli/local/pfgentoo/usr/lib64/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lgcc_s
collect2: ld gab 1 als Ende-Status zurück

but emerging gcc 4.6.3 with 4.2.4 enabled works fine.

Any ideas where this could come from?
Comment 1 Jack Hill 2012-07-19 12:17:20 UTC
What is your $EPREFIX/etc/make.profile symlinked to?

Prefix on amd64-linux uses lib as the libdir not lib64 as in …usr/lib64/gcc…

I don’t understand why 4.2 is not affected though.
Comment 2 Fabian Groffen gentoo-dev 2012-07-19 12:36:50 UTC
I agree with both observations.  How does $EPREFIX/usr look like?
Comment 3 Fabian Groffen gentoo-dev 2012-07-19 12:37:58 UTC
removing amd64 team, as they have nothing to do here as far as I can see now
Comment 4 Martin Höfling 2012-07-19 12:52:41 UTC
Link:
make.profile -> /home/mhoefli/local/pfgentoo/usr/portage/profiles/prefix/linux/amd64

$ ls $EPREFIX/usr
bin  include  lib  lib64  libexec  local  portage  sbin  share  tmp  x86_64-pc-linux-gnu
Comment 5 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-07-19 13:12:24 UTC
(In reply to comment #4)
> $ ls $EPREFIX/usr
> bin  include  lib  lib64  libexec  local  portage  sbin  share  tmp 
> x86_64-pc-linux-gnu

Bingo, how did you get lib64 there? (qfile from portage-utils might help triage)
Comment 6 Martin Höfling 2012-07-19 13:22:50 UTC
no idea, emerged qfile. Is this the output you are interested?

mhoefli@mhoefli ~/local/pfgentoo $ qfile usr/lib64
sys-devel/gcc-4.2.4-r01.4 (/home/mhoefli/local/pfgentoo/usr/lib64)
sys-devel/gcc (/home/mhoefli/local/pfgentoo/usr/lib64)

seems as if gcc 4.2 has put some stuff there.

Just as a side note, I had similar lib64 problems emerging portage with python in tmp. Here's the full list of commands till the error occurs:

export EPREFIX=$HOME/local/pfgentoo
export PATH="$EPREFIX/usr/bin:$EPREFIX/bin:$EPREFIX/tmp/usr/bin:$EPREFIX/tmp/bin:$PATH"

unset PYTHONPATH

./bootstrap-prefix.sh $EPREFIX tree
./bootstrap-prefix.sh $EPREFIX/tmp make
./bootstrap-prefix.sh $EPREFIX/tmp wget
./bootstrap-prefix.sh $EPREFIX/tmp sed
./bootstrap-prefix.sh $EPREFIX/tmp coreutils
./bootstrap-prefix.sh $EPREFIX/tmp findutils
./bootstrap-prefix.sh $EPREFIX/tmp tar
./bootstrap-prefix.sh $EPREFIX/tmp patch
./bootstrap-prefix.sh $EPREFIX/tmp grep
./bootstrap-prefix.sh $EPREFIX/tmp gawk
./bootstrap-prefix.sh $EPREFIX/tmp bash
./bootstrap-prefix.sh $EPREFIX/tmp zlib
./bootstrap-prefix.sh $EPREFIX/tmp python

#To fix python, I copied everything from lib64 in  lib, otherwise portage doest find the python Makefile in the python config directory (they are in lib64).
#Copy $EPREFIX/tmp/usr/lib64 into $EPREFIX/tmp/usr/lib

./bootstrap-prefix.sh $EPREFIX portage

hash -r

emerge --oneshot sed
emerge --oneshot --nodeps bash
emerge --oneshot --nodeps wget

emerge --oneshot --nodeps sys-apps/baselayout-prefix
emerge --oneshot --nodeps app-arch/xz-utils
emerge --oneshot --nodeps sys-devel/m4
emerge --oneshot --nodeps sys-devel/flex
emerge --oneshot --nodeps sys-devel/bison
emerge --oneshot --nodeps sys-devel/binutils-config
emerge --oneshot --nodeps sys-devel/binutils
emerge --oneshot --nodeps sys-devel/gcc-config
emerge --oneshot --nodeps "=sys-devel/gcc-4.2*"

emerge --oneshot sys-apps/coreutils
emerge --oneshot sys-apps/findutils
emerge --oneshot '<app-arch/tar-1.26-r1'
emerge --oneshot sys-apps/grep
emerge --oneshot sys-devel/patch
emerge --oneshot sys-apps/gawk
emerge --oneshot sys-devel/make
emerge --oneshot sys-libs/zlib
emerge --oneshot --nodeps sys-apps/file
emerge --oneshot --nodeps app-admin/eselect
emerge --oneshot app-misc/pax-utils
emerge --oneshot "<net-misc/wget-1.13.4-r1"
emerge --oneshot virtual/os-headers

env FEATURES="-collision-protect" emerge --oneshot sys-apps/portage

rm -Rf $EPREFIX/tmp/*

hash -r

emerge --sync
emerge --oneshot "<dev-libs/mpc-0.9"
env USE=-git emerge -u system

echo 'USE="unicode nls"' >> $EPREFIX/etc/portage/make.conf
echo 'CFLAGS="-O2 -pipe"' >> $EPREFIX/etc/portage/make.conf
echo 'CXXFLAGS="${CFLAGS}"' >> $EPREFIX/etc/portage/make.conf

gcc-config -l
gcc-config 2

emerge -e system
Comment 7 Fabian Groffen gentoo-dev 2012-08-10 09:40:34 UTC
this seems a dup of #414469 to me

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