-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Rust source make install fails due to missing vendor folder #40108
Comments
As that info message quite helpfully mentioned, because you're doing that command under |
Thanks @retep998 . I've uninstalled the default rust installation (from rustup) are restarted the whole process and unfortunately ended up with the same error. If I run
What is this command you're referring to? Appreciate the help. |
Without |
I believe it might be |
Appreciate @retep998 found it however I need to to do some digging how to call it in order to generate the missing vendor files. Thanks. |
Note that if you get the source code from the official tarballs, the vendor directory is populated: https://static.rust-lang.org/dist/2017-02-26/rust-src-nightly.tar.gz src/vendor is just not checked into git, to not pollute the history as @retep998 said. Of course, one could argue whether this is a bug or not, whether configure is supposed to access the internet, or whether having tools rely on the internet is a good thing, but we could certainly have a better error message, and possibly have a option to rely on the internet via the configure/make interface as well. |
/cc @eddyb who implemented this behavior |
@steveklabnik The @itarato Does |
@eddyb I did a few tries with |
It's not supposed to build anything |
@eddyb the guards here are very much intentional to prevent Cargo from spraying root-owned files in Without these guards there's a very high risk that Cargo decides to download crates from crates.io and cache them in @itarato thanks for the report! This is definitely a bug that we should fix. |
Oh, so no precautions were taken for |
The "easiest" fix for this is to somehow just detect that a normal @eddyb precautions have always been taking on |
@alexcrichton Can't we trigger it on the first EDIT: nevermind, we run |
@eddyb oh yes that's true, we could pass |
As I seen, command
return error
And next attempts returns:
Command (without sudo) works after manually changed user and group for
|
@alexcrichton Uh oh I think this issue slipped, it should've gotten tagged and assigned :( |
If it need I can create a new issue. |
Is there an easy workaround for gathering the vendor directory that corresponds with a given revision? |
@cbcrouch one possible workaround is:
|
@cbcrouch you can try to do |
Hmm, is this really the officially endorsed way of building rust? |
@est31 as far as I can tell it is and it used to work, but it got broken during rustbuild migration and no one cared enough to fix it since then |
Has this issue been fixed yet? I get the exact problem when following the build steps mentioned in the README. I am currently on a macOS Sierra box. EDIT: Okay, so this is what worked for me in the end:
|
Tagging as T-doc because it seems to be a docs issue. |
I ran into this issue today on macOS. @timmyjose's workaround fixed it. ~ ❯❯❯ sw_vers
ProductName: Mac OS X
ProductVersion: 10.11.6
BuildVersion: 15G1611 |
I, too am suffering from this problem. Changing the ownership on the
Running without
Rust builds fine: I have an up to date Unless someone here has a specific fix, I might try digging into the build to see what could be going wrong. Despite it seeming semi-resolved/workarounded, it seems pretty clear to me there's still some sort of problem here. |
I'm using Ubuntu 17.10 and none of the above solutions worked for me. I've found a simple workaround, which solves all the issues I've faced:
Now all the Rust tools use custom built rustc, you can even use It seems, that Rustup is smart enough to use tools from last used default toolchain if they are not present among built ones, like cargo or rust-fmt. Make sure, that last default toolchain is the newest nightly. |
@CodeSandwich's #40108 (comment) worked the best for me on Ubuntu -- except that $ ./x.py install
Updating only changed submodules
Submodules updated in 0.03 seconds
Finished dev [unoptimized] target(s) in 0.26s
thread 'main' panicked at 'could not canonicalize ~/.rustup/toolchains/dev: Os { code: 2, kind: NotFound, message: "No such file or directory" }', libcore/result.rs:945:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
failed to run: /rust/build/bootstrap/debug/bootstrap install
Build completed unsuccessfully in 0:00:01 Providing an absolute path to |
Add additional instructions when `sudo ./x.py install` fails to complete the build. This resolves issues rust-lang#40108 and rust-lang#49269.
Update build instructions in README.md Add additional instructions when `sudo ./x.py install` fails to complete the build. This resolves issues rust-lang#40108 and rust-lang#49269. r? @steveklabnik
Update build instructions in README.md Add additional instructions when `sudo ./x.py install` fails to complete the build. This resolves issues rust-lang#40108 and rust-lang#49269. r? @steveklabnik
Update build instructions in README.md Add additional instructions when `sudo ./x.py install` fails to complete the build. This resolves issues rust-lang#40108 and rust-lang#49269. r? @steveklabnik
Yep, thanks! |
Update cargo-vendor usage This contains a variety of updates to clean up the usage of cargo-vendor. - Remove the install step for the old cargo-vendor now that it is built-in to cargo and available in the stage0 install. - Update installation instructions, dealing with vendoring. The current instructions of running `sudo ./x.py install` is broken, it will almost always fail (since the vendor directory doesn't exist). Since the steps for properly handling this are numerous, I'm recommending removing the suggestion to use `sudo` altogether. - If the sudo-forced-vendoring detects that the vendor directory is not available, abort with instructions on how to fix. - Now that cargo-vendor is built-in, automatically run it if it looks like it is needed. - Update instructions on how to install cargo. - Remove the unused markdown link references in README/CONTRIBUTING. This reverts most of #44935. These references don't do anything if they are unused. Closes #49269 cc #61142 #48771 #40108
Update cargo-vendor usage This contains a variety of updates to clean up the usage of cargo-vendor. - Remove the install step for the old cargo-vendor now that it is built-in to cargo and available in the stage0 install. - Update installation instructions, dealing with vendoring. The current instructions of running `sudo ./x.py install` is broken, it will almost always fail (since the vendor directory doesn't exist). Since the steps for properly handling this are numerous, I'm recommending removing the suggestion to use `sudo` altogether. - If the sudo-forced-vendoring detects that the vendor directory is not available, abort with instructions on how to fix. - Now that cargo-vendor is built-in, automatically run it if it looks like it is needed. - Update instructions on how to install cargo. - Remove the unused markdown link references in README/CONTRIBUTING. This reverts most of #44935. These references don't do anything if they are unused. Closes #49269 cc #61142 #48771 #40108
It seems the [install] entrypoint is what it needed, it worked after this! |
I was building Rust (branch master) from source.
./configure
andmake
completed without any problems, howeversudo make install
immediately fails with the following problem:The
error: failed to load source for a dependency on 'toml'
line is complaining about seemingly rangom things, such as cmake, toml or getopts. However the last line (failed to read root of directory source: /mnt/shared/Checkout/rust/src/vendor
) is odd as it doesn't have anysrc/vendor
folder and this kind of error is more likely on Rust projects using cargo.toml.For reference, my build env:
I also have already installed via the official rustup script.
So far no luck getting closer to what would cause this. Do you have any idea where to look for?
The text was updated successfully, but these errors were encountered: