Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 908815 - media-video/rav1e fails to build with LTO
Summary: media-video/rav1e fails to build with LTO
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Luca Barbato
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2023-06-18 23:47 UTC by Andrew Udvare
Modified: 2023-12-23 07:28 UTC (History)
3 users (show)

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


Attachments
build log (build.log.gz,17.24 KB, application/gzip)
2023-06-18 23:47 UTC, Andrew Udvare
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Udvare 2023-06-18 23:47:01 UTC
Many linking errors:

  = note: /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/media-video/rav1e-0.6.6/work/rav1e
-0.6.6/target/release/deps/libbuilt-372779b299ed31fe.rlib(built-372779b299ed31fe.built.09b89016-cgu.7.rcgu.o): in function `git2::repo::R
epository::open':
          built.09b89016-cgu.7:(.text._ZN4git24repo10Repository4open17hf05b4d3f10d5ebf5E+0x1cc): undefined reference to `git_repository_o
pen'
          /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/media-video/rav1e-0.6.6/work/rav1e
-0.6.6/target/release/deps/libbuilt-372779b299ed31fe.rlib(built-372779b299ed31fe.built.09b89016-cgu.7.rcgu.o): in function `git2::repo::R
epository::discover':
          built.09b89016-cgu.7:(.text._ZN4git24repo10Repository8discover17h903cf5f40f310d88E+0x237): undefined reference to `git_reposito
ry_discover'
          /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/media-video/rav1e-0.6.6/work/rav1e
-0.6.6/target/release/deps/libgit2-583dd0867985c87f.rlib(git2-583dd0867985c87f.git2.a09953ce-cgu.1.rcgu.o): in function `git2::ObjectType
::str':
          git2.a09953ce-cgu.1:(.text._ZN4git210ObjectType3str17h084e05c0e53feabbE+0x12): undefined reference to `git_object_type2string'
          /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/media-video/rav1e-0.6.6/work/rav1e
-0.6.6/target/release/deps/libgit2-583dd0867985c87f.rlib(git2-583dd0867985c87f.git2.a09953ce-cgu.10.rcgu.o): in function `git2::commit::C
ommit::id':
          git2.a09953ce-cgu.10:(.text._ZN4git26commit6Commit2id17hfdf82893d01f6274E+0x13): undefined reference to `git_commit_id'
          /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/media-video/rav1e-0.6.6/work/rav1e
-0.6.6/target/release/deps/libgit2-583dd0867985c87f.rlib(git2-583dd0867985c87f.git2.a09953ce-cgu.10.rcgu.o): in function `<git2::commit::
Commit as core::ops::drop::Drop>::drop':
          git2.a09953ce-cgu.10:(.text._ZN62_$LT$git2..commit..Commit$u20$as$u20$core..ops..drop..Drop$GT$4drop17h40ea598a9ca3f2dfE+0x6):
undefined reference to `git_commit_free'

Reproducible: Always

Steps to Reproduce:
1. Add -flto to CFLAGS
2. emerge -1 media-video/rav1e
Actual Results:  
Fails to build.

Expected Results:  
Should build.

Portage 3.0.48.1 (python 3.11.4-final-0, default/linux/amd64/17.1/desktop/plasma/systemd/merged-usr, gcc-13, glibc-2.37-r3, 6.3.8-gentoo-limelight x86_64)
=================================================================
System uname: Linux-6.3.8-gentoo-limelight-x86_64-11th_Gen_Intel-R-_Core-TM-_i9-11900K_@_3.50GHz-with-glibc2.37
KiB Mem:    65708332 total,  45414044 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sun, 18 Jun 2023 21:02:08 +0000
Head commit of repository gentoo: 2bf37f258887fcba6bc8af705140972186182762

Timestamp of repository brave-overlay: Wed, 14 Jun 2023 20:01:54 +0000
Head commit of repository brave-overlay: 3175fb13cb5fb56bd0eaa258027338ff0d851735

Head commit of repository guru: ae2c75b7fd693a6291305762735315c14e1b9a77

Timestamp of repository menelkir: Sun, 18 Jun 2023 21:02:00 +0000
Head commit of repository menelkir: ec2b36851fa8a56b26a236a9265465b0dcbaf1b7

Timestamp of repository pentoo: Sun, 18 Jun 2023 21:01:56 +0000
Head commit of repository pentoo: 361dceef3062e60b00855ff6621a64df9c9a05c8

Timestamp of repository steam-overlay: Sat, 17 Jun 2023 10:17:28 +0000
Head commit of repository steam-overlay: 6d66cb6aaaeceafa8b4df65009bc5f851e6e7b01

Head commit of repository tatsh-overlay: f59cebd4d7eb61bd64227c706618e48249438392

sh bash 5.2_p15-r3
ld GNU ld (Gentoo 2.40 p5) 2.40.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r3::gentoo
dev-java/java-config:      2.3.1-r1::gentoo
dev-lang/perl:             5.36.1-r2::gentoo
dev-lang/python:           3.10.12::gentoo, 3.11.4::gentoo, 3.12.0_beta2::gentoo
dev-lang/rust:             1.69.0-r1::gentoo
dev-util/cmake:            3.26.4-r1::gentoo
dev-util/meson:            1.1.1::gentoo
sys-apps/baselayout:       2.13-r1::gentoo
sys-apps/sandbox:          2.31::gentoo
sys-apps/systemd:          253.5::gentoo
sys-devel/autoconf:        2.13-r8::gentoo, 2.71-r6::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.40-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r3::gentoo, 16.0.6::gentoo
sys-devel/gcc:             13.1.1_p20230527::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             15.0.7::gentoo, 16.0.6::gentoo
sys-devel/llvm:            14.0.6-r4::gentoo, 15.0.7-r3::gentoo, 16.0.6::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r3::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/sync/gentoo.git
    priority: -1000
    volatile: False
    sync-git-verify-commit-signature: no

brave-overlay
    location: /var/db/repos/brave-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/brave-overlay.git
    masters: gentoo
    volatile: False

crossdev
    location: /var/db/repos/crossdev
    masters: gentoo
    volatile: False

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: git+ssh://git@git.gentoo.org/repo/proj/guru.git
    masters: gentoo
    volatile: False
    sync-git-verify-commit-signature: no

menelkir
    location: /var/db/repos/menelkir
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/menelkir.git
    masters: gentoo
    volatile: False

pentoo
    location: /var/db/repos/pentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/pentoo.git
    masters: gentoo
    volatile: False

rcvpn
    location: /var/db/repos/rcvpn
    masters: gentoo
    volatile: False

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo
    volatile: False

tatsh-overlay
    location: /var/db/repos/tatsh
    sync-type: git
    sync-uri: https://github.com/Tatsh/tatsh-overlay.git
    masters: gentoo
    volatile: False
    sync-git-verify-commit-signature: no

Installed sets: @admin, @android, @bashcomp, @cdr, @charles, @chrome, @cups, @dbeaver, @emulators, @exfat, @firefox, @fonts, @gimp, @git, @i3, @ibus, @kde, @kernel, @kodi, @libimobiledevice, @libreoffice, @media, @misc, @mlocate, @mupen64plus, @nfs, @pass, @portage-utilities, @python, @qemu, @rar, @retroarch, @ringcentral, @sm64, @steam, @stepmania, @thunderbird, @tmux, @vim, @virtualbox, @vlc, @vscode, @wine, @x11, @xirvik-vpn, @yt-dlp
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -flto -ftree-vectorize -ggdb -march=native -mtune=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/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/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -flto -ftree-vectorize -ggdb -march=native -mtune=native -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--jobs 17 --load-average 17 --quiet-build=y --usepkg --verbose-conflicts --buildpkg-exclude 'acct-*/* app-arch/rar app-emulation/virtualbox-extpack-oracle app-emulation/virtualbox-modules */*-bin dev-util/intel-ocl-sdk games-util/steam-launcher media-fonts/* media-video/magewell-pro-capture media-video/makemkv net-im/ripcord sys-kernel/linux-firmware sys-kernel/*-sources virtual/* media-video/cxadc *-drivers/*'"
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="-O2 -flto -ftree-vectorize -ggdb -march=native -mtune=native -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live cgroup clean-logs compressdebug 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 splitdebug strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync warn-on-large-env xattr"
FFLAGS="-O2 -flto -ftree-vectorize -ggdb -march=native -mtune=native -pipe"
GENTOO_MIRRORS="http://gentoo.osuosl.org/  http://www.gtlib.gatech.edu/pub/gentoo https://mirrors.rit.edu/gentoo/"
INSTALL_MASK="/etc/avahi/services/sftp-ssh.service /etc/conf.d /etc/cron.daily /etc/cron.monthly /etc/cron.weekly /etc/dracut.conf /etc/grub.d /etc/init.d /etc/modules-load.d/ddccontrol-i2c-dev.conf /usr/lib/modules-load.d/fwupd-msr.conf /usr/lib/modules-load.d/joycond.conf /usr/lib/rc"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
LINGUAS="en en_GB en_US"
MAKEOPTS="--jobs=17 --load-average=17"
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"
SHELL="/bin/bash"
USE="X a52 aac aacs acl acpi activities aio alsa amd64 aptx avahi bash-completion bluetooth bluray branding bzip2 cairo cdda cddb cdio cdr cjk clang cli colord crypt cups curl dav1d dbus declarative dri dts dvb dvd dvdr egl encode exif faudio ffmpeg flac fluidsynth fortran gamepad gdbm gif gles2 gpm gsm gstreamer gui hardened heif hwaccel ibus iconv icu idn ipv6 jack jemalloc joystick jpeg jpeg2k kde kwallet lame lcms ldac libass libcaca libnotify libretro libtirpc lm-sensors lto lv2 lvm lz4 lzma mad man matroska mng mod modplug mp3 mp4 mpeg multilib ncurses nls nptl nvenc ogg opencl opengl openmp opus pam pango pcre pdf pgo pipewire plasma png policykit ppds pulseaudio qml qt5 qt6 rar readline samba screencast sdl seccomp semantic-desktop snappy sound speex spell ssl startup-notification svg syslog system-av1 system-binutils system-boost system-bootloader system-cmark system-crontab system-ffmpeg system-harfbuzz system-heimdal system-info system-ipxe system-jpeg system-jsoncpp system-lcms system-leveldb system-libcxx system-libevent system-libs system-libvpx system-libyaml system-llvm system-lua system-lz4 system-mathjax system-mesa system-mitkrb5 system-numpy system-png system-python system-qemu system-seabios system-sqlite system-ssl system-tbb system-webp system-wfconfig system-wide system-wlroots system-zlib systemd taglib test-rust theora threads tiff tpm truetype twolame udev udisks unicode upower usb v4l vaapi vcd vdpau vim-syntax vlc vorbis vpx vulkan wavpack wayland webengine webp widgets wmf wxwidgets x264 x265 xattr xcb xft xinerama xml xpm xv xvid xxhash zeroconf zlib zstd" ABI_X86="64" 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_X86="aes avx avx2 avx512f avx512dq avx512cd avx512bw avx512vl avx512vbmi f16c fma3 mmx mmxext pclmul popcnt rdrand sha 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" INPUT_DEVICES="evdev libinput joystick wacom" KERNEL="linux" L10N="en en-GB en-US" 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_11" PYTHON_TARGETS="python3_11" QEMU_SOFTMMU_TARGETS="ppc x86_64" RUBY_TARGETS="ruby31" VIDEO_CARDS="nvidia v4l" 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, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Andrew Udvare 2023-06-18 23:47:15 UTC
Created attachment 864190 [details]
build log
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-18 23:48:14 UTC
Unfortunately, this is the generic "Rust-broken-with-LTO" issue which we need to handle in the eclass.
Comment 3 Jocelyn Mayer 2023-12-23 07:26:45 UTC
one interesting point is that it links without issues when using clang but not with gww, at least on one of my configurations (server machine).
Checked today.
Comment 4 Jocelyn Mayer 2023-12-23 07:28:11 UTC
(In reply to Jocelyn Mayer from comment #3)
> one interesting point is that it links without issues when using clang but
> not with gww, at least on one of my configurations (server machine).
> Checked today.

* I meant gcc, not gww, sorry..