Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 806175 - sys-kernel/genkernel ld.lld: error: undefined symbol: btrfs_util_strerror
Summary: sys-kernel/genkernel ld.lld: error: undefined symbol: btrfs_util_strerror
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-02 10:01 UTC by Michiel Hazelhof
Modified: 2021-09-20 07:32 UTC (History)
1 user (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 Michiel Hazelhof 2021-08-02 10:01:46 UTC
Guessing this is a llvm/clang issue, feel free to send me in the proper direction.

All 5.13.x kernels present this issue (didn't test with older kernels), the compile fails near the end on the btrfs-progs.

Reproducible: Always

Steps to Reproduce:
genkernel.conf:
KERNEL_CC="clang"
UTILS_CC="clang"

make CC=clang menuconfig
LLVM=1 genkernel all --install --no-splash --oldconfig
Actual Results:  
x86_64-pc-linux-gnu-clang -o mkfs.btrfs.static mkfs/main.static.o mkfs/common.static.o mkfs/rootdir.static.o kernel-shared/dir-item.static.o qgroup.static.o kernel-lib/list_sort.static.o props.static.o kernel-shared/ulist.static.o check/qgroup-verify.static.o kernel-shared/backref.static.o common/string-table.static.o common/task-utils.static.o kernel-shared/inode.static.o kernel-shared/file.static.o common/help.static.o cmds/receive-dump.static.o common/fsfeatures.static.o common/format-output.static.o common/send-stream.static.o common/send-utils.static.o kernel-lib/rbtree.static.o btrfs-list.static.o kernel-lib/radix-tree.static.o common/extent-cache.static.o kernel-shared/extent_io.static.o crypto/crc32c.static.o common/messages.static.o kernel-shared/uuid-tree.static.o common/utils-lib.static.o common/rbtree-utils.static.o kernel-shared/ctree.static.o kernel-shared/disk-io.static.o kernel-shared/extent-tree.static.o kernel-shared/delayed-ref.static.o kernel-shared/print-tree.static.o kernel-shared/free-space-cache.static.o kernel-shared/root-tree.static.o kernel-shared/volumes.static.o kernel-shared/transaction.static.o kernel-shared/free-space-tree.static.o common/repair.static.o kernel-shared/inode-item.static.o kernel-shared/file-item.static.o kernel-shared/zoned.static.o kernel-lib/raid56.static.o kernel-lib/tables.static.o common/device-scan.static.o common/path-utils.static.o common/utils.static.o libbtrfsutil/subvolume.static.o libbtrfsutil/stubs.static.o crypto/hash.static.o crypto/xxhash.static.o crypto/sha224-256.static.o crypto/blake2b-ref.static.o common/open-utils.static.o common/units.static.o common/device-utils.static.o -L/var/tmp/genkernel/gk_YsJ91ANr/btrfs-progs/buildroot/usr/lib -rdynamic -L.   -static -Wl,--gc-sections -L/var/tmp/genkernel/gk_YsJ91ANr/btrfs-progs/buildroot/usr/lib -luuid  -L/var/tmp/genkernel/gk_YsJ91ANr/btrfs-progs/buildroot/usr/lib -lblkid  -L. -pthread
ld.lld: error: undefined symbol: btrfs_util_strerror
>>> referenced by props.c
>>>               props.static.o:(prop_read_only)
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:599: mkfs.btrfs.static] Error 1
make: *** Waiting for unfinished jobs....
* ERROR: Command 'nice -n10 make -j2 V=1 static' failed!

* ERROR: create_initramfs(): append_data(): append_btrfs(): populate_binpkg(): gkbuild(): Failed to create binpkg of btrfs-progs-5.12.1!

Expected Results:  
Succesfull compilation

Portage 3.0.20 (python 3.9.6-final-0, default/linux/amd64/17.1/no-multilib/hardened, gcc-11.2.0, glibc-2.33-r5, 5.13.0-gentoo-x86_64 x86_64)
=================================================================
System uname: Linux-5.13.0-gentoo-x86_64-x86_64-Intel-R-_Pentium-R-_Silver_J5005_CPU_@_1.50GHz-with-glibc2.33
KiB Mem:     7988452 total,   1736624 free
KiB Swap:   16777212 total,  15797760 free
Head commit of repository gentoo: 9c5752c28fff71b00c44491ea790cbe5678de241

sh bash 5.1_p8
ld GNU ld (Gentoo 2.36.1 p4) 2.36.1
distcc 3.4 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          5.1_p8::gentoo
dev-lang/perl:            5.34.0-r1::gentoo
dev-lang/python:          3.8.11::gentoo, 3.9.6::gentoo, 3.10.0_beta4::gentoo
dev-util/cmake:           3.21.1::gentoo
sys-apps/baselayout:      2.7-r3::gentoo
sys-apps/sandbox:         2.24::gentoo
sys-devel/autoconf:       2.69-r5::gentoo
sys-devel/automake:       1.16.4::gentoo
sys-devel/binutils:       2.36.1-r2::gentoo
sys-devel/gcc:            11.2.0::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33-r5::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: git://github.com/gentoo/gentoo.git
    priority: -1000

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -flto=auto -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-nest-optimize -fgraphite-identity -ftree-vectorize -fuse-linker-plugin -fipa-pta -fno-semantic-interposition -fdevirtualize-at-ltrans"
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/gconf /etc/gentoo-release /etc/php/apache2-php8.0/ext-active/ /etc/php/cgi-php8.0/ext-active/ /etc/php/cli-php8.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe -flto=auto -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-nest-optimize -fgraphite-identity -ftree-vectorize -fuse-linker-plugin -fipa-pta -fno-semantic-interposition -fdevirtualize-at-ltrans"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--load-average 3.0"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY 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"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance clean-logs 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="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-march=native -O2 -pipe -flto=auto -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-nest-optimize -fgraphite-identity -ftree-vectorize -fuse-linker-plugin -fipa-pta -fno-semantic-interposition -fdevirtualize-at-ltrans -fuse-linker-plugin"
LINGUAS="en"
MAKEOPTS="-j2"
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"
USE="64bit aio amd64 apache2 bash-completion bcmath boost btrfs bzip2 cli crypt curl cxx default-lld deflate dnscrypt down-root ecs exif fpm gd git gmp graphite grub gzip hardened hddtemp headless-awt hostonly hsts http2 iconv idn igbinary imagemagick initramfs innodb inotify intl iproute2 jemalloc jit libglvnd libidn2 libtirpc lto lz4 lzma lzo mysql mysqli ncurses nftables nls nptl opcache openmp openssl pam pcntl pcre pdo pie python readline redis regex resolvconf sasl sctp seccomp sftp sharedmem split-usr sqlite ssl ssp symlink systemd sysv-utils threads tls-heartbeat truetype unicode urandom verify-sig vhost-net xattr xmlreader xmlwriter xtables xtpax zip zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="unixd http2 remoteip dir proxy proxy_wstunnel proxy_fcgi cache_disk proxy proxy_http proxy_http2 unixd cgid actions alias auth_digest authn_anon authn_core authn_default authn_file authz_core authz_default authz_groupfile authz_host authz_owner authz_user cache deflate disk_cache env expires ext_filter file_cache filter headers ident include info log_config logio mem_cache negotiation rewrite setenvif so socache_shmcb status unique_id vhost_alias mime" APACHE2_MPMS="event" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes 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" 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-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_8 python3_9" QEMU_SOFTMMU_TARGETS="arm x86_64" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="intel i965" 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:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
Comment 1 Michiel Hazelhof 2021-09-20 07:32:21 UTC
Latest kernel/clang/genkernel play nicely, thin LTO now boots (full hangs, but that's not for here).