-
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
cargo not found when building rust-1.15.0 from source #39540
Comments
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) |
@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) \
)
endef You 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 |
Well, seems the That
The next set of errors are on the stage1 for |
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; \
)
endef Build 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 |
Yes the current |
Got it, thanks! |
@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 |
Is there something left to solve here? I'm not seeing anything specific... |
I'm going to go ahead and close, please let us know if there's still something pending here. |
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?
The text was updated successfully, but these errors were encountered: