Skip to content
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

Wrong exec_root for cargo_build_script #2719

Closed
setoelkahfi opened this issue Jul 1, 2024 · 0 comments
Closed

Wrong exec_root for cargo_build_script #2719

setoelkahfi opened this issue Jul 1, 2024 · 0 comments

Comments

@setoelkahfi
Copy link

I'm trying to use the cargo_build_script, but it seems like the exec_root points to the wrong directory:

❯ bazel build //src-tauri:build-script --verbose_failures
INFO: Invocation ID: 4e126e23-4098-46d0-a812-2f6b1ddcf0d2
INFO: Analyzed target //src-tauri:build-script (0 packages loaded, 0 targets configured).
ERROR: /Users/setoelka/tauri-on-bazel/src-tauri/BUILD.bazel:4:19: Running Cargo build script build-script failed: (Exit 1): cargo_build_script_runner failed: error executing CargoBuildScriptRun command (from target //src-tauri:build-script)
  (cd /private/var/tmp/_bazel_setoelka/55d40751772f9cc52358541c06338f83/sandbox/darwin-sandbox/233/execroot/_main && \
  exec env - \
...
...
...
Build script process failed with exit code 1
--stdout:
cargo:rerun-if-env-changed=TAURI_CONFIG
cargo:rerun-if-changed=tauri.conf.json
cargo:rustc-cfg=desktop
cargo:rustc-cfg=dev
No such file or directory (os error 2)

--stderr:

Target //src-tauri:build-script failed to build
INFO: Elapsed time: 0.613s, Critical Path: 0.42s
INFO: 2 processes: 2 internal.
ERROR: Build did NOT complete successfully

There's no darwin-sandbox but there's sandbox_stash.

╭─░▒▓ ~/tauri-on-bazel  feature/tauri-js-rs wip                                                                                                                                        1 ✘  13:46:55 ▓▒░
╰─ ls /private/var/tmp/_bazel_setoelka/55d40751772f9cc52358541c06338f83/sandbox/sandbox_stash/CargoBuildScriptRun/163/execroot/_main/
bazel-out/  external/   src-tauri/
❯ ls /private/var/tmp/_bazel_setoelka/55d40751772f9cc52358541c06338f83/sandbox/
_moved_trash_dir sandbox_stash

Or maybe I don't understand how it is supposed to work. Any pointers?

I'm using MacOS Sonoma 14.5, M1.

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

No branches or pull requests

1 participant