Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 902211 - app-emulation/libvirt: build failure with LLD 16 (ERROR: Problem encountered: No supported version script link argument found.)
Summary: app-emulation/libvirt: build failure with LLD 16 (ERROR: Problem encountered:...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Matthias Maier
URL:
Whiteboard: fixed in 8.9.0
Keywords: PullRequest
Depends on:
Blocks: LD-is-lld, systemwide-lld c99-porting
  Show dependency tree
 
Reported: 2023-03-20 01:48 UTC by Sam James
Modified: 2024-10-31 09:48 UTC (History)
2 users (show)

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


Attachments
build.log (file_902211.txt,16.62 KB, text/plain)
2023-03-20 01:48 UTC, Sam James
Details
meson-log.txt (file_902211.txt,147.64 KB, text/plain)
2023-03-20 01:49 UTC, Sam James
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-20 01:48:21 UTC
Created attachment 858421 [details]
build.log

Compiler for C supports link arguments -Wl,-z,defs: YES
Compiler for C supports link arguments -Wl,--no-copy-dt-needed-entries: YES
Compiler for C supports link arguments -Wl,--version-script=/var/tmp/portage/app-emulation/libvirt-8.9.0-r1/work/libvirt-8.9.0/src/libvirt_qemu.syms: NO

meson.build:521:4: ERROR: Problem encountered: No supported version script link argument found.

A full log can be found at /var/tmp/portage/app-emulation/libvirt-8.9.0-r1/work/libvirt-8.9.0-build/meson-logs/meson-log.txt
 * ERROR: app-emulation/libvirt-8.9.0-r1::gentoo failed (configure phase):
 *   (no error message)

----

# emerge --info
Portage 3.0.45.3 (python 3.10.10-final-0, default/linux/amd64/17.0/musl/clang, gcc-12, musl-1.2.3-r7, 6.1.19-gentoo-dist-hardened x86_64)
=================================================================
System uname: Linux-6.1.19-gentoo-dist-hardened-x86_64-AMD_Ryzen_9_3950X_16-Core_Processor-with-libc
KiB Mem:    65745744 total,   3583816 free
KiB Swap:    8290300 total,   2930740 free
Timestamp of repository gentoo: Sun, 19 Mar 2023 23:50:11 +0000
sh bash 5.2_p15-r2
ld GNU ld (Gentoo 2.39 p5) 2.39.0
ccache version 4.8 [disabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r2::gentoo
dev-lang/perl:             5.36.0-r2::gentoo
dev-lang/python:           3.10.10_p3::gentoo, 3.11.2_p2::gentoo
dev-lang/rust:             1.67.1::gentoo
dev-lang/rust-bin:         1.66.0::gentoo
dev-util/ccache:           4.8::gentoo
dev-util/cmake:            3.26.0::gentoo
dev-util/meson:            1.0.1::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-r3::gentoo, 2.71-r5::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.39-r4::gentoo, 2.40-r3::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           13.0.1::gentoo, 14.0.6-r1::gentoo, 15.0.6::gentoo, 16.0.0::gentoo
sys-devel/gcc:             12.2.1_p20230304::gentoo
sys-devel/gcc-config:      2.10::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             13.0.1-r1::gentoo, 14.0.6-r1::gentoo, 15.0.6::gentoo, 16.0.0::gentoo
sys-devel/llvm:            13.0.1::gentoo, 14.0.6-r2::gentoo, 15.0.6::gentoo, 16.0.0::gentoo
sys-devel/make:            4.4.1::gentoo
sys-kernel/linux-headers:  6.2::gentoo (virtual/os-headers)
sys-libs/musl:             1.2.3-r7::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: 24
    sync-rsync-verify-jobs: 1

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

Installed sets: @llvm, @sam
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
ADDR2LINE="llvm-addr2line"
AR="llvm-ar"
AS="clang -c"
CBUILD="x86_64-gentoo-linux-musl"
CC="clang"
CFLAGS="-O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches"
CHOST="x86_64-gentoo-linux-musl"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /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/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CPP="clang-cpp"
CXX="clang++"
CXXFLAGS="-O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going=y --complete-graph"
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 -fdiagnostics-color=always -frecord-gcc-switches"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox network-sandbox news parallel-fetch parallel-install 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="-O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches"
GENTOO_MIRRORS="http://mirror.bytemark.co.uk/gentoo/ http://www.mirrorservice.org/sites/distfiles.gentoo.org/ http://mirrors.soeasyto.com/distfiles.gentoo.org/"
INSTALL_MASK="charset.alias /usr/share/locale/locale.alias"
LANG="C.UTF8"
LD="ld.lld"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--as-needed  -Wl,--defsym=__gentoo_check_ldflags__=0"
LEX="flex"
NM="llvm-nm"
OBJCOPY="llvm-objcopy"
OBJDUMP="llvm-objdump"
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"
RANLIB="llvm-ranlib"
READELF="llvm-readelf"
STRINGS="llvm-strings"
STRIP="llvm-strip"
USE="acl amd64 bzip2 clang cli crypt dri fortran hunspell iconv ipv6 libglvnd libtirpc llvm-libunwind ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl system-av1 system-binutils system-boost system-bootstrap system-cairo system-clang system-digest system-ffmpeg system-harfbuzz system-heimdal system-icu system-jpeg system-leveldb system-libevent system-libs system-libvpx system-libyaml system-llvm system-lz4 system-mitkrb5 system-sqlite system-ssl system-tbb system-uulib system-webp system-zlib test-rust timidity unicode xattr zlib" 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="mmx mmxext sse sse2" ELIBC="musl" 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" 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="ruby27 ruby30" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy 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:  ARFLAGS, ASFLAGS, CCLD, CONFIG_SHELL, CPPFLAGS, CTARGET, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, MAKEOPTS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS, SHELL, SIZE, YACC, YFLAGS
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-20 01:49:19 UTC
Created attachment 858423 [details]
meson-log.txt

This is caused/exposed by https://reviews.llvm.org/D135402:

```
Compiler stderr:
 ld.lld: error: version script assignment of 'LIBVIRT_QEMU_0.8.3' to symbol 'virDomainQemuMonitorCommand' failed: symbol not defined
ld.lld: error: version script assignment of 'LIBVIRT_QEMU_0.9.4' to symbol 'virDomainQemuAttach' failed: symbol not defined
ld.lld: error: version script assignment of 'LIBVIRT_QEMU_0.10.0' to symbol 'virDomainQemuAgentCommand' failed: symbol not defined
ld.lld: error: version script assignment of 'LIBVIRT_QEMU_1.2.3' to symbol 'virConnectDomainQemuMonitorEventDeregister' failed: symbol not defined
ld.lld: error: version script assignment of 'LIBVIRT_QEMU_1.2.3' to symbol 'virConnectDomainQemuMonitorEventRegister' failed: symbol not defined
ld.lld: error: version script assignment of 'LIBVIRT_QEMU_8.2.0' to symbol 'virDomainQemuMonitorCommandWithFiles' failed: symbol not defined
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)

Compiler for C supports link arguments -Wl,--version-script=/var/tmp/portage/app-emulation/libvirt-8.9.0-r1/work/libvirt-8.9.0/src/libvirt_qemu.syms: NO 

meson.build:521:4: ERROR: Problem encountered: No supported version script link argument found.
```
Comment 2 Michal Prívozník 2023-03-20 13:56:29 UTC
This is a genuine libvirt bug. I've posted a fix here:

https://listman.redhat.com/archives/libvir-list/2023-March/238923.html
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-21 03:56:50 UTC
(In reply to Michal Prívozník from comment #2)
> This is a genuine libvirt bug. I've posted a fix here:
> 
> https://listman.redhat.com/archives/libvir-list/2023-March/238923.html

Thanks for fixing it so quickly Michal. Would you mind pulling that into gentoo too?
Comment 4 Michal Prívozník 2023-03-21 04:48:33 UTC
(In reply to Sam James from comment #3)
> Thanks for fixing it so quickly Michal. Would you mind pulling that into
> gentoo too?

Sure thing! Once the patch gets merged (there was an alternative approach suggested in the review), I'll backport it.
Comment 6 Larry the Git Cow gentoo-dev 2023-03-21 19:19:02 UTC
The bug has been closed via the following commit(s):

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

commit bb55416d6844769391476f78aaff25c6b6bee090
Author:     Michal Privoznik <michal.privoznik@gmail.com>
AuthorDate: 2023-03-21 11:04:06 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-03-21 19:18:32 +0000

    app-emulation/libvirt: Fix a build failure with LLD 16
    
    With the newest LLD, the libvirt's detection of --version-script=
    linker argument works no more. Backport the upstream patch that
    fixes the issue.
    
    Since the patch is merged and is going to be contained in the
    upcoming release, there's no point in adding it to the list of
    patched in the live ebuild. Append it only into the older
    versions then.
    
    Also, I had to rebase the patch for older version of libvirt,
    because the patched file (meson.build) looked a bit different and
    the upstream patch did not apply cleanly.
    
    Closes: https://bugs.gentoo.org/902211
    Signed-off-by: Michal Privoznik <michal.privoznik@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/30284
    Signed-off-by: Sam James <sam@gentoo.org>

 ....0-meson-Stop-detecting-Wl-version-script.patch | 55 ++++++++++++++++++++++
 ....0-meson-Stop-detecting-Wl-version-script.patch | 53 +++++++++++++++++++++
 app-emulation/libvirt/libvirt-8.7.0-r1.ebuild      |  1 +
 app-emulation/libvirt/libvirt-8.8.0-r1.ebuild      |  1 +
 app-emulation/libvirt/libvirt-8.9.0-r1.ebuild      |  1 +
 app-emulation/libvirt/libvirt-8.9.0.ebuild         |  1 +
 6 files changed, 112 insertions(+)