-
Notifications
You must be signed in to change notification settings - Fork 888
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
Binaries built with rustup rustc that link to dynamic libs fail to run #765
Comments
This is also true in Linux. If I try to run an RLS build with rustup's version of nightly, I get:
|
I've looked into this a little, and I don't think there's anything more This is the situation:
The problem is that the RLS has an implicit dependency on these shared libraries. For developing the RLS, it's sufficient to use Ideally, the RLS shouldn't continue to depend on the rust installation after it has been built. The best way to do this is to copy the shared libraries on which it depends into the output directory, and compile the binary with a relative RPATH, to produce an entirely self-contained set of binaries. This is preferable to hard-coding the I imagine that in future the RLS will be distributed by rustup as just another component of the rust installation. In that case the relative RPATH solution makes even more sense, since this is exactly how |
This sounds like a good solution. How would we automate this? Can we instruct Cargo to do it declaratively or do we need to do this in the build script? Is there an example doing this already we can look at? |
cc @alexcrichton for ^ |
IIRC, you'd have to do the copying in a build script, and set the rpath in the profile section http://doc.crates.io/manifest.html#the-profile-sections |
Duplicate of #350 ? |
If you build the rls using the rustup rust nighty, it will build successfully, but it won't properly set up the rpath. This causes the resulting rls to fail to run correctly on at least macOS and Windows (and possibly other platforms).
The text was updated successfully, but these errors were encountered: