-
Notifications
You must be signed in to change notification settings - Fork 13k
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
rustc has incomplete version information when compiling from source #86587
Comments
What build directions did you follow? Have you looked at these sections of
|
I haven't tried to build rust from scratch myself to be honest, but as I said the problem is present in practically every distributed non-rustup build. So either they are all missing some required configuration or the detailed version information is only included when the source is built from the git repository. Here are some pkg build files for reference: And again, as far as I can tell the detailed version information is left unassigned if no git information is found. Line 362 in 456a032
which returns rust/compiler/rustc_driver/src/lib.rs Lines 764 to 769 in 456a032
Also, possibly a consequence of this issue: #33286 (I just looked up that issue and totally forgot that I already left a comment there, whoops) |
When building from released sources (
https://static.rust-lang.org/dist/rustc-<version>-src.tar.xz
), the resulting rustc binary is missing detailed version information like commit hash and commit date.Looking at the source it seems to only rely on git commands/paths to assemble this information (
https://github.com/rust-lang/rust/blob/5a7834050f3a0ebcd117b4ddf0bc1e8459594309/src/bootstrap/channel.rs#L26-L36
), but it could also be obtained/parsed fromrustc-<version>-src/version
when compiling from the released source files (andrustc-<version>-src/git-commit-hash
if the entire commit hash is required too).As far as I know this affects all rust releases that are not obtained via rustup (i.e. packaged by distributions or built from scratch).
Sample output of
rustc -vV
:The text was updated successfully, but these errors were encountered: