Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 918872 - kde-apps/dolphin-23.08.4-r1: fails to build on musl+clang profile: ld.lld: error: undefined symbol: fts_close
Summary: kde-apps/dolphin-23.08.4-r1: fails to build on musl+clang profile: ld.lld: er...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2023-11-29 22:05 UTC by Caleb Stein
Modified: 2024-04-20 13:40 UTC (History)
1 user (show)

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


Attachments
build.log from build failure (build.log,248.36 KB, text/x-log)
2023-11-29 22:06 UTC, Caleb Stein
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Caleb Stein 2023-11-29 22:05:39 UTC
kde-apps/dolphin build fails with musl+clang mentioning undefined symbols fts_read, fts_set, and fts_close in the error. sys-libs/fts-standalone is installed on the system. The build log is attached.

Reproducible: Always

Steps to Reproduce:
1. emerge kde-apps/dolphin on a musl+clang profile with sys-libs/fts-standalone installed
2. wait for the failure on 101/237
Actual Results:  
The build fails

Expected Results:  
The build should succeed

Portage 3.0.55 (python 3.11.6-final-0, default/linux/amd64/17.0/musl/clang, [unavailable], musl-1.2.4-r1, 6.6.2-gentoo-dist x86_64)
=================================================================
System uname: Linux-6.6.2-gentoo-dist-x86_64-Intel-R-_Core-TM-_i5-3320M_CPU_@_2.60GHz-with-libc
KiB Mem:    16334104 total,   8389804 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of repository gentoo: Wed, 29 Nov 2023 09:02:00 +0000
Head commit of repository gentoo: f06eeb12e53adfc9e785a2a3e43339f5c1bf949d

Timestamp of repository guru: Mon, 27 Nov 2023 11:17:02 +0000
Head commit of repository guru: 728d49a0365315ccc1d68af7b2b4969a9020ac2b

sh dash 0.5.12
ld LLD 17.0.5 (compatible with GNU linkers)
app-misc/pax-utils:       1.3.7::gentoo
app-shells/bash:          5.2_p21::gentoo
dev-java/java-config:     2.3.3-r1::gentoo
dev-lang/perl:            5.38.0-r1::gentoo
dev-lang/python:          3.11.6::gentoo, 3.12.0_p1::gentoo
dev-lang/rust:            1.73.0::gentoo
dev-util/cmake:           3.27.7::gentoo
dev-util/meson:           1.3.0::gentoo
sys-apps/baselayout:      2.14-r1::gentoo
sys-apps/openrc:          0.52.1::gentoo
sys-apps/sandbox:         2.38::gentoo
sys-devel/autoconf:       2.13-r8::gentoo, 2.71-r7::gentoo
sys-devel/automake:       1.16.5-r1::gentoo
sys-devel/clang:          17.0.5::gentoo
sys-devel/libtool:        2.4.7-r1::gentoo
sys-devel/lld:            17.0.5::gentoo
sys-devel/llvm:           17.0.5::gentoo
sys-devel/make:           4.4.1-r1::gentoo
sys-kernel/linux-headers: 6.6::gentoo (virtual/os-headers)
sys-libs/musl:            1.2.4-r1::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: yes

cstein-local
    location: /etc/portage/local-repos/cstein-local
    masters: gentoo
    volatile: True

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

Binary Repositories:

gentoobinhost
    priority: 1
    sync-uri: https://gentoo.osuosl.org/releases/amd64/binpackages/17.1/x86-64_musl_llvm

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
ADDR2LINE="llvm-addr2line"
AR="llvm-ar"
AS="clang -c"
CBUILD="x86_64-gentoo-linux-musl"
CC="clang"
CFLAGS="-march=native -O2 -pipe"
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/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CPP="clang-cpp"
CXX="clang++"
CXXFLAGS="-march=native -O2 -pipe"
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="-march=native -O2 -pipe"
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 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="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="charset.alias /usr/share/locale/locale.alias"
LANG="C.UTF8"
LD="ld.lld"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--as-needed -fuse-ld=mold"
LEX="flex"
MAKEOPTS="-j4"
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"
SHELL="/bin/zsh"
STRINGS="llvm-strings"
STRIP="llvm-strip"
USE="X acl alsa amd64 bzip2 clang cli crypt cups dbus dri elogind fortran iconv ipv6 libtirpc llvm-libunwind ncurses networkmanager nls nptl openmp pam pcre pic pulseaudio 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" 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="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby32" VIDEO_CARDS="intel i915" 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, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS, SIZE, YACC, YFLAGS
Comment 1 Caleb Stein 2023-11-29 22:06:08 UTC
Created attachment 875945 [details]
build.log from build failure
Comment 2 Alfred Wingate 2023-11-30 00:08:41 UTC
ld.lld: error: undefined symbol: fts_open
>>> referenced by kdirectorycontentscounterworker.cpp
>>>               src/CMakeFiles/dolphinprivate.dir/kitemviews/private/kdirectorycontentscounterworker.cpp.o:(KDirectoryContentsCounterWorker::walkDir(QString const&, bool, unsigned int))

ld.lld: error: undefined symbol: fts_read
>>> referenced by kdirectorycontentscounterworker.cpp
>>>               src/CMakeFiles/dolphinprivate.dir/kitemviews/private/kdirectorycontentscounterworker.cpp.o:(KDirectoryContentsCounterWorker::walkDir(QString const&, bool, unsigned int))
>>> referenced by kdirectorycontentscounterworker.cpp
>>>               src/CMakeFiles/dolphinprivate.dir/kitemviews/private/kdirectorycontentscounterworker.cpp.o:(KDirectoryContentsCounterWorker::walkDir(QString const&, bool, unsigned int))

ld.lld: error: undefined symbol: fts_set
>>> referenced by kdirectorycontentscounterworker.cpp
>>>               src/CMakeFiles/dolphinprivate.dir/kitemviews/private/kdirectorycontentscounterworker.cpp.o:(KDirectoryContentsCounterWorker::walkDir(QString const&, bool, unsigned int))

ld.lld: error: undefined symbol: fts_close
>>> referenced by kdirectorycontentscounterworker.cpp
>>>               src/CMakeFiles/dolphinprivate.dir/kitemviews/private/kdirectorycontentscounterworker.cpp.o:(KDirectoryContentsCounterWorker::walkDir(QString const&, bool, unsigned int))
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

https://wiki.gentoo.org/wiki/Musl_porting_notes#undefined_reference_to_fts.2A_.28ex._fts_read.29
Comment 3 Caleb Stein 2023-11-30 00:29:57 UTC
My apologies, I should've clarified in the original report, this is happening with the change to the ebuild and the sys-libs/fts-standalone package installed.
Comment 4 Agostino Sarubbo gentoo-dev 2024-01-17 07:53:32 UTC
tinderbox_musl has reproduced this issue with version 23.08.4-r1 - Updating summary.
Comment 5 Andreas Sturmlechner gentoo-dev 2024-04-20 13:40:54 UTC
Please submit patches for musl upstream if you want this fixed.