🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.dist
1 messages
1 total messages Started by Sylvestre Ledru Sun, 15 Nov 2026 12:30
Bug#1154047: smlsharp: FTBFS with LLVM 23 as default: TargetLoweringObjectFile API change
#4577
Author: Sylvestre Ledru
Date: Sun, 15 Nov 2026 12:30
96 lines
4789 bytes
--1804289383-1794740571=:2282552
Content-Type: text/plain; charset=UTF-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
Content-ID: <20261115120251.2282552@pulau.ecranbleu.org>

Source: smlsharp
Version: 4.1.0-1.1
Severity: important
Tags: ftbfs patch
User: pkg-llvm-team@lists.alioth.debian.org
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.

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

--1804289383-1794740571=:2282552
Content-Type: text/x-diff; charset=UTF-8; name="smlsharp.debdiff"
Content-Disposition: attachment; filename="smlsharp.debdiff"
Content-Transfer-Encoding: 8bit
Content-ID: <20261115120251.2282552.1@pulau.ecranbleu.org>

diff --git a/debian/patches/llvm-23.patch b/debian/patches/llvm-23.patch
new file mode 100644
index 0000000..c8e076d
--- /dev/null
+++ b/debian/patches/llvm-23.patch
@@ -0,0 +1,23 @@
+Description: Fix the build with LLVM 23
+ TargetLoweringObjectFile::getSectionForConstant takes an additional
+ "const Function *" argument since LLVM 23.
+Author: Sylvestre Ledru <sylvestre@debian.org>
+Forwarded: no
+Last-Update: 2026-11-15
+---
+Index: smlsharp-4.1.0/src/llvm/main/smlsharp_gc.cpp
+===================================================================
+--- smlsharp-4.1.0.orig/src/llvm/main/smlsharp_gc.cpp
++++ smlsharp-4.1.0/src/llvm/main/smlsharp_gc.cpp
+@@ -147,7 +147,11 @@ SMLSharpGCPrinter::finishAssembly(Module
+ #endif
+ 		(ap.getObjFileLowering().getSectionForConstant
+ 		 (ap.getDataLayout(), SectionKind::getReadOnly(),
++#if LLVM_VERSION_MAJOR >= 23
++		  nullptr, align, nullptr));
++#else
+ 		  nullptr, align));
++#endif
+ 	EmitAlignPtrSize(ap);
+ #if LLVM_VERSION_MAJOR <= 10
+ 	ap.OutStreamer->EmitLabel(sml_ftab);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..57a9af7
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+llvm-23.patch

--1804289383-1794740571=:2282552--
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads