Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Compile error on cross-i686-pc-linux-gnu-gcc-stage2 [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
jedsen
Apprentice
Apprentice


Joined: 15 Oct 2004
Posts: 276
Location: Sacramento, California, USA

PostPosted: Mon Mar 27, 2006 9:35 am    Post subject: Compile error on cross-i686-pc-linux-gnu-gcc-stage2 [solved] Reply with quote

Code:
/usr/i686-pc-linux-gnu/bin/ld: cannot find /usr/i686-pc-linux-gnu/lib/libc.so.6 inside /usr/i686-pc-linux-gnu/binutils-bin/2.16.1/../../../i686-pc-linux-gnu
collect2: ld returned 1 exit status
make[2]: *** [libgcc_s.so] Error 1

I'm getting this compile error when using crossdev to compile the i686 toolchain. I checked, and the file that it says it can't find is there. Any ideas on how to fix it?


Last edited by jedsen on Fri Apr 14, 2006 11:28 pm; edited 1 time in total
Back to top
View user's profile Send private message
hiyuh
n00b
n00b


Joined: 18 Jan 2006
Posts: 11
Location: Japan

PostPosted: Mon Apr 03, 2006 1:46 pm    Post subject: Reply with quote

I cann't say any idea for you.
Because of you forgot to post your binutils/gcc/libc/headers versions combination...
At least, please post your host/target these versions,
and then tell us what you did exactly...
Back to top
View user's profile Send private message
Skorgu
n00b
n00b


Joined: 10 Sep 2003
Posts: 39

PostPosted: Sat Apr 08, 2006 5:27 pm    Post subject: Reply with quote

I have this problem exactly.
I ran

Code:

crossdev -t i686


Here is my info:

Code:

skorgu@dukeleto ~ $ cat  /var/log/portage/cross-i686-pc-linux-gnu-info.log
--------------------------------------------------------------------------------
 * Host Portage ARCH:     amd64
 * Target Portage ARCH:   x86
 * Target System:         i686-pc-linux-gnu
 * Stage:                 4 (C/C++ compiler)

 * binutils:              binutils-[latest]
 * gcc:                   gcc-[latest]
 * headers:               linux-headers-[latest]
 * libc:                  glibc-[latest]

 * PORTDIR_OVERLAY:       /usr/local/portage
 * PORT_LOGDIR:           /var/log/portage
 * PKGDIR:                /usr/portage/packages/cross/i686-pc-linux-gnu
 * PORTAGE_TMPDIR:        /var/tmp/cross/i686-pc-linux-gnu
  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  - 
Gentoo Base System version 1.12.0_pre16
Portage 2.1_pre7-r3 (default-linux/amd64/2006.0, gcc-3.4.5, glibc-2.4-r1, 2.6.15-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.15-gentoo-r7 x86_64 AMD Athlon(tm) 64 Processor 3000+
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [disabled]
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon64 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig confcache distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LC_ALL="en_US.UTF-8"
PKGDIR="/usr/portage/packages/cross/i686-pc-linux-gnu"
PORTAGE_TMPDIR="/var/tmp/cross/i686-pc-linux-gnu"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X acpi alsa avi bash-completion berkdb bitmap-fonts bzip2 cjk cli crypt ctype cups dba dlloader doc dri dts eds emboss encode expat fastbuild fastcgi firefox flac font-server foomaticdb force-cgi-redirect fortran ftp gd gdbm gif glep glut gnome gpm gstreamer gtk gtk2 hal idn imagemagick imlib ipv6 isdnlog java jpeg kde lcms lm_sensors lzw lzw-tiff mad memlimit mng motif mozilla mp3 mpeg mysql ncurses nls nptl nptlonly nvidia ogg oggvorbis opengl oss pam pcre pdflib perl pic png posix postgres pppd python qt quicktime readline realtcgi ruby samba sdl session silc simplexml slang soap sockets sox spell spl sqlite ssl svg tcltk tcpd tetex threads tiff tokenizer truetype truetype-fonts type1-fonts unicode usb utf8 vorbis xinerama xml xml2 xpm xsl xv zlib elibc_glibc kernel_linux userland_GNU"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, LINGUAS, MAKEOPTS


The error message is:

Code:

/usr/bin/i686-pc-linux-gnu-ld: cannot find /usr/i686-pc-linux-gnu/lib/libc.so.6 inside /usr/i686-pc-linux-gnu
collect2: ld returned 1 exit status
make[3]: *** [libgcc_s.so] Error 1
make[3]: Leaving directory `/var/tmp/cross/i686-pc-linux-gnu/portage/gcc-4.1.0/work/build/gcc'
make[2]: *** [libgcc.a] Error 2
make[2]: Leaving directory `/var/tmp/cross/i686-pc-linux-gnu/portage/gcc-4.1.0/work/build/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/var/tmp/cross/i686-pc-linux-gnu/portage/gcc-4.1.0/work/build'
make: *** [all] Error 2

!!! ERROR: cross-i686-pc-linux-gnu/gcc-4.1.0 failed.
Call stack:
  ebuild.sh, line 1526:   Called dyn_compile
  ebuild.sh, line 923:   Called src_compile
  ebuild.sh, line 1236:   Called toolchain_src_compile
  toolchain.eclass, line 24:   Called gcc_src_compile
  toolchain.eclass, line 1428:   Called gcc_do_make
  toolchain.eclass, line 1302:   Called die

!!! emake failed with all
!!! If you need support, post the topmost build error, and the call stack if relevant.


Of course, that libc.so.6 exists:
Code:

dukeleto lib # pwd
/usr/i686-pc-linux-gnu/lib
dukeleto lib # ls -al libc.so.6
lrwxrwxrwx  1 root root 13 Apr  7 17:08 libc.so.6 -> libc-2.3.6.so

_________________
"I paid for four wheels, make 'em all drive"
Back to top
View user's profile Send private message
nibiru
n00b
n00b


Joined: 09 Jun 2005
Posts: 38

PostPosted: Sat Apr 08, 2006 8:47 pm    Post subject: Reply with quote

Skorgu wrote:
I have this problem exactly.
I ran


The very same problem here.

I tried first with:

Code:

crossdev -t ppc
#(I'm on an Athlon XP)


... but latest glibc refuses to compile AFAIK (even other ppl reported).

Then with:

Code:

 crossdev --l 2.3.5-r3 --b 2.16.1 --g 3.4.5-r1 --k 2.6.11-r4  -t powerpc-unknown-linux-gnu
#(those are stable version on the actual PPC)


... and it dies on gcc-stage2, with the same error:

Code:


/var/tmp/portage/gcc-3.4.5/work/build/gcc/xgcc -B/var/tmp/portage/gcc-3.4.5/work/build/gcc/ -B/usr/powerpc-unknown-linux-gnu/bin/ -B/usr/powerpc-unknown-linux-gnu/lib/ -isystem /usr/powerpc-unknown-linux-gnu/include -isystem /usr/powerpc-unknown-linux-gnu/sys-include -O2  -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -DHAVE_SYSLOG -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -D_LIBC_PROVIDES_SSP_ -fno-stack-protector -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc/./libgcc.map -o libgcc_s.so.1.tmp   libgcc/./_muldi3.o libgcc/./_negdi2.o libgcc/./_lshrdi3.o libgcc/./_ashldi3.o libgcc/./_ashrdi3.o libgcc/./_cmpdi2.o libgcc/./_ucmpdi2.o libgcc/./_floatdidf.o libgcc/./_floatdisf.o libgcc/./_fixunsdfsi.o libgcc/./_fixunssfsi.o libgcc/./_fixunsdfdi.o libgcc/./_fixdfdi.o libgcc/./_fixunssfdi.o libgcc/./_fixsfdi.o libgcc/./_fixxfdi.o libgcc/./_fixunsxfdi.o libgcc/./_floatdixf.o libgcc/./_fixunsxfsi.o libgcc/./_fixtfdi.o libgcc/./_fixunstfdi.o libgcc/./_floatditf.o libgcc/./_clear_cache.o libgcc/./_enable_execute_stack.o libgcc/./_trampoline.o libgcc/./__main.o libgcc/./_absvsi2.o libgcc/./_absvdi2.o libgcc/./_addvsi3.o libgcc/./_addvdi3.o libgcc/./_subvsi3.o libgcc/./_subvdi3.o libgcc/./_mulvsi3.o libgcc/./_mulvdi3.o libgcc/./_negvsi2.o libgcc/./_negvdi2.o libgcc/./_ctors.o libgcc/./_ffssi2.o libgcc/./_ffsdi2.o libgcc/./_clz.o libgcc/./_clzsi2.o libgcc/./_clzdi2.o libgcc/./_ctzsi2.o libgcc/./_ctzdi2.o libgcc/./_popcount_tab.o libgcc/./_popcountsi2.o libgcc/./_popcountdi2.o libgcc/./_paritysi2.o libgcc/./_paritydi2.o libgcc/./_stack_smash_handler.o libgcc/./_divdi3.o libgcc/./_moddi3.o libgcc/./_udivdi3.o libgcc/./_umoddi3.o libgcc/./_udiv_w_sdiv.o libgcc/./_udivmoddi4.o libgcc/./_pack_sf.o libgcc/./_unpack_sf.o libgcc/./_addsub_sf.o libgcc/./_mul_sf.o libgcc/./_div_sf.o libgcc/./_fpcmp_parts_sf.o libgcc/./_compare_sf.o libgcc/./_eq_sf.o libgcc/./_ne_sf.o libgcc/./_gt_sf.o libgcc/./_ge_sf.o libgcc/./_lt_sf.o libgcc/./_le_sf.o libgcc/./_unord_sf.o libgcc/./_si_to_sf.o libgcc/./_sf_to_si.o libgcc/./_negate_sf.o libgcc/./_make_sf.o libgcc/./_sf_to_df.o libgcc/./_sf_to_tf.o libgcc/./_thenan_sf.o libgcc/./_sf_to_usi.o libgcc/./_usi_to_sf.o libgcc/./_pack_df.o libgcc/./_unpack_df.o libgcc/./_addsub_df.o libgcc/./_mul_df.o libgcc/./_div_df.o libgcc/./_fpcmp_parts_df.o libgcc/./_compare_df.o libgcc/./_eq_df.o libgcc/./_ne_df.o libgcc/./_gt_df.o libgcc/./_ge_df.o libgcc/./_lt_df.o libgcc/./_le_df.o libgcc/./_unord_df.o libgcc/./_si_to_df.o libgcc/./_df_to_si.o libgcc/./_negate_df.o libgcc/./_make_df.o libgcc/./_df_to_sf.o libgcc/./_df_to_tf.o libgcc/./_thenan_df.o libgcc/./_df_to_usi.o libgcc/./_usi_to_df.o libgcc/./tramp.o  libgcc/./unwind-dw2.o libgcc/./unwind-dw2-fde-glibc.o libgcc/./unwind-sjlj.o libgcc/./gthr-gnat.o libgcc/./unwind-c.o -lc && rm -f libgcc_s.so && if [ -f libgcc_s.so.1 ]; then mv -f libgcc_s.so.1 libgcc_s.so.1.backup; else true; fi && mv libgcc_s.so.1.tmp libgcc_s.so.1 && ln -s libgcc_s.so.1 libgcc_s.so
/usr/powerpc-unknown-linux-gnu/bin/ld: cannot find /usr/powerpc-unknown-linux-gnu/lib/libc.so.6 inside /usr/powerpc-unknown-linux-gnu/binutils-bin/2.16.1/../../../powerpc-unknown-linux-gnu
collect2: ld returned 1 exit status
make[2]: *** [libgcc_s.so] Error 1
make[2]: Leaving directory `/var/tmp/portage/gcc-3.4.5/work/build/gcc'
make[1]: *** [stmp-multilib] Error 2
rm gcc.pod
make[1]: Leaving directory `/var/tmp/portage/gcc-3.4.5/work/build/gcc'
make: *** [all-gcc] Error 2

!!! ERROR: cross-powerpc-unknown-linux-gnu/gcc-3.4.5 failed.
!!! Function gcc_do_make, Line 1302, Exitcode 2
!!! emake failed with all
!!! If you need support, post the topmost build error, NOT this status message.
Back to top
View user's profile Send private message
Jake
Veteran
Veteran


Joined: 31 Jul 2003
Posts: 1132

PostPosted: Sat Apr 08, 2006 8:55 pm    Post subject: Reply with quote

This problem is actually quite common lately. I hope the bug gets fixed soon.
Back to top
View user's profile Send private message
Skorgu
n00b
n00b


Joined: 10 Sep 2003
Posts: 39

PostPosted: Sat Apr 08, 2006 9:12 pm    Post subject: Reply with quote

Thanks a ton Jake, I guess I'm blind... I'm trying that workaround now.
_________________
"I paid for four wheels, make 'em all drive"
Back to top
View user's profile Send private message
nibiru
n00b
n00b


Joined: 09 Jun 2005
Posts: 38

PostPosted: Sat Apr 08, 2006 9:48 pm    Post subject: Reply with quote

Jake wrote:
This problem is actually quite common lately. I hope the bug gets fixed soon.


Thanks from me too.

I didn't find that thread too.

Here's what has fixed the problem at once:

Code:

cd /usr/<target>
rm usr
ln -s .. usr


best regards!
Back to top
View user's profile Send private message
Skorgu
n00b
n00b


Joined: 10 Sep 2003
Posts: 39

PostPosted: Sat Apr 08, 2006 9:54 pm    Post subject: Reply with quote

Yeah, that workaround worked. Thanks again!
_________________
"I paid for four wheels, make 'em all drive"
Back to top
View user's profile Send private message
Jake
Veteran
Veteran


Joined: 31 Jul 2003
Posts: 1132

PostPosted: Sat Apr 08, 2006 10:06 pm    Post subject: Reply with quote

nibiru wrote:
Code:

cd /usr/<target>
rm usr
ln -s .. usr

Interesting. I had to use the other workaround:
Code:
ln -s . /usr/<target>/<target>
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum