Skip to content

[MacOS] Add arm64 support. #315

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

arturgontijo
Copy link
Collaborator

@arturgontijo arturgontijo commented Mar 21, 2025

Starting the journey to support MacOS (arm64) arch.

make build-all

  • MacOS (arm64) [works without evolution and python wheels, check the bellow notes]
  • Linux (arm64)

make test-all (breaking due to unrelated issue)

  • MacOS (arm64)
  • Linux (arm64)

tests, evolution and python wheels build are working with b5be17d

&& ln -s ${THIRD_PARTY} ${DAS_DIR}/src/3rd-party \
&& mv bazelisk ${BAZEL_DIR}
COPY src/assets/bazelisk.tgz /tmp
RUN ARCH=$(if [ "$(uname -m)" = "aarch64" ]; then echo "arm64"; else echo "amd64"; fi) \
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
RUN ARCH=$(if [ "$(uname -m)" = "aarch64" ]; then echo "arm64"; else echo "amd64"; fi) \
RUN ARCH=$([ "$(uname -m)" = "aarch64" ] && echo "arm64" || echo "amd64") \

@@ -30,7 +32,7 @@ py_wheel(
description_content_type = "text/markdown",
description_file = "README.md",
distribution = "hyperon_das_atomdb_cpp",
platform = "manylinux_2_28_x86_64",
platform = "any",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This will be a possible issue when publishing the module on PyPI.

Comment on lines 40 to -42

docker run --rm \
--user="$(id -u)":"$(id -g)" \
Copy link
Collaborator

@angeloprobst angeloprobst Mar 24, 2025

Choose a reason for hiding this comment

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

Please, bind the user ID and group as env vars:

docker run --rm \
  --name=$CONTAINER_NAME \
  -e HOST_USER_ID="$(id -u)" \
  -e HOST_USER_GROUP="$(id -g)" \
  -e BIN_DIR=$CONTAINER_BIN_DIR \
  <rest of the command> . . .

And then, at the end of bazel_build.sh, before the exit, add this:

[ "${HOST_USER_ID:-x}" != "x" -a "${HOST_USER_GROUP:-x}" != "x" ] && \
  chown -R ${HOST_USER_ID}:${HOST_USER_GROUP} "$BIN_DIR"

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