Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upcargo not found when building rust-1.15.0 from source #39540
Comments
This comment has been minimized.
This comment has been minimized.
|
It looks like you're running the build system against a directly downloaded release tarball, is that right? If so then it's not the same structure as a standard installation, so you'll have to manually configure where to find cargo (in the same way you're manually configuring where to find rustc presumably) |
This comment has been minimized.
This comment has been minimized.
|
@djc, I just run into this same problem too (we are using buildroot). If you take a look at the Your build script is probably hooking things up with something similar to: # old setup, uses an external bootstrap package
define HOST_RUST_BUILDROOT_CONFIGURE_CMDS
(cd $(@D); $(HOST_CONFIGURE_OPTS) \
$(HOST_RUST_BUILDROOT_CONF_ENV) \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix="$(HOST_DIR)/usr" \
--jemalloc-root="$(HOST_DIR)/usr/lib" \
--enable-local-rust \
--local-rust-root="$(HOST_RUST_BOOTSTRAP_DIR)/rustc" \
--disable-docs \
--disable-manage-submodules \
--sysconfdir="$(HOST_DIR)/etc" \
--localstatedir="$(HOST_DIR)/var/lib" \
--datadir="$(HOST_DIR)/usr/share" \
--infodir="$(HOST_DIR)/usr/share/info" \
$(HOST_RUST_BUILDROOT_CONF_OPTS) \
)
endefYou can get rid of the following two lines, along with the rust-bootstrap package. --enable-local-rust \
--local-rust-root="$(HOST_RUST_BOOTSTRAP_DIR)/rustc" \
cc: @elebihan, seems |
This comment has been minimized.
This comment has been minimized.
|
Well, seems the That
The next set of errors are on the stage1 for |
This comment has been minimized.
This comment has been minimized.
|
Took us quite a few days to get the compilation from source back to work with cross compilation support. Configurationdefine HOST_RUST_BUILDROOT_CONFIGURE_CMDS
(cd $(@D); $(HOST_CONFIGURE_OPTS) \
$(HOST_RUST_BUILDROOT_CONF_ENV) \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix="$(HOST_DIR)/usr" \
--disable-docs \
--disable-manage-submodules \
--sysconfdir="$(HOST_DIR)/etc" \
--localstatedir="$(HOST_DIR)/var/lib" \
--datadir="$(HOST_DIR)/usr/share" \
--infodir="$(HOST_DIR)/usr/share/info" \
$(HOST_RUST_BUILDROOT_CONF_OPTS) \
)
# The following is to get mips64 working
(cd $(@D); \
echo > config.toml; \
echo "[rust]" >> config.toml; \
echo "backtrace = false" >> config.toml; \
echo "[target.$(GNU_TARGET_NAME)]" >> config.toml; \
echo "cc = \"$(GNU_TARGET_NAME)-gcc\"" >> config.toml; \
echo "cxx = \"$(GNU_TARGET_NAME)-g++\"" >> config.toml; \
)
endefBuild step@alexcrichton, the We had to call the define HOST_RUST_BUILDROOT_BUILD_CMDS
(cd $(@D); \
$(HOST_MAKE_ENV) $(HOST_RUST_BUILDROOT_MAKE_ENV) $(HOST_DIR)/usr/bin/python \
src/bootstrap/bootstrap.py build $(if $(VERBOSE),-v); \
$(HOST_MAKE_ENV) $(HOST_RUST_BUILDROOT_MAKE_ENV) $(HOST_DIR)/usr/bin/python \
src/bootstrap/bootstrap.py build --keep-stage 1 --target $(GNU_TARGET_NAME) $(if $(VERBOSE),-v); \
)
endef |
This comment has been minimized.
This comment has been minimized.
|
Yes the current |
This comment has been minimized.
This comment has been minimized.
|
Got it, thanks! |
brson
added
the
T-tools
label
Feb 11, 2017
This comment has been minimized.
This comment has been minimized.
elebihan
commented
Feb 11, 2017
|
@icorderi I'll keep the rust-bootstrap and cargo-bootstrap packages for Buildroot, because they are needed for offline builds. I've updated the rust package to use rustbuild. The installation step is a bit tricky because rustbuild in 1.15.1 can't handle the "prefix" section of config.toml and the target libstd is not installed when using |
This comment has been minimized.
This comment has been minimized.
|
Is there something left to solve here? I'm not seeing anything specific... |
Mark-Simulacrum
added
A-build
and removed
T-tools
labels
May 24, 2017
This comment has been minimized.
This comment has been minimized.
|
I'm going to go ahead and close, please let us know if there's still something pending here. |
djc commentedFeb 4, 2017
I'm trying to update the Gentoo Linux for Rust to 1.15.0. After solving the problems in #39469 with the changes in #39471, I run into a different problem:
The command it's trying to execute is
['/var/tmp/portage/dev-lang/rust-1.15.0/work/rustc-1.14.0-x86_64-unknown-linux-gnu/rustc/bin/cargo', 'build', '--manifest-path', '/var/tmp/portage/dev-lang/rust-1.15.0/work/rustc-1.15.0-src/src/bootstrap/Cargo.toml', '--frozen'].That is, it tries to find cargo in the downloaded rustc-1.14.0-x86_64-unknown-linux-gnu, but doesn't find it there. How is this supposed to work with the new build system? Is this stuff documented anywhere?