Skip to content

Conversation

@jmid
Copy link
Member

@jmid jmid commented Nov 22, 2025

There is a current issue with conf-libclang which has not evolved as fast as new clang versions are upgraded in distributions.

The current conf-libclang.15 is thus failing on several distributions because system packages such as libclang-15-dev are no longer available on a recent distro, causing a downgrade to conf-libclang.12 (with unversioned system package constraints) which will instead fail the version check, as "libclang.21 is not in [3;12]".

This WIP PR

  • takes a first shot at a conf-libclang.21 more up to date with distribution versions and
  • attempts to make the bash configure script generic, so that we don't have to submit PRs to both opam-source-archives and opam-repository to roll a new version.

AFAICS we were already passing the opam version variable to configure.sh in earlier versions, but not using it? 🤔

Here's a diff to assess what has changed in the configure script:

$ diff -db patches/conf-libclang/configure.sh.15 patches/conf-libclang/configure-generic.sh.1
9c9,20
< maximum_version=15
---
> if [ $# != 1 ]; then
>     echo "Error: Expected exactly one argument, but got $#"
>     echo "Usage: $0 <maximum-llvm-version-to-check>"
>     exit 1
> fi
> 
> if [ $1 -lt 3 ]; then
>     echo "Error: version argument should be at least 3"
>     exit 1
> fi
> 
> maximum_version=$1
130c141
< echo "Error: No usable version of LLVM <=15.0.x found."
---
> echo "Error: No usable version of LLVM <= $maximum_version.0.x found."

@jmid jmid marked this pull request as draft November 22, 2025 17:29
@jmid jmid force-pushed the conf-libclang-fix branch from 9a77ae4 to 1baa48e Compare November 22, 2025 22:36
@jmid
Copy link
Member Author

jmid commented Nov 22, 2025

I've opened ocaml/opam-source-archives#55 with the generalized script, which should be reusable for 22, or 16, ..., 20 too, if we need them.

@jmid jmid changed the title Add conf-libclang.21 using a generic configure script [WIP] Add conf-libclang.21 using a generic configure script Nov 23, 2025
@jmid
Copy link
Member Author

jmid commented Nov 23, 2025

This is all green modulo

  • Windows failures
  • frama-clang revdeps failures

It is thus a good step forward to address conf-libclang failures.

The PR needs a maintainer to merge ocaml/opam-source-archives#55
after which I can update the URL in the opam-file.

@jmid jmid marked this pull request as ready for review November 23, 2025 21:47
@mseri mseri merged commit 2029610 into ocaml:master Nov 25, 2025
0 of 3 checks passed
@mseri
Copy link
Member

mseri commented Nov 25, 2025

Tests had already run on the file, and it was retrieved and built correctly from the new url

@mseri
Copy link
Member

mseri commented Nov 25, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants