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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ users)
## Infrastructure

## Release scripts
* Workaround incorrect `NGROUPS_MAX` in `<limits.h>` in musl for release builds [#5383 @dra27]

## Admin

Expand Down
1 change: 1 addition & 0 deletions release/Dockerfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ RUN tar xzf %OCAMLV%.tar.gz
WORKDIR ocaml-%OCAMLV%
RUN sed -i 's/gnueabi/*eabi/' configure
RUN sed -i 's/musl/musl*/' configure
RUN sed -i -e 's/NGROUPS_MAX/65536/' otherlibs/unix/getgroups.c
RUN ./configure %CONF% -prefix /usr/local
RUN make "-j$(nproc)" && make install && rm -rf /root/ocaml-%OCAMLV% /root/ocaml-%OCAMLV%.tar.gz

Expand Down
6 changes: 4 additions & 2 deletions release/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,19 @@ build/%.image: build/Dockerfile.%
docker build -t opam-build-$* -f $^ build
touch $@

SHA_LINK = $(if $(shell tar xOf "$(OUTDIR)/opam-full-$(VERSION).tar.gz" opam-full-$(VERSION)/src_ext/Makefile.sources | grep -F URL_sha),-lsha_stubs)

# Actually, this is for alpine 3.13, and varies
CLINKING_linux = \
-Wl,-Bstatic \
-lunix -lmccs_stubs -lmccs_glpk_stubs -lsha_stubs \
-lunix -lmccs_stubs -lmccs_glpk_stubs $(SHA_LINK) \
-lstdc++ \
-static-libgcc \
-static
# -Wl,-Bdynamic

CLINKING_macos = \
-lunix -lmccs_stubs -lmccs_glpk_stubs -lsha_stubs \
-lunix -lmccs_stubs -lmccs_glpk_stubs $(SHA_LINK) \
-lstdc++

CLINKING_openbsd = $(CLINKING_macos)
Expand Down