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

rust-src component is incomplete in recent nightlies #41952

Closed
japaric opened this issue May 12, 2017 · 7 comments
Closed

rust-src component is incomplete in recent nightlies #41952

japaric opened this issue May 12, 2017 · 7 comments

Comments

@japaric
Copy link
Member

japaric commented May 12, 2017

The component is missing compiler-rt, jemalloc and other git submodules required to compile the std crate. This broke Xargo's use case of cross compiling the std crate.

Affected version: nightly-2017-05-04 and newer

Workaround

Switch to an older nightly version:

Known good version: nightly-2017-04-27 (still bisecting)

cc @brson @alexcrichton Do you know of any changes that may have caused this? It seems that the rust-src component has been trimmed to not include rustc source?

@alexcrichton
Copy link
Member

cc @cuviper, maybe related to #41546?

@cuviper
Copy link
Member

cuviper commented May 12, 2017

Yeah, it's surely related. If we want this to work, we'll have to augment std_src_dirs with more paths, and maybe do a full compilation in the distcheck.

At first glance, we'll need at least compiler-rt, jemalloc, and libbacktrace. I'm a little sad to add compiler-rt as that's 35M added to the current 8.4M. But 28M of that is compiler-rt/test, so maybe it can be pruned. There's only 1.5M in compiler-rt/lib/builtins.

@RalfJung
Copy link
Member

So, say I wanted to try and fix this -- how would I go about testing the fix? Is there a way to (a) create that rust-src package locally (./x.py dist src or ./x.py dist, I guess), and (b) tell rustup to install this package such that one could actually see whether xargo works now?

@ids1024
Copy link
Contributor

ids1024 commented May 24, 2017

(b) tell rustup to install this package such that one could actually see whether xargo works now?

You can set $XARGO_RUST_SRC to tell xargo where to find the source for Rust, instead of messing with rustup.

@cuviper
Copy link
Member

cuviper commented May 24, 2017

Yes, ./x.py dist src will suffice. I don't know how to get rustup to install it, but you can manually extract it and run ./install.sh --prefix ~/.rustup/toolchains/nightly-$TARGET.

@RalfJung
Copy link
Member

Thanks, sounds like I have two options to play with then :)
I'm still fighting other issues though; right now, a working xargo wouldn't even help. If I manage to solve them, I will come back to this one, but please don't hold your breath.

@RalfJung
Copy link
Member

All right, I got things to work with xargo on old Rust nightlies, so I submitted #42214 to fix this bug.

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue May 26, 2017
rust-src: include everything needed to compile libstd with jemalloc

I am not very happy about all this `Path::new`, but did not find a nice way to avoid it. Also, this shouldn't be very performance-critical.

With this patch, rust-src-1.19.0-dev.tar.gz grows from 1.4 to 3.1 MiB (new uncompressed size: 15.5 MiB). Not great, but shipping incomplete sources is also not great, and this is still much smaller than pre-rust-lang#41546. Excluding the entire `src/jemalloc/test` does not work, unfortunately; there is a file in there that is needed to build libstd. (And anyway there's just 190 KiB uncompressed left in that folder.)

In principle, we could try excluding the Rust test suite directories (that would be `libcore/tests` and `libcollection/tests`). I don't know enough about how this component is used to judge whether that would cause any problems. Anyway this is just 600 KiB uncompressed.

Fixes rust-lang#41952
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue May 27, 2017
rust-src: include everything needed to compile libstd with jemalloc

I am not very happy about all this `Path::new`, but did not find a nice way to avoid it. Also, this shouldn't be very performance-critical.

With this patch, rust-src-1.19.0-dev.tar.gz grows from 1.4 to 3.1 MiB (new uncompressed size: 15.5 MiB). Not great, but shipping incomplete sources is also not great, and this is still much smaller than pre-rust-lang#41546. Excluding the entire `src/jemalloc/test` does not work, unfortunately; there is a file in there that is needed to build libstd. (And anyway there's just 190 KiB uncompressed left in that folder.)

In principle, we could try excluding the Rust test suite directories (that would be `libcore/tests` and `libcollection/tests`). I don't know enough about how this component is used to judge whether that would cause any problems. Anyway this is just 600 KiB uncompressed.

Fixes rust-lang#41952
bors added a commit that referenced this issue May 29, 2017
rust-src: include everything needed to compile libstd with jemalloc

I am not very happy about all this `Path::new`, but did not find a nice way to avoid it. Also, this shouldn't be very performance-critical.

With this patch, rust-src-1.19.0-dev.tar.gz grows from 1.4 to 3.1 MiB (new uncompressed size: 15.5 MiB). Not great, but shipping incomplete sources is also not great, and this is still much smaller than pre-#41546. Excluding the entire `src/jemalloc/test` does not work, unfortunately; there is a file in there that is needed to build libstd. (And anyway there's just 190 KiB uncompressed left in that folder.)

In principle, we could try excluding the Rust test suite directories (that would be `libcore/tests` and `libcollection/tests`). I don't know enough about how this component is used to judge whether that would cause any problems. Anyway this is just 600 KiB uncompressed.

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

No branches or pull requests

5 participants