🚀 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 13:40
Bug#1154059: apache-arrow: FTBFS with LLVM 23 as default: Gandiva rejects LLVM 23
#4587
Author: Sylvestre Ledru
Date: Sun, 15 Nov 2026 13:40
115 lines
5897 bytes
--1804289383-1794740520=:2281320
Content-Type: text/plain; charset=UTF-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
Content-ID: <20261115120200.2281320@pulau.ecranbleu.org>

Source: apache-arrow
Version: 25.0.0-2
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.

apache-arrow fails to build in unstable with it, and builds without it:

CMake Warning at cmake_modules/FindLLVMAlt.cmake:58 (find_package):
  Could not find a configuration file for package "LLVM" that is compatible
  with requested version [...]
    /usr/lib/llvm-23/lib/cmake/llvm/LLVMConfig.cmake, version: 23.1.3

Gandiva has a fixed list of supported LLVM versions, ARROW_LLVM_VERSIONS
in cpp/CMakeLists.txt:181, which stops at 22.1. With "23.1" added, the
build goes further and fails in cpp/src/gandiva/engine.cc:213: since
LLVM 23, the ObjectLinkingLayerCreator callback also gets the
JITLinkMemoryManager.

The attached debdiff fixes both. apache-arrow builds with it, tests included.

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-1794740520=:2281320
Content-Type: text/x-diff; charset=UTF-8; name="apache-arrow.debdiff"
Content-Disposition: attachment; filename="apache-arrow.debdiff"
Content-Transfer-Encoding: 8bit
Content-ID: <20261115120200.2281320.1@pulau.ecranbleu.org>

diff --git a/debian/patches/llvm-23.patch b/debian/patches/llvm-23.patch
new file mode 100644
index 0000000..56bcfae
--- /dev/null
+++ b/debian/patches/llvm-23.patch
@@ -0,0 +1,38 @@
+Description: Build Gandiva with LLVM 23
+ * Add 23.1 to the supported LLVM versions.
+ * The ObjectLinkingLayerCreator callback gets the JITLinkMemoryManager
+   since LLVM 23.
+Author: Sylvestre Ledru <sylvestre@debian.org>
+Forwarded: no
+Last-Update: 2026-11-15
+---
+Index: apache-arrow-25.0.0/cpp/CMakeLists.txt
+===================================================================
+--- apache-arrow-25.0.0.orig/cpp/CMakeLists.txt
++++ apache-arrow-25.0.0/cpp/CMakeLists.txt
+@@ -179,6 +179,7 @@ set(ARROW_DOC_DIR "${CMAKE_INSTALL_DOCDI
+ set(BUILD_SUPPORT_DIR "${CMAKE_SOURCE_DIR}/build-support")
+ 
+ set(ARROW_LLVM_VERSIONS
++    "23.1"
+     "22.1"
+     "21.1"
+     "20.1"
+Index: apache-arrow-25.0.0/cpp/src/gandiva/engine.cc
+===================================================================
+--- apache-arrow-25.0.0.orig/cpp/src/gandiva/engine.cc
++++ apache-arrow-25.0.0/cpp/src/gandiva/engine.cc
+@@ -209,7 +209,12 @@ Status UseJITLinkIfEnabled(llvm::orc::LL
+   static auto maybe_use_jit_link = ::arrow::internal::GetEnvVar("GANDIVA_USE_JIT_LINK");
+   if (maybe_use_jit_link.ok()) {
+     ARROW_ASSIGN_OR_RAISE(static auto memory_manager, CreateMemmoryManager());
+-#  if LLVM_VERSION_MAJOR >= 21
++#  if LLVM_VERSION_MAJOR >= 23
++    jit_builder.setObjectLinkingLayerCreator(
++        [&](llvm::orc::ExecutionSession& ES, llvm::jitlink::JITLinkMemoryManager&) {
++          return std::make_unique<llvm::orc::ObjectLinkingLayer>(ES, *memory_manager);
++        });
++#  elif LLVM_VERSION_MAJOR >= 21
+     jit_builder.setObjectLinkingLayerCreator([&](llvm::orc::ExecutionSession& ES) {
+       return std::make_unique<llvm::orc::ObjectLinkingLayer>(ES, *memory_manager);
+     });
diff --git a/debian/patches/series b/debian/patches/series
index 0968955..1712f76 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 use-debian-mimalloc.patch
 build-sse4.2-kernels.patch
 gandiva-riscv64-pic-jit.patch
+llvm-23.patch

--1804289383-1794740520=:2281320--
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