Open mattip opened 5 months ago
Hm, we select the assembly based on the platform here:
:linux_x86_64
is defined here:
Bazel documentation suggests that you might need to pass --platforms
to the Bazel build? I'm not actually that familiar with how Bazel platforms and cross-compilation work, offhand.
I forget to say I am have build --cpu=darwin_arm64
in my .bazelrc
, which should have prevent setting the linux_x86_64
config_setting. Do you have any tips how to debug the config_setting
used in the build? Is there some kind of print
I can use in bazel to add debug info?
With the continued caveat that I don't closely follow bazel targets/cross-compilation, the docs make it look to me like --cpu
and --platforms
are somewhat independent and they're in the middle of a migration from the one to the other. So you may need both?
Bazel Starlark does have a print
function you can try to use… You can check out a local copy of rules_boost
and reference it with local_repository
to experiment with adding debug prints.
Over at conda-forge/ray-packages-feedstock#158 I am trying to get ray which is using bazel5.4 to build for macos. The build machine available in CI is x86_64. When the target is x86_64 everything works. Bug when the target is arm64 (using a
--crosstool_top
bazel directive), I am seeing the build tries to compileboost/libs/context/src/asm/jump_x86_64_sysv_macho_gas.S
which of course cannot succeed since the assembly in that file is for x86_64, not arm64. Conda-forge is a framework that sets up the CI environment, downloads the source code of the project, then runs a script to call the project's build system, in this case ray's source code and usingpython setup.py
which calls bazel to build the project. Here is where this project comes into play:which is then loaded as
boost_deps
, and then boost is used in other places in the bazel build script, for instance hereAny hints as to what might be going on? Do I need to define something to convey the target CPU to boost? I see the the conda-forge boost feedstock uses
ARCHITECTURE=arm
in theb2
call, is there something like that needed here?