-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
opam switch create
with static
option fails on Ubuntu aarch64
#26216
Comments
@kit-ty-kate I found that the problem might be solved by setting CFLAGS=-mno-outline-atomics see e.g. rust-lang/rust#89626 (comment) or https://lists.cs.columbia.edu/pipermail/kvmarm/2020-July/041614.html I wanted to try it out but unfortunately have no idea how to get the |
opam passes most environment variables as-is so if exporting |
I can confirm that It is not enough if this is set in the environment. It is not passed through to the By using /root/.opam/5.2.0/.opam-switch/build/ocaml-variants.5.2.0+options/./configure "--prefix=/root/.opam/5.2.0" "--docdir=/root/.opam/5.2.0/doc/ocaml" "-C" "CC=musl-gcc" "CFLAGS=-Os" "ASPP=musl-gcc -c" "LIBS=-static" "--disable-warn-error Note the Now if I do not clean up the broken switch and instead manually call configure as follows (with the cd /root/.opam/5.2.0/.opam-switch/build/ocaml-variants.5.2.0+options
rm config.cache
/root/.opam/5.2.0/.opam-switch/build/ocaml-variants.5.2.0+options/./configure "--prefix=/root/.opam/5.2.0" "--docdir=/root/.opam/5.2.0/doc/ocaml" "-C" "CC=musl-gcc" "CFLAGS=-Os -mno-outline-atomics" "ASPP=musl-gcc -c" "LIBS=-static" "--disable-warn-error"
make -j9
# Success! @kit-ty-kate So I think what I would actually need is
(maybe conditional on platform Linux ARM64) |
Sure, a PR would be welcome if you have the time |
Great! If I fork opam-repository and fix this there, I can even test with setup-ocaml by specifying my fork in |
yes that's right |
Consider this Dockerfile:
On x64, it works perfectly fine.
However, on aarch64,
opam switch create
gives me the following error:The text was updated successfully, but these errors were encountered: