Skip to content

[new release] coccinelle (1.3.1) - #29974

Merged
jmid merged 1 commit into
ocaml:masterfrom
evdenis:coccinelle-1.3.1
May 31, 2026
Merged

[new release] coccinelle (1.3.1)#29974
jmid merged 1 commit into
ocaml:masterfrom
evdenis:coccinelle-1.3.1

Conversation

@evdenis

@evdenis evdenis commented May 30, 2026

Copy link
Copy Markdown
Contributor

@jmid jmid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Our CI is failing to install this across all tested platforms!

On Debian running out the "version tests":
https://opam.ci.ocaml.org/github/ocaml/opam-repository/commit/153e435dbafcbfe131bb920515e501287483c43f/variant/compilers,5.4,coccinelle.1.3.1

coccinelle.1.3.1 is not installed. Install it? [Y/n] y
  * Missing dependency:
    - coccinelle >= 1.3.1 -> pcre -> conf-libpcre
    depends on the unavailable system package 'libpcre3-dev'. Use `--no-depexts' to attempt installation anyway, or it is possible that a depext package name in the opam file is incorrect.

which seems due to a missing/removed Debian libpcre3-dev package.

On 5.4 on non-Debian, it seems to fail due to no compatible stdcompat:
https://opam.ci.ocaml.org/github/ocaml/opam-repository/commit/153e435dbafcbfe131bb920515e501287483c43f/variant/distributions,centos-10-ocaml-5.4,coccinelle.1.3.1

coccinelle.1.3.1 is not installed. Install it? [Y/n] y
  * Incompatible packages:
    - (invariant) -> ocaml-base-compiler = 5.4.1
    - coccinelle >= 1.3.1 -> stdcompat >= 19 -> ocaml < 5.2 -> dkml-base-compiler
    You can temporarily relax the switch invariant with `--update-invariant'
  * Incompatible packages:
    - (invariant) -> ocaml-base-compiler = 5.4.1
    - coccinelle >= 1.3.1 -> stdcompat >= 19 -> ocaml < 5.2 -> ocaml-variants (< 4.13.3~ | >= 4.14.1~)
  * Missing dependency:
    - coccinelle >= 1.3.1 -> stdcompat >= 19 -> ocaml < 5.2 -> ocaml-base-compiler < 4.11.0 | ocaml-system (<= 3.07+1 | = 3.07+2 | >= 3.08.0) | ocaml-variants < 4.10.3~
    no matching version
    unmet availability conditions, e.g. 'sys-ocaml-version = "5.4.1" & (os != "win32" | sys-ocaml-libc = "msvc")'
    no matching version
  * Missing dependency:
    - coccinelle >= 1.3.1 -> stdcompat >= 19 -> ocaml < 5.2 -> ocaml-variants >= 4.14.1~ -> system-msvc
    unmet availability conditions: 'os = "win32"'

On 4.14.3 non-Debian it also seems to fail due to no compatible stdcompat:
https://opam.ci.ocaml.org/github/ocaml/opam-repository/commit/153e435dbafcbfe131bb920515e501287483c43f/variant/distributions,fedora-42-ocaml-4.14,coccinelle.1.3.1

coccinelle.1.3.1 is not installed. Install it? [Y/n] y
  * No agreement on the version of ocaml:
    - (invariant) -> ocaml-base-compiler = 4.14.3 -> ocaml = 4.14.3
    - coccinelle >= 1.3.1 -> stdcompat >= 19 -> ocaml (< 4.14.3 | >= 5.0)
    You can temporarily relax the switch invariant with `--update-invariant'
  * Missing dependency:
    - coccinelle >= 1.3.1 -> stdcompat >= 19 -> ocaml (< 4.14.3 | >= 5.0) -> ocaml-base-compiler (<= 4.00.1 | = 4.01.0) | ocaml-system (<= 3.07+1 | = 3.07+2 | >= 3.08.0) | ocaml-variants < 4.01.1~
    not available because the package is pinned to version 4.14.3
    unmet availability conditions, e.g. 'sys-ocaml-version = "5.4.1" & (os != "win32" | sys-ocaml-libc = "msvc")'
    no matching version

I suspect you have not installed this using opam yourself and use a different approach instead (e.g., manually compiling from source), is that correct?

Publishing a non-installable package is not fun for anyone.
How do you see this going forward? Relaxing stdcompat bounds perhaps? 🤔

@jmid jmid added the question label May 31, 2026
@evdenis
evdenis force-pushed the coccinelle-1.3.1 branch from 153e435 to 6a577aa Compare May 31, 2026 16:13
@evdenis

evdenis commented May 31, 2026

Copy link
Copy Markdown
Contributor Author

I tested it on Gentoo with opam (ocaml-system.4.14.2). I moved pcre from depends to depopts, and gated --enable-pcre-syntax/--enable-pcre on {pcre:installed}. coccinelle's configure falls back to the str backend when libpcre is absent, so it now installs on trixie without libpcre3-dev. I see that coccinelle developers added support for pcre2 after this release. So pcre2 support will be available with next coccinelle release.

The 5.4/4.14.3 failures aren't coccinelle-specific. It's coccinelle -> pyml -> stdcompat chain, and stdcompat doesn't build on 5.4 yet (ocamllibs/stdcompat#70) and is bounded < 4.14.3. The whole stdcompat/pyml dependency is unavailable there until an upstream stdcompat release adds support.

@jmid jmid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

This is now building without issues on 5.2 and 5.3. I also found ocamllibs/stdcompat#73 confirming that the stdcompat bound is real.

(CI is done, modulo RISCV64 which is hanging these days)

@jmid
jmid merged commit 5acf410 into ocaml:master May 31, 2026
4 of 5 checks passed
@evdenis
evdenis deleted the coccinelle-1.3.1 branch June 12, 2026 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants