Opened 3 months ago

Closed 2 months ago

#20897 closed enhancement (fixed)

rustc-1.84.0

Reported by: zeckma Owned by: Xi Ruoyao
Priority: normal Milestone: 12.3
Component: BOOK Version: git
Severity: normal Keywords:
Cc:

Description

New minor version.

Change History (14)

comment:1 by Xi Ruoyao, 3 months ago

Owner: changed from blfs-book to Xi Ruoyao
Status: newassigned

Mine but I'll wait for several days for LLVM-19.1.7 release (scheduled on Jan 14) so I don't need to test everything twice.

comment:2 by Rahul Chandra, 3 months ago

Seems like they're some stale git connection in the src tarball. The build fails for me with a git fatal error about not a git repo

comment:3 by Rahul Chandra, 3 months ago

seems to be from this file? src/gcc/libgo/go/cmd/go/testdata/script/get_update_unknown_protocol.txt:exec

git config --local url.https://github.com/.insteadOf xyz://github.com/

comment:4 by Rahul Chandra, 3 months ago

nevermind spits out the same error even with the file deleted

comment:5 by Rahul Chandra, 3 months ago

Okay so it wants the main rust git directory in order to try and get a revision number? Maybe the detection for the distribution tarball is turned off? I seriously doubt they shipped a broken tarball.

called Result::unwrap() on an Err value: "command did not execute successfully: cd \"/blfs/builds/rustc-1.84.0-src\" && \"git\" \"rev-list\" \"--author=bors@…\" \"-n1\" \"--first-parent\" \"HEAD\"\nexpected success, got: exit status: 128\n"

comment:6 by Rahul Chandra, 3 months ago

Think it might have something to do with src/bootstrap/src/core/config/config.rs

(weird file path)

comment:7 by Rahul Chandra, 3 months ago

You need to add profile="dist" to the top of the config.toml

in reply to:  7 comment:8 by Xi Ruoyao, 3 months ago

Replying to Rahul Chandra:

You need to add profile="dist" to the top of the config.toml

It looks like we actually want the setting download-rustc = false in src/bootstrap/defaults/config.dist.toml. profile = "dist" just imports everything from the config.dist.toml file. Well but to me it seems a good idea to use profile = "dist" to simplify our config.toml anyway.

comment:9 by Xi Ruoyao, 3 months ago

Oops, profile = "dist" imports lld = true and llvm-bitcode-linker = true those we don't want. Even if we want a faster linker we should build lld separately or as a part of LLVM, and I prefer mold anyway (if it didn't need cmake I'd propose it for LFS).

comment:10 by Xi Ruoyao, 3 months ago

FTR download-rustc = "if-unchanged" is now the default, meaning if we are hacking rustc but we've not modified any compiler components (i.e. we only modified std or cargo), the building system will download those components from upstream CI instead of building them. Checking if any compiler component is modified and getting the correct commit revision for which the CI output to be used obviously need a Git repository, and we want to build everything from source anyway, thus we should change it to download-rustc = false. profile = "dist" just imports download-rustc = false from the src/bootstrap/defaults/config.dist.toml file.

Arguably this option should be named download-ci-rustc instead (as it's similar to the existing download-ci-llvm).

in reply to:  9 ; comment:11 by Rahul Chandra, 3 months ago

Replying to Xi Ruoyao:

Oops, profile = "dist" imports lld = true and llvm-bitcode-linker = true those we don't want. Even if we want a faster linker we should build lld separately or as a part of LLVM, and I prefer mold anyway (if it didn't need cmake I'd propose it for LFS).

Oops I didn't realize that. Weirdly it seemed to build fine anyways? But I think the download-rustc option is probably the best way to go about it. Great catch!

Looking at mold I'm tempted to try it...

in reply to:  11 comment:12 by Xi Ruoyao, 3 months ago

Replying to Rahul Chandra:

Replying to Xi Ruoyao:

Oops, profile = "dist" imports lld = true and llvm-bitcode-linker = true those we don't want. Even if we want a faster linker we should build lld separately or as a part of LLVM, and I prefer mold anyway (if it didn't need cmake I'd propose it for LFS).

Oops I didn't realize that. Weirdly it seemed to build fine anyways? But I think the download-rustc option is probably the best way to go about it. Great catch!

It'll build lld and llvm-bitcode-linker from the shipped LLVM source, you'll see some cmake output for them but yes the build should success.

comment:14 by Xi Ruoyao, 2 months ago

Resolution: fixed
Status: assignedclosed

Fixed:

Note: See TracTickets for help on using tickets.