Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Linker errors with GCC 9.2.0 on RPi 4 64bit Gentoo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
g-virus
n00b
n00b


Joined: 26 Aug 2017
Posts: 66

PostPosted: Fri Jun 19, 2020 12:24 am    Post subject: [SOLVED] Linker errors with GCC 9.2.0 on RPi 4 64bit Gentoo Reply with quote

Hello everyone!

I'm trying to build a new version of gcc 10.1.0 and I'm stuck with the following errors during the linking

Code:

/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: ../libbacktrace/.libs/libbacktrace.a(mmap.o): in function `backtrace_alloc':
mmap.c:(.text+0x14c): undefined reference to `__aarch64_swp4_acq'
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: ../libbacktrace/.libs/libbacktrace.a(mmap.o): in function `backtrace_free':
mmap.c:(.text+0x3e0): undefined reference to `__aarch64_swp4_acq'
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: ../libbacktrace/.libs/libbacktrace.a(elf.o): in function `elf_add_syminfo_data':
elf.c:(.text+0x744): undefined reference to `__aarch64_cas8_acq_rel'
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: ../libbacktrace/.libs/libbacktrace.a(elf.o): in function `backtrace_initialize':
elf.c:(.text+0x5b44): undefined reference to `__aarch64_cas8_acq_rel'
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: ../libbacktrace/.libs/libbacktrace.a(dwarf.o): in function `backtrace_dwarf_add':
dwarf.c:(.text+0x7594): undefined reference to `__aarch64_cas8_acq_rel'
collect2: error: ld returned 1 exit status
distcc[31404] ERROR: compile (null) on localhost failed
make[3]: *** [Makefile:3014: gcov] Error 1
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: ../libbacktrace/.libs/libbacktrace.a(mmap.o): in function `backtrace_alloc':
mmap.c:(.text+0x14c): undefined reference to `__aarch64_swp4_acq'
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: ../libbacktrace/.libs/libbacktrace.a(mmap.o): in function `backtrace_free':
mmap.c:(.text+0x3e0): undefined reference to `__aarch64_swp4_acq'
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: ../libbacktrace/.libs/libbacktrace.a(elf.o): in function `elf_add_syminfo_data':
elf.c:(.text+0x744): undefined reference to `__aarch64_cas8_acq_rel'
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: ../libbacktrace/.libs/libbacktrace.a(elf.o): in function `backtrace_initialize':
elf.c:(.text+0x5b44): undefined reference to `__aarch64_cas8_acq_rel'
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: ../libbacktrace/.libs/libbacktrace.a(dwarf.o): in function `backtrace_dwarf_add':
dwarf.c:(.text+0x7594): undefined reference to `__aarch64_cas8_acq_rel'
collect2: error: ld returned 1 exit status
distcc[31408] ERROR: compile (null) on localhost failed
make[3]: *** [Makefile:2209: lto-wrapper] Error 1
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: ../libbacktrace/.libs/libbacktrace.a(mmap.o): in function `backtrace_alloc':
mmap.c:(.text+0x14c): undefined reference to `__aarch64_swp4_acq'
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: ../libbacktrace/.libs/libbacktrace.a(mmap.o): in function `backtrace_free':
mmap.c:(.text+0x3e0): undefined reference to `__aarch64_swp4_acq'
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: ../libbacktrace/.libs/libbacktrace.a(elf.o): in function `elf_add_syminfo_data':
elf.c:(.text+0x744): undefined reference to `__aarch64_cas8_acq_rel'
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: ../libbacktrace/.libs/libbacktrace.a(elf.o): in function `backtrace_initialize':
elf.c:(.text+0x5b44): undefined reference to `__aarch64_cas8_acq_rel'
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: ../libbacktrace/.libs/libbacktrace.a(dwarf.o): in function `backtrace_dwarf_add':
dwarf.c:(.text+0x7594): undefined reference to `[code]__aarch64_cas8_acq_rel'[/code]


Before I tried to build a fresh version of glibc and got similar errors. I have gcc 9.2.0 and linux kernel 5.7.0. What's going on?

Thank you in advance


Last edited by g-virus on Sun Jun 21, 2020 2:19 am; edited 1 time in total
Back to top
View user's profile Send private message
Maitreya
Guru
Guru


Joined: 11 Jan 2006
Posts: 440

PostPosted: Fri Jun 19, 2020 7:35 am    Post subject: Reply with quote

Changed any cflags prior to upgrading?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46710
Location: 56N 3W

PostPosted: Fri Jun 19, 2020 4:45 pm    Post subject: Reply with quote

g-virus,

Please post your
Code:
emerge --info
and pastebin the entire build log if you can find a suitable pastebin site?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
g-virus
n00b
n00b


Joined: 26 Aug 2017
Posts: 66

PostPosted: Sun Jun 21, 2020 2:19 am    Post subject: Reply with quote

Maitreya wrote:
Changed any cflags prior to upgrading?


Nope, I didn't change anything special

NeddySeagon, sorry for my late answer. I really tried to reproduce it next day, but I couldn't! First I got another error, something like "building process has been terminated". Then I decided to use my host computer - downgraded a cross compiler to 9.2.0, ran fstrim -av command on the Raspberry Pi and started building gcc 10 on the Raspberry with distcc. After some time it just finished and now I don't know and won't find out what problem was it.

emerge --info
Code:
Portage 2.3.101 (python 3.7.7-final-0, default/linux/arm64/17.0, gcc-9.2.0, glibc-2.31-r3, 5.7.0-rc7-v8+ aarch64)
=================================================================
System uname: Linux-5.7.0-rc7-v8+-aarch64-with-gentoo-2.7
KiB Mem:     1948556 total,   1645096 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Thu, 18 Jun 2020 21:30:01 +0000
Head commit of repository gentoo: 9aa6947ae348f91a97f301c0f0e76e6955612420
Head commit of repository genpi64: 95cd26a71935cbec638b4105833b43f6038bbfbf

sh bash 5.0_p17
ld GNU ld (Gentoo 2.34 p4) 2.34.0
distcc 3.3.3 aarch64-unknown-linux-gnu [enabled]
app-shells/bash:          5.0_p17::gentoo
dev-lang/perl:            5.30.2-r2::gentoo
dev-lang/python:          2.7.18::gentoo, 3.7.7-r2::genpi64, 3.8.3::gentoo
dev-util/cmake:           3.17.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1-r2::genpi64
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.2::gentoo
sys-devel/binutils:       2.34-r1::gentoo
sys-devel/gcc:            9.2.0-r2::gentoo
sys-devel/gcc-config:     2.3::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.7::gentoo (virtual/os-headers)
sys-libs/glibc:           2.31-r3::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts:
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1

genpi64
    location: /var/db/repos/genpi64
    sync-type: git
    sync-uri: https://github.com/sakaki-/genpi64-overlay.git
    masters: gentoo

ACCEPT_KEYWORDS="arm64 ~arm64"
ACCEPT_LICENSE="@FREE"
CBUILD="aarch64-unknown-linux-gnu"
CFLAGS="-march=armv8-a+crc+simd -mtune=cortex-a72 -ftree-vectorize -O2 -pipe -fomit-frame-pointer"
CHOST="aarch64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /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"
CXXFLAGS="-march=armv8-a+crc+simd -mtune=cortex-a72 -ftree-vectorize -O2 -pipe -fomit-frame-pointer"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH 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="-march=armv8-a+crc+simd -mtune=cortex-a72 -ftree-vectorize -O2 -pipe -fomit-frame-pointer"
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-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=armv8-a+crc+simd -mtune=cortex-a72 -ftree-vectorize -O2 -pipe -fomit-frame-pointer"
GENTOO_MIRRORS="ftp://mirror.netcologne.de/gentoo/ https://mirror.netcologne.de/gentoo/ rsync://mirror.netcologne.de/gentoo/ https://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo rsync://ftp.snt.utwente.nl/gentoo ftp://mirror.mdfnet.se/gentoo https://mirror.mdfnet.se/gentoo https://mirror.dkm.cz/gentoo/ ftp://mirror.dkm.cz/gentoo/ rsync://mirror.dkm.cz/gentoo/"
LANG="en_US.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j24 -l4"
PKGDIR="/var/cache/binpkgs"
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 --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl arm64 berkdb bluetooth bzip2 cairo cli crypt dbus dri egl elogind fortran gdbm gles1 gles2 iconv ipv6 libtirpc ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl tcpd unicode xattr zlib" ADA_TARGET="gnat_2018" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_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 filter 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_ARM="edsp thumb thumb2 v4 v5 v6 v7 v8 vfp vfp-d32 vfpv3 vfpv4" 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" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_7" RUBY_TARGETS="ruby25" USERLAND="GNU" VIDEO_CARDS="vc4" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS



Can't attach build.log because It doesn't contain the error anymore :( Well,the problem is solved but I didn't find out the reason of this
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum