-
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
Add rustc flags for cross-compiling only #5411
Comments
@therealbstern yeah, it is indeed a bug in Cargo there there's no way to set It seems to me that Cargo should be able to build all those crates without fiddling with |
@matklad I don't use rustup at all, I installed rust using the tarball. This was suggested by others (out of band) as a cause for the problem. I am happy to believe that it is not. I too agree that the installation method should not be relevant. The reason I need to set According to @SimonSapin in the linked issue,
|
I believe this step should not be necessary, because libprocmacro lives in compiler's sysroot, and compiler should make sure that the linker picks it up. I've installed rust locally via tarball, and I am able to compile html5ever without setting LD_LIBRARY_PATH. Could you check that your installation has sysroot setup correctly? You can use Here's how it looks on my machine:
|
To give more details, I've installed rust by downloading the tarball from https://www.rust-lang.org/en-US/other-installers.html and running |
@therealbstern Could some other crate in your dependency graph be enabling the |
This is controlled by https://github.com/rust-lang/rust/blob/1.25.0/src/libproc_macro/Cargo.toml#L8 |
@matklad @SimonSapin: I don't have nightly installed, so I would think that it would crash the build if I needed it. Is there a |
@therealbstern and do you have |
@matklad I do. Here's what
Following through...
As @SimonSapin pointed out, note the lack of However, this detective work was of value, at least to me:
I apologize for wasting time on a search path problem. I do posit that there is an installer problem, since on x86_64, As mentioned in #5411 (comment), do you want an issue on |
Let's close this! Although the underlying issue in #4423 is different, the desirable feature of being able to specify separate
Probably! I would suggest searching for an existing issue at rust-lang/rust, and opening a new one if this wasn't reported before! |
I'm having the same problem as described in #3105, except that I'm not cross-compiling. (I'm opening a new issue because #4423 seems more focused upon cross-compiling, #3105 seems to be as well, and also #3105 was closed in favor of #4423).
Several crates that did not formerly need
-C rpath
for their custom build scripts now do, includinghtml5ever
,markup5ever
, andstring_cache
.I used the manual rust installation method, due to rust-lang/rustup#241 (I like having signatures of things checked before I install them.)
If I add
-C rpath
by hand to the command line for building the relevantbuild-script-build
binaries (acquired fromcargo build -vv
), my subsequentcargo build
works.-C rpath
isn't needed for the overall build: it certainly works if I put it inRUSTFLAGS
but I don't need it for any target output other than thebuild-scripts-build
binaries identified above. My final binaries don't require it, for example.I'm on
x86_64-unknown-linux-gnu
and using:cargo 0.26.0 (41480f5cc 2018-02-26)
rustc 1.25.0 (84203cac6 2018-03-25)
The text was updated successfully, but these errors were encountered: