-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Internal Compiler Error after setting flag "-L/usr/local/lib" #11195
Comments
The sequence of events that would lead to this error are:
Right now this is an assertion that I used when debugging the introduction of rlibs, but I don't think that it's ok to override that assertion. If you've got /usr/local/lib as the installation directory for rust, then this is probably picking up the libstd that is used by rustc itself, and not the target libstd which you're supposed to be linking against. All in all, this is correctly an error today, although This should certainly not actually be an error. We advertise rust as being installable to /usr/local/lib, (or /usr/lib), and it looks like that doesn't quite work. This would need a resolution of #11145 to make further progress on this issue. In the meantime, I would sadly recommend installing rustc itself not to /usr/local/lib, but you can continue to install all other rust libraries to /usr/local/lib. |
Why can't rustc be statically compiled? |
This no longer ICEs. Instead it complains about multiple matching libraries.
|
When multiple candidates for a library are found, if one (and only one) candidate lives in the target library path, prioritize that one. This allows `rustc -L /usr/local/lib lib.rs` to compile successfully, whereas today it complains about multiple candidates for e.g. libstd. Fixes rust-lang#13733, rust-lang#11195.
Today, this gives me no error. Closing. |
…d, r=Manishearth fix: false positive for `option_env!` in `ifs_same_cond` Clippy had a false positive for with `ifs_same_cond` when two if-let expressions have an `option_env!` macro. The fix is similar to the `env!` macro fix. The following example had a clippy error: ```rust if let Some(env1) = option_env!("ENV1") { // ... } else if let Some(env2) = option_env!("ENV2") { // ... } ``` See https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=01b85c61b56ddd900117fb247af04824 changelog: [`ifs_same_cond`]: fix false positive when using `option_env!` in if-let expressions.
I observe this error on Mac OSX 10.9.
Note that /usr/local/lib is the installation directory for Rust.
I ran into this error when I was trying to built rust-zmq, which requires linking against zmq.dylib, which is also installed in /usr/local/lib.
The text was updated successfully, but these errors were encountered: