Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround incorrect <limits.h> in musl in the release scripts #5383

Merged
merged 3 commits into from
Nov 14, 2023

Conversation

dra27
Copy link
Member

@dra27 dra27 commented Dec 9, 2022

Alternate for #5373 - musl has a pre-kernel 2.6.4 value of 32 for NGROUPS_MAX. This PR simply patches the limits.h to correct that (in the Docker builds only!) so that OCaml is compiled with the 2.6.4+ value of 65536.

In passing, a slightly inelegant (but tested!) hack to add -lsha_stubs only when needed (so that make -C release TAG=2.1.3 x86_64-linux works with master)

musl ships with an incorrect value for NGROUPS_MAX in limits.h. This
affects OCaml's Unix.getgroups function. Fortunately, for the opam
binary, this can be worked around simply by ensuring
/usr/include/limits.h has been patched before OCaml is compiled.

This would not work for Unix.initgroups, but fortunately opam doesn't
need that.
Allows the release scripts on master to build opam 2.1 release tags.
@kit-ty-kate
Copy link
Member

Thanks!

@kit-ty-kate kit-ty-kate merged commit 75dd738 into ocaml:master Nov 14, 2023
2 checks passed
@kit-ty-kate kit-ty-kate added this to the 2.2.0~alpha3 milestone Nov 14, 2023
@dra27 dra27 deleted the fix-ngroups_max branch November 14, 2023 15:20
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.

opam init cannot find tools
2 participants