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

Fix architecture detection when using 32bit mode on ARM64 and i486 #4462

Merged
merged 4 commits into from
Dec 4, 2020

Conversation

kit-ty-kate
Copy link
Member

armv8l and armv8b actually mean "32bit emulation on an armv8 processor", see https://reviews.llvm.org/rG9b958356983afffaf56788f37bdab9213369fa45

This was causing issue in ocaml/opam-repository#17747 where the package does not work on Arm32, restricted the availability there but 32bit environment is still wrongly detected as arm64:

#=== ERROR while compiling albatross.1.0.1 ====================================#
# context              2.0.7 | linux/arm64 | ocaml-base-compiler.4.11.1 | pinned(https://github.com/roburio/albatross/releases/download/v1.0.1/albatross-v1.0.1.tbz)
# path                 ~/.opam/4.11/.opam-switch/build/albatross.1.0.1
# command              ~/.opam/4.11/bin/dune build -p albatross -j 31
# exit-code            1
# env-file             ~/.opam/log/albatross-7-6a4d96.env
# output-file          ~/.opam/log/albatross-7-6a4d96.out
### output ###
#     discover stats/c_flags.sexp,stats/c_library_flags.sexp (exit 2)
# (cd _build/default/stats && config/discover.exe)
# Fatal error: exception Failure("Unsupported platform: linux_eabihf")

Test-case:

$ docker run --rm -it --entrypoint bash ocaml/opam:debian-10-ocaml-4.11@sha256:ca5b021f7b74707f3d5df69657bb5a34062e81f0cfb71fdf8101cb4b32a8980a
opam@3440e642156a:~$ uname -m
aarch64
opam@3440e642156a:~$ linux32 uname -m
armv8l

Copy link
Collaborator

@rjbou rjbou left a comment

Choose a reason for hiding this comment

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

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants