xls icon indicating copy to clipboard operation
xls copied to clipboard

python3: cannot execute binary file on ARM Mac

Open spurserh opened this issue 1 year ago • 2 comments

A new user trying to set up XLS on an ARM Mac got an error "python3: cannot execute binary file" from the bazel build. The path shown is to the x64 python binary.

The user says "I moved the python39_x86-64 folder out of the way, and made that folder name symlink to the python_aarch64 folder -> works".

spurserh avatar Jan 13 '24 01:01 spurserh

since we switched to hermetic toolchain in https://github.com/google/xls/commit/eb2fb6d81523b09fbd77b63b88381b1ad6c74850 rules_python should be able to select the right python variant to download https://github.com/bazelbuild/rules_python/blob/a79b66a76eeee4a8c7b967cde80e9ded82411631/python/versions.bzl#L191-L201 according to the target platform.

@spurserh do have the full log, I suspect it could be a rogue target that doesn't use the hermetic toolchain interpreter with

load("@python39//:defs.bzl", python_interpreter_target = "interpreter")

proppy avatar Jan 13 '24 01:01 proppy

@spurserh Also note to help with these we'd probably need more step by step instructions on how the environment got set up, because the nightly OS X build is looking ok: https://github.com/google/xls/actions/runs/7622196412/job/20759833772 Notably that's not running any test targets though.

cdleary avatar Jan 23 '24 17:01 cdleary