#1154051 ldc: FTBFS with LLVM 23 as default: llvm::cl::boolOrDefault API change

Package:
src:ldc
Source:
src:ldc
Submitter:
Sylvestre Ledru
Date:
2026-11-19 08:53:02 UTC
Severity:
normal
Tags:
#1154051#5
Date:
2026-11-15 11:02:25 UTC
From:
To:
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

#1154051#14
Date:
2026-11-15 12:34:19 UTC
From:
To:
This is fixed in experimental. See https://bugs.debian.org/1154031

Thank you,
Jeremy Bícha

#1154051#21
Date:
2026-11-19 08:51:03 UTC
From:
To:
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 1154051@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jeremy Bícha <jbicha@ubuntu.com> (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 ftpmaster@ftp-master.debian.org)
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 <team+d-team@tracker.debian.org>
Changed-By: Jeremy Bícha <jbicha@ubuntu.com>
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-----