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

Does not work with ~/.cargo/bin not being the most important path #475

Closed
nagisa opened this issue May 16, 2016 · 4 comments
Closed

Does not work with ~/.cargo/bin not being the most important path #475

nagisa opened this issue May 16, 2016 · 4 comments

Comments

@nagisa
Copy link
Member

nagisa commented May 16, 2016

It manifests itself in two ways:

$ ~/.cargo/bin/rustup run nightly cargo build --release
   Compiling permutohedron v0.2.1
   Compiling itertools v0.4.13
   Compiling fixedbitset v0.1.0
error: the crate `std` has been compiled with rustc 1.10.0-nightly (d91f8ab0f 2016-05-07), which is incompatible with this version of rustc [E0514]
help: consider removing the compiled binaries and recompiling with your current version of rustc
error: the crate `core` has been compiled with rustc 1.10.0-nightly (d91f8ab0f 2016-05-07), which is incompatible with this version of rustc [E0514]
help: consider removing the compiled binaries and recompiling with your current version of rustc
error: the crate `collections` has been compiled with rustc 1.10.0-nightly (d91f8ab0f 2016-05-07), which is incompatible with this version of rustc [E0514]
help: consider removing the compiled binaries and recompiling with your current version of rustc
error: the crate `rustc_unicode` has been compiled with rustc 1.10.0-nightly (d91f8ab0f 2016-05-07), which is incompatible with this version of rustc [E0514]
help: consider removing the compiled binaries and recompiling with your current version of rustc
error: the crate `alloc` has been compiled with rustc 1.10.0-nightly (d91f8ab0f 2016-05-07), which is incompatible with this version of rustc [E0514]
help: consider removing the compiled binaries and recompiling with your current version of rustc
error: the crate `rand` has been compiled with rustc 1.10.0-nightly (d91f8ab0f 2016-05-07), which is incompatible with this version of rustc [E0514]
help: consider removing the compiled binaries and recompiling with your current version of rustc
error: the crate `libc` has been compiled with rustc 1.10.0-nightly (d91f8ab0f 2016-05-07), which is incompatible with this version of rustc [E0514]
help: consider removing the compiled binaries and recompiling with your current version of rustc
error: the crate `alloc_jemalloc` has been compiled with rustc 1.10.0-nightly (d91f8ab0f 2016-05-07), which is incompatible with this version of rustc [E0514]
help: consider removing the compiled binaries and recompiling with your current version of rustc
error: the crate `std` has been compiled with rustc 1.10.0-nightly (d91f8ab0f 2016-05-07), which is incompatible with this version of rustc [E0514]
help: consider removing the compiled binaries and recompiling with your current version of rustc
error: the crate `core` has been compiled with rustc 1.10.0-nightly (d91f8ab0f 2016-05-07), which is incompatible with this version of rustc [E0514]
help: consider removing the compiled binaries and recompiling with your current version of rustc
error: the crate `collections` has been compiled with rustc 1.10.0-nightly (d91f8ab0f 2016-05-07), which is incompatible with this version of rustc [E0514]
help: consider removing the compiled binaries and recompiling with your current version of rustc
error: the crate `rustc_unicode` has been compiled with rustc 1.10.0-nightly (d91f8ab0f 2016-05-07), which is incompatible with this version of rustc [E0514]
help: consider removing the compiled binaries and recompiling with your current version of rustc
error: the crate `alloc` has been compiled with rustc 1.10.0-nightly (d91f8ab0f 2016-05-07), which is incompatible with this version of rustc [E0514]
help: consider removing the compiled binaries and recompiling with your current version of rustc
error: the crate `rand` has been compiled with rustc 1.10.0-nightly (d91f8ab0f 2016-05-07), which is incompatible with this version of rustc [E0514]
help: consider removing the compiled binaries and recompiling with your current version of rustc
error: the crate `libc` has been compiled with rustc 1.10.0-nightly (d91f8ab0f 2016-05-07), which is incompatible with this version of rustc [E0514]
help: consider removing the compiled binaries and recompiling with your current version of rustc
error: the crate `alloc_jemalloc` has been compiled with rustc 1.10.0-nightly (d91f8ab0f 2016-05-07), which is incompatible with this version of rustc [E0514]
help: consider removing the compiled binaries and recompiling with your current version of rustc
error: aborting due to 8 previous errors
error: the crate `std` has been compiled with rustc 1.10.0-nightly (d91f8ab0f 2016-05-07), which is incompatible with this version of rustc [E0514]
help: consider removing the compiled binaries and recompiling with your current version of rustc
error: the crate `core` has been compiled with rustc 1.10.0-nightly (d91f8ab0f 2016-05-07), which is incompatible with this version of rustc [E0514]
help: consider removing the compiled binaries and recompiling with your current version of rustc
error: the crate `collections` has been compiled with rustc 1.10.0-nightly (d91f8ab0f 2016-05-07), which is incompatible with this version of rustc [E0514]
help: consider removing the compiled binaries and recompiling with your current version of rustc
error: the crate `rustc_unicode` has been compiled with rustc 1.10.0-nightly (d91f8ab0f 2016-05-07), which is incompatible with this version of rustc [E0514]
help: consider removing the compiled binaries and recompiling with your current version of rustc
error: the crate `alloc` has been compiled with rustc 1.10.0-nightly (d91f8ab0f 2016-05-07), which is incompatible with this version of rustc [E0514]
help: consider removing the compiled binaries and recompiling with your current version of rustc
error: the crate `rand` has been compiled with rustc 1.10.0-nightly (d91f8ab0f 2016-05-07), which is incompatible with this version of rustc [E0514]
help: consider removing the compiled binaries and recompiling with your current version of rustc
error: the crate `libc` has been compiled with rustc 1.10.0-nightly (d91f8ab0f 2016-05-07), which is incompatible with this version of rustc [E0514]
help: consider removing the compiled binaries and recompiling with your current version of rustc
error: the crate `alloc_jemalloc` has been compiled with rustc 1.10.0-nightly (d91f8ab0f 2016-05-07), which is incompatible with this version of rustc [E0514]
help: consider removing the compiled binaries and recompiling with your current version of rustc
Build failed, waiting for other jobs to finish...
error: aborting due to 8 previous errors
error: aborting due to 8 previous errors
error: Could not compile `permutohedron`.

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

when there’s a local copy of rustc in /usr/

and

$ ~/.cargo/bin/rustup run nightly rustc --version
rustc 1.10.0-nightly (5ebe41835 2016-05-15)                 
$ ~/.cargo/bin/rustup run nightly cargo --version
error: Could not execute process `rustc -vV` (never executed)

Caused by:
  No such file or directory (os error 2)

when the local copy is removed.

@brson
Copy link
Contributor

brson commented May 17, 2016

If we want rustup to take precedence over the system rustc (which may be the right thing to do), then the setup_mode will need to prepend it to the PATH and so will the proxies.

@brson
Copy link
Contributor

brson commented Aug 23, 2016

Currently setup prepends the ~/.cargo/bin path, and the proxies append ~/.cargo/bin and the toolchain path.

Offhand I can't remember why the proxies append instead of prepend, and I can't think of a reason, so let's just change it and see what happens! Modify Toolchain::set_ldpath and include a link to this issue so I don't forget again.

@Diggsey
Copy link
Contributor

Diggsey commented May 4, 2017

This should have been fixed in #707

@Diggsey Diggsey closed this as completed May 4, 2017
@Kouloum04
Copy link

install ~/.cargo/bin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants