-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Cross-compiling fails with gcc-rs #4456
Comments
Hm Cargo nowadays shouldn't be setting |
I tried 0.20.0 and 0.21.0. It seems to be creating the system libdir path at https://github.com/rust-lang/cargo/blob/master/src/cargo/ops/cargo_rustc/context.rs#L288 and adding it to |
Oh interesting! You've got rustc installed at I didn't even realize we had that block, but yeah we probably shouldn't be setting that in |
Yes, this is the default setup on Gentoo. If it avoids setting |
As there hasn't been any activity here in over 6 months I've marked this as stale and if no further activity happens for 7 days I will close it. I'm a bot so this may be in error! If this issue should remain open, could someone (the author, a team member, or any interested party) please comment to that effect? The team would be especially grateful if such a comment included details such as:
Thank you for contributing! (The cargo team is currently evaluating the use of Stale bot, and using #6035 as the tracking issue to gather feedback.) If you're reading this comment from the distant future, fear not if this was closed automatically. If you believe it's still an issue please leave a comment and a team member can reopen this issue. Opening a new issue is also acceptable! |
As I didn't see any updates in 30 days I'm going to close this. Please see the previous comment for more information! |
I am unable to cross-compile via
cargo build --target
when projects usegcc-rs
if the host binutils has libraries in/usr/lib
and the cross-binutils libraries are elsewhere. It causes the cross-compiler programs to use the host libraries with bad results. Here is an example failure message:The problem is from cargo setting
LD_LIBRARY_PATH
with/usr/lib
(where/usr
is the--print=sysroot
value). It also adds that path before adding theLD_LIBRARY_PATH
from the environment, so it can't be overridden. I thought of specifying--sysroot
viaRUSTFLAGS
to change theLD_LIBRARY_PATH
value, butenv_args
incontext.rs
forbids this. (See #4423.)So far, I have only managed to get these builds working by either wrapping
rustc
in a script that adds--sysroot
, or by wrapping the cross-compilers in a script that unsetsLD_LIBRARY_PATH
. Am I missing a better way to handle this?The text was updated successfully, but these errors were encountered: