Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 912777 - dev-libs/libnl-3.7.0 fail to compile with llvm based toolchain (lld 17)
Summary: dev-libs/libnl-3.7.0 fail to compile with llvm based toolchain (lld 17)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 912821
  Show dependency tree
 
Reported: 2023-08-21 19:57 UTC by ahmedsoliman
Modified: 2023-08-31 06:04 UTC (History)
1 user (show)

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


Attachments
full build log (libnl-build.log.gz,7.60 KB, application/gzip)
2023-08-21 19:57 UTC, ahmedsoliman
Details
Bug fix (based on gentoo master from github) (0001-dev-libs-libnl-backport-clang17-build-fix-for-3.7.0-.patch,2.45 KB, patch)
2023-08-23 22:44 UTC, ahmedsoliman
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ahmedsoliman 2023-08-21 19:57:44 UTC
Created attachment 868388 [details]
full build log

The immediate error is:

libtool: link: clang -shared  -fPIC -DPIC  lib/.libs/libnl_3_la-addr.o lib/.libs/libnl_3_la-attr.o lib/.libs/libnl_3_la-cache.o lib/.libs/libnl_3_la-cache_mngr.o lib/.libs/libnl_3_la-cache_mngt.o lib/.libs/libnl_3_la-data.o lib/.libs/libn
l_3_la-error.o lib/.libs/libnl_3_la-handlers.o lib/.libs/libnl_3_la-hash.o lib/.libs/libnl_3_la-hashtable.o lib/.libs/libnl_3_la-mpls.o lib/.libs/libnl_3_la-msg.o lib/.libs/libnl_3_la-nl.o lib/.libs/libnl_3_la-object.o lib/.libs/libnl_3_l
a-socket.o lib/.libs/libnl_3_la-utils.o lib/.libs/libnl_3_la-version.o   -Wl,--as-needed -lpthread  -O2 -march=native -Wl,--version-script=/var/tmp/portage/dev-libs/libnl-3.7.0/work/libnl-3.7.0/libnl-3.sym -Wl,-O1 -fuse-ld=lld   -Wl,-sona
me -Wl,libnl-3.so.200 -o lib/.libs/libnl-3.so.200.26.0                                                                                                                                                                                        
ld.lld: error: version script assignment of 'libnl_3_6' to symbol 'rtnl_link_info_ops_get' failed: symbol not defined                                                                                                                         
clang: error: linker command failed with exit code 1 (use -v to see invocation)                                                                                                                                                               

$ emerge --info '=dev-libs/libnl-3.7.0::gentoo' 
Portage 3.0.49 (python 3.11.4-final-0, default/linux/amd64/17.1, gcc-12, glibc-2.37-r3, 6.1.41-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.1.41-gentoo-x86_64-Intel-R-_Core-TM-_i7-4500U_CPU_@_1.80GHz-with-glibc2.37
KiB Mem:     8073024 total,   4982732 free
KiB Swap:   15624996 total,  15614476 free
Timestamp of repository gentoo: Mon, 21 Aug 2023 06:00:01 +0000
Head commit of repository gentoo: 3c1913e2a2da08cec51b804f0d5b6256d6aa180b
sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.40 p5) 2.40.0
ccache version 4.8.2 [disabled]
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-lang/perl:             5.36.1-r3::gentoo
dev-lang/python:           3.11.4::gentoo
dev-util/ccache:           4.8.2::gentoo
dev-util/cmake:            3.26.4-r2::gentoo
dev-util/meson:            1.1.1::gentoo
sys-apps/baselayout:       2.14::gentoo
sys-apps/openrc:           0.47.1::gentoo
sys-apps/sandbox:          2.37::gentoo
sys-devel/autoconf:        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:           17.0.0_rc2::gentoo
sys-devel/gcc:             12.3.1_p20230526::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             17.0.0_rc2::gentoo
sys-devel/llvm:            17.0.0_rc2::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r3::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-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
AR="llvm-ar"
CBUILD="x86_64-pc-linux-gnu"
CC="clang"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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/sandbox.d /etc/terminfo"
CXX="clang++"
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 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="-O2 -pipe -march=native"
GENTOO_MIRRORS="https://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/     http://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/     rsync://mirror.eu.oneandone.net/gentoo/     http://ftp.agdsn.de/gentoo     https://ftp.agdsn.de/gentoo     rsync://ftp.agdsn.de/gentoo     https://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/     http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/     rsync://ftp.spline.inf.fu-berlin.de/gentoo-distfiles/     https://ftp.gwdg.de/pub/linux/gentoo/     http://ftp.gwdg.de/pub/linux/gentoo/     ftp://ftp.gwdg.de/pub/linux/gentoo/     rsync://ftp.gwdg.de/gentoo/     https://ftp.uni-hannover.de/gentoo/     http://ftp.uni-hannover.de/gentoo/     ftp://ftp.uni-hannover.de/gentoo/     ftp://mirror.netcologne.de/gentoo/     https://mirror.netcologne.de/gentoo/     http://mirror.netcologne.de/gentoo/     rsync://mirror.netcologne.de/gentoo/     https://mirror.netzwerge.de/gentoo/     http://mirror.netzwerge.de/gentoo/     https://packages.hs-regensburg.de/gentoo-distfiles/     http://packages.hs-regensburg.de/gentoo-distfiles/     https://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/     http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/     ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/     rsync://linux.rz.ruhr-uni-bochum.de/gentoo     https://ftp.halifax.rwth-aachen.de/gentoo/     http://ftp.halifax.rwth-aachen.de/gentoo/     ftp://ftp.halifax.rwth-aachen.de/gentoo/     rsync://ftp.halifax.rwth-aachen.de/gentoo/     https://ftp.tu-ilmenau.de/mirror/gentoo/     http://ftp.tu-ilmenau.de/mirror/gentoo/     rsync://ftp.tu-ilmenau.de/gentoo/     https://ftp.fau.de/gentoo     http://ftp.fau.de/gentoo     ftp://ftp.fau.de/gentoo     rsync://ftp.fau.de/gentoo     https://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/     http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/     ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/     rsync://ftp-stud.hs-esslingen.de/gentoo/     https://ftp.uni-stuttgart.de/gentoo-distfiles/     http://ftp.uni-stuttgart.de/gentoo-distfiles/     ftp://ftp.uni-stuttgart.de/gentoo-distfiles/     https://mirror.yandex.ru/gentoo-distfiles/     http://mirror.yandex.ru/gentoo-distfiles/     ftp://mirror.yandex.ru/gentoo-distfiles/     https://mirror.bytemark.co.uk/gentoo/     http://mirror.bytemark.co.uk/gentoo/     rsync://mirror.bytemark.co.uk/gentoo/     https://mirrors.gethosted.online/gentoo     http://mirrors.gethosted.online/gentoo     https://www.mirrorservice.org/sites/distfiles.gentoo.org/     http://www.mirrorservice.org/sites/distfiles.gentoo.org/     ftp://ftp.mirrorservice.org/sites/distfiles.gentoo.org/     rsync://rsync.mirrorservice.org/distfiles.gentoo.org/     https://mirror.clarkson.edu/gentoo/     http://mirror.clarkson.edu/gentoo/     rsync://mirror.clarkson.edu/gentoo/     http://www.gtlib.gatech.edu/pub/gentoo     rsync://rsync.gtlib.gatech.edu/gentoo     https://mirrors.mit.edu/gentoo-distfiles/     http://mirrors.mit.edu/gentoo-distfiles/     rsync://mirrors.mit.edu/gentoo-distfiles/     https://gentoo.osuosl.org/     http://gentoo.osuosl.org/     https://mirrors.rit.edu/gentoo/     http://mirrors.rit.edu/gentoo/     ftp://mirrors.rit.edu/gentoo/     rsync://mirrors.rit.edu/gentoo/     http://gentoo-mirror.flux.utah.edu/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -fuse-ld=lld -rtlib=compiler-rt -Wl,--as-needed"
LEX="flex"
NM="llvm-nm"
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"
SHELL="/bin/zsh"
USE="acl amd64 bzip2 cli crypt dri fortran gdbm iconv ipv6 libtirpc multilib ncurses networkmanager nls nptl openmp pam pcre readline seccomp split-usr ssl test-rust 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 aes avx avx2 f16c fma3 pclmul popcnt rdrand 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" GRUB_PLATFORMS="efi-64" 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="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" 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:  ADDR2LINE, ARFLAGS, AS, ASFLAGS, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, MAKEOPTS, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

=================================================================
                        Package Settings
=================================================================

dev-libs/libnl-3.7.0::gentoo was built with the following:
USE="debug -python -test -utils" ABI_X86="(64) -32 (-x32)" PYTHON_TARGETS="python3_11 -python3_10"
CFLAGS="-O2 -pipe -march=native -flto"
CXXFLAGS="-O2 -pipe -march=native -flto"
FEATURES="distlocks pid-sandbox userpriv unmerge-logs assume-digests buildpkg-live merge-sync xattr network-sandbox sandbox news unknown-features-warn config-protect-if-modified unmerge-orphans ebuild-locks protect-owned binpkg-logs binpkg-docompress strict parallel-fetch ipc-sandbox multilib-strict userfetch preserve-libs binpkg-dostrip usersandbox fixlafiles binpkg-multi-instance sfperms qa-unresolved-soname-deps usersync"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
Comment 1 ahmedsoliman 2023-08-23 22:44:46 UTC
Created attachment 868581 [details, diff]
Bug fix (based on gentoo master from github)

tested that libnl builds and it does.
Comment 2 Larry the Git Cow gentoo-dev 2023-08-31 06:04:24 UTC
The bug has been closed via the following commit(s):

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

commit fa7525e13bb39e816ddd607891f875224327643c
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-08-31 06:03:58 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-08-31 06:04:12 +0000

    dev-libs/libnl: add 3.8.0
    
    Closes: https://bugs.gentoo.org/912777
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-libs/libnl/Manifest                            |   1 +
 .../libnl/files/libnl-3.8.0-printf-non-bash.patch  |  22 ++++
 .../libnl-3.8.0-python-decorator-syntax.patch      |  21 ++++
 dev-libs/libnl/libnl-3.8.0.ebuild                  | 120 +++++++++++++++++++++
 dev-libs/libnl/libnl-9999.ebuild                   |  17 ++-
 5 files changed, 177 insertions(+), 4 deletions(-)