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
Unable to statically link a native library if there a dynamic library in the same directory. #124462
Comments
I can confirm that this does not happen in my Linux with rustc 1.77.2. @devxu Could you try this in a different MacOS environment other than yours? (BTW, I don't think the
I-ICE
|
@rustbot label -I-ICE |
On Linux it is possible to use rust/compiler/rustc_codegen_ssa/src/back/linker.rs Lines 243 to 253 in 6be7b0c
|
I had the same problem with macos m3 |
Is there any way to temporarily resolve this? |
Very bad temporary solution, just in case anyone needs it, I'm putting it here, feel free to ignore my code. Hope this issue will be resolved soon. // build.rs
const APPLE: [&str; 2] = ["aarch64-apple-darwin", "aarch64-apple-ios"];
if APPLE.contains(&target.as_str()) {
fs::rename(
path.join("my.dylib"),
path.join("this.not.static.my.dylib"),
)
.unwrap();
println!("cargo:rustc-link-search={}", path.display());
} |
@kekeimiku In build.rs do these: |
Code
Meta
rustc --version --verbose
:Error output
The text was updated successfully, but these errors were encountered: