Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 897698 - dev-util/rustup-1.25.2 fails to link with lto (undefined reference to `GFp_p384_scalar_mul_mont')
Summary: dev-util/rustup-1.25.2 fails to link with lto (undefined reference to `GFp_p3...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Rust Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2023-02-25 15:32 UTC by Roy Bamford
Modified: 2024-03-07 05:16 UTC (History)
3 users (show)

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


Attachments
Build Log (dev-util:rustup-1.25.2:20230225-135621.log,410.37 KB, text/x-log)
2023-02-25 15:33 UTC, Roy Bamford
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roy Bamford gentoo-dev 2023-02-25 15:32:29 UTC
The first error is

     Running `rustc --crate-name rustup_init --edition=2021 src/bin/rustup-init.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C opt-level=3 -C lto -C codegen-units=1 --cf
g 'feature="curl-backend"' --cfg 'feature="no-self-update"' --cfg 'feature="reqwest-backend"' --cfg 'feature="reqwest-default-tls"' --cfg 'feature="reqwest-rustls-tls"' -C metadata=8c49fa94f0ddfd46 -C extra-filename=-8c49fa94f0ddfd46 --out-dir 
/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps -L dependency=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps --extern anyhow=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25
.2/target/release/deps/libanyhow-ccc8dd568fe87aaf.rlib --extern cfg_if=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/libcfg_if-7d5bece4e4aba694.rlib --extern chrono=/var/tmp/portage/dev-util/rustup-1.25.2/work/r
ustup-1.25.2/target/release/deps/libchrono-4e0a2335b8edd219.rlib --extern clap=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/libclap-52f1ee9af4f492c6.rlib --extern download=/var/tmp/portage/dev-util/rustup-1.25.
2/work/rustup-1.25.2/target/release/deps/libdownload-7047cafb9bc5588d.rlib --extern effective_limits=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/libeffective_limits-66ea061761877eb8.rlib --extern enum_map=/var
/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/libenum_map-dfe0987e62a49341.rlib --extern flate2=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/libflate2-7bba0e90c152c4d4.rlib --extern
 git_testament=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/libgit_testament-67ec7d64952f1d80.rlib --extern home=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/libhome-29e3dc1dce
d9315a.rlib --extern lazy_static=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/liblazy_static-b4c25e1b13c916ba.rlib --extern libc=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/li
blibc-24fd07b7a23bf190.rlib --extern num_cpus=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/libnum_cpus-f2f20a6cf16de934.rlib --extern opener=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/rel
ease/deps/libopener-56f91f2eb86fa17b.rlib --extern pulldown_cmark=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/libpulldown_cmark-f76d3905b883bb6e.rlib --extern rand=/var/tmp/portage/dev-util/rustup-1.25.2/work/
rustup-1.25.2/target/release/deps/librand-7715799066486b49.rlib --extern regex=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/libregex-35c9733f36b02283.rlib --extern remove_dir_all=/var/tmp/portage/dev-util/rustu
p-1.25.2/work/rustup-1.25.2/target/release/deps/libremove_dir_all-76280dbbdf1a51bb.rlib --extern retry=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/libretry-c773ccb00590a564.rlib --extern rs_tracing=/var/tmp/po
rtage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/librs_tracing-422cf6c061006738.rlib --extern rustup=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/librustup-8b7cc27125214c3c.rlib --extern same
_file=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/libsame_file-16d6ff4c2f481160.rlib --extern scopeguard=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/libscopeguard-f7fb0ef9443
4a317.rlib --extern semver=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/libsemver-99eb37821bc04c15.rlib --extern sequoia_openpgp=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/li
bsequoia_openpgp-a1825ca4796b9ba6.rlib --extern serde=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/libserde-30cb06f26a61ce15.rlib --extern sha2=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/
release/deps/libsha2-56943af6149cc374.rlib --extern sharded_slab=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/libsharded_slab-1ba007a8ea9f0f88.rlib --extern strsim=/var/tmp/portage/dev-util/rustup-1.25.2/work/r
ustup-1.25.2/target/release/deps/libstrsim-8325f29937048231.rlib --extern tar=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/libtar-e9ebeae60de623ae.rlib --extern tempfile=/var/tmp/portage/dev-util/rustup-1.25.2/
work/rustup-1.25.2/target/release/deps/libtempfile-449358ef738b169b.rlib --extern term=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/libterm-7e07be19179641bc.rlib --extern thiserror=/var/tmp/portage/dev-util/rus
tup-1.25.2/work/rustup-1.25.2/target/release/deps/libthiserror-5694dbfeb0c06905.rlib --extern threadpool=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/libthreadpool-571cc93f59dd9c67.rlib --extern toml=/var/tmp/p
ortage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/libtoml-d843a5601ec29309.rlib --extern url=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/liburl-9de33e6a9abf01a3.rlib --extern wait_timeout=/v
ar/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/libwait_timeout-c89c5cdde647ed10.rlib --extern xz2=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/libxz2-bf0551dcdc837ed0.rlib --extern
 zstd=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/deps/libzstd-60cf65504c4c5875.rlib -L native=/usr/lib64 -L native=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/build/ring-8d89674cd5d0b
c91/out -L native=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/build/sys-info-f4e3e0444b9d8a6b/out -L native=/usr/lib64 -L native=/var/tmp/portage/dev-util/rustup-1.25.2/work/rustup-1.25.2/target/release/build/zstd-
sys-044b9fee2f4e7f8e/out`
error: linking with `aarch64-unknown-linux-gnu-gcc` failed: exit status: 1


Reproducible: Always

Steps to Reproduce:
1. Use gcc-13 on arm64
2. emerge -1av =dev-util/rustup-1.25.2
3. read the build log
Actual Results:  
The build failed as above

Expected Results:  
It will be fixed before gcc-13 goes stable.

Pi4_GCC-13 ~ # emerge --info
Portage 3.0.44 (python 3.10.10-final-0, default/linux/arm64/17.0/desktop, gcc-13, glibc-2.36-r7, 6.1.1-gentoo aarch64)
=================================================================
System uname: Linux-6.1.1-gentoo-aarch64-with-glibc2.36
KiB Mem:    72945512 total,  17897592 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sun, 12 Feb 2023 14:30:01 +0000
Head commit of repository gentoo: da6978e56be698805a0fac2efa92c645f0b823fe
sh bash 5.2_p15-r2
ld GNU ld (Gentoo 2.39 p5) 2.39.0
distcc 3.4 aarch64-unknown-linux-gnu [disabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r2::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.36.0-r2::gentoo
dev-lang/python:           3.9.16-r1::gentoo, 3.10.10::gentoo, 3.11.2::gentoo
dev-lang/rust:             1.67.1::gentoo
dev-util/cmake:            3.25.2::gentoo
dev-util/meson:            1.0.0::gentoo
sys-apps/baselayout:       2.13-r1::gentoo
sys-apps/openrc:           0.46::gentoo
sys-apps/sandbox:          2.30-r1::gentoo
sys-devel/autoconf:        2.13-r7::gentoo, 2.71-r5::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.39-r4::gentoo, 2.40-r1::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           14.0.6-r1::gentoo, 15.0.7-r1::gentoo
sys-devel/gcc:             11.3.1_p20221007::gentoo, 12.2.1_p20221231::gentoo, 13.0.1_pre20230205-r1::gentoo
sys-devel/gcc-config:      2.10::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             14.0.6-r1::gentoo, 15.0.7::gentoo
sys-devel/llvm:            13.0.1::gentoo, 14.0.6-r2::gentoo, 15.0.7::gentoo
sys-devel/make:            4.4::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.36-r7::gentoo
sys-libs/libselinux:       3.4::gentoo
Repositories:

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

Installed sets: @extras, @fs-extras, @kde-extras, @more_extras
ACCEPT_KEYWORDS="arm64 ~arm64"
ACCEPT_LICENSE="@FREE all-rights-reserved bh-luxi bluez-firmware fairuse FraunhoferFDK freedist IUPAC-InChi kaptan linux-firmware linux-fw-redistributable MPEG-4 MSttfEULA no-source-code OSGi-Specification-2.0 raspberrypi-videocore-bin rpi-eeprom SSPL-1 sun-bcla-jai Turkowski unRAR xgraph LSI free-noncomm MBROLA-VOICES Microsoft-vscode MBROLA Amazon CC-BY-NC-SA-2.5 SPS vim.org Sun-BSD-no-nuclear-2005 PICO-8 NVIDIA-SDK Kryoflux-MAME NVIDIA-r2 codehaus-classworlds BigelowHolmes BSL-1.1 DCC grass-ipafonts JoyPixels bakoma"
CBUILD="aarch64-unknown-linux-gnu"
CFLAGS="-mcpu=cortex-a72+crc -mtune=cortex-a72 -ftree-vectorize -O2 -pipe -fomit-frame-pointer -flto=6"
CHOST="aarch64-unknown-linux-gnu"
CONFIG_PROTECT="/boot/cmdline.txt /boot/config.txt /etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /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/php/apache2-php7.4/ext-active/ /etc/php/apache2-php8.0/ext-active/ /etc/php/apache2-php8.1/ext-active/ /etc/php/apache2-php8.2/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cgi-php8.0/ext-active/ /etc/php/cgi-php8.1/ext-active/ /etc/php/cgi-php8.2/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/php/cli-php8.0/ext-active/ /etc/php/cli-php8.1/ext-active/ /etc/php/cli-php8.2/ext-active/ /etc/php/fpm-php7.4/ext-active/ /etc/php/fpm-php8.0/ext-active/ /etc/php/fpm-php8.1/ext-active/ /etc/php/fpm-php8.2/ext-active/ /etc/php/phpdbg-php7.4/ext-active/ /etc/php/phpdbg-php8.0/ext-active/ /etc/php/phpdbg-php8.1/ext-active/ /etc/php/phpdbg-php8.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-mcpu=cortex-a72+crc -mtune=cortex-a72 -ftree-vectorize -O2 -pipe -fomit-frame-pointer -flto=6"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE 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 XDG_STATE_HOME"
FCFLAGS="-mcpu=cortex-a72+crc -mtune=cortex-a72 -ftree-vectorize -O2 -pipe -fomit-frame-pointer -flto=6"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg buildpkg-live collision-protect config-protect-if-modified 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="-mcpu=cortex-a72+crc -mtune=cortex-a72 -ftree-vectorize -O2 -pipe -fomit-frame-pointer -flto=6"
GENTOO_MIRRORS="http://mirrors.gethosted.online/gentoo                 http://www.mirrorservice.org/sites/distfiles.gentoo.org/                 http://mirrors.soeasyto.com/distfiles.gentoo.org/                 http://mirror.leaseweb.com/gentoo/                 http://gentoo.mirrors.ovh.net/gentoo-distfiles/                 http://ftp.snt.utwente.nl/pub/os/linux/gentoo                 https://www.mirrorservice.org/sites/distfiles.gentoo.org/                 http://mirror.bytemark.co.uk/gentoo/                  http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/                  http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
LINGUAS="en en_GB"
MAKEOPTS="-j32"
PKGDIR="/var/cache/packages"
PORTAGE_BINHOST="http://bloodnoc.org/~roy/BINHOSTS/gcc-12.x/armv8a"
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"
SHELL="/bin/bash"
USE="X a52 aac aalib accessibility acl acpi alsa arm64 bluetooth bluray branding btrfs bzip2 cairo cdda cdr clamav clang cli context crypt cups dbus default-gold dillo dmraid doc dot dri dts dvd dvdnav dvdr eds egl elogind encode exif extras f2fs faad fat ffmpeg flac fontconfig fortran gdbm geoclue gif gles1 gnome-keyring gpm graphite gstreamer gtk gtk3 gui hfs iconv icu introspection iptables ipv6 jack jadetex jfs jit jpeg kde latex lcms libglvnd libnotify libtirpc lto lvm mad map mdadm minizip mng modemmanager mp3 mp4 mpeg mysql mysqli ncurses netifrc ngspice nls nptl nss ntfs ogg openexr opengl openmp openssl pam pango pcre pcre16 pcre32 pdf php pie pim png policykit postgres postproc ppds python qml qt5 rar raspberry-pi readline reiser4 reiserfs script sdk sdl seccomp servletapi skia sound speex spell split-usr sqlite ssl ssp startup-notification svc svg test-rust thesaurus thin threads tiff tk truetype twolame udev udf udisks unicode upower usb vala virt-network vorbis vulkan webengine widgets wmf wxwidgets x264 x265 xattr xcb xface xfs xft xml xpm xscreensaver xv xvfb xvid xvmc zip zlib" ADA_TARGET="gnat_2021" 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 vfp vfpv3 vfpv4 vfp-d32 crc32 v4 v5 v6 v7 v8 thumb2" 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="evdev libinput synaptics" KERNEL="linux" L10N="en en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby26 ruby27 ruby30 ruby31" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev nouveau radeon v3d vc4" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Roy Bamford gentoo-dev 2023-02-25 15:33:00 UTC
Created attachment 854610 [details]
Build Log
Comment 2 Georgy Yakovlev archtester gentoo-dev 2023-02-25 23:26:12 UTC
Can you try disabling -flto ?

cargo.eclass will be filtering it from *flags soon, haven’t merged the patch yet.
Comment 3 Roy Bamford gentoo-dev 2023-02-26 19:17:23 UTC
Pi4_GCC-13 ~ # CFLAGS="${CFLAGS} -fno-lto" CXXFLAGS="${CXXFLAGS} -fno-lto"  emerge -1av  =dev-util/rustup-1.25.2 --buildpkgonly

ends with 
...
 * Final size of build directory: 1034096 KiB (1009.8 MiB)
 * Final size of installed tree:     9916 KiB (   9.6 MiB)

So that works. Thank you.
Comment 4 Eli Schwartz 2024-03-07 05:16:02 UTC
Fixed by cargo.eclass, cannot reproduce anymore.