WHile trying to execute 'crossdev i386-pc-linux-gnu' on a machine with CBUILD='i686-pc-linux-gnu', gcc fails to build in stage 1: In file included from /var/tmp/cross/i386-pc-linux-gnu/portage/gcc-3.4.5/work/gcc-3.4.5/gcc/libgcov.c:37: /var/tmp/cross/i386-pc-linux-gnu/portage/gcc-3.4.5/work/gcc-3.4.5/gcc/tsystem.h:40:1: warning: this is the location of the previous definition make[2]: i386-pc-linux-gnu-ar: Command not found make[2]: *** [libgcc.a] Error 127 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory `/var/tmp/cross/i386-pc-linux-gnu/portage/gcc-3.4.5/work/build/gcc' make[1]: *** [libgcc.a] Error 2 rm gcc.pod make[1]: Leaving directory `/var/tmp/cross/i386-pc-linux-gnu/portage/gcc-3.4.5/work/build/gcc' make: *** [all-gcc] Error 2 Below is my emerge --info: tomhendr@elaine ~ $ emerge --info Portage 2.0.54 (default-linux/x86/2005.1, gcc-3.3.6, glibc-2.3.5-r2, 2.6.15-gentoo-r1 i686) ================================================================= System uname: 2.6.15-gentoo-r1 i686 AMD Athlon(TM) XP 2000+ Gentoo Base System version 1.6.14 distcc 2.18.3 i686-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-r6 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="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -mcpu=athlon-xp -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -mcpu=athlon-xp -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks fixpackages sandbox sfperms strict userpriv usersandbox" GENTOO_MIRRORS="http://gentoo.inode.at/ ftp://ftp.twaren.net/Linux/Gentoo/ ftp://130.59.10.35/mirror/gentoo/" LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="x86 X acpi alsa audiofile avi berkdb bzip2 cdr crypt cups curl dbus dvd eds emboss encode esd ethereal exif expat fam ffmpeg flac foomaticdb fortran gdbm gif glut gmp gnome gpm gstreamer gtk gtk2 gtkhtml hal howl idn imagemagick imlib ipv6 java jpeg lcms libg++ libwww mad mhash mikmod mng motif mp3 mpeg ncurses nls nptl nsplugin ogg oggvorbis opengl pam pcre pdflib png ppds python quicktime readline samba scanner sdl spell ssl tcpd tiff truetype truetype-fonts type1-fonts udev unicode usb vorbis xine xml2 xprint xv xvid zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LDFLAGS, LINGUAS
Created attachment 80044 [details] cross-i386-pc-gnu-info.log
Created attachment 80045 [details] cross-i386-pc-linux-gnu-gcc-stage1.log
what does `binutils-config -l` show ? what do you mean you set CBUILD ? you shouldnt be screwing with that ...
tomhendr@elaine ~ $ binutils-config -l [1] i386-pc-linux-gnu-2.16.1 [2] i686-pc-linux-gnu-2.16.1 * This seems logical when I run it in the normal environment, but I guess this should be adapted in the crossdev context? I wasn't screwing with CBUILD. The local machine is a stage1 install from some time ago which I optimized for i686, and the target machine is a fresh stage3 install (thus using i386). I was merely pointing out that If I had followed the same procedure for both hosts, I would not need a cross-development toolchain at all;)
> This seems logical when I run it in the normal environment, but I guess this > should be adapted in the crossdev context? there is no "crossdev context" post the output of `qlist binutils` as an attachment ... i guess `i386-pc-linux-gnu-ar` doesnt work in your normal env ? > I wasn't screwing with CBUILD. you said you were in your original comment > I was merely pointing out that If I had followed the same procedure for both > hosts, I would not need a cross-development toolchain at all;) so you meant to say 'CHOST', not 'CBUILD'
Created attachment 80069 [details] 'qlist binutils' output
and 'i386-pc-linux-gnu` doesn't exist indeed...
(In reply to comment #7) > and 'i386-pc-linux-gnu` doesn't exist indeed... > i386-pc-linux-gnu-ar, that is :P
try running `binutils-config 1` and see if you get an i386-pc-linux-gnu-ar in your PATH
tomhendr@elaine ~ $ which i386-pc-linux-gnu-ar /usr/bin/i386-pc-linux-gnu-ar
so does that mean it's working now or not ?
I was waiting until it was finished completely, but yes it works :)
k