sys-devel/crossdev-20151026-r1 fails to setup the stage2 cross-compiler properly Reproducible: Always Steps to Reproduce: 1. build a -s4 cross uclibc toolchain 2. Note that cross-compiling/cross-emerging c++ code fails Actual Results: Incomplete setup of stage2 cross compiler Expected Results: Complete setup of the stage2 cross compiler Possibly a missing call to gcc-config from crossdev after the stage2 merge.
Created attachment 435144 [details] build.log x-emerge failure because of incomplete toolchain setup
As can be easily seen, the build uses the host's c++ compiler (g++) instead of the cross-compiler x86_64-pc-linux-uclibc-g++. The reason is simple, it does not get detected: checking for x86_64-pc-linux-uclibc-gcc... (cached) x86_64-pc-linux-uclibc-gcc checking whether we are using the GNU C compiler... (cached) yes checking whether x86_64-pc-linux-uclibc-gcc accepts -g... (cached) yes checking for x86_64-pc-linux-uclibc-gcc option to accept ISO C89... (cached) none needed checking for x86_64-pc-linux-uclibc-g++... no The reason why it does not get detected is quite simple aswell, there's a missing symlink. Running gcc-config -l and then gcc-config <#> to select the cross-compiler will fix the missing symlinks, this is is what's present after crossdev merged the stage2 compiler: lrwxrwxrwx 1 root root 49 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-addr2line -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/addr2line lrwxrwxrwx 1 root root 42 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-ar -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/ar lrwxrwxrwx 1 root root 42 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-as -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/as lrwxrwxrwx 1 root root 88 May 13 00:39 /usr/bin/x86_64-pc-linux-uclibc-c++-5.3.0 -> /usr/x86_64-pc-linux-gnu/x86_64-pc-linux-uclibc/gcc-bin/5.3.0/x86_64-pc-linux-uclibc-c++ lrwxrwxrwx 1 root root 47 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-c++filt -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/c++filt -rwxr-xr-x 1 root root 10368 May 12 01:32 /usr/bin/x86_64-pc-linux-uclibc-cpp lrwxrwxrwx 1 root root 88 May 13 00:39 /usr/bin/x86_64-pc-linux-uclibc-cpp-5.3.0 -> /usr/x86_64-pc-linux-gnu/x86_64-pc-linux-uclibc/gcc-bin/5.3.0/x86_64-pc-linux-uclibc-cpp lrwxrwxrwx 1 root root 43 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-dwp -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/dwp lrwxrwxrwx 1 root root 47 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-elfedit -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/elfedit lrwxrwxrwx 1 root root 12 May 13 00:14 /usr/bin/x86_64-pc-linux-uclibc-emerge -> cross-emerge lrwxrwxrwx 1 root root 14 May 13 00:14 /usr/bin/x86_64-pc-linux-uclibc-fix-root -> cross-fix-root lrwxrwxrwx 1 root root 88 May 13 00:39 /usr/bin/x86_64-pc-linux-uclibc-g++-5.3.0 -> /usr/x86_64-pc-linux-gnu/x86_64-pc-linux-uclibc/gcc-bin/5.3.0/x86_64-pc-linux-uclibc-g++ -rwxr-xr-x 1 root root 10368 May 12 01:32 /usr/bin/x86_64-pc-linux-uclibc-gcc lrwxrwxrwx 1 root root 88 May 13 00:39 /usr/bin/x86_64-pc-linux-uclibc-gcc-5.3.0 -> /usr/x86_64-pc-linux-gnu/x86_64-pc-linux-uclibc/gcc-bin/5.3.0/x86_64-pc-linux-uclibc-gcc -rwxr-xr-x 1 root root 10368 May 12 01:32 /usr/bin/x86_64-pc-linux-uclibc-gcc-ar -rwxr-xr-x 1 root root 10368 May 12 01:32 /usr/bin/x86_64-pc-linux-uclibc-gcc-nm -rwxr-xr-x 1 root root 10368 May 12 01:32 /usr/bin/x86_64-pc-linux-uclibc-gcc-ranlib -rwxr-xr-x 1 root root 10368 May 12 01:32 /usr/bin/x86_64-pc-linux-uclibc-gcov lrwxrwxrwx 1 root root 89 May 13 00:39 /usr/bin/x86_64-pc-linux-uclibc-gcov-5.3.0 -> /usr/x86_64-pc-linux-gnu/x86_64-pc-linux-uclibc/gcc-bin/5.3.0/x86_64-pc-linux-uclibc-gcov -rwxr-xr-x 1 root root 10368 May 12 01:32 /usr/bin/x86_64-pc-linux-uclibc-gcov-tool lrwxrwxrwx 1 root root 93 May 13 00:39 /usr/bin/x86_64-pc-linux-uclibc-gfortran-5.3.0 -> /usr/x86_64-pc-linux-gnu/x86_64-pc-linux-uclibc/gcc-bin/5.3.0/x86_64-pc-linux-uclibc-gfortran lrwxrwxrwx 1 root root 45 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-gprof -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/gprof lrwxrwxrwx 1 root root 42 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-ld -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/ld lrwxrwxrwx 1 root root 46 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-ld.bfd -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/ld.bfd -rwxr-xr-x 1 root root 29012 May 12 02:20 /usr/bin/x86_64-pc-linux-uclibc-ldconfig -rwxr-xr-x 1 root root 18650 May 12 02:20 /usr/bin/x86_64-pc-linux-uclibc-ldd lrwxrwxrwx 1 root root 47 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-ld.gold -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/ld.gold lrwxrwxrwx 1 root root 42 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-nm -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/nm lrwxrwxrwx 1 root root 47 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-objcopy -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/objcopy lrwxrwxrwx 1 root root 47 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-objdump -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/objdump lrwxrwxrwx 1 root root 16 May 13 00:14 /usr/bin/x86_64-pc-linux-uclibc-pkg-config -> cross-pkg-config lrwxrwxrwx 1 root root 46 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-ranlib -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/ranlib lrwxrwxrwx 1 root root 47 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-readelf -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/readelf lrwxrwxrwx 1 root root 44 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-size -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/size lrwxrwxrwx 1 root root 47 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-strings -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/strings lrwxrwxrwx 1 root root 45 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-strip -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/strip And here after running gcc-config manually: lrwxrwxrwx 1 root root 49 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-addr2line -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/addr2line lrwxrwxrwx 1 root root 42 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-ar -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/ar lrwxrwxrwx 1 root root 42 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-as -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/as lrwxrwxrwx 1 root root 88 May 13 00:39 /usr/bin/x86_64-pc-linux-uclibc-c++-5.3.0 -> /usr/x86_64-pc-linux-gnu/x86_64-pc-linux-uclibc/gcc-bin/5.3.0/x86_64-pc-linux-uclibc-c++ lrwxrwxrwx 1 root root 47 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-c++filt -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/c++filt -rwxr-xr-x 1 root root 10368 May 12 01:32 /usr/bin/x86_64-pc-linux-uclibc-cpp lrwxrwxrwx 1 root root 88 May 13 00:39 /usr/bin/x86_64-pc-linux-uclibc-cpp-5.3.0 -> /usr/x86_64-pc-linux-gnu/x86_64-pc-linux-uclibc/gcc-bin/5.3.0/x86_64-pc-linux-uclibc-cpp lrwxrwxrwx 1 root root 43 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-dwp -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/dwp lrwxrwxrwx 1 root root 47 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-elfedit -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/elfedit lrwxrwxrwx 1 root root 12 May 13 00:14 /usr/bin/x86_64-pc-linux-uclibc-emerge -> cross-emerge lrwxrwxrwx 1 root root 14 May 13 00:14 /usr/bin/x86_64-pc-linux-uclibc-fix-root -> cross-fix-root lrwxrwxrwx 1 root root 88 May 13 00:39 /usr/bin/x86_64-pc-linux-uclibc-g++-5.3.0 -> /usr/x86_64-pc-linux-gnu/x86_64-pc-linux-uclibc/gcc-bin/5.3.0/x86_64-pc-linux-uclibc-g++ -rwxr-xr-x 1 root root 10368 May 12 01:32 /usr/bin/x86_64-pc-linux-uclibc-gcc lrwxrwxrwx 1 root root 88 May 13 00:39 /usr/bin/x86_64-pc-linux-uclibc-gcc-5.3.0 -> /usr/x86_64-pc-linux-gnu/x86_64-pc-linux-uclibc/gcc-bin/5.3.0/x86_64-pc-linux-uclibc-gcc -rwxr-xr-x 1 root root 10368 May 12 01:32 /usr/bin/x86_64-pc-linux-uclibc-gcc-ar -rwxr-xr-x 1 root root 10368 May 12 01:32 /usr/bin/x86_64-pc-linux-uclibc-gcc-nm -rwxr-xr-x 1 root root 10368 May 12 01:32 /usr/bin/x86_64-pc-linux-uclibc-gcc-ranlib -rwxr-xr-x 1 root root 10368 May 12 01:32 /usr/bin/x86_64-pc-linux-uclibc-gcov lrwxrwxrwx 1 root root 89 May 13 00:39 /usr/bin/x86_64-pc-linux-uclibc-gcov-5.3.0 -> /usr/x86_64-pc-linux-gnu/x86_64-pc-linux-uclibc/gcc-bin/5.3.0/x86_64-pc-linux-uclibc-gcov -rwxr-xr-x 1 root root 10368 May 12 01:32 /usr/bin/x86_64-pc-linux-uclibc-gcov-tool lrwxrwxrwx 1 root root 93 May 13 00:39 /usr/bin/x86_64-pc-linux-uclibc-gfortran-5.3.0 -> /usr/x86_64-pc-linux-gnu/x86_64-pc-linux-uclibc/gcc-bin/5.3.0/x86_64-pc-linux-uclibc-gfortran lrwxrwxrwx 1 root root 45 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-gprof -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/gprof lrwxrwxrwx 1 root root 42 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-ld -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/ld lrwxrwxrwx 1 root root 46 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-ld.bfd -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/ld.bfd -rwxr-xr-x 1 root root 29012 May 12 02:20 /usr/bin/x86_64-pc-linux-uclibc-ldconfig -rwxr-xr-x 1 root root 18650 May 12 02:20 /usr/bin/x86_64-pc-linux-uclibc-ldd lrwxrwxrwx 1 root root 47 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-ld.gold -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/ld.gold lrwxrwxrwx 1 root root 42 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-nm -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/nm lrwxrwxrwx 1 root root 47 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-objcopy -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/objcopy lrwxrwxrwx 1 root root 47 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-objdump -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/objdump lrwxrwxrwx 1 root root 16 May 13 00:14 /usr/bin/x86_64-pc-linux-uclibc-pkg-config -> cross-pkg-config lrwxrwxrwx 1 root root 46 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-ranlib -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/ranlib lrwxrwxrwx 1 root root 47 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-readelf -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/readelf lrwxrwxrwx 1 root root 44 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-size -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/size lrwxrwxrwx 1 root root 47 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-strings -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/strings lrwxrwxrwx 1 root root 45 May 12 01:13 /usr/bin/x86_64-pc-linux-uclibc-strip -> /usr/libexec/gcc/x86_64-pc-linux-uclibc/strip Note the additional symlinks for g++/c++ (without version) and gfortran. Those should really be created when the stage2 compiler gets merged.
provide the full build log of your uclibc. considering your last bug showed you changing config options, i wouldn't be surprised if this was related.
How would I grab the complete build.log? The build logs do get deleted after a successfull merge, don't they?
Created attachment 435250 [details] cross-x86_64-pc-linux-uclibc-binutils.log binutils build log
Created attachment 435252 [details] cross-x86_64-pc-linux-uclibc-linux-headers-quick.log linux-headers log
Created attachment 435254 [details] cross-x86_64-pc-linux-uclibc-gcc-stage1.log.xz gcc-stage1 build log
Created attachment 435258 [details] cross-x86_64-pc-linux-uclibc-uclibc.log uclibc build log
Created attachment 435262 [details] gcc2.log.bz2 gcc-stage2 log
As can easily be observed (gcc-stage2 log): >>> Installing (1 of 1) cross-x86_64-pc-linux-uclibc/gcc-5.3.0::local-crossdev * The current gcc config appears valid, so it will not be * automatically switched for you. If you would like to * switch to the newly installed gcc version, do the * following: * gcc-config x86_64-pc-linux-uclibc-5.3.0 * source /etc/profile * Python seems to be broken, attempting to locate CHOST ourselves ... * Switching native-compiler to x86_64-pc-linux-gnu-5.3.0 ...PORTAGE_BZIP2_COMMAND setting is invalid: 'bzip2' PORTAGE_BZIP2_COMMAND setting from make.globals is invalid: 'bzip2' >>> Regenerating /etc/ld.so.cache... So yes, gcc-config does get called as expected (my fault) but it does fail to do it's job. Since I am not a gentoo dev, I can however not tell if it's crossdev's or portage's fault or a bug withing gcc-config.
However right after crossdev finishes it's job: # gcc-config -l [1] x86_64-pc-linux-gnu-4.9.3 [2] x86_64-pc-linux-gnu-5.3.0 * [3] x86_64-pc-linux-uclibc-5.3.0 * [4] x86_64-stamina-linux-musl-5.3.0 * # gcc-config 4 * Switching cross-compiler to x86_64-stamina-linux-musl-5.3.0 ... [ ok ] Seems to work without any problems.
(In reply to Sven E. from comment #11) > However right after crossdev finishes it's job: > # gcc-config -l > [1] x86_64-pc-linux-gnu-4.9.3 > [2] x86_64-pc-linux-gnu-5.3.0 * > > [3] x86_64-pc-linux-uclibc-5.3.0 * > > [4] x86_64-stamina-linux-musl-5.3.0 * > # gcc-config 4 > * Switching cross-compiler to x86_64-stamina-linux-musl-5.3.0 ... > [ ok ] > > Seems to work without any problems. Sorry, wrong number, but running gcc-config 3 does indeed work without an error message aswell (and creates the links)
*** Bug 585110 has been marked as a duplicate of this bug. ***
uclibc support in Gentoo has been removed.