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

Bootstrapping cargo - instructions unclear #3437

Closed
vojtechkral opened this issue Dec 21, 2016 · 11 comments · Fixed by #3458
Closed

Bootstrapping cargo - instructions unclear #3437

vojtechkral opened this issue Dec 21, 2016 · 11 comments · Fixed by #3458
Labels

Comments

@vojtechkral
Copy link
Contributor

vojtechkral commented Dec 21, 2016

Hi,
the readme says:

If, however, you have neither rustc nor cargo previously installed you can run:

python -B src/etc/install-deps.py
./configure --local-rust-root="$PWD"/rustc
make
make install

This seems to be outdated.
The src/etc/install-deps.py doesn't seem to exist anymore.
Also, running configure says:

configure: CFG_CARGO            :=  
configure: error: needed, but unable to find any of: CFG_CARGO cargo

I'm wondering now how does one compile cargo on a system without cargo.
Thanks!

@alexcrichton
Copy link
Member

Oh this is actually just a case where we forgot to update the docs! Cargo now requires a previous installation of Cargo/rustc to be present to build Cargo.

@starius
Copy link

starius commented Dec 26, 2016

What to do if I do not want to run cargo binaries not built by myself?

bors added a commit that referenced this issue Dec 26, 2016
Update README build instructions

Closes #3437
@alexcrichton
Copy link
Member

Cargo requires a Rust compiler to build, and all Rust compilers should be coupled with Cargo, so you can run that Cargo you've got on hand.

@vojtechkral
Copy link
Contributor Author

@starius There's @dhuseby/cargo-bootstrap

@starius
Copy link

starius commented Dec 29, 2016

@vojtechkral Thanks!
I wrote a script installing Rust and Cargo locally:
https://github.com/starius/config/blob/master/.bin/install-rust

@cnd
Copy link

cnd commented Jan 7, 2017

all Rust compilers should be coupled with Cargo sounds problematic/complicated to package cargo and rust in modular way, seems like in source based distribution we will need some separate rust binary bootstrap with compiler and cargo and then rust package and cargo package will depend on that bootstrap package, I wish configure to be smarter and download binaries it needs in case when cargo is not installed but that's not correct way either since build process shouldn't ideally download anything so maybe it's just some another headache for packaging.

@carlorosati
Copy link

carlorosati commented Feb 1, 2017

@alexcrichton

Cargo requires a Rust compiler to build, and all Rust compilers should be coupled with Cargo, so you can run that Cargo you've got on hand.

Which directory does cargo get installed into after ./configureing and make installing rustc?

find /tmp/cargo/../rustc-1.14.0/ -name cargo

revealed 3...

/tmp/cargo/../rustc-1.14.0/src/rust-installer/test/image3/bin/cargo
/tmp/cargo/../rustc-1.14.0/src/rust-installer/test/image-docdir2/share/doc/cargo
/tmp/cargo/../rustc-1.14.0/src/rust-installer/test/rust-installer-v2/test/image3/bin/cargo

Which one is it?

@alexcrichton
Copy link
Member

@carlorosati right now make install in the rust repo doesn't install Cargo (but it will eventually!)

@carlorosati
Copy link

@alexcrichton Temporarily I will be using the cargo release tar.

As of now, I cannot find these release tars documented anywhere on the rust website(s). Is there any plans on documenting these or are they meant sheerly for developers.

@alexcrichton
Copy link
Member

They're mostly just meant for developers currenlty

@Michele31415
Copy link

I understand that this is a bit old now but I just tried starius' script above and it failed thusly:

...
Submodules updated in 482.25 seconds
downloading https://static.rust-lang.org/dist/2019-12-18/rust-std-beta-sparcv9-sun-solaris.tar.gz
######################################################################### 100.0%
extracting /tmp/tmp.DYuS0c/build/cache/2019-12-18/rust-std-beta-sparcv9-sun-solaris.tar.gz
curl: (22) The requested URL returned error: 404

???

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

Successfully merging a pull request may close this issue.

7 participants