Skip to content

Commit 5bcc122

Browse files
pin clang bindings to 16.0.6 to match Ubuntu's default libclang
pip installs the latest 'clang' release by default, whose libclang API surface is newer than Ubuntu 24.04's apt libclang-16, causing a LibclangError about an undefined symbol. Older bindings against a newer libclang stay compatible, so pin the bindings low rather than the system library.
1 parent 0fece41 commit 5bcc122

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ test = [
4545
"pytest>=8.0",
4646
"pytest-cov>=5.0",
4747
"ctypeslib2",
48+
# Pinned rather than left to ctypeslib2's own (unpinned) dependency: pip
49+
# installs the latest release by default, and its libclang API surface
50+
# can be newer than the system libclang (e.g. Ubuntu 24.04 ships
51+
# libclang-16), which fails with a LibclangError about an undefined
52+
# symbol. Older bindings against a newer libclang stay compatible, so
53+
# pin to an old-enough release instead of pinning apt's libclang.
54+
"clang==16.0.6",
4855
]
4956

5057
[tool.setuptools.packages.find]

0 commit comments

Comments
 (0)