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

Can't run x.py dist on rust 1.85.0 source distribution #137332

Closed
orium opened this issue Feb 20, 2025 · 4 comments · Fixed by #137338
Closed

Can't run x.py dist on rust 1.85.0 source distribution #137332

orium opened this issue Feb 20, 2025 · 4 comments · Fixed by #137338
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@orium
Copy link
Member

orium commented Feb 20, 2025

On the rust 1.85.0 source distribution (from https//static.rust-lang.org/dist/2025-02-20/rustc-1.85.0-src.tar.xz) it's not possible to build rustc with ./x.py dist:

Steps to reproduce:

$ curl -O https://static.rust-lang.org/dist/2025-02-20/rustc-1.85.0-src.tar.xz
$ tar xf rustc-1.85.0-src.tar.xz
$ cd rustc-1.85.0-src
$ cp config.example.toml config.toml
$ ./x.py dist

thread 'main' panicked at src/bootstrap/src/utils/helpers.rs:441:5:
std::fs::read_dir(dir) failed with No such file or directory (os error 2)

If I add a debug println!() I can see it is failing because the directory src/gcc does not exist. It did exist in rustc-1.84.0-src:

$ ls rustc-1.84.0-src/src/gcc
ABOUT-NLS           compile       configure        COPYING3      gotools     libbacktrace  libgcc       libiberty     libssp           ltmain.sh       maintainer-scripts  mkdep           SECURITY.txt
ar-lib              config        configure.ac     COPYING3.LIB  include     libcc1        libgfortran  libitm        libstdc++-v3     lto-plugin      MAINTAINERS         mkinstalldirs   symlink-tree
c++tools            config-ml.in  contrib          depcomp       INSTALL     libcody       libgm2       libobjc       libtool-ldflags  ltoptions.m4    Makefile.def        move-if-change  test-driver
ChangeLog           config.guess  COPYING          fixincludes   install-sh  libcpp        libgo        libphobos     libtool.m4       ltsugar.m4      Makefile.in         multilib.am     ylwrap
ChangeLog.jit       config.rpath  COPYING.LIB      gcc           libada      libdecnumber  libgomp      libquadmath   libvtv           ltversion.m4    Makefile.tpl        patches         zlib
ChangeLog.tree-ssa  config.sub    COPYING.RUNTIME  gnattools     libatomic   libffi        libgrust     libsanitizer  ltgcc.m4         lt~obsolete.m4  missing             README
$ ls rustc-1.85.0-src/src/gcc
"rustc-1.85.0-src/src/gcc": No such file or directory (os error 2)

Was the rustc-1.85.0-src.tar.xz wrongly packaged or did something change?

@orium orium added C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Feb 20, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Feb 20, 2025
@bobrik
Copy link

bobrik commented Feb 20, 2025

The dir disappeared from the nightly on 2025-01-21:

$ curl -s https://static.rust-lang.org/dist/2025-01-20/rustc-nightly-src.tar.xz | tar tvv -J | grep rustc-nightly-src/src/gcc/gcc$
drwxr-xr-x 0/0               0 2006-07-24 01:21 rustc-nightly-src/src/gcc/gcc
$ curl -s https://static.rust-lang.org/dist/2025-01-21/rustc-nightly-src.tar.xz | tar tvv -J | grep rustc-nightly-src/src/gcc/gcc$
$

The corresponding range is 9a1d156..f3d1d47.

@bobrik
Copy link

bobrik commented Feb 20, 2025

I think it's #135658. cc @Kobzol, @cuviper

@Kobzol
Copy link
Contributor

Kobzol commented Feb 20, 2025

This is caused by this call.

I'm not sure why we even build the source tarball from within a source tarball during x dist, lol, that doesn't seem needed.

@orium
Copy link
Member Author

orium commented Feb 20, 2025

Creating src/gcc/ and putting a file is enough to make x.py dist work.

@onur-ozkan onur-ozkan removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Feb 20, 2025
workingjubilee added a commit to workingjubilee/rustc that referenced this issue Feb 20, 2025
skip submodule updating logics on tarballs

Running submodule logic on tarballs isn't necessary since git isn't available there.

Fixes rust-lang#137332
workingjubilee added a commit to workingjubilee/rustc that referenced this issue Feb 20, 2025
…-ozkan

Add a notice about missing GCC sources into source tarballs

I didn't use `.gitkeep`, because that would be a hidden file that might not be noticed, whereas we want to let people inspecting the archive know why the sources are missing.

Inspired by rust-lang#137332.

r? `@onur-ozkan`
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Feb 21, 2025
Rollup merge of rust-lang#137340 - Kobzol:bootstrap-dir-check, r=onur-ozkan

Add a notice about missing GCC sources into source tarballs

I didn't use `.gitkeep`, because that would be a hidden file that might not be noticed, whereas we want to let people inspecting the archive know why the sources are missing.

Inspired by rust-lang#137332.

r? `@onur-ozkan`
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Feb 21, 2025
Rollup merge of rust-lang#137338 - onur-ozkan:137332, r=Kobzol

skip submodule updating logics on tarballs

Running submodule logic on tarballs isn't necessary since git isn't available there.

Fixes rust-lang#137332
github-merge-queue bot pushed a commit to rust-lang/rust-analyzer that referenced this issue Feb 24, 2025
Add a notice about missing GCC sources into source tarballs

I didn't use `.gitkeep`, because that would be a hidden file that might not be noticed, whereas we want to let people inspecting the archive know why the sources are missing.

Inspired by rust-lang/rust#137332.

r? `@onur-ozkan`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants