firefox-90.0_rc1 fails to compile with rust-1.54 (esr also affected)
Categories
(Firefox Build System :: General, defect)
Tracking
(firefox-esr78 fixed, firefox90 wontfix, firefox91 fixed, firefox92 fixed)
People
(Reporter: herrtimson, Assigned: hsivonen)
Details
Attachments
(4 files, 1 obsolete file)
252.49 KB,
application/gzip
|
Details | |
48 bytes,
text/x-phabricator-request
|
pascalc
:
approval-mozilla-beta+
|
Details | Review |
52.22 KB,
patch
|
Details | Diff | Splinter Review | |
48 bytes,
text/x-phabricator-request
|
jcristau
:
approval-mozilla-esr78+
|
Details | Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
Steps to reproduce:
hey there, I installed rust-1.54-beta2 for testing and tried to compile firefox with it on a linux amd64 box. It didn't went well.
Actual results:
the compile failed with these errors:
4:06.18 --> /var/tmp/portage/www-client/firefox-90.0_rc1/work/firefox-90.0/third_party/rust/packed_simd/src/codegen/llvm.rs:43:7
4:06.18 |
4:06.18 43 | #[rustc_args_required_const(2)]
4:06.18 | ^^^^^^^^^^^^^^^^^^^^^^^^^
4:06.18 error: attributes starting with rustc
are reserved for use by the rustc
compiler
4:06.18 --> /var/tmp/portage/www-client/firefox-90.0_rc1/work/firefox-90.0/third_party/rust/packed_simd/src/codegen/llvm.rs:37:7
4:06.18 |
4:06.18 37 | #[rustc_args_required_const(2)]
4:06.18 | ^^^^^^^^^^^^^^^^^^^^^^^^^
4:06.18 error: attributes starting with rustc
are reserved for use by the rustc
compiler
4:06.18 --> /var/tmp/portage/www-client/firefox-90.0_rc1/work/firefox-90.0/third_party/rust/packed_simd/src/codegen/llvm.rs:31:7
4:06.18 |
4:06.18 31 | #[rustc_args_required_const(2)]
4:06.18 | ^^^^^^^^^^^^^^^^^^^^^^^^^
4:06.19 error: attributes starting with rustc
are reserved for use by the rustc
compiler
4:06.19 --> /var/tmp/portage/www-client/firefox-90.0_rc1/work/firefox-90.0/third_party/rust/packed_simd/src/codegen/llvm.rs:25:7
4:06.19 |
4:06.19 25 | #[rustc_args_required_const(2)]
4:06.19 | ^^^^^^^^^^^^^^^^^^^^^^^^^
4:06.19 error: attributes starting with rustc
are reserved for use by the rustc
compiler
4:06.19 --> /var/tmp/portage/www-client/firefox-90.0_rc1/work/firefox-90.0/third_party/rust/packed_simd/src/codegen/llvm.rs:19:7
4:06.19 |
4:06.19 19 | #[rustc_args_required_const(2)]
4:06.19 | ^^^^^^^^^^^^^^^^^^^^^^^^^
4:06.19 error: attributes starting with rustc
are reserved for use by the rustc
compiler
4:06.19 --> /var/tmp/portage/www-client/firefox-90.0_rc1/work/firefox-90.0/third_party/rust/packed_simd/src/codegen/llvm.rs:13:7
4:06.19 |
4:06.19 13 | #[rustc_args_required_const(2)]
4:06.19 | ^^^^^^^^^^^^^^^^^^^^^^^^^
4:06.33 error: cannot find attribute rustc_args_required_const
in this scope
4:06.33 --> /var/tmp/portage/www-client/firefox-90.0_rc1/work/firefox-90.0/third_party/rust/packed_simd/src/codegen/llvm.rs:43:7
4:06.33 |
4:06.33 43 | #[rustc_args_required_const(2)]
4:06.33 | ^^^^^^^^^^^^^^^^^^^^^^^^^
4:06.33 error: cannot find attribute rustc_args_required_const
in this scope
4:06.33 --> /var/tmp/portage/www-client/firefox-90.0_rc1/work/firefox-90.0/third_party/rust/packed_simd/src/codegen/llvm.rs:37:7
4:06.33 |
4:06.33 37 | #[rustc_args_required_const(2)]
4:06.33 | ^^^^^^^^^^^^^^^^^^^^^^^^^
4:06.33 error: cannot find attribute rustc_args_required_const
in this scope
4:06.33 --> /var/tmp/portage/www-client/firefox-90.0_rc1/work/firefox-90.0/third_party/rust/packed_simd/src/codegen/llvm.rs:31:7
4:06.33 |
4:06.33 31 | #[rustc_args_required_const(2)]
4:06.33 | ^^^^^^^^^^^^^^^^^^^^^^^^^
4:06.33 error: cannot find attribute rustc_args_required_const
in this scope
4:06.33 --> /var/tmp/portage/www-client/firefox-90.0_rc1/work/firefox-90.0/third_party/rust/packed_simd/src/codegen/llvm.rs:25:7
4:06.33 |
4:06.33 25 | #[rustc_args_required_const(2)]
4:06.33 | ^^^^^^^^^^^^^^^^^^^^^^^^^
4:06.34 error: cannot find attribute rustc_args_required_const
in this scope
4:06.34 --> /var/tmp/portage/www-client/firefox-90.0_rc1/work/firefox-90.0/third_party/rust/packed_simd/src/codegen/llvm.rs:19:7
4:06.34 |
4:06.34 19 | #[rustc_args_required_const(2)]
4:06.34 | ^^^^^^^^^^^^^^^^^^^^^^^^^
4:06.34 error: cannot find attribute rustc_args_required_const
in this scope
4:06.34 --> /var/tmp/portage/www-client/firefox-90.0_rc1/work/firefox-90.0/third_party/rust/packed_simd/src/codegen/llvm.rs:13:7
4:06.34 |
4:06.34 13 | #[rustc_args_required_const(2)]
4:06.34 | ^^^^^^^^^^^^^^^^^^^^^^^^^
this happens, since in rust-1.54 rustc_args_required_const
was removed, the corresponding bug/pullrequest is: https://github.com/rust-lang/rust/pull/85110
so even though this is a beta version, my assumption is that this is not a bug in rust itself.
firefox-esr branch is also affected, and I guess nightly should also be affected since llvm.rs hasn't been touched recently, but I haven't tested that yet to confirm it safely.
the full build log is attached, grep for rustc_args_required_const
Expected results:
compile should have passed
Comment 2•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox Build System::General' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Updated•3 years ago
|
Comment 3•3 years ago
|
||
thanks for the quick answer - I tried to pull in the patch locally, but ran into problems with checksums when compiling. If you happen to know how to properly pull the patch in, and are either able to teach me how or attach a working split patch, I'm happy to test it.
Assignee | ||
Comment 5•3 years ago
|
||
Aside: I have ported encoding_rs
to core_simd
and am currently in the process of validating its performance relative to packed_simd
, but since core_simd
is not available on crates.io, it would in some ways be nicer to wait until core::simd
is available in the standard library behind a feature gate.
Assignee | ||
Comment 6•3 years ago
|
||
Current nightly Rust suffers from https://github.com/rust-lang/rust/issues/86893 . To test nightly, go back to 2021-07-01.
Assignee | ||
Comment 7•3 years ago
|
||
Cherry-pick upstream commits
https://github.com/rust-lang/packed_simd/commit/58ba720df859b8d8a4c685a7984266e6f237b75e
https://github.com/rust-lang/packed_simd/commit/728d47506fe3a2599818060bd6e02e4bd3e338d5
to update the shuffle API for const generics and to remove the unnecessary const_fn
feature gate.
Assignee | ||
Comment 8•3 years ago
|
||
Assignee | ||
Comment 9•3 years ago
|
||
(In reply to Henri Sivonen (:hsivonen) from comment #5)
Aside: I have ported
encoding_rs
tocore_simd
and am currently in the process of validating its performance relative topacked_simd
, but sincecore_simd
is not available on crates.io, it would in some ways be nicer to wait untilcore::simd
is available in the standard library behind a feature gate.
Filed bug 1719896 for this.
Assignee | ||
Comment 10•3 years ago
|
||
Can't backport this to ESR within the bounds of the currently-documented MSRV for ESR.
Assignee | ||
Comment 11•3 years ago
|
||
I'm providing the ESR backport as a courtesy to people who wish to build ESR with Rust 1.54, but I don't expect us to take this patch into the ESR repo, since it would change the MSRV for ESR.
Assignee | ||
Comment 12•3 years ago
|
||
asan-fuzzing fails but I fail to see the relation to packed_simd
:
https://treeherder.mozilla.org/logviewer?job_id=344811470&repo=try&lineNumber=76012
Assignee | ||
Comment 13•3 years ago
|
||
MSRV isn't an issue in the case of 90, but, AFAICT, it wouldn't be within our other policies to take this to 90 at this point, so I'm providing this patch as a courtesy to people who wish to build Firefox 90 with Rust 1.54.
Assignee | ||
Comment 14•3 years ago
|
||
Cherry-pick upstream commits
https://github.com/rust-lang/packed_simd/commit/58ba720df859b8d8a4c685a7984266e6f237b75e
https://github.com/rust-lang/packed_simd/commit/728d47506fe3a2599818060bd6e02e4bd3e338d5
to update the shuffle API for const generics and to remove the unnecessary const_fn
feature gate.
Also, conditionally restore old-style shuffles in order to maintain the MSRV for ESR.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 15•3 years ago
|
||
I've posted different patches for ESR and central. Only esr78 needs the MSRV-lowering conditional tweak. It's not needed for central and the upcoming esr91 and I don't want to have to revert it on esr91 or central if it causes future cherry-picks not to apply in the future.
Comment 16•3 years ago
|
||
Pushed by hsivonen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f597999c46c0 Make packed_simd compile with Rust 1.54. r=glandium
Comment 17•3 years ago
|
||
bugherder |
Assignee | ||
Comment 18•3 years ago
|
||
Comment on attachment 9230517 [details]
Bug 1719674 - Make packed_simd compile with Rust 1.54.
Beta/Release Uplift Approval Request
- User impact if declined: No impact to users who get their Firefox builds from Mozilla. This patch allows more flexibility in terms of upgrading Rust for others who compile Firefox.
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): This patch changes how a thing is communicated to the compiler while keeping everything else as-is and the result is known to compile.
- String changes made/needed: None
Assignee | ||
Comment 19•3 years ago
|
||
Comment on attachment 9230680 [details]
Bug 1719674 - ESR version - Make packed_simd compile with Rust 1.54.
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: Allows more Rust update flexibility for people who compile Firefox from source, including distro maintainers.
- User impact if declined: No impact for users who get their builds from Mozilla. This change adds flexibility for others who compile Firefox.
- Fix Landed on Version: 92
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): This patch changes how a thing is communicated to the compiler while keeping everything else as-is and the result is known to compile.
- String or UUID changes made by this patch: None
Comment 20•3 years ago
|
||
Comment on attachment 9230517 [details]
Bug 1719674 - Make packed_simd compile with Rust 1.54.
Low risk in early betas, approved for uplift in 91 beta 4, thanks
Comment 21•3 years ago
|
||
bugherder uplift |
Updated•3 years ago
|
Comment 22•3 years ago
|
||
Comment on attachment 9230680 [details]
Bug 1719674 - ESR version - Make packed_simd compile with Rust 1.54.
approved for 78.13esr
Comment 23•3 years ago
|
||
bugherder uplift |
Description
•