You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was playing around with buck2 and trying to use it to build the prelude workspace seen in the examples folder of the repo and was running into issues. All of the other toolchains seem to be working except for the Rust one. For clarification, I'm running buck2 on an M1 Mac using homebrew for package management if that helps. I was wondering if anyone has any ideas on resolving the issues. Relevant error messages are provided below for reference.
buck2 build ...
File changed: root//.git/objects/maintenance.lock
File changed: root//.git/modules/prelude/FETCH_HEAD
File changed: root//.git/modules/prelude/objects/maintenance.lock
Action failed: root//rust:main (rustc bin-pic-static_pic-link/main-link bin,pic,link [diag])
Local command returned non-zero exit code 1
Reproduce locally: /usr/bin/env "PYTHONPATH=buck-out/v2/gen/prelude/213ed1b7ab869379/rust/tools/__rustc_action__/__rust ...<omitted>... .py @buck-out/v2/gen/root/213ed1b7ab869379/rust/__main__/bin-pic-static_pic-link/main-link-diag.args (run buck2 log what-failed to get the full command)
stdout:
stderr:
arch: posix_spawnp: rustc: Bad CPU type in executable
Build ID: dc3e3c7d-a1d0-42cd-8399-392a63445c30
Jobs completed: 9. Time elapsed: 0.3s. Cache hits: 0%. Commands: 1 (cached: 0, remote: 0, local: 1)
BUILD FAILED
Failed to build 'root//rust:main (prelude//platforms:default#213ed1b7ab869379)'
Not sure if I need to change some sort of configuration for rustc in the context of buck2 or what a possible solution would be. Appreciate any ideas, thanks.
The text was updated successfully, but these errors were encountered:
pulanski
changed the title
Building Rust on Apple Silicon
Building Rust on Apple Silicon w/ buck2
Apr 7, 2023
I was playing around with buck2 and trying to use it to build the prelude workspace seen in the examples folder of the repo and was running into issues. All of the other toolchains seem to be working except for the Rust one. For clarification, I'm running buck2 on an M1 Mac using homebrew for package management if that helps. I was wondering if anyone has any ideas on resolving the issues. Relevant error messages are provided below for reference.
buck2 build ...
File changed: root//.git/objects/maintenance.lock
File changed: root//.git/modules/prelude/FETCH_HEAD
File changed: root//.git/modules/prelude/objects/maintenance.lock
Action failed: root//rust:main (rustc bin-pic-static_pic-link/main-link bin,pic,link [diag])
Local command returned non-zero exit code 1
Reproduce locally:
/usr/bin/env "PYTHONPATH=buck-out/v2/gen/prelude/213ed1b7ab869379/rust/tools/__rustc_action__/__rust ...<omitted>... .py @buck-out/v2/gen/root/213ed1b7ab869379/rust/__main__/bin-pic-static_pic-link/main-link-diag.args (run
buck2 log what-failedto get the full command)
stdout:
stderr:
arch: posix_spawnp: rustc: Bad CPU type in executable
Build ID: dc3e3c7d-a1d0-42cd-8399-392a63445c30
Jobs completed: 9. Time elapsed: 0.3s. Cache hits: 0%. Commands: 1 (cached: 0, remote: 0, local: 1)
BUILD FAILED
Failed to build 'root//rust:main (prelude//platforms:default#213ed1b7ab869379)'
Output from log what-failed
buck2 log what-failed
Showing commands from: buck2 build ...
build root//rust:main (prelude//platforms:default#213ed1b7ab869379) (rustc bin-pic-static_pic-link/main-link bin,pic,link [diag]) local env -- "TMPDIR=~/buck2/examples/prelude/buck-out/v2/tmp/root/213ed1b7ab869379/rust/main/rustc/_buck_130845f0f81d454f" "BUCK2_DAEMON_UUID=2833dbcc-04d4-4384-a79c-6a57c3c7866d" /usr/bin/env "PYTHONPATH=buck-out/v2/gen/prelude/213ed1b7ab869379/rust/tools/rustc_action/rustc_action" python3 buck-out/v2/gen/prelude/213ed1b7ab869379/rust/tools/rustc_action/rustc_action.py @buck-out/v2/gen/root/213ed1b7ab869379/rust/main/bin-pic-static_pic-link/main-link-diag.args
Not sure if I need to change some sort of configuration for rustc in the context of buck2 or what a possible solution would be. Appreciate any ideas, thanks.
The text was updated successfully, but these errors were encountered: