I tried to generate a croos-toolchain for an i586 target on an i686 machine. Here is the output from the crossdev command: crossdev --arch=i586 --unstable --vheaders=2.4.26 * crossdev.sh v0.4 - Cross-Toolchain Generator * Host Architecture: i686-pc-linux-gnu * Host CFLAGS: -march=i686 -O2 -pipe * Target Architecture: i586-pc-linux-gnu * Target CFLAGS: -march=i586 -O2 -pipe * Install Path: /home/crossdev1/i586 * Using unstable packages... On * Enabling extra gcc langs... Off * Using Portage CFLAGS... Off * Using Portage Sandbox... Off * Building Kernel Compiler... Off * Cleaning build dir... Off * Pretending... No * The following packages in /usr/portage will be used: sys-kernel/linux-headers-2.4.26 sys-devel/binutils-2.14.90.0.8-r1 sys-devel/gcc-3.3.4-r1 sys-libs/glibc-2.3.4.20040808 I skipped the error message from the build as I already have a fix for it. But I'm not sure if it is a clean fix as the fix - together with the already implemented fix for this problem - is dependend on the glibc version. Fix in crossdev-04.-r1 tackles glibc 2.3.3. My patch adds support for glibc 2.3.4.20040808. Reproducible: Always Steps to Reproduce: 1. crossdev --arch=i586 --unstable --vheaders=2.4.26 2. 3. Portage 2.0.50-r10 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.4.20040808-r0, 2.6. 7) ================================================================= System uname: 2.6.7 i686 Intel(R) Pentium(R) 4 CPU 3.06GHz Gentoo Base System version 1.5.3 distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3. 2/share/config /usr/kde/3.3/share/config:/usr/kde/3.3/env:/usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /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/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distcc sandbox" GENTOO_MIRRORS="ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ http://linux. rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://194.117.158.30" MAKEOPTS="-j7" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/home/src" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X aalib alsa apm avi berkdb bonobo cdr crypt cups dga dvd dvdr encode esd ethereal evo foomaticdb gdbm gif gnome gpm gtk gtk2 gtkhtml imagemagick imap imlib java jpeg kerberos lcms libg++ libwww lirc mad mbox mikmod mmx motif mozilla mpeg mpi mule mysql nas ncurses nls oggvorbis opengl pam pdflib perl plotutils png postgres ppds prelude python qt quicktime readline samba scanner sdl slang spell sse ssl svga tcltk tcpd tetex tiff truetype usb x86 xinerama xml2 xmms xv zlib"
Created attachment 38371 [details, diff] patch for the "gcc_eh not found" problem in glibc-2.3.4.20040808
OK. Seems that I was not too awake this morning at 9:30 am. Sorry guys. Of course the error is that ld during the Make process states: .../bin/ld: -lgcc_eh could not find file... (Now I will fall back to sleep).
I'm getting a similar error generating a cross-compiler for mips. Unfortunately, I'm completely new to cross-compiling, and I have no idea what I'm doing. :D I just need to compile some stuff for my mipsel Linksys WRT54GS router. ################################################################# # emerge info Portage 2.0.50-r10 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.3.20040420-r1, 2.6.8-gentoo-r3) ================================================================= System uname: 2.6.8-gentoo-r3 i686 Pentium III (Coppermine) Gentoo Base System version 1.4.16 distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium3 -pipe -fomit-frame-pointer -fstack-protector" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium3 -pipe -fomit-frame-pointer -fstack-protector" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distcc fixpackages sandbox" GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo http://mirrors.tds.net/gentoo ftp://linux.thai.net/pub/mirrors/gentoo" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X aalib alsa apache2 apm avi bidi crypt cups dga directfb divx4linux encode faad fbcon flash foomaticdb gd ggi gnome gtk gtk2 imagemagick imap imlib jpeg lcms libcaca libg++ libwww mad matroska mcal memlimit mikmod mmap mmx mmx2 motif mozilla mpeg mysql ncurses nls nntp oggvorbis opengl pam pdflib perl png postgres ppds python quicktime readline samba sasl sdl slang slp spell sse ssl svga tcltk threads tiff truetype unicode usb vhosts wxwindows x86 xml xml2 xmms xv xvid zlib" # # # crossdev.sh -u --arch=mipsel (Note: fails without -u) ... ...Then, somewhere in stage 5, I believe: ... mipsel-unknown-linux-gnu-gcc -O2 -nostdlib -nostartfiles -mips3 -mabi=32 -O2 -pipe -nostdlib -nostartfiles -o /var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/iconv/iconv_prog -Wl,-dynamic-linker=/home/crossdev/mipsel/lib/ld.so.1 /var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/csu/crt1.o /var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/csu/crti.o `mipsel-unknown-linux-gnu-gcc -O2 -nostdlib -nostartfiles -mips3 -mabi=32 -O2 -pipe --print-file-name=crtbegin.o` /var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/iconv/iconv_prog.o /var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/iconv/iconv_charmap.o /var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/iconv/charmap.o /var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/iconv/charmap-dir.o /var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/iconv/linereader.o /var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/iconv/dummy-repertoire.o /var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/iconv/simple-hash.o /var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/iconv/xstrdup.o /var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/iconv/xmalloc.o -Wl,-rpath-link=/var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel:/var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/math:/var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/elf:/var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/dlfcn:/var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/nss:/var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/nis:/var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/rt:/var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/resolv:/var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/crypt:/var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/linuxthreads /var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/libc.so.6 /var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/libc_nonshared.a -lgcc -lgcc_eh `mipsel-unknown-linux-gnu-gcc -O2 -nostdlib -nostartfiles -mips3 -mabi=32 -O2 -pipe --print-file-name=crtend.o` /var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/csu/crtn.o /home/crossdev/mipsel/lib/gcc-lib/mipsel-unknown-linux-gnu/3.3.4/../../../../mipsel-unknown-linux-gnu/bin/ld: cannot find -lgcc_eh collect2: ld returned 1 exit status make[2]: *** [/var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/iconv/iconvconfig] Error 1 make[2]: *** Waiting for unfinished jobs.... /home/crossdev/mipsel/lib/gcc-lib/mipsel-unknown-linux-gnu/3.3.4/../../../../mipsel-unknown-linux-gnu/bin/ld: cannot find -lgcc_eh collect2: ld returned 1 exit status make[2]: *** [/var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-mipsel/iconv/iconv_prog] Error 1 make[2]: Leaving directory `/var/tmp/portage/crossdevbuild/glibc-2.3.2/iconv' make[1]: *** [iconv/others] Error 2 make[1]: Leaving directory `/var/tmp/portage/crossdevbuild/glibc-2.3.2' make: *** [all] Error 2 * InstallGlibcCore(): Failed to compile! ################################################################# Is this related or should I open a new bug?
Oops...forgot to include the crossdev info: ######################################################3 # crossdev -u --arch=mipsel * crossdev.sh v0.4 - Cross-Toolchain Generator * Host Architecture: i686-pc-linux-gnu * Host CFLAGS: -march=i686 -O2 -pipe * Target Architecture: mipsel-unknown-linux-gnu * Target CFLAGS: -mips3 -mabi=32 -O2 -pipe * Install Path: /home/crossdev/mipsel * Using unstable packages... On * Enabling extra gcc langs... Off * Using Portage CFLAGS... Off * Using Portage Sandbox... On * Building Kernel Compiler... Off * Cleaning build dir... Off * Pretending... No * The following packages in /usr/portage will be used: sys-kernel/mips-headers-2.4.22-r1 sys-devel/binutils-2.14.90.0.8-r1 sys-devel/gcc-3.3.4-r1 sys-libs/glibc-2.3.4.20040619-r1 ...
make[2]: *** Waiting for unfinished jobs.... /home/crossdev/m68k/lib/gcc/m68k-unknown-linux-gnu/3.4.1/../../../../m68k-unknown-linux-gnu/bin/ld: cannot find -lgcc_eh collect2: ld returned 1 exit status make[2]: *** [/var/tmp/portage/crossdevbuild/glibc-2.3.3/buildhere-m68k/iconv/iconvconfig] Error 1 make[2]: Leaving directory `/var/tmp/portage/crossdevbuild/glibc-2.3.3/iconv' make[1]: *** [iconv/others] Error 2 make[1]: Leaving directory `/var/tmp/portage/crossdevbuild/glibc-2.3.3' make: *** [all] Error 2 * InstallGlibcCore(): Failed to compile! * crossdev.sh v0.4 - Cross-Toolchain Generator * Host Architecture: powerpc-unknown-linux-gnu * Host CFLAGS: -mcpu=powerpc -mtune=powerpc -O2 -pipe * Target Architecture: m68k-unknown-linux-gnu * Target CFLAGS: -O2 -pipe * Install Path: /home/crossdev/m68k * Using unstable packages... On * Enabling extra gcc langs... Off * Using Portage CFLAGS... Off * Using Portage Sandbox... On * Building Kernel Compiler... Off * Cleaning build dir... Off * Pretending... Yes * The following packages in /usr/portage will be used: sys-kernel/linux-headers-2.4.22 sys-devel/binutils-2.15.90.0.1.1-r3 sys-devel/gcc-3.4.1-r2 sys-libs/glibc-2.3.4.20040808 Going to test with the patch and tell you later...
<=crossdev-0.4 is no longer supported ... please upgrade to crossdev-0.9 and if you're still having problems, re-open the bug and re-assign to toolchain@gentoo.org