The Cargo README states the following:
Compiling from Source
Cargo requires the following tools and packages to build:
pythoncurl(on Unix)cmake- OpenSSL headers (only for Unix, this is the
libssl-devpackage on ubuntu)cargoandrustcFirst, you'll want to check out this repository
git clone --recursive https://github.com/rust-lang/cargo cd cargoWith
cargoalready installed, you can simply run:cargo build --releaseOtherwise, you can also use a more traditional approach:
./configure make make install
It indicates that Cargo is a dependency for building Cargo, but also seems to indicate that if Cargo is not installed then the method starting with ./configure should work.
When I clone that repo and run ./configure I get an error
...
configure: found cmake
configure: found make
configure: recreating config.tmp
configure:
configure: processing ./configure args
configure:
configure: CFG_PREFIX := /usr/local
configure: CFG_LOCAL_RUST_ROOT :=
configure: CFG_CARGO := cargo
configure: CFG_RUSTC := rustc
configure: CFG_RUSTDOC := rustdoc
configure: CFG_CARGO :=
configure: error: needed, but unable to find any of: CFG_CARGO cargo
Does this mean I can't build Cargo from source without having Cargo installed? Maybe an argument to configure is missing?
I built Rust from source because I am not a privileged user on this system and have the installation in my user directory.