Closed
Description
Passing --verbose
to ./x.py build
and setting build.verbose
in config.toml
does not cause --verbose
to be passed to cargo
, which results in a non-verbose build.
I am trying to build rust-1.17.0 as follows:
cat <<- EOF > "${S}"/config.toml
[llvm]
optimize = $(toml_usex !debug)
release-debuginfo = $(toml_usex debug)
assertions = $(toml_usex debug)
[build]
build = "${CTARGET}"
host = "${CTARGET}"
target = "${CTARGET}"
cargo = "${WORKDIR}/${cargo_stage0}/cargo/bin/cargo"
rustc = "${WORKDIR}/${rustc_stage0}/rustc/bin/rustc"
docs = $(toml_usex doc)
submodules = false
python = "${EPYTHON}"
locked-deps = true
vendor = true
verbose = 2
[install]
prefix = "${EPREFIX}/usr"
libdir = "$(get_libdir)/${P}"
docdir = "share/doc/${P}"
mandir = "share/${P}/man"
[rust]
optimize = $(toml_usex !debug)
debuginfo = $(toml_usex debug)
debug-assertions = $(toml_usex debug)
use-jemalloc = $(toml_usex jemalloc)
default-linker = "${linker}"
default-ar = "${archiver}"
rpath = false
[target.x86_64-unknown-linux-gnu]
cc = "${c_compiler}"
cxx = "${cxx_compiler}"
llvm-config = "${llvm_config}"
EOF
./x.py build --verbose --config="${S}"/config.toml
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
alexcrichton commentedon May 20, 2017
@devurandom just to confirm, this is the build for rustbuild itself? I know that location doesn't handle
--verbose
for Cargo, but all others should.devurandom commentedon May 20, 2017
@alexcrichton I was trying to build rustc.
You can find the complete, but WIP ebuild in my Gentoo overlay. It is based on the Gentoo ebuild for 1.16.0, but tries to adapt to the changes in the build-system from 1.16 to 1.17 and switch from Makefiles to
x.py
.alexcrichton commentedon May 21, 2017
@devurandom do you have logs or a gist of the wrong behavior, maybe with comments as to what the expected correct behavior is?
devurandom commentedon May 21, 2017
E.g. when I run
cargo build --verbose
, I see therustc
commandline for every package being build. I would like to see the same when building Rust using./x.py
, but I can't convince the build-system to show it to me (s.a.).This makes it very hard for me to debug another issue, where the bootstrapping
rustc
complains that it can't find crate forstd
(error[E0463]
). I was hoping that seeing the actual invocation ofrustc
would give me a fresh idea what's going on there.alexcrichton commentedon May 22, 2017
Do you have logs of what's going on? The logs in the linked thread there look like
--verbose
is working?devurandom commentedon May 23, 2017
Build log when using the current ebuild: https://gist.github.com/devurandom/1223ee18f46c6ed866b386ec7009dbbb
You are right that, after bootstrapping, the build was verbose in the logs linked from the forums post. But even there you will notice that the bootstrap process is not verbose (see lines 108 to 118 of the Gist). It just so happens that at the time I posted that Gist I tricked the bootstrap process into succeeding, which is why most of what you see is output of later stages of the build.
The major difference between the ebuild posted in the Gist and the current version of the ebuild is that the former uses the system Rust compiler to bootstrap (which is why it works during bootstrapping, but fails later), while the latter uses the Rust compiler it downloads from https://static.rust-lang.org/dist/rustc-1.16.0-x86_64-unknown-linux-gnu.tar.gz (which shows the libstd issue already during bootstrapping).
alexcrichton commentedon May 23, 2017
Ok thanks for the clarification! In that case I believe the fix would just go somewhere around here
devurandom commentedon May 24, 2017
Thanks for the hint. I came across that part about a hundred times, but failed to make the connection. Please find the fix in #42186.
On the other topic: Is it possible to make Cargo /
rustc
output a list of directories where it searched for a "crate"? I tried settingLD_LIBRARY_PATH
andRUSTC_SYSROOT
, but I cannot makerustc
pickup thelibstd-13f36e2630c2d79b.so
inrustc-1.16.0-x86_64-unknown-linux-gnu/rustc/lib
, so I would like to know what exactly (i.e. actual library name) it is searching where (which sysroot and library path does it see).Rollup merge of rust-lang#42186 - devurandom:fix/bootstrap-verbose, r…
Rollup merge of rust-lang#42186 - devurandom:fix/bootstrap-verbose, r…
Rollup merge of rust-lang#42186 - devurandom:fix/bootstrap-verbose, r…
Rollup merge of rust-lang#42186 - devurandom:fix/bootstrap-verbose, r…
Rollup merge of rust-lang#42186 - devurandom:fix/bootstrap-verbose, r…