Dear Maintainer,
Reproducible steps:
--------------------
# cat /etc/dpkg/buildflags.conf
APPEND CFLAGS -O -fPIE
APPEND CXXFLAGS -O -fPIE
APPEND LDFLAGS -pie -fuse-ld=lld
# Add below to debian/rules
export CC=clang
export CXX=clang++
3 test cases will failed, you can ignore them by:
1) Edit debian/rules, comment a few lines:
------------------------
ifeq (, $(filter nocheck, $(DEB_BUILD_OPTIONS)))
# echo "01234567890123456789012345678901" > build-deb/machine-id
# some tests hang under fakeroot, so disable fakeroot
# env -u LD_PRELOAD SYSTEMD_MACHINE_ID_PATH=$(CURDIR)/build-deb/machine-id meson test -C build-deb $(TEST_TIMEOUT_MULTIPLIER) || ( \
#
env -u LD_PRELOAD meson test -C build-deb $(TEST_TIMEOUT_MULTIPLIER) || ( \
------------------------
2) Drop two patches(0001-util-lib-static-array-argument-sizes-are-apparently-.patch and test-bus-track.patch) into debian/patches:
diff --git a/src/basic/string-util.c b/src/basic/string-util.c
index 7c487fb9a3..9586b3940e 100644
--- a/src/basic/string-util.c
+++ b/src/basic/string-util.c
@@ -725,10 +725,17 @@ char *strreplace(const char *text, const char *old_string, const char *new_strin
return ret;
}
Hello, I was surprised reading this bug report, givent that the systemd upstream CI runs Clang builds with different Clang versions. I rebuilt both the buster and sid/bullseye systemd package in a corresponding build chroot with clang/llvm-dev with no source changes. sid built successfully and passed all tests, buster built successfully as well but had one failing test (test-strip-tab-ansi). Rebuilding with "nocheck" was successful. Thus closing the bug report. I assume there must be an issue with your build environment. I'm attaching the log files for completes sake. Regards, Michael
Control: reassign -1 lld-11 Am 11.04.21 um 14:21 schrieb Michael Biebl: Ok, the missing part was that you not only used clang but also the llvm based linker. So lld is the real culprit here, thus reassigning. I could reproduce the issue on sid with lld-11, so reassigning to that package. Excerpt from the build log dh_makeshlibs -plibudev1 --add-udeb=libudev1-udeb -- -c0 dpkg-gensymbols: warning: some symbols or patterns disappeared in the symbols file: see diff output below dpkg-gensymbols: warning: debian/libudev1/DEBIAN/symbols doesn't match completely debian/libudev1.symbols --- debian/libudev1.symbols (libudev1_247.3-3_amd64) +++ dpkg-gensymbolsDoJqNd 2021-04-11 13:02:31.114254096 +0000 @@ -1,11 +1,11 @@ libudev.so.1 libudev1 #MINVER# * Build-Depends-Package: libudev-dev - LIBUDEV_183@LIBUDEV_183 183 - LIBUDEV_189@LIBUDEV_189 189 - LIBUDEV_196@LIBUDEV_196 196 - LIBUDEV_199@LIBUDEV_199 199 - LIBUDEV_215@LIBUDEV_215 215 - LIBUDEV_247@LIBUDEV_247 247 +#MISSING: 247.3-3# LIBUDEV_183@LIBUDEV_183 183 +#MISSING: 247.3-3# LIBUDEV_189@LIBUDEV_189 189 +#MISSING: 247.3-3# LIBUDEV_196@LIBUDEV_196 196 +#MISSING: 247.3-3# LIBUDEV_199@LIBUDEV_199 199 +#MISSING: 247.3-3# LIBUDEV_215@LIBUDEV_215 215 +#MISSING: 247.3-3# LIBUDEV_247@LIBUDEV_247 247 udev_device_get_action@LIBUDEV_183 183 udev_device_get_current_tags_list_entry@LIBUDEV_247 247 udev_device_get_devlinks_list_entry@LIBUDEV_183 183 dh_makeshlibs -psystemd -Xlibsystemd-shared -- -c0 dh_makeshlibs --remaining-packages -- -c0 dpkg-gensymbols: warning: some new symbols appeared in the symbols file: see diff output below dpkg-gensymbols: warning: some symbols or patterns disappeared in the symbols file: see diff output below dpkg-gensymbols: warning: debian/libsystemd0/DEBIAN/symbols doesn't match completely debian/libsystemd0.symbols --- debian/libsystemd0.symbols (libsystemd0_247.3-3_amd64) +++ dpkg-gensymbolsuYW0SJ 2021-04-11 13:02:34.350300727 +0000 @@ -1,33 +1,35 @@ libsystemd.so.0 libsystemd0 #MINVER# * Build-Depends-Package: libsystemd-dev - LIBSYSTEMD_209@LIBSYSTEMD_209 0 - LIBSYSTEMD_211@LIBSYSTEMD_211 211 - LIBSYSTEMD_213@LIBSYSTEMD_213 213 - LIBSYSTEMD_214@LIBSYSTEMD_214 214 - LIBSYSTEMD_216@LIBSYSTEMD_216 217 - LIBSYSTEMD_217@LIBSYSTEMD_217 217 - LIBSYSTEMD_219@LIBSYSTEMD_219 219 - LIBSYSTEMD_220@LIBSYSTEMD_220 220 - LIBSYSTEMD_221@LIBSYSTEMD_221 221 - LIBSYSTEMD_222@LIBSYSTEMD_222 222 - LIBSYSTEMD_226@LIBSYSTEMD_226 226 - LIBSYSTEMD_227@LIBSYSTEMD_227 227 - LIBSYSTEMD_229@LIBSYSTEMD_229 229 - LIBSYSTEMD_230@LIBSYSTEMD_230 230 - LIBSYSTEMD_231@LIBSYSTEMD_231 231 - LIBSYSTEMD_232@LIBSYSTEMD_232 232 - LIBSYSTEMD_233@LIBSYSTEMD_233 233 - LIBSYSTEMD_234@LIBSYSTEMD_234 234 - LIBSYSTEMD_236@LIBSYSTEMD_236 236 - LIBSYSTEMD_237@LIBSYSTEMD_237 237 - LIBSYSTEMD_238@LIBSYSTEMD_238 238 - LIBSYSTEMD_239@LIBSYSTEMD_239 239 - LIBSYSTEMD_240@LIBSYSTEMD_240 240 - LIBSYSTEMD_241@LIBSYSTEMD_241 241 - LIBSYSTEMD_243@LIBSYSTEMD_243 243 - LIBSYSTEMD_245@LIBSYSTEMD_245 245 - LIBSYSTEMD_246@LIBSYSTEMD_246 246 - LIBSYSTEMD_247@LIBSYSTEMD_247 247 +#MISSING: 247.3-3# LIBSYSTEMD_209@LIBSYSTEMD_209 0 +#MISSING: 247.3-3# LIBSYSTEMD_211@LIBSYSTEMD_211 211 +#MISSING: 247.3-3# LIBSYSTEMD_213@LIBSYSTEMD_213 213 +#MISSING: 247.3-3# LIBSYSTEMD_214@LIBSYSTEMD_214 214 +#MISSING: 247.3-3# LIBSYSTEMD_216@LIBSYSTEMD_216 217 +#MISSING: 247.3-3# LIBSYSTEMD_217@LIBSYSTEMD_217 217 +#MISSING: 247.3-3# LIBSYSTEMD_219@LIBSYSTEMD_219 219 +#MISSING: 247.3-3# LIBSYSTEMD_220@LIBSYSTEMD_220 220 +#MISSING: 247.3-3# LIBSYSTEMD_221@LIBSYSTEMD_221 221 +#MISSING: 247.3-3# LIBSYSTEMD_222@LIBSYSTEMD_222 222 +#MISSING: 247.3-3# LIBSYSTEMD_226@LIBSYSTEMD_226 226 +#MISSING: 247.3-3# LIBSYSTEMD_227@LIBSYSTEMD_227 227 +#MISSING: 247.3-3# LIBSYSTEMD_229@LIBSYSTEMD_229 229 +#MISSING: 247.3-3# LIBSYSTEMD_230@LIBSYSTEMD_230 230 +#MISSING: 247.3-3# LIBSYSTEMD_231@LIBSYSTEMD_231 231 +#MISSING: 247.3-3# LIBSYSTEMD_232@LIBSYSTEMD_232 232 +#MISSING: 247.3-3# LIBSYSTEMD_233@LIBSYSTEMD_233 233 +#MISSING: 247.3-3# LIBSYSTEMD_234@LIBSYSTEMD_234 234 +#MISSING: 247.3-3# LIBSYSTEMD_236@LIBSYSTEMD_236 236 +#MISSING: 247.3-3# LIBSYSTEMD_237@LIBSYSTEMD_237 237 +#MISSING: 247.3-3# LIBSYSTEMD_238@LIBSYSTEMD_238 238 +#MISSING: 247.3-3# LIBSYSTEMD_239@LIBSYSTEMD_239 239 +#MISSING: 247.3-3# LIBSYSTEMD_240@LIBSYSTEMD_240 240 +#MISSING: 247.3-3# LIBSYSTEMD_241@LIBSYSTEMD_241 241 +#MISSING: 247.3-3# LIBSYSTEMD_243@LIBSYSTEMD_243 243 +#MISSING: 247.3-3# LIBSYSTEMD_245@LIBSYSTEMD_245 245 +#MISSING: 247.3-3# LIBSYSTEMD_246@LIBSYSTEMD_246 246 +#MISSING: 247.3-3# LIBSYSTEMD_247@LIBSYSTEMD_247 247 + __start_SYSTEMD_BUS_ERROR_MAP@Base 247.3-3 + __stop_SYSTEMD_BUS_ERROR_MAP@Base 247.3-3 sd_booted@LIBSYSTEMD_209 0 sd_bus_add_fallback@LIBSYSTEMD_221 221 sd_bus_add_fallback_vtable@LIBSYSTEMD_221 221
Fwiw, this problem is not specific to systemd. Other packages FTBFS with lld as well, e.g. network-manager. It appears to be the same issue.--- debian/libnm0.symbols (libnm0_1.30.0-1_amd64) +++ dpkg-gensymbolsbURsJa 2021-04-11 13:46:43.525365613 +0000 @@ -1,32 +1,32 @@ libnm.so.0 libnm0 #MINVER# * Build-Depends-Package: libnm-dev - libnm_1_0_0@libnm_1_0_0 1.0.0 - libnm_1_0_4@libnm_1_0_4 1.0.4 - libnm_1_0_6@libnm_1_0_6 1.0.6 - libnm_1_10_0@libnm_1_10_0 1.9.90 - libnm_1_10_14@libnm_1_10_14 1.14.4 - libnm_1_10_2@libnm_1_10_2 1.10.2 - libnm_1_12_0@libnm_1_12_0 1.11.3 - libnm_1_12_2@libnm_1_12_2 1.12.2 - libnm_1_14_0@libnm_1_14_0 1.13.90 - libnm_1_14_8@libnm_1_14_8 1.19.90 - libnm_1_16_0@libnm_1_16_0 1.16.0 - libnm_1_18_0@libnm_1_18_0 1.18.0 - libnm_1_20_0@libnm_1_20_0 1.19.90 - libnm_1_20_6@libnm_1_20_6 1.20.6 - libnm_1_22_0@libnm_1_22_0 1.22.0 - libnm_1_22_2@libnm_1_22_2 1.22.2 - libnm_1_22_8@libnm_1_22_8 1.22.8 - libnm_1_24_0@libnm_1_24_0 1.23.90 - libnm_1_26_0@libnm_1_26_0 1.25.90 - libnm_1_26_4@libnm_1_26_4 1.27.90 - libnm_1_28_0@libnm_1_28_0 1.27.90 - libnm_1_2_0@libnm_1_2_0 1.1.90 - libnm_1_2_4@libnm_1_2_4 1.2.4 - libnm_1_30_0@libnm_1_30_0 1.29.90 - libnm_1_4_0@libnm_1_4_0 1.4.0 - libnm_1_6_0@libnm_1_6_0 1.5.90 - libnm_1_8_0@libnm_1_8_0 1.8.0 +#MISSING: 1.30.0-1# libnm_1_0_0@libnm_1_0_0 1.0.0 +#MISSING: 1.30.0-1# libnm_1_0_4@libnm_1_0_4 1.0.4 +#MISSING: 1.30.0-1# libnm_1_0_6@libnm_1_0_6 1.0.6 +#MISSING: 1.30.0-1# libnm_1_10_0@libnm_1_10_0 1.9.90 +#MISSING: 1.30.0-1# libnm_1_10_14@libnm_1_10_14 1.14.4 +#MISSING: 1.30.0-1# libnm_1_10_2@libnm_1_10_2 1.10.2 +#MISSING: 1.30.0-1# libnm_1_12_0@libnm_1_12_0 1.11.3 +#MISSING: 1.30.0-1# libnm_1_12_2@libnm_1_12_2 1.12.2 +#MISSING: 1.30.0-1# libnm_1_14_0@libnm_1_14_0 1.13.90 +#MISSING: 1.30.0-1# libnm_1_14_8@libnm_1_14_8 1.19.90 +#MISSING: 1.30.0-1# libnm_1_16_0@libnm_1_16_0 1.16.0 +#MISSING: 1.30.0-1# libnm_1_18_0@libnm_1_18_0 1.18.0 +#MISSING: 1.30.0-1# libnm_1_20_0@libnm_1_20_0 1.19.90 +#MISSING: 1.30.0-1# libnm_1_20_6@libnm_1_20_6 1.20.6 +#MISSING: 1.30.0-1# libnm_1_22_0@libnm_1_22_0 1.22.0 +#MISSING: 1.30.0-1# libnm_1_22_2@libnm_1_22_2 1.22.2 +#MISSING: 1.30.0-1# libnm_1_22_8@libnm_1_22_8 1.22.8 +#MISSING: 1.30.0-1# libnm_1_24_0@libnm_1_24_0 1.23.90 +#MISSING: 1.30.0-1# libnm_1_26_0@libnm_1_26_0 1.25.90 +#MISSING: 1.30.0-1# libnm_1_26_4@libnm_1_26_4 1.27.90 +#MISSING: 1.30.0-1# libnm_1_28_0@libnm_1_28_0 1.27.90 +#MISSING: 1.30.0-1# libnm_1_2_0@libnm_1_2_0 1.1.90 +#MISSING: 1.30.0-1# libnm_1_2_4@libnm_1_2_4 1.2.4 +#MISSING: 1.30.0-1# libnm_1_30_0@libnm_1_30_0 1.29.90 +#MISSING: 1.30.0-1# libnm_1_4_0@libnm_1_4_0 1.4.0 +#MISSING: 1.30.0-1# libnm_1_6_0@libnm_1_6_0 1.5.90 +#MISSING: 1.30.0-1# libnm_1_8_0@libnm_1_8_0 1.8.0 nm_802_11_ap_flags_get_type@libnm_1_0_0 1.0.0 nm_802_11_ap_security_flags_get_type@libnm_1_0_0 1.0.0 nm_802_11_mode_get_type@libnm_1_0_0 1.0.0 dh_makeshlibs: error: failing due to earlier errors make[1]: *** [debian/rules:69: override_dh_makeshlibs] Error 1 make[1]: Leaving directory '/network-manager-1.30.0' make: *** [debian/rules:10: binary] Error 2 dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
Dear submitter, as the package llvm-toolchain-11 has just been removed from the Debian archive unstable we hereby close the associated bug reports. We are sorry that we couldn't deal with your issue properly. For details on the removal, please see https://bugs.debian.org/1000941 The version of this package that was in Debian prior to this removal can still be found using http://snapshot.debian.org/. Please note that the changes have been done on the master archive and will not propagate to any mirrors until the next dinstall run at the earliest. This message was generated automatically; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmaster@ftp-master.debian.org. Debian distribution maintenance software pp. Scott Kitterman (the ftpmaster behind the curtain)
with This is still a problem in unstable, and make llvm unusable for building library packages. I've reopened and reassigned to the metapackage, as the versioned packages have short lives and these bugs get automatically closed when they are removed, even if the problems persist.
afaics, this is an upstream issue, lld not being able to understand GNU versioned symbols. In a distro context, please just use the BFD linker as an reliable (but maybe somehow slower) alternative. -fuse-ld=ld.bfd is your friend. Maybe the latter should be made the default for the distro.