View previous topic :: View next topic |
Author |
Message |
weyhan Apprentice
Joined: 27 May 2003 Posts: 245
|
Posted: Thu Mar 17, 2005 2:05 pm Post subject: emerge system failed on gcc [Solved] |
|
|
Hi,
I have managed to do a stage 1 install successfully on a minimum useflag (multilib, nptl). However, when I emerge system after I have added a whole bunch of useflag, emerge system failed on gcc. The error occurred during a ld for 32/libgcc_s_32.so complaining that libc is not found. But not before complaining that ld is skipping a whole bunch of libc because it is incompatible. Of course they are incompatible, they are all 64bit version. Below is the output:
Code: | /usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../libc.so when searching for -lc
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../libc.a when searching for -lc
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
/usr/x86_64-pc-linux-gnu/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make[3]: *** [32/libgcc_s_32.so] Error 1
make[3]: Leaving directory `/var/tmp/portage/gcc-3.4.3-r1/work/build/gcc'
make[2]: *** [stmp-multilib] Error 2
make[2]: Leaving directory `/var/tmp/portage/gcc-3.4.3-r1/work/build/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/var/tmp/portage/gcc-3.4.3-r1/work/build/gcc'
make: *** [profiledbootstrap] Error 2 |
I thought maybe my useflags are too aggressive, so I put it back to the original minimum useflag setting and try emerging system again. However, I still get the same result. I have tried adding '-L /emul/linux/x86/lib32' to LDFLAGS in make.conf. Same thing.
My make.conf is as follows. The two USE line is what I have tried and failed:
Code: | CFLAGS="-march=athlon64 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
USE="nptl multilib"
#USE="X Xaw3d acpi alsa audiofile avi bash-completion berkdb bindist bzlib calendar cdr cjk cscope cpdflib ctype cups curl curlwrappers dio directfb divx4linux dvd dvdr emacs emacs-w3 exif fbcon flac flash foomaticdb gcj gif gnome gnutls gphoto2 gstreamer gtk gtk2 imagemagick imap imlib jabber jack java jikes jpeg lcms ldap leim mad mcal memlimit mikmod ming mozilla mpeg mule multilib ncurses nptl offensive ofx oggvorbis openal opengl pda pdflib perl php posix ppds quicktime readline ruby session sftplogging speex spell ssl tcltk theora tiff tokenizer truetype unicode usb videos vim-with-x xine xmms xprint xv xvid yahoo zeo zlib -apm -gdbm -gpm -hardened -hardenedphp -mailwrapper -oss"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
RSYNC_RETRIES="3"
SYNC="rsync://rsync.asia.gentoo.org/gentoo-portage"
GENTOO_MIRRORS="http://mymirror.asiaosc.org/gentoo ftp://ftp6.uni-erlangen.de/pub/mirrors/gentoo http://www.zentek-international.com/mirrors/gentoo/ http://ftp.isu.edu.tw/pub/Linux/Gentoo"
|
Anyone have any idea?
Oh, and I have also tried MAKEOPTS='-j1'. Same thing also.
Also, I was not able to find any post in the forum with the same problem. Am I the only one? _________________ Han.
Last edited by weyhan on Sat Mar 19, 2005 3:48 pm; edited 1 time in total |
|
Back to top |
|
|
tuxfan Apprentice
Joined: 14 Feb 2003 Posts: 257
|
Posted: Thu Mar 17, 2005 3:51 pm Post subject: |
|
|
I had the same problem and I could solve it by switching with the gcc-config to another gcc version and back again. But now I get the following error message
Code: | checking for x86_64-pc-linux-gnu-gcc... /var/tmp/portage/gcc-3.4.3-r1/work/build/gcc/xgcc -B/var/tmp/portage/gcc-3.4.3-r1/work/build/gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -m32
checking for C compiler default output... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
make[1]: *** [configure-target-libstdc++-v3] Fehler 1
make[1]: Leaving directory `/var/tmp/portage/gcc-3.4.3-r1/work/build'
make: *** [profiledbootstrap] Fehler 2
|
The config.log contains the following
Code: | This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
configure:581: checking host system type
configure:602: checking target system type
configure:620: checking build system type
configure:675: checking for a BSD compatible install
configure:2859: checking for x86_64-pc-linux-gnu-ar
configure:2892: checking for ar
configure:2931: checking for x86_64-pc-linux-gnu-as
configure:2964: checking for as
configure:3003: checking for x86_64-pc-linux-gnu-dlltool
configure:3036: checking for dlltool
configure:3075: checking for x86_64-pc-linux-gnu-ld
configure:3147: checking for x86_64-pc-linux-gnu-nm
configure:3180: checking for nm
configure:3219: checking for x86_64-pc-linux-gnu-ranlib
configure:3252: checking for ranlib
configure:3291: checking for x86_64-pc-linux-gnu-windres
configure:3324: checking for windres
configure:3363: checking for x86_64-pc-linux-gnu-objcopy
configure:3396: checking for objcopy
configure:3435: checking for x86_64-pc-linux-gnu-objdump
configure:3468: checking for objdump
configure:3517: checking for x86_64-pc-linux-gnu-ar
configure:3550: checking for ar
configure:3589: checking for x86_64-pc-linux-gnu-as
configure:3622: checking for as
configure:3661: checking for x86_64-pc-linux-gnu-dlltool
configure:3694: checking for dlltool
configure:3733: checking for x86_64-pc-linux-gnu-ld
configure:3766: checking for ld
configure:3805: checking for x86_64-pc-linux-gnu-nm
configure:3838: checking for nm
configure:3877: checking for x86_64-pc-linux-gnu-ranlib
configure:3910: checking for ranlib
configure:3949: checking for x86_64-pc-linux-gnu-windres
configure:3982: checking for windres
configure:4049: checking whether to enable maintainer-specific portions of Makefiles
|
Any suggestions? |
|
Back to top |
|
|
weyhan Apprentice
Joined: 27 May 2003 Posts: 245
|
Posted: Thu Mar 17, 2005 5:18 pm Post subject: |
|
|
tuxfan wrote: | I had the same problem and I could solve it by switching with the gcc-config to another gcc version and back again. ... |
I've tried your switching with gcc-config like you've said. Did not help me though. _________________ Han. |
|
Back to top |
|
|
MrPyro Tux's lil' helper
Joined: 14 Aug 2003 Posts: 121 Location: Sheffield, England
|
Posted: Fri Mar 18, 2005 5:53 pm Post subject: |
|
|
I've been having this problem, and I think I've just fixed it (gcc is still compiling as I type, but it's got past the point where it's been crashing before)
Try re-emerging emul-linux-x86-baselibs, emul-linux-x86-compat and emul-linux-x86-glibc. That's what I did. I have no idea why it would have worked: I was just desperate and thought I'd give it a try. Hope this helps you too. _________________ Back off man, I'm a computer scientist |
|
Back to top |
|
|
MrPyro Tux's lil' helper
Joined: 14 Aug 2003 Posts: 121 Location: Sheffield, England
|
Posted: Fri Mar 18, 2005 5:57 pm Post subject: |
|
|
Also, make sure you have enabled the emul-linux use flag. In my case I also re-emerged glibc, but I don't know if that actually made any difference. _________________ Back off man, I'm a computer scientist |
|
Back to top |
|
|
tuxfan Apprentice
Joined: 14 Feb 2003 Posts: 257
|
Posted: Fri Mar 18, 2005 6:05 pm Post subject: |
|
|
Have a look here.
That solved my problems. |
|
Back to top |
|
|
weyhan Apprentice
Joined: 27 May 2003 Posts: 245
|
Posted: Fri Mar 18, 2005 6:38 pm Post subject: |
|
|
tuxfan wrote: | Have a look here.
That solved my problems. | Humm... Wonder why a search with "emerge gcc libc" did not turn up that post. Anyway, trying it now.
EDIT: Ahhh... wait, now I remember. The search did turn up that post, I just thought the subject line did not match my situation so did not read it. Should have explore a bit more. _________________ Han.
Last edited by weyhan on Fri Mar 18, 2005 6:57 pm; edited 1 time in total |
|
Back to top |
|
|
weyhan Apprentice
Joined: 27 May 2003 Posts: 245
|
Posted: Fri Mar 18, 2005 6:53 pm Post subject: |
|
|
MrPyro wrote: | Try re-emerging emul-linux-x86-baselibs, emul-linux-x86-compat and emul-linux-x86-glibc. That's what I did. I have no idea why it would have worked: I was just desperate and thought I'd give it a try. Hope this helps you too. |
Yes, it did. I manage to go pass the spot where it errors. Hope that's the last of the hurdle. *Fingers crossed*
Thanks too to tuxfan. _________________ Han. |
|
Back to top |
|
|
weyhan Apprentice
Joined: 27 May 2003 Posts: 245
|
Posted: Sat Mar 19, 2005 3:48 pm Post subject: |
|
|
WooHoo!! Success!
Again, tanks folks. _________________ Han. |
|
Back to top |
|
|
Maedhros Bodhisattva
Joined: 14 Apr 2004 Posts: 5511 Location: Durham, UK
|
|
Back to top |
|
|
|