Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 933096 - dev-libs/intel-compute-runtime-24.17.29377.6 error ld.gold: pack-relative-relocs: unknown -z option
Summary: dev-libs/intel-compute-runtime-24.17.29377.6 error ld.gold: pack-relative-rel...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Jan Henke
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: systemwide-gold
  Show dependency tree
 
Reported: 2024-05-29 00:22 UTC by Freddie Witherden
Modified: 2024-06-30 00:00 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Freddie Witherden 2024-05-29 00:22:08 UTC
When attempting to upgrade my ~AMD64 system to dev-libs/intel-compute-runtime-24.17.29377.6 I get a compilation error stating:

FAILED: bin/libocloc.so 
: && /usr/bin/x86_64-pc-linux-gnu-g++ -fPIC -O2 -pipe -march=native -flto=auto -ffat-lto-objects -ftemplate-depth=1024 -Wall -Wempty-body -Wignored-qualifiers -Wtype-limits -Wuninitialized -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Winvalid-pch -Wno-unknown-pragmas -Wno-unused-local-typedefs -Wno-unused-but-set-variable -Wclobbered -Wimplicit-fallthrough=4 -Wno-noexcept-type -fstack-protector-strong -Wformat -Wformat-security  -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -fuse-ld=gold  -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now  -Wl,--version-script=/var/tmp/portage/dev-libs/intel-compute-runtime-24.17.29377.6/work/compute-runtime-24.17.29377.6/shared/offline_compiler/source/ocloc.exports -shared -Wl,-soname,libocloc.so -o bin/libocloc.so @CMakeFiles/ocloc_lib.rsp && :
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld.gold: pack-relative-relocs: unknown -z option
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld.gold: use the --help option for usage information
collect2: error: ld returned 1 exit status

Info:

# emerge --info
Portage 3.0.64 (python 3.11.9-final-0, default/linux/amd64/23.0/desktop/plasma/systemd, gcc-13, glibc-2.39-r6, 6.4.8-gentoo-x86_64 x86_64)
=================================================================
System uname: Linux-6.4.8-gentoo-x86_64-x86_64-12th_Gen_Intel-R-_Core-TM-_i7-12700H-with-glibc2.39
KiB Mem:    65418352 total,  25284828 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Tue, 28 May 2024 11:00:00 +0000
Head commit of repository gentoo: d5a55fcccaabd24eaf74696ba43292b89489eb0b
sh bash 5.2_p26-r3
ld GNU ld (Gentoo 2.42 p3) 2.42.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p26-r3::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo, 2.72-r1::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.29.3::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.4.0-r1::gentoo
dev-java/java-config:      2.3.3-r1::gentoo
dev-lang/perl:             5.38.2-r6::gentoo
dev-lang/python:           3.10.14_p1-r1::gentoo, 3.11.9-r1::gentoo, 3.12.3-r1::gentoo, 3.13.0_beta1_p3::gentoo
dev-lang/rust:             1.77.1::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-apps/systemd:          255.7::gentoo
sys-devel/binutils:        2.38-r2::gentoo, 2.41-r5::gentoo, 2.42-r1::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r3::gentoo, 16.0.6::gentoo, 17.0.6::gentoo, 18.1.6::gentoo
sys-devel/gcc:             13.2.1_p20240503::gentoo, 14.1.1_p20240518::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             15.0.7::gentoo, 16.0.6::gentoo, 17.0.6::gentoo, 18.1.6::gentoo
sys-devel/llvm:            15.0.7-r3::gentoo, 16.0.6::gentoo, 17.0.6::gentoo, 18.1.6::gentoo
sys-kernel/linux-headers:  6.9::gentoo (virtual/os-headers)
sys-libs/glibc:            2.39-r6::gentoo
Repositories:

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

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA NVIDIA-CUDA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
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 -pipe -march=native"
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="-O2 -pipe -march=native"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=native"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
MAKEOPTS="-j12"
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 acl acpi activities alsa amd64 avif bluetooth branding bzip2 cairo cdda cdr cet crypt cups dbus declarative djvu dri dts dvd dvdr encode exif flac gdbm gif gpm gtk gui heif iconv icu ipv6 jack-sdk jpeg jpegxl kde kwallet lcms libnotify libtirpc lv2 mad mng mp3 mp4 mpeg multilib ncurses networkmanager nls ogg opengl openmp pam pango pcre pdf pipewire plasma png policykit ppds pulseaudio qml qt5 readline screencast sdl seccomp semantic-desktop sound spell ssl startup-notification svg systemd test-rust tiff truetype udev udisks unicode upower usb vaapi vorbis vulkan wayland widgets wxwidgets x264 xattr xcb xft xml xv xvid zeroconf zlib" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio 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="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="wacom libinput" KERNEL="linux" L10N="en en-US en-GB" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto 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, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-05-30 23:18:03 UTC
The 23.0 profile defaults set -Wl,-z,pack-relative-relocs. gold doesn't support this and gold is pretty dead - it's masked for a reason. Consider not using it anymore, but you can override the default LDFLAGS too if you wish.
Comment 2 Freddie Witherden 2024-06-02 14:04:24 UTC
(In reply to Sam James from comment #1)
> The 23.0 profile defaults set -Wl,-z,pack-relative-relocs. gold doesn't
> support this and gold is pretty dead - it's masked for a reason. Consider
> not using it anymore, but you can override the default LDFLAGS too if you
> wish.

I'm not intentionally using gold.  From my currently selected binutils:

[ebuild   R    ] sys-devel/binutils-2.42-r1:2.42::gentoo  USE="cet nls plugins zstd -debuginfod -doc -gold -gprofng -hardened -multitarget -pgo -static-libs -test -vanilla" 0 KiB

I do have an ld.gold binary on my system due to an older version of binutils which I've not unmerged.  So it appears as if the build scripts are going out of their way to pick gold as a linker.
Comment 3 Freddie Witherden 2024-06-03 21:04:18 UTC
For those who are interested the issue is here:

https://github.com/intel/compute-runtime/commit/d186e496fcecdd3027dcdab37dffcb7cf69c06ea

which "build: use lld/gold for shared libraries."  I am unsure why upstream did this but it looks as if it can be disabled with NEO_DISABLE_LD_GOLD.  The ebuild should probably include this.
Comment 4 Larry the Git Cow gentoo-dev 2024-06-30 00:00:09 UTC
The bug has been closed via the following commit(s):

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

commit 6bd8af7bb55ace12e2788f4770ddfca3b834c76d
Author:     Conrad Kostecki <conikost@gentoo.org>
AuthorDate: 2024-06-28 19:51:40 +0000
Commit:     Conrad Kostecki <conikost@gentoo.org>
CommitDate: 2024-06-29 23:53:57 +0000

    dev-libs/intel-compute-runtime: force disable gold
    
    Closes: https://bugs.gentoo.org/933096
    Signed-off-by: Conrad Kostecki <conikost@gentoo.org>

 .../intel-compute-runtime/intel-compute-runtime-24.22.29735.21.ebuild    | 1 +
 1 file changed, 1 insertion(+)