Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 583914 - sys-devel/crossdev-20151026-r1 cross-g++/c++ incomplete setup (uclibc)
Summary: sys-devel/crossdev-20151026-r1 cross-g++/c++ incomplete setup (uclibc)
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
: 585110 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-05-23 22:38 UTC by Sven E.
Modified: 2016-06-06 00:28 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,64.15 KB, text/plain)
2016-05-23 22:40 UTC, Sven E.
Details
cross-x86_64-pc-linux-uclibc-binutils.log (cross-x86_64-pc-linux-uclibc-binutils.log,569.70 KB, text/plain)
2016-05-24 14:24 UTC, Sven E.
Details
cross-x86_64-pc-linux-uclibc-linux-headers-quick.log (cross-x86_64-pc-linux-uclibc-linux-headers-quick.log,5.18 KB, text/plain)
2016-05-24 14:26 UTC, Sven E.
Details
cross-x86_64-pc-linux-uclibc-gcc-stage1.log.xz (cross-x86_64-pc-linux-uclibc-gcc-stage1.log.xz,280 bytes, text/plain)
2016-05-24 14:37 UTC, Sven E.
Details
cross-x86_64-pc-linux-uclibc-uclibc.log (cross-x86_64-pc-linux-uclibc-uclibc.log,134.97 KB, text/plain)
2016-05-24 14:39 UTC, Sven E.
Details
gcc2.log.bz2 (gcc2.log.bz2,119.92 KB, text/plain)
2016-05-24 15:02 UTC, Sven E.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sven E. 2016-05-23 22:38:13 UTC
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.
Comment 1 Sven E. 2016-05-23 22:40:32 UTC
Created attachment 435144 [details]
build.log

x-emerge failure because of incomplete toolchain setup
Comment 2 Sven E. 2016-05-23 22:54:44 UTC
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.
Comment 3 SpanKY gentoo-dev 2016-05-24 13:56:09 UTC
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.
Comment 4 Sven E. 2016-05-24 14:13:50 UTC
How would I grab the complete build.log? The build logs do get deleted after a successfull merge, don't they?
Comment 5 Sven E. 2016-05-24 14:24:47 UTC
Created attachment 435250 [details]
cross-x86_64-pc-linux-uclibc-binutils.log

binutils build log
Comment 6 Sven E. 2016-05-24 14:26:09 UTC
Created attachment 435252 [details]
cross-x86_64-pc-linux-uclibc-linux-headers-quick.log

linux-headers log
Comment 7 Sven E. 2016-05-24 14:37:49 UTC
Created attachment 435254 [details]
cross-x86_64-pc-linux-uclibc-gcc-stage1.log.xz

gcc-stage1 build log
Comment 8 Sven E. 2016-05-24 14:39:59 UTC
Created attachment 435258 [details]
cross-x86_64-pc-linux-uclibc-uclibc.log

uclibc build log
Comment 9 Sven E. 2016-05-24 15:02:06 UTC
Created attachment 435262 [details]
gcc2.log.bz2

gcc-stage2 log
Comment 10 Sven E. 2016-05-24 15:05:28 UTC
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.
Comment 11 Sven E. 2016-05-24 15:07:55 UTC
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.
Comment 12 Sven E. 2016-05-24 15:18:16 UTC
(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)
Comment 13 SpanKY gentoo-dev 2016-06-06 00:28:11 UTC
*** Bug 585110 has been marked as a duplicate of this bug. ***