Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 699446 - cross-armv7a-hardfloat-linux-gnueabi/glibc - /usr/libexec/gcc/armv7a-hardfloat-linux-gnueabi/ld: skipping incompatible /usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/8.2.0/libgcc.a when searching for -lgcc
Summary: cross-armv7a-hardfloat-linux-gnueabi/glibc - /usr/libexec/gcc/armv7a-hardfloa...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-06 13:52 UTC by xiaojie+bugzillagentoo
Modified: 2019-11-09 17:36 UTC (History)
1 user (show)

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


Attachments
cross-armv7a-hardfloat-linux-gnueabi-glibc.log.xz logfile (cross-armv7a-hardfloat-linux-gnueabi-glibc.log.xz,127.40 KB, application/octet-stream)
2019-11-06 15:40 UTC, xiaojie+bugzillagentoo
Details
cross-armv7a-hardfloat-linux-gnueabi-info.log logfile (cross-armv7a-hardfloat-linux-gnueabi-info.log,17.78 KB, text/x-log)
2019-11-06 15:40 UTC, xiaojie+bugzillagentoo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description xiaojie+bugzillagentoo 2019-11-06 13:52:54 UTC
A few weeks ago, I had a perfectly running « crossdev for armv7a-hardfloat-linux-gnueabi » on one of my machines. I did some bad vodoo, and stuff (cross-compiles, or runs of cross-compiled execs) began to fail. So I umerged cross-armv7a-hardfloat-linux-gnueabi/*, ran a crossdev -C armv7a-hardfloat-linux-gnueabi, cleaned all I could think of, and tried to build the cross-compile toolchain again.

Build failed.

Same result with « crossdev -S -t armv7a-hardfloat-linux-gnueabi »

Reproducible: Always

Steps to Reproduce:
1. run crossdev -t -armv7a-hardfloat-linux-gnueabi
2. wait for the error
Actual Results:  
$ crossdev --b '~2.32' --g '~8.2.0' --k '~4.19' --l '~2.29' -t armv7a-hardfloat-linux-gnueabi -oO /usr/local/portage-crossdev
 * crossdev version:      20190712
 * Host Portage ARCH:     amd64
 * Target Portage ARCH:   arm
 * Target System:         armv7a-hardfloat-linux-gnueabi
 * Stage:                 4 (C/C++ compiler)
 * USE=multilib:          no
 * ABIs:                  default
 
 * binutils:              ~binutils-2.32
 * gcc:                   ~gcc-8.2.0
 * headers:               ~linux-headers-4.19
 * libc:                  ~glibc-2.29
 
 * CROSSDEV_OVERLAY:      /usr/local/portage-crossdev
 * PORT_LOGDIR:           /var/log/portage
 * PORTAGE_CONFIGROOT:    /
 * Portage flags:

 * enabling thin-manifests due to /usr/local/layman/go-overlay

 * Log: /var/log/portage/cross-armv7a-hardfloat-linux-gnueabi-binutils.log
 * Emerging cross-binutils ...                                                                                                                                                                               [ ok ]
 * Log: /var/log/portage/cross-armv7a-hardfloat-linux-gnueabi-linux-headers-quick.log
 * Emerging cross-linux-headers-quick ...                                                                                                                                                                    [ ok ]
 * Log: /var/log/portage/cross-armv7a-hardfloat-linux-gnueabi-glibc-headers.log
 * Emerging cross-glibc-headers ...                                                                                                                                                                          [ ok ]
 * Log: /var/log/portage/cross-armv7a-hardfloat-linux-gnueabi-gcc-stage1.log
 * Emerging cross-gcc-stage1 ...                                                                                                                                                                             [ ok ]
 * Log: /var/log/portage/cross-armv7a-hardfloat-linux-gnueabi-linux-headers.log
 * Emerging cross-linux-headers ...                                                                                                                                                                          [ ok ]
 * Log: /var/log/portage/cross-armv7a-hardfloat-linux-gnueabi-glibc.log
 * Emerging cross-glibc ...

 * error: glibc failed :(
 *
 * If you file a bug, please attach the following logfiles:
 * /var/log/portage/cross-armv7a-hardfloat-linux-gnueabi-info.log
 * /var/log/portage/cross-armv7a-hardfloat-linux-gnueabi-glibc.log.xz
 * /var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/glibc*/temp/glibc-config.logs.tar.xz 

make: Leaving directory '/var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/glibc-2.29-r6/work/build-default-armv7a-hardfloat-linux-gnueabi-nptl'
 * ERROR: cross-armv7a-hardfloat-linux-gnueabi/glibc-2.29-r6::crossdev failed (compile phase):
 *   emake failed 

In cross-armv7a-hardfloat-linux-gnueabi-glibc.log.xz :

/usr/libexec/gcc/armv7a-hardfloat-linux-gnueabi/ld: skipping incompatible /usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/8.2.0/libgcc.a when searching for -lgcc
/usr/libexec/gcc/armv7a-hardfloat-linux-gnueabi/ld: cannot find -lgcc
collect2: error: ld returned 1 exit status                                                               
distcc[18609] ERROR: compile (null) on localhost failed
make[2]: *** [Makefile:456: /var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/glibc-2.29-r6/work/build-default-armv7a-hardfloat-linux-gnueabi-nptl/elf/librtld.map] Error 1
make[2]: *** Waiting for unfinished jobs....                                                                                                                                                                       
make[2]: Leaving directory '/var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/glibc-2.29-r6/work/glibc-2.29/elf'     
make[1]: *** [Makefile:259: elf/subdir_lib] Error 2                                                                                                                                                               
make[1]: Leaving directory '/var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/glibc-2.29-r6/work/glibc-2.29'                   
make: *** [Makefile:9: all] Error 2                                                                                                                                                                               


Expected Results:  
Should have a proper cross-compile environment.
Comment 1 xiaojie+bugzillagentoo 2019-11-06 13:58:19 UTC
$ emerge --info                                                                                                                                                                                         
Portage 2.3.76 (python 2.7.16-final-0, default/linux/amd64/17.0/desktop, gcc-8.2.0, glibc-2.29-r2, 4.19.72-gentoo-LTS x86_64)
=================================================================
System uname: Linux-4.19.72-gentoo-LTS-x86_64-Intel-R-_Core-TM-_i5-4690K_CPU_@_3.50GHz-with-gentoo-2.6
KiB Mem:    28690256 total,   2104376 free          
KiB Swap:   16777212 total,  16776188 free          
Timestamp of repository gentoo: Wed, 06 Nov 2019 00:45:01 +0000                                                                                                                                                    Head commit of repository gentoo: d857bd00624d0922c870136f5f5684bc8af6be79
sh bash 4.4_p23-r1       
ld GNU ld (Gentoo 2.32 p2) 2.32.0                                                                                                                                                                                  distcc 3.3.3 x86_64-pc-linux-gnu [enabled]                                                                                                                                                                         ccache version 3.7.4 [disabled]                                                                                                                                                                                    app-shells/bash:          4.4_p23-r1::gentoo                                                                                                                                                                       dev-lang/perl:            5.28.2-r1::gentoo                                                                                                                                                                        dev-lang/python:          2.7.16::gentoo, 3.6.9::gentoo                                                                                                                                                            dev-util/ccache:          3.7.4::gentoo                                                                                                                                                                            dev-util/cmake:           3.14.6::gentoo                                                                                                                                                                           dev-util/pkgconfig:       0.29.2::gentoo                                                                                                                                                                           sys-apps/baselayout:      2.6-r1::gentoo                                                                                                                                                                           sys-apps/openrc:          0.41.2::gentoo                                                                                                                                                                           sys-apps/sandbox:         2.13::gentoo                                                                   
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo                                                                                                                                                         
sys-devel/automake:       1.15.1-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo                                     
sys-devel/gcc:            8.2.0-r6::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo

Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://gensync.my.domain/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: no
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

crossdev
    location: /usr/local/portage-crossdev
    masters: gentoo
    priority: 10

go-overlay
    location: /usr/local/layman/go-overlay
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE Apache-2 BitTorrent LGPL linux-firmware linux-fw-redistributable MSttfEULA no-source-code PUEL unRAR"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/lan
guage.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="-j25 --load-average 10"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distcc distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetc
h pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j6 --load-average 8.0"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclu
de=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 berkdb branding bzip2 cairo cdda cdr cleartype cli consolekit corefonts crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam flac gdbm gif gpm gtk iconv icu jpeg lcms li
bnotify libtirpc mad minimal mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt5 readline sdl seccomp smp split-usr ssl startup-notification svg tcpd tiff truet
ype udev udisks unicode usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es19
38 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon au
thn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache fi
lter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS=
"df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin
 garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evde
v" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf ha
rness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TAR
GET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy
 condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2019-11-06 14:23:36 UTC
 * /var/log/portage/cross-armv7a-hardfloat-linux-gnueabi-info.log
 * /var/log/portage/cross-armv7a-hardfloat-linux-gnueabi-glibc.log.xz
 * /var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/glibc*/temp/glibc-config.logs.tar.xz

Where are they?
Comment 3 xiaojie+bugzillagentoo 2019-11-06 15:40:19 UTC
Created attachment 595126 [details]
cross-armv7a-hardfloat-linux-gnueabi-glibc.log.xz logfile
Comment 4 xiaojie+bugzillagentoo 2019-11-06 15:40:54 UTC
Created attachment 595128 [details]
cross-armv7a-hardfloat-linux-gnueabi-info.log logfile
Comment 5 xiaojie+bugzillagentoo 2019-11-06 15:42:06 UTC
(In reply to Jeroen Roovers from comment #2)
>  * /var/log/portage/cross-armv7a-hardfloat-linux-gnueabi-info.log
>  * /var/log/portage/cross-armv7a-hardfloat-linux-gnueabi-glibc.log.xz
>  *
> /var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/glibc*/temp/glibc-
> config.logs.tar.xz
> 
> Where are they?

Sorry, forgot to add them. Done now.
Mind that the two files are from the « crossdev -S -t ... » run.
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2019-11-06 22:16:00 UTC
> distcc[14548] (dcc_build_somewhere) Warning: failed to distribute, running locally instead
...
> armv7a-hardfloat-linux-gnueabi-gcc  -pipe -O2 -fno-strict-aliasing -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed  -nostdlib -nostartfiles -r -o /var/tmp/portage/cross-armv7a-hardfloat-linux$
 -Wl,-d -Wl,--whole-archive /var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/glibc-2.29-r2/work/build-default-armv7a-hardfloat-linux-gnueabi-nptl/libc_pic.a -o /var/tmp/portage/cross-arm$
armv7a-hardfloat-linux-gnueabi-gcc  -pipe -O2 -fno-strict-aliasing -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed  -nostdlib -nostartfiles -r -o /var/tmp/portage/cross-armv7a-hardfloat-linux$
armv7a-hardfloat-linux-gnueabi-gcc  -pipe -O2 -fno-strict-aliasing -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed  -nostdlib -nostartfiles -r -o /var/tmp/portage/cross-armv7a-hardfloat-linux$
        '-Wl,-(' /var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/glibc-2.29-r2/work/build-default-armv7a-hardfloat-linux-gnueabi-nptl/elf/dl-allobjs.os /var/tmp/portage/cross-armv7a-har$
/usr/libexec/gcc/armv7a-hardfloat-linux-gnueabi/ld: skipping incompatible /usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/8.2.0/libgcc.a when searching for -lgcc
/usr/libexec/gcc/armv7a-hardfloat-linux-gnueabi/ld: cannot find -lgcc
collect2: error: ld returned 1 exit status
distcc[18608] ERROR: compile (null) on localhost failed

I see you are using distcc. Do all machines have this cross-compiler?

I wonder why /usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/8.2.0/libgcc.a was deemed incompatible. Can you attach that file?
Comment 7 Sergei Trofimovich (RETIRED) gentoo-dev 2019-11-06 22:48:36 UTC
Reproduced locally on gcc-8.3.0/glibc-2.29. Looking closer.
Comment 8 Larry the Git Cow gentoo-dev 2019-11-06 23:30:00 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ebf183727b8469b7ab63ed682a2ac185c6c7f963

commit ebf183727b8469b7ab63ed682a2ac185c6c7f963
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-11-06 23:21:41 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-11-06 23:29:54 +0000

    toolchain.eclass: restore RESTRICT=strip on <gcc-9.2-r1, bug #699446
    
    commit d16e2840220 ("rename USE=regression-test to USE=test")
    added a 'RESTRICT="!test? ( test )"' assignment and accidentally
    overrode existing RESTRICT="strip" one. That reintroduced excessive
    stripping regression.
    
    Move RESTRICT assignments closer to one another and restore
    RESTRICT="strip".
    
    Reported-by: sargastic@gmail.com
    Closes: https://bugs.gentoo.org/699446
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 eclass/toolchain.eclass | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
Comment 9 Sergei Trofimovich (RETIRED) gentoo-dev 2019-11-06 23:32:11 UTC
Should be fixed now. You'll need to sync the ::gentoo tree when the update gets to mirrors and rebuild toolchain with crossdev. That should build working gcc.
Comment 10 xiaojie+bugzillagentoo 2019-11-09 17:36:15 UTC
(In reply to Sergei Trofimovich from comment #9)
> Should be fixed now. You'll need to sync the ::gentoo tree when the update
> gets to mirrors and rebuild toolchain with crossdev. That should build
> working gcc.

Indeed it does. Thanks for the fix.