-
Notifications
You must be signed in to change notification settings - Fork 25
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
building [email protected] fails on numpy native libs for cross-compile to linux aarch64 #41
Comments
Minimal repro in #42 |
It looks like what's happening here is:
Also verified that pytensor already declares the numpy dependency https://github.com/mark-thm/rules_pycross/blob/64e9cfa8651f4d63607c1507a27122a6b115e615/examples/crossenv/example_lock.bzl#L501-L519 -- and the sandbox above shows the dependency is available |
based on the tree shared it seems that py3.9 was used but your error says using py3.10 i had a similar issue with grpc which was fixed by passing the python interpreter to the grpc repo. GRPC is a bazel compatible repo so that might not apply here but just wanted to point that out in case its relevant or helps! http_archive(
name = "com_github_grpc_grpc",
# Due to https://github.com/grpc/grpc/issues/24665
# See https://github.com/grpc/grpc/issues/24665#issuecomment-1373577865
# This makes sure we use the right python version and not the local python version
repo_mapping = {"@local_config_python": "@python3_9"},
sha256 = "7f42363711eb483a0501239fd5522467b31d8fe98d70d7867c6ca7b52440d828",
strip_prefix = "grpc-1.51.0",
urls = [
"https://github.com/grpc/grpc/archive/refs/tags/v1.51.0.tar.gz",
],
) another thing to check is if you are using zig toolchain and if its correctly configured for linux arm64 |
Sorry for the way late reply. I agree that this is what is happening, and I'm not sure that there is a great answer. There are now hooks in You can see some examples of using hooks in the |
#105 adds the building block for another approach to building libraries like this: build the C/C++ code with Bazel |
I'm running into a pretty cryptic problem where building [email protected] fails with missing numpy C libraries even though building numpy directly succeeds. I have the pretty much same setup as the crossenv example but with a linux_aarch64 platform and toolchains defined, and have added pytensor to pyproject.toml/poetry.lock, re-generated the bzl lockfile. Then, building:
Fails with error:
Even though this succeeds:
If it helps, here's the contents of numpy from the sandbox
❯ tree ./bazel-out/darwin-fastbuild/bin/deps/numpy_1.25.2
I'd add that pytensor has a declared dependency on numpy.
The text was updated successfully, but these errors were encountered: