🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #4571

Bug#1154039: python-opencascade-pywrap: hardcodes /usr/lib/llvm-21/lib/libclang.so, python-ocp FTBFS with LLVM 23 as default

#4571
From: Sylvestre Ledru
Date: Sun, 15 Nov 2026 11:50
50 lines
3287 bytes
Source: python-opencascade-pywrap
Version: 0.0~git20251205135501.e4d7570-3
Severity: important
Tags: patch
User: pkg-llvm-team@lists.alioth.debian.org
Usertags: llvm-23-default
Control: affects -1 + src:llvm-defaults src:python-ocp
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.

python-ocp then fails to build, because its bindings generator, the
bindgen module of python3-opencascade-pywrap, loads LLVM 21's libclang:

clang.cindex.LibclangError: /usr/lib/llvm-21/lib/libclang.so: cannot
open shared object file: No such file or directory

The path is hardcoded in bindgen/utils.py by
debian/patches/0003-Use-system-clang.patch:

        Config.set_library_file('/usr/lib/llvm-21/lib/libclang.so')

It also ignores the libclang passed by python-ocp (-l
/usr/lib/llvm-23/lib/libclang.so). The attached debdiff uses that path
when given, and otherwise lets python3-clang pick its default libclang,
so it won't break again at the next transition.

With it, python-ocp builds with LLVM 23 as default.

To reproduce, build python-ocp 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~)' \
    python-ocp

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
Technical Details
Message-ID: <NZGU9-c1Wg-3@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!bofh.it!news.nic.it!robomod

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!bofh.it!news.nic.it!robomod
From: Sylvestre Ledru <sylvestre@debian.org>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1154039: python-opencascade-pywrap: hardcodes /usr/lib/llvm-21/lib/libclang.so, python-ocp FTBFS with LLVM 23 as default
Date: Sun, 15 Nov 2026 12:50:02 +0100
Message-ID: <NZGU9-c1Wg-3@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Sun Nov 15 11:41:11 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.9
Reply-To: Sylvestre Ledru <sylvestre@debian.org>, 1154039@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: debian-science-maintainers@lists.alioth.debian.org
X-Debian-Pr-Message: report 1154039
X-Debian-Pr-Package: src:python-opencascade-pywrap
X-Debian-Pr-Keywords: patch
X-Debian-Pr-Source: python-opencascade-pywrap
User-Agent: mail (GNU Mailutils 3.21)
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2002709
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 50
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Sun, 15 Nov 2026 12:02:46 +0100
X-Original-Message-ID: <20261115110246.3ABBA19CDB0C@pulau.ecranbleu.org>