Skip to content

[windows][build] fix pyml's Windows stubs for OCaml 5 - #2284

Merged
dulmarod merged 1 commit into
meta:mainfrom
jeremydubreil:patch-pyml-windows
Oct 29, 2026
Merged

dulmarod merged 1 commit into
meta:mainfrom
jeremydubreil:patch-pyml-windows

Conversation

@jeremydubreil

@jeremydubreil jeremydubreil commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

On Windows, infer fails to link, because pyml's Windows stubs still use the names that two primitives of OCaml's unix library had before OCaml 5.0. This adds a second patch to the pyml.20220905 package of infer's local opam repository, applied after no-stdcompat.patch:

  • in pyml_arch.ml.c, win_handle_fd becomes caml_unix_filedescr_of_fd, its name since OCaml 5.0;
  • in pyml_stubs.c, the declaration of win_CRT_fd_of_filedescr is replaced by #include <caml/unixsupport.h>. That header still provides the old name, through a macro, but pyml declared the function itself, which bypasses the macro.

Both changes are in code that is only compiled on Windows, so nothing changes on Linux and macOS.

@meta-cla meta-cla Bot added the CLA Signed label Oct 27, 2026
@jeremydubreil
jeremydubreil marked this pull request as ready for review October 28, 2026 08:56
@dulmarod

Copy link
Copy Markdown
Contributor

There is a conflict here.

@jeremydubreil

jeremydubreil commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor Author

There is a conflict here.

Fixed after rebasing.

@dulmarod
dulmarod merged commit 46d62ac into meta:main Oct 29, 2026
13 checks passed
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