-
Notifications
You must be signed in to change notification settings - Fork 240
Rust Linking Issues for Windows and Headless #2521
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
Comments
If What version/chanel of cargo are you using? |
I'm experiencing this as well on both macos and windows. Using rust nightly through cargo (up to date as of yesterday). Using up to date dev binary ninja and up to date dev branch of binaryninja-api for the rust crate. From MacOS:
|
Whoops, my bad! The expected behavior is to compile haha. I am using:
|
I'm still confirming this, but I think this is a regression in cargo. Everything works on my Mac on 1.53.0-nightly, and everything was working on Linux for me before I updated nightly (not sure from what version). Seems like it's no longer propagating the linker arguments from binaryninjacore-sys. |
Sure enough, if I run I'll see if there's a provided workaround from Rust. |
Unfortunately it seems that we were relying on a bug, and that any ability for a crate to provide linking dependencies for crates that import it is an intended anti-pattern: see rust-lang/cargo#9554. The only solution at the moment seems to make all dependants include their own build.rs until rpath has better first-class support. I'll push a rust/examples/template. |
Binary Ninja Version - Latest Dev API
Bug Description
For the Rust API, whenever I try to create a Headless build (or any build on Windows), there are linking issues. Specifically, it cannot link to any function from the C API This is whenever I tell Cargo that a dependency is Binary Ninja via Git or Locally.
A Linux plugin doesn't have these linking issues.
To Reproduce
Steps to reproduce the behavior:
cargo build
Expected behavior
Compile a binary (for headless and windows plugin)
Version and Platform (required):
The text was updated successfully, but these errors were encountered: