Package: src:ldc
Version: 1:1.12.0-1
Severity: important
Tags: sid bullseye

ldc ftbfs with ld --as-needed as the default.  Apparently this is a packaging
change in 1.12, because 1.11 built.

from
https://launchpadlibrarian.net/408101762/buildlog_ubuntu-disco-amd64.ldc_1%3A1.12.0-1_BUILDING.txt.gz

make[4]: Entering directory '/<<PKGBUILDDIR>>/build-static'
[  0%] Generating ../bin/ldc-prune-cache
cd /<<PKGBUILDDIR>> && /<<PKGBUILDDIR>>/build-temp/bin/ldmd2 -wi -fPIC -O
-inline -release -J/<<PKGBUILDDIR>>/dmd -J/<<PKGBUILDDIR>>/res
-I/<<PKGBUILDDIR>> -I/<<PKGBUILDDIR>>/build-static -version=IN_LLVM -L-lz
-I/<<PKGBUILDDIR>>/dmd -of/<<PKGBUILDDIR>>/build-static/bin/ldc-prune-cache
/<<PKGBUILDDIR>>/tools/ldc-prune-cache.d /<<PKGBUILDDIR>>/driver/cache_pruning.d

This is from debian/patches/01_no-zlib-embed.patch:

--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -9,7 +9,7 @@

 function(build_d_tool output_exe compiler_args linker_args compile_deps 
link_deps)
     set(dflags "${D_COMPILER_FLAGS} ${DDMD_DFLAGS}")
-    set(lflags "")
+    set(lflags "-L-lz")
     if(UNIX)
       separate_arguments(dflags UNIX_COMMAND "${dflags}")
       separate_arguments(lflags UNIX_COMMAND "${lflags}")

"-L-lz" is wrong. What is it supposed to do?

And passing libraries in macros known as *glags* is error prone too, as you see
here.

Reply via email to