Skip to content
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

Giving access to multiple users #920

Closed
anthonyjclark opened this issue Jan 11, 2017 · 1 comment
Closed

Giving access to multiple users #920

anthonyjclark opened this issue Jan 11, 2017 · 1 comment

Comments

@anthonyjclark
Copy link

Hello, I would like to install Rust under my user directory and then give access to other users in the same group. I am close to getting the results that I want, but I am getting stuck. I have done the following:

  1. Installed rust with the rustup script.
  2. Given execute (chmod g+x) permissions to the directories along the chain .rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin
  3. Given execute permissions to the directories along the chain .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib
  4. Given execute permissions to the directories along the chain .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/

On the other user's end, I did the following:

  1. Added the binaries to their path: export PATH="/home/aclark/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin:/home/aclark/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/:$PATH"
  2. Added the compiler's runtime libraries and the Rust libraries to their library path: export LD_LIBRARY_PATH="/home/aclark/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib:/home/aclark/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/:$LD_LIBRARY_PATH"

The problem seems to be that rustc cannot find the rust standard libraries. The following process gives an error:

$ cargo new hello_world --bin
     Created binary (application) `hello_world` project

$ cd hello_world/

$ cargo run
   Compiling hello_world v0.1.0 (file:///home/aclark2/hello_world)
error[E0463]: can't find crate for `std`

error: aborting due to previous error

error: Could not compile `hello_world`.

To learn more, run the command again with --verbose.

$ cargo run --verbose
   Compiling hello_world v0.1.0 (file:///home/aclark2/hello_world)
     Running `rustc src/main.rs --crate-name hello_world --crate-type bin -g -C metadata=c19af5a8f8086d2b --out-dir /home/aclark2/hello_world/target/debug --emit=dep-info,link -L dependency=/home/aclark2/hello_world/target/debug/deps`
error[E0463]: can't find crate for `std`

error: aborting due to previous error

error: Could not compile `hello_world`.

Caused by:
  process didn't exit successfully: `rustc src/main.rs --crate-name hello_world --crate-type bin -g -C metadata=c19af5a8f8086d2b --out-dir /home/aclark2/hello_world/target/debug --emit=dep-info,link -L dependency=/home/aclark2/hello_world/target/debug/deps` (exit code: 101)

I also tried the following to no avail:

$ rustc -L/home/aclark/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/ main.rs
error[E0463]: can't find crate for `std`

error: aborting due to previous error

If you have any recommendations on how to tell rustc where to find the standard library I would appreciate it. Thanks!

@Diggsey
Copy link
Contributor

Diggsey commented May 5, 2017

Dupe of #313

@Diggsey Diggsey closed this as completed May 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants