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-1.47 contains mismatched tools #63202

Closed
4 tasks done
justdave opened this issue Oct 21, 2020 · 13 comments
Closed
4 tasks done

rust-1.47 contains mismatched tools #63202

justdave opened this issue Oct 21, 2020 · 13 comments
Labels
outdated PR was locked due to age

Comments

@justdave
Copy link

Bug report

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

  • ran brew update and can still reproduce the problem?
  • ran brew doctor, fixed all issues and can still reproduce the problem?
  • ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?
tbmbp:Homebrew admin$ brew gist-logs rust
Error: No logs.
  • if brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?
tbmbp:Homebrew admin$ brew config
HOMEBREW_VERSION: 2.5.6-100-ga6ee5b7
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: a6ee5b79b06c39f5d43ae41a85004e773c04e019
Last commit: 11 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 1163d23427690cfe4b498e197a2f72359bae2660
Core tap last commit: 12 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 16
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 16-core 64-bit kabylake
Clang: 12.0 build 1200
Git: 2.29.0 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 1.8.0_231, 1.8.0_31
macOS: 10.15.7-x86_64
CLT: N/A
Xcode: 12.0.1
XQuartz: 2.7.11 => /opt/X11
tbmbp:Homebrew admin$ brew doctor
Your system is ready to brew.

What you were trying to do (and why)

Trying to build Firefox nightly, which now requires Rust 1.47

What happened (include command output)

configure fails complaining that cargo isn't new enough, and requires version 1.47

Command output

tbmbp:Homebrew admin$ brew install rust
==> Downloading https://homebrew.bintray.com/bottles/rust-1.47.0.catalina.bottle.tar.gz
Already downloaded: /Users/admin/Library/Caches/Homebrew/downloads/30d7cc7ba65e5799e9515db1996d1a0a2cb7ec546ee365f3252e6292705ba4c9--rust-1.47.0.catalina.bottle.tar.gz
==> Pouring rust-1.47.0.catalina.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d

zsh completions have been installed to:
/usr/local/share/zsh/site-functions
==> Summary
🍺 /usr/local/Cellar/rust/1.47.0: 12,057 files, 576.9MB
tbmbp:Homebrew admin$ ls -ld which rustc
lrwxr-xr-x 1 admin wheel 31 Oct 21 02:30 /usr/local/bin/rustc -> ../Cellar/rust/1.47.0/bin/rustc
tbmbp:Homebrew admin$ rustc --version
rustc 1.47.0
tbmbp:Homebrew admin$ ls -ld which cargo
lrwxr-xr-x 1 admin wheel 31 Oct 21 02:30 /usr/local/bin/cargo -> ../Cellar/rust/1.47.0/bin/cargo
tbmbp:Homebrew admin$ cargo --version
cargo 1.46.0
tbmbp:~ admin$ ls -ld which rustdoc
lrwxr-xr-x 1 admin wheel 33 Oct 21 02:30 /usr/local/bin/rustdoc -> ../Cellar/rust/1.47.0/bin/rustdoc
tbmbp:~ admin$ rustdoc --version
rustdoc 1.47.0

What you expected to happen

The utilities installed with rust are supposed to be version-locked to rust itself. If I use rustup-init to install rust instead of using the homebrew package, I get matched versions, which implies something wasn't built right in the package (I can't guarantee that, but that's what it looks like)

Step-by-step reproduction instructions (by running brew install commands)

brew install rust
/usr/local/bin/cargo --version
@SMillerDev
Copy link
Member

I see the same result, but we're not doing anything special in the build. What does it say after you install it using brew install --build-from-source rust?

@justdave
Copy link
Author

It's not done building, yet, but I can see what's wrong already from the output I've seen so far.

The source for cargo is fetched separately, and it's grabbing the wrong cargo tag.

==> Cloning https://github.com/rust-lang/cargo.git
Cloning into '/Users/admin/Library/Caches/Homebrew/rust--cargo--git'...
==> Checking out tag 0.47.0
HEAD is now at 149022b Merge pull request #8503 from alexcrichton/revert-beta
==> Downloading https://static.rust-lang.org/dist/2020-08-27/cargo-0.47.0-x86_64-apple-darwin.tar.gz
######################################################################## 100.0%

According to Rust's release documentation at https://github.com/rust-lang/rust-forge/blob/master/src/release/process.md the cargo tag that matches to the rustc version is 1 higher, so it should be grabbing 0.48.0

From the instructions for their release folks:

Change rustc to "X.Y.Z" where that's the version of rustc you just build
Change cargo to "A.B.C" where it's Cargo's version. That's typically "0.(Y+1).0" wrt the rustc version.

@SMillerDev
Copy link
Member

No, because the rustc bootstrap is the version before. So rustc is 1.46.0

@justdave
Copy link
Author

But it's grabbing 1.47.0 for rustc, too:

==> Downloading https://static.rust-lang.org/dist/rustc-1.47.0-src.tar.gz
######################################################################## 100.0%

Looks like you can find the matching cargo version number in src/stage0.txt

https://github.com/rust-lang/rust/blob/beta/src/stage0.txt#L17

@SMillerDev
Copy link
Member

It should be https://github.com/rust-lang/rust/blob/1.47.0/src/stage0.txt#L17 actually, since that's the version we're building.

And I believe that rustc 1.46.0 is part of the cargo-0.47.0-x86_64-apple-darwin.tar.gz file that we're downloading

@justdave
Copy link
Author

Build finished finally (that sure took a while).

tbmbp:~ admin$ cargo --version
cargo 1.46.0
tbmbp:~ admin$ rustc --version
rustc 1.47.0

@BrewTestBot
Copy link
Member

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@BrewTestBot BrewTestBot added stale No recent activity and removed stale No recent activity labels Nov 26, 2020
@Standard8
Copy link

Now that rust 1.48.0 is out, maybe we could get a fresh build and see if that fixes the issue?

@Standard8
Copy link

Oh I see #65286 is in progress, but needs help.

@carlocab carlocab mentioned this issue Dec 5, 2020
5 tasks
@carlocab
Copy link
Member

This will be fixed in #66285, if I can fix the CI errors. Assistance would be appreciated.

❯ rustc --version
rustc 1.48.0
❯ cargo --version
cargo 1.48.0
❯ rustdoc --version
rustdoc 1.48.0

@carlocab
Copy link
Member

Unless I've grossly misjudged the impact of the changes I've made in the PR linked above, there are three formulae that are preventing Rust 1.48 (and the fix to this issue) from passing CI:

asuka
deno
ktmpl

@stweil
Copy link
Contributor

stweil commented Dec 20, 2020

ktmpl is fixed.

@carlocab
Copy link
Member

Yes. This issue can be closed as well, I believe:

❯ cargo --version
cargo 1.48.0
❯ rustdoc --version
rustdoc 1.48.0

@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Jan 21, 2021
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Jan 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants