#1154047 smlsharp: FTBFS with LLVM 23 as default: TargetLoweringObjectFile API change

Package:
src:smlsharp
Source:
src:smlsharp
Submitter:
Sylvestre Ledru
Date:
2026-11-15 12:21:02 UTC
Severity:
normal
Tags:
#1154047#5
Date:
2026-11-15 11:02:51 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.

smlsharp fails to build in unstable with it, and builds without it:

src/llvm/main/smlsharp_gc.cpp:149:18: error: no matching function for
call to 'llvm::TargetLoweringObjectFile::getSectionForConstant(const
llvm::DataLayout&, llvm::SectionKind, std::nullptr_t, llvm::Align&) const'

In LLVM 23, TargetLoweringObjectFile::getSectionForConstant takes an
additional const Function *F argument (after the alignment), the call
in src/llvm/main/smlsharp_gc.cpp:148 needs it. #1123477 was the same
kind of port for LLVM 21.

The attached debdiff adds it for LLVM >= 23. smlsharp builds with it.

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