-
Notifications
You must be signed in to change notification settings - Fork 36
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
building cargo atop multirust fails, dyn link problems (Mac OS X) #43
Comments
Baffling to me as well on first glance. I've got a backlog of multirust bugs to fix and I'll try to get to this in the next couple of weeks. Let me know if it's blocking you or if you see it happen elsewhere. multirust has had trouble building cargo itself before. |
I did this on OS X to build Cargo with multirust successfully:
That works because Cargo's Makefiles set up DYLD_LIBRARY_PATH. If I try to execute the in-tree cargo directly while putting multirust's rustc on the path I get an error like yours
That's because it's using Cargo's own snapshot of cargo to do the build. It's not part of multirust and doesn't configure the environment to find the multirust-installed toolchain. Setting both
How are you invoking the cargo build? |
Hmm I think my wrapper script only mucks with |
@brson BTW, how did you find out the specific nightly to use to build cargo? I've often been flummoxed by my inability to figure out which version of rustc the head of cargo was last built upon. |
@pnkfelix Cargo has a file |
I have a similar problem with nrc/rustfmt. Executing the binary from the |
I'm going to close this; @brson's feedback gave me enough info to get cargo building, and I'm not sure there's something here that is actually actionable, at least from the point-of-view of multirust itself. |
Well, I reopened this because @killercup's description of his bug made me suspicious that rpath is not working as expected. |
@brson, come to think of it, I'm not sure my problem is actually about multirust. Using When executing the binary from The Rust libraries in multirust's toochains are not in a default path like I don't know how to work around this except for telling people to set their |
@killercup Yes, when you run the bin produced by cargo multirust isn't invoked, but multirust passes It's possible that Cargo is moving binaries around in a way that breaks |
BTW, if you want to configure the environment so that the dynamic linker works for a particular toolchain, |
I don't think it's working at all. Are there tests which exercise it? I don't see any of
For contrast, here's what I expect to see:
That does work, by setting DYLD_LIBRARY_PATH. Edit: I believe rust-lang/rust#17219 is about the same issue. |
Yes, rust-lang/rust#17219 seems to be the most likely culprit. |
Note that Cargo no longer builds build scripts dynamically so this issue may just be moot now. |
I am still seeing the incorrect lib paths in binaries
|
@seanjensengrey Perhaps this issue. |
Still reading the issue you linked, but I believe part of the problem I am seeing is |
Similar problem here: murarth/rusti#60 |
building cargo atop multirust on Mac OS X fails during build-script-build invocations
I do not know whether this is a cargo bug or a multirust one, to be honest, but it seemed troubling that the attempts to resolve
libstd
were not going through theDYLD_LIBRARY_PATH
and instead seemed to be going through ... what I think is an embeddedrpath
?(It is also weird that it seems like is using this path
x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libstd-4e7c5e5c.dylib
which looks like it must be coming from a local rust build, even though I am attempting to usemultirust
solely with thebeta
andnightly
channels ... perhaps that is a clue to something more deeply wrong in my setup...)The text was updated successfully, but these errors were encountered: