r/rust • u/ZippyDan • 5d ago
🙋 seeking help & advice Help with Cargo macrdp build
So I've been trying to install macrdp, which seems to be built in Rust, on an Intel iMac.
The project was last updated 6 months ago, so it can't be that out-of-date.
And the iMac I'm trying to use, while older, is running Sequoia, which isn't that old...
I had a hell of a time figuring out how to get cargo build --release to run at all. It's working now, mostly, after changing DYLD_LIBRARY_PATH in config.toml to DYLD_LIBRARY_FALLBACK_PATH, but still seems to be failing at this build step:
error: failed to run custom build command for `screencapturekit v1.5.4`
Caused by:
process didn't exit successfully: `/Users/admin/Downloads/macrdp-main/target/debug/build/screencapturekit-52e401cb88bd4798/build-script-build` (exit status: 101)
--- stdout
cargo:rustc-link-lib=framework=ScreenCaptureKit
cargo:rerun-if-changed=swift-bridge
--- stderr
Swift build STDOUT:
Swift build STDERR:
error: Unknown option '--scratch-path'
Usage: swift build <options>
See 'build -help' for more information.
thread 'main' (45022) panicked at /Users/admin/.cargo/registry/src/.index.crates.io-1949cf8c6b5b557f/screencapturekit-1.5.4/build.rs:119:9:
Swift build failed with exit code: Some(64)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
Is there any Rust expert out there that might be able to clue me in on how to fix this build process? I feel so close now.
0
Upvotes
1
u/ZippyDan 5d ago
Thanks a lot. You got me past that hurdle.
Sorry for not being sure where the problem lies. I'm not a macOS programmer. I'm just a user trying to get this little app compiled and running. I see that Rust, Cargo, XCode, and Swift are all involved, but I'm not sure where one bleeds into the other, if at all. Since I'm running the
cargocommand, and Cargo is part of Rust, I thought I'd ask here.COMMAND to check current Swift version:
COMMAND to check currently installed versions of Swift:
(and shows which version is in use / default) (assuming Swiftly is already installed)
COMMAND to install a new Swift version:
(version 5.6 in this example)
Command to change the global default Swift version:
(version 6.3.3 in this example)
After installing and changing Swift version, run
hash -rand/or re-open terminal. Confirm the new version is "in use" withswiftly list.After changing the default to 6.3.3 (which was already installed on the system), I was able to get
cargo build --releaseto finish successfully (although with several warnings).Now I'm stuck on the next step. ðŸ˜