Your message dated Thu, 19 Nov 2026 08:51:03 +0000
with message-id <[email protected]>
and subject line Bug#1154051: fixed in ldc 1:1.43.0-3
has caused the Debian Bug report #1154051,
regarding ldc: FTBFS with LLVM 23 as default: llvm::cl::boolOrDefault API change
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1154051: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1154051
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: ldc
Version: 1:1.42.0-2.1
Severity: important
Tags: ftbfs
User: [email protected]
Usertags: llvm-23-default
Control: affects -1 + src:llvm-defaults
Control: block 1154024 by -1
Hello,
We are going to switch the default LLVM version to 23 (transition bug
#1154024). llvm-defaults 0.75~exp1, in experimental, already points to
23.
ldc fails to build in unstable with it, and builds without it:
driver/cl_helpers.h:43:52: error: 'BOU_TRUE' is not a member of
'opts::cl'; did you mean 'llvm::cl::boolOrDefault::BOU_TRUE'?
In LLVM 23, llvm::cl::boolOrDefault is an enum class, so the BOU_*
constants in driver/cl_helpers.h need to be qualified
(cl::boolOrDefault::BOU_TRUE, ...).
The attached debdiff is only a start: it fixes the two first API changes
(boolOrDefault, and Module::appendModuleInlineAsm() which takes a
GlobalAsmFragment since LLVM 23). The build then fails on a third one:
TargetMachine::getMCSubtargetInfo() and getMCAsmInfo() return
references instead of pointers (gen/ldctraits.cpp:27,
gen/llvmhelpers.cpp:1375). ldc 1.42 only knows LLVM up to 21, a newer
upstream release is probably the way to go.
To reproduce, with sbuild:
sbuild -d unstable \
--extra-repository='deb http://deb.debian.org/debian experimental main' \
--build-dep-resolver=aptitude \
--add-depends='clang (>= 1:23~), llvm-dev (>= 1:23~), libclang-dev (>=
1:23~)' \
<package>
The --add-depends forces the llvm-defaults packages from experimental
(the default apt resolver won't pick them, aptitude does), everything
else comes from unstable.
The severity will be raised to serious once llvm-defaults 23 is in
unstable.
Cheers,
Sylvestre
diff --git a/debian/patches/llvm-23.patch b/debian/patches/llvm-23.patch
new file mode 100644
index 0000000..bf90f1d
--- /dev/null
+++ b/debian/patches/llvm-23.patch
@@ -0,0 +1,115 @@
+Description: Fix the build with LLVM 23
+ * llvm::cl::boolOrDefault is an enum class since LLVM 23. Qualifying the
+ enumerators also works with the older versions.
+ * Module::appendModuleInlineAsm() takes a GlobalAsmFragment since LLVM
+ 23, which can't be built from a brace list. Pass a StringRef, which
+ works with both.
+Author: Sylvestre Ledru <[email protected]>
+Forwarded: no
+Last-Update: 2026-11-15
+---
+Index: ldc-1.42.0/driver/cl_helpers.h
+===================================================================
+--- ldc-1.42.0.orig/driver/cl_helpers.h
++++ ldc-1.42.0/driver/cl_helpers.h
+@@ -40,12 +40,12 @@ template <> struct FlagParserDataType<bo
+ };
+
+ template <> struct FlagParserDataType<cl::boolOrDefault> {
+- static cl::boolOrDefault true_val() { return cl::BOU_TRUE; }
+- static cl::boolOrDefault false_val() { return cl::BOU_FALSE; }
++ static cl::boolOrDefault true_val() { return cl::boolOrDefault::BOU_TRUE; }
++ static cl::boolOrDefault false_val() { return cl::boolOrDefault::BOU_FALSE; }
+ };
+
+ inline bool getFlagOrDefault(cl::boolOrDefault value, bool defaultValue) {
+- return value == cl::BOU_UNSET ? defaultValue : value == cl::BOU_TRUE;
++ return value == cl::boolOrDefault::BOU_UNSET ? defaultValue : value == cl::boolOrDefault::BOU_TRUE;
+ }
+
+ template <> struct FlagParserDataType<CHECKENABLE> {
+Index: ldc-1.42.0/driver/linker-gcc.cpp
+===================================================================
+--- ldc-1.42.0.orig/driver/linker-gcc.cpp
++++ ldc-1.42.0/driver/linker-gcc.cpp
+@@ -561,7 +561,7 @@ void ArgsBuilder::build(llvm::StringRef
+ args.push_back("-shared");
+ }
+
+- if (linkFullyStatic() == llvm::cl::BOU_TRUE) {
++ if (linkFullyStatic() == llvm::cl::boolOrDefault::BOU_TRUE) {
+ args.push_back("-static");
+ }
+
+Index: ldc-1.42.0/driver/linker.cpp
+===================================================================
+--- ldc-1.42.0.orig/driver/linker.cpp
++++ ldc-1.42.0/driver/linker.cpp
+@@ -222,9 +222,9 @@ cl::boolOrDefault linkFullyStatic() { re
+ bool linkAgainstSharedDefaultLibs() {
+ // -static enforces static default libs.
+ // Default to shared default libs for DLLs.
+- return staticFlag != cl::BOU_TRUE &&
+- (linkDefaultLibShared == cl::BOU_TRUE ||
+- (linkDefaultLibShared == cl::BOU_UNSET && global.params.dll));
++ return staticFlag != cl::boolOrDefault::BOU_TRUE &&
++ (linkDefaultLibShared == cl::boolOrDefault::BOU_TRUE ||
++ (linkDefaultLibShared == cl::boolOrDefault::BOU_UNSET && global.params.dll));
+ }
+
+ //////////////////////////////////////////////////////////////////////////////
+Index: ldc-1.42.0/driver/main.cpp
+===================================================================
+--- ldc-1.42.0.orig/driver/main.cpp
++++ ldc-1.42.0/driver/main.cpp
+@@ -470,11 +470,11 @@ void parseCommandLine(Strings &sourceFil
+ }
+
+ global.params.output_o =
+- (opts::output_o == cl::BOU_UNSET &&
++ (opts::output_o == cl::boolOrDefault::BOU_UNSET &&
+ !(opts::output_bc || opts::output_ll || opts::output_s ||
+ opts::output_mlir))
+ ? OUTPUTFLAGdefault
+- : opts::output_o == cl::BOU_TRUE ? OUTPUTFLAGset : OUTPUTFLAGno;
++ : opts::output_o == cl::boolOrDefault::BOU_TRUE ? OUTPUTFLAGset : OUTPUTFLAGno;
+ global.params.output_bc = opts::output_bc ? OUTPUTFLAGset : OUTPUTFLAGno;
+ global.params.output_ll = opts::output_ll ? OUTPUTFLAGset : OUTPUTFLAGno;
+ global.params.output_mlir = opts::output_mlir ? OUTPUTFLAGset : OUTPUTFLAGno;
+Index: ldc-1.42.0/gen/optimizer.cpp
+===================================================================
+--- ldc-1.42.0.orig/gen/optimizer.cpp
++++ ldc-1.42.0/gen/optimizer.cpp
+@@ -159,8 +159,8 @@ bool willInline() {
+ #ifdef IN_JITRT
+ return false;
+ #else
+- return enableInlining == cl::BOU_TRUE ||
+- (enableInlining == cl::BOU_UNSET && optLevel() > 1);
++ return enableInlining == cl::boolOrDefault::BOU_TRUE ||
++ (enableInlining == cl::boolOrDefault::BOU_UNSET && optLevel() > 1);
+ #endif
+ }
+
+@@ -168,7 +168,7 @@ bool willCrossModuleInline() {
+ #ifdef IN_JITRT
+ return false;
+ #else
+- return enableCrossModuleInlining == llvm::cl::BOU_TRUE && willInline();
++ return enableCrossModuleInlining == llvm::cl::boolOrDefault::BOU_TRUE && willInline();
+ #endif
+ }
+
+Index: ldc-1.42.0/gen/declarations.cpp
+===================================================================
+--- ldc-1.42.0.orig/gen/declarations.cpp
++++ ldc-1.42.0/gen/declarations.cpp
+@@ -511,7 +511,7 @@ public:
+
+ DString str = se->peekString();
+ if (str.length)
+- irs->module.appendModuleInlineAsm({str.ptr, str.length});
++ irs->module.appendModuleInlineAsm(llvm::StringRef(str.ptr, str.length));
+ }
+ };
+
diff --git a/debian/patches/series b/debian/patches/series
index b72ff8e..5460566 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
i386_int128_alignment.patch
Don-t-emit-install-time-rpath-in-50-target-default.conf.patch
0001-Link-with-curl-when-building-ldc-profdata-5165.patch
+llvm-23.patch
--- End Message ---
--- Begin Message ---
Source: ldc
Source-Version: 1:1.43.0-3
Done: Jeremy Bícha <[email protected]>
We believe that the bug you reported is fixed in the latest version of
ldc, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Jeremy Bícha <[email protected]> (supplier of updated ldc package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Thu, 19 Nov 2026 08:53:59 +0100
Source: ldc
Built-For-Profiles: derivative.ubuntu noudeb
Architecture: source
Version: 1:1.43.0-3
Distribution: unstable
Urgency: medium
Maintainer: Debian D Language Group <[email protected]>
Changed-By: Jeremy Bícha <[email protected]>
Closes: 1154051
Launchpad-Bugs-Fixed: 2173908
Changes:
ldc (1:1.43.0-3) unstable; urgency=medium
.
* Team upload
* Add proposed patch from Sebastien Bacher to fix riscv64 build (LP:
#2173908)
* Release to unstable (Closes: #1154051)
.
ldc (1:1.43.0-1) experimental; urgency=medium
.
* Team upload
* New upstream release
- Fixes build with llvm 22
* Update shared library package name per upstream soname bump
* Remove curl patch applied in new release
* Refresh patches
* debian/watch: Convert to Version: 5
Checksums-Sha1:
25de5cc541bbf2d4be4daac58949f86aaa573098 2435 ldc_1.43.0-3.dsc
c0ec6216fe2d190f5c66e4fc8be869631e44566c 32968 ldc_1.43.0-3.debian.tar.xz
a766515ed92ec63695f47e72ecc182757db18848 8056 ldc_1.43.0-3_source.buildinfo
Checksums-Sha256:
1e11effcce9baa1cb4165783cfeb52234ca61fc9d5029737c6836687de03d0f7 2435
ldc_1.43.0-3.dsc
0201ad646a33c7a987e9215a20eea1af00be40e90abdf7f84d64152d4f420bed 32968
ldc_1.43.0-3.debian.tar.xz
a4a8d41c4bd7b290771729b47f0d9d6bb5d4b4e66e4822da04cb2a87a9e21b73 8056
ldc_1.43.0-3_source.buildinfo
Files:
21c95c8e10a410f92aa38fb2c8a6d7ba 2435 devel optional ldc_1.43.0-3.dsc
c8ff99b4530c1c7f7110d539dfcdaaad 32968 devel optional
ldc_1.43.0-3.debian.tar.xz
824daac1115daadf0fa632a5d70fee0d 8056 devel optional
ldc_1.43.0-3_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEETQvhLw5HdtiqzpaW5mx3Wuv+bH0FAmr+rAoACgkQ5mx3Wuv+
bH2NvxAAnyO0MdzWVSuuzj/aYSJvSyHwEbTcJ6bVfc1PaxkrWqDIcbh9I3mXhATK
0rXU+wMQa6+G9StHp8n7wULt7aclUAEIvqdHUTnYiWtZhdxjOEBt3wgeBbOfoQIl
/lYqzjaA6vRWliLa084bmjI8unsETaNmjqrDr9im+IyMNz3C5NdzEy83SabivC2/
uktxhRYuKiBikKIuLwCu6MNzVaVwmSjWpsap8dxV9UXfv4j1ea+o5IJ25jfplKSF
nVJ/BNnYpkJXo/PVJ/H8+TZiYX8ZJ4/zL0SKTM4YuK7Am6U8Dy0DoWmYuSC1CZHb
zQHIlRuwD5F4MIjk9rGMzaVLLyVY23K+U6GyVhwj0bMRT9O+FOTjxAKu9I20SqCq
t+vU4GCXcbrVSmrqMrlaY7OXtRJlsFtAi+un7ALqXtJw3e5B99DsVsMEtzrNdmCk
DY4zCSS0r9DwzKRqSctB6cEAjH/jFnBJ1mmRthTBDYUPrGZHbRu8B3wRm/NhiKm0
7uAlP6LewRXeXaIDafKfDVsdg9a7kNwOZIoer66YAk+VOPrgC/Gtq+dtJuBYH39m
Gv1Nx56lw90IoeOgRmWpplX7kAaJoHKWyFWKGTyeQpCoif12f/1OfTASIymOZzSU
3owckmxWsr4LX1HHA+U0sVNHk3t37hVaOTGeBBEfS8jA5jcj9lg=
=MsWz
-----END PGP SIGNATURE-----
pgpyMdQwvlCzg.pgp
Description: PGP signature
--- End Message ---