[Cargo Install flutter_rust_bridge_codegen Error]
weixuefeng opened this issue · comments
Describe the bug
When i execute: cargo install flutter_rust_bridge_codegen@^2.0.0-dev.0
, i got error:
.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=166 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="std"' -C metadata=5ae67087ca064313 -C extra-filename=-5ae67087ca064313 --out-dir /var/folders/zb/gj9d2pnd33jc_1l55dqzwk440000gn/T/cargo-installl1nxIL/release/build/crossbeam-utils-5ae67087ca064313 -C strip=debuginfo -L dependency=/var/folders/zb/gj9d2pnd33jc_1l55dqzwk440000gn/T/cargo-installl1nxIL/release/deps --cap-lints allow`
Running `/var/folders/zb/gj9d2pnd33jc_1l55dqzwk440000gn/T/cargo-installl1nxIL/release/build/libc-4e0d5e4668e13f61/build-script-build`
Running `/var/folders/zb/gj9d2pnd33jc_1l55dqzwk440000gn/T/cargo-installl1nxIL/release/build/proc-macro2-86681cc674fbd63f/build-script-build`
Running `/var/folders/zb/gj9d2pnd33jc_1l55dqzwk440000gn/T/cargo-installl1nxIL/release/build/serde-4a6888119dcf066b/build-script-build`
Running `/var/folders/zb/gj9d2pnd33jc_1l55dqzwk440000gn/T/cargo-installl1nxIL/release/build/slab-3c8460411f63fea7/build-script-build`
error: failed to run custom build command for `proc-macro2 v1.0.79`
Caused by:
process didn't exit successfully: `/var/folders/zb/gj9d2pnd33jc_1l55dqzwk440000gn/T/cargo-installl1nxIL/release/build/proc-macro2-40b0990b09d2eb80/build-script-build` (signal: 9, SIGKILL: kill)
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `proc-macro2 v1.0.79`
Caused by:
process didn't exit successfully: `/var/folders/zb/gj9d2pnd33jc_1l55dqzwk440000gn/T/cargo-installl1nxIL/release/build/proc-macro2-86681cc674fbd63f/build-script-build` (signal: 9, SIGKILL: kill)
error: failed to run custom build command for `libc v0.2.153`
Caused by:
process didn't exit successfully: `/var/folders/zb/gj9d2pnd33jc_1l55dqzwk440000gn/T/cargo-installl1nxIL/release/build/libc-4e0d5e4668e13f61/build-script-build` (signal: 9, SIGKILL: kill)
error: failed to run custom build command for `slab v0.4.9`
Caused by:
process didn't exit successfully: `/var/folders/zb/gj9d2pnd33jc_1l55dqzwk440000gn/T/cargo-installl1nxIL/release/build/slab-3c8460411f63fea7/build-script-build` (signal: 9, SIGKILL: kill)
error: failed to run custom build command for `serde v1.0.197`
Caused by:
process didn't exit successfully: `/var/folders/zb/gj9d2pnd33jc_1l55dqzwk440000gn/T/cargo-installl1nxIL/release/build/serde-4a6888119dcf066b/build-script-build` (signal: 9, SIGKILL: kill)
error: failed to compile `flutter_rust_bridge_codegen v2.0.0-dev.30`, intermediate artifacts can be found at `/var/folders/zb/gj9d2pnd33jc_1l55dqzwk440000gn/T/cargo-installl1nxIL`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path
Steps to reproduce
cargo install flutter_rust_bridge_codegen@^2.0.0-dev.0
Logs
Running `/var/folders/zb/gj9d2pnd33jc_1l55dqzwk440000gn/T/cargo-installl1nxIL/release/build/libc-4e0d5e4668e13f61/build-script-build`
Running `/var/folders/zb/gj9d2pnd33jc_1l55dqzwk440000gn/T/cargo-installl1nxIL/release/build/proc-macro2-86681cc674fbd63f/build-script-build`
Running `/var/folders/zb/gj9d2pnd33jc_1l55dqzwk440000gn/T/cargo-installl1nxIL/release/build/serde-4a6888119dcf066b/build-script-build`
Running `/var/folders/zb/gj9d2pnd33jc_1l55dqzwk440000gn/T/cargo-installl1nxIL/release/build/slab-3c8460411f63fea7/build-script-build`
error: failed to run custom build command for `proc-macro2 v1.0.79`
Caused by:
process didn't exit successfully: `/var/folders/zb/gj9d2pnd33jc_1l55dqzwk440000gn/T/cargo-installl1nxIL/release/build/proc-macro2-40b0990b09d2eb80/build-script-build` (signal: 9, SIGKILL: kill)
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `proc-macro2 v1.0.79`
Caused by:
process didn't exit successfully: `/var/folders/zb/gj9d2pnd33jc_1l55dqzwk440000gn/T/cargo-installl1nxIL/release/build/proc-macro2-86681cc674fbd63f/build-script-build` (signal: 9, SIGKILL: kill)
error: failed to run custom build command for `libc v0.2.153`
Caused by:
process didn't exit successfully: `/var/folders/zb/gj9d2pnd33jc_1l55dqzwk440000gn/T/cargo-installl1nxIL/release/build/libc-4e0d5e4668e13f61/build-script-build` (signal: 9, SIGKILL: kill)
error: failed to run custom build command for `slab v0.4.9`
Caused by:
process didn't exit successfully: `/var/folders/zb/gj9d2pnd33jc_1l55dqzwk440000gn/T/cargo-installl1nxIL/release/build/slab-3c8460411f63fea7/build-script-build` (signal: 9, SIGKILL: kill)
error: failed to run custom build command for `serde v1.0.197`
Caused by:
process didn't exit successfully: `/var/folders/zb/gj9d2pnd33jc_1l55dqzwk440000gn/T/cargo-installl1nxIL/release/build/serde-4a6888119dcf066b/build-script-build` (signal: 9, SIGKILL: kill)
error: failed to compile `flutter_rust_bridge_codegen v2.0.0-dev.30`, intermediate artifacts can be found at `/var/folders/zb/gj9d2pnd33jc_1l55dqzwk440000gn/T/cargo-installl1nxIL`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
### Expected behavior
_No response_
### Generated binding code
_No response_
### OS
MaxOs,M2,14.2
### Version of `flutter_rust_bridge_codegen`
v2.0.0-dev.30
### Flutter info
```shell
╰─>$ flutter doctor -v
[!] Flutter (Channel stable, 3.13.8, on macOS 14.2 23C64 darwin-arm64, locale zh-Hans-CN)
• Flutter version 3.13.8 on channel stable at /Users/weixuefeng/tools/flutter/3.13.8
! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/3.0.5/libexec/bin/dart, which is not inside your current Flutter SDK checkout at
/Users/weixuefeng/tools/flutter/3.13.8. Consider adding /Users/weixuefeng/tools/flutter/3.13.8/bin to the front of your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 6c4930c4ac (6 个月前), 2023-10-18 10:57:55 -0500
• Engine revision 767d8c75e8
• Dart version 3.1.4
• DevTools version 2.25.0
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/weixuefeng/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15E204a
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
[✓] VS Code (version 1.88.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.86.0
[✓] Connected device (3 available)
• qqqq (mobile) • CBF3D78C-E836-4CCE-AC2C-9E530EBEF0E4 • ios • com.apple.CoreSimulator.SimRuntime.iOS-17-4 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 14.2 23C64 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 123.0.6312.107
[✓] Network resources
• All expected network resources are available.
### Version of `clang++`
Apple clang version 15.0.0 (clang-1500.3.9.4)
### Additional context
╰─>$ rustup show
Default host: aarch64-apple-darwin
rustup home: /Users/weixuefeng/.rustup
installed toolchains
stable-aarch64-apple-darwin (default)
nightly-aarch64-apple-darwin
installed targets for active toolchain
aarch64-apple-darwin
aarch64-apple-ios
aarch64-apple-ios-sim
x86_64-apple-ios
active toolchain
stable-aarch64-apple-darwin (default)
rustc 1.77.1 (7cf61ebde 2024-03-27)
Hi! Thanks for opening your first issue here! 😄
Hi, it seems that cargo install
fails to compile things like proc-macro2
, which looks like a general Rust/cargo issue.
console.app logs:
ASP: Security policy would not allow process: 29270, /private/tmp/cargo-installYMH2Lx/release/build/serde-d23a0ad27943c223/build-script-build
。。。
unable to get a dev_t for store 1795162192.
So it does look like general Rust/cargo issue. What about trying to ask on rust forum / stackoverflow / github etc
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new issue.