firefox-91.1.0 fails to compile with rust-1.56
Categories
(Firefox Build System :: General, defect, P3)
Tracking
(firefox-esr91 fixed, firefox94 fixed)
People
(Reporter: herrtimson, Assigned: glandium)
References
Details
Attachments
(6 files)
185.33 KB,
application/x-xz
|
Details | |
131.62 KB,
application/x-xz
|
Details | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-esr91+
|
Details | Review |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-esr91+
|
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.56-beta2 for testing and tried to compile firefox with it on a linux amd64 box. The compile is broken.
Actual results:
Actual results:
the compile failed with these errors:
1:56.73 error: [u32; 2]
is forbidden as the type of a const generic parameter
1:56.73 --> /var/tmp/portage/www-client/firefox-91.1.0/work/firefox-91.1.0/third_party/rust/packed_simd/src/codegen/llvm.rs:20:44
1:56.73 |
1:56.73 20 | pub unsafe fn __shuffle_vector2<const IDX: [u32; 2], T, U>(x: T, y: T) -> U
1:56.73 | ^^^^^^^^
1:56.73 |
1:56.73 = note: the only supported types are integers, bool
and char
1:56.73 = help: more complex types are supported with #![feature(adt_const_params)]
1:56.73 error: [u32; 4]
is forbidden as the type of a const generic parameter
1:56.73 --> /var/tmp/portage/www-client/firefox-91.1.0/work/firefox-91.1.0/third_party/rust/packed_simd/src/codegen/llvm.rs:30:44
1:56.73 |
1:56.73 30 | pub unsafe fn __shuffle_vector4<const IDX: [u32; 4], T, U>(x: T, y: T) -> U
1:56.73 | ^^^^^^^^
1:56.73 |
1:56.73 = note: the only supported types are integers, bool
and char
1:56.73 = help: more complex types are supported with #![feature(adt_const_params)]
1:56.73 error: [u32; 8]
is forbidden as the type of a const generic parameter
1:56.73 --> /var/tmp/portage/www-client/firefox-91.1.0/work/firefox-91.1.0/third_party/rust/packed_simd/src/codegen/llvm.rs:40:44
1:56.73 |
1:56.73 40 | pub unsafe fn __shuffle_vector8<const IDX: [u32; 8], T, U>(x: T, y: T) -> U
1:56.73 | ^^^^^^^^
1:56.73 |
1:56.73 = note: the only supported types are integers, bool
and char
1:56.73 = help: more complex types are supported with #![feature(adt_const_params)]
1:56.73 error: [u32; 16]
is forbidden as the type of a const generic parameter
1:56.73 --> /var/tmp/portage/www-client/firefox-91.1.0/work/firefox-91.1.0/third_party/rust/packed_simd/src/codegen/llvm.rs:50:45
1:56.73 |
1:56.73 50 | pub unsafe fn __shuffle_vector16<const IDX: [u32; 16], T, U>(x: T, y: T) -> U
1:56.73 | ^^^^^^^^^
1:56.73 |
1:56.73 = note: the only supported types are integers, bool
and char
1:56.73 = help: more complex types are supported with #![feature(adt_const_params)]
1:56.73 error: [u32; 32]
is forbidden as the type of a const generic parameter
1:56.73 --> /var/tmp/portage/www-client/firefox-91.1.0/work/firefox-91.1.0/third_party/rust/packed_simd/src/codegen/llvm.rs:60:45
1:56.73 |
1:56.73 60 | pub unsafe fn __shuffle_vector32<const IDX: [u32; 32], T, U>(x: T, y: T) -> U
1:56.73 | ^^^^^^^^^
1:56.73 |
1:56.73 = note: the only supported types are integers, bool
and char
1:56.73 = help: more complex types are supported with #![feature(adt_const_params)]
1:56.73 error: [u32; 64]
is forbidden as the type of a const generic parameter
1:56.74 --> /var/tmp/portage/www-client/firefox-91.1.0/work/firefox-91.1.0/third_party/rust/packed_simd/src/codegen/llvm.rs:70:45
1:56.74 |
1:56.74 70 | pub unsafe fn __shuffle_vector64<const IDX: [u32; 64], T, U>(x: T, y: T) -> U
1:56.74 | ^^^^^^^^^
1:56.74 |
1:56.74 = note: the only supported types are integers, bool
and char
1:56.74 = help: more complex types are supported with #![feature(adt_const_params)]
Expected results:
compile should have passed
I will attach the compressed build log, as of now I was unable to find a specific rust pullrequst that broke this.
It seems I wasn't grepping correctly, here are some missing but interesting bits:
1:52.57 error[E0557]: feature has been removed
1:52.57 --> /var/tmp/portage/www-client/firefox-91.1.0/work/firefox-91.1.0/third_party/rust/packed_simd/src/lib.rs:203:5
1:52.57 |
1:52.57 203 | const_generics,
1:52.57 | ^^^^^^^^^^^^^^ feature has been removed
1:52.57 |
1:55.31 mkdir -p '.deps/'
1:55.31 caps/BasePrincipal.o
1:54.80 error: type parameters must be declared prior to const parameters
1:54.80 --> /var/tmp/portage/www-client/firefox-91.1.0/work/firefox-91.1.0/third_party/rust/packed_simd/src/codegen/llvm.rs:20:54
1:54.80 |
1:54.80 20 | pub unsafe fn __shuffle_vector2<const IDX: [u32; 2], T, U>(x: T, y: T) -> U
1:54.80 | ----------------------^--^- help: reorder the parameters: lifetimes, then types, then consts: <T, U, const IDX: [u32; 2]>
1:54.80 error: type parameters must be declared prior to const parameters
1:54.80 --> /var/tmp/portage/www-client/firefox-91.1.0/work/firefox-91.1.0/third_party/rust/packed_simd/src/codegen/llvm.rs:30:54
1:54.81 |
1:54.81 30 | pub unsafe fn __shuffle_vector4<const IDX: [u32; 4], T, U>(x: T, y: T) -> U
1:54.81 | ----------------------^--^- help: reorder the parameters: lifetimes, then types, then consts: <T, U, const IDX: [u32; 4]>
1:54.81 error: type parameters must be declared prior to const parameters
1:54.81 --> /var/tmp/portage/www-client/firefox-91.1.0/work/firefox-91.1.0/third_party/rust/packed_simd/src/codegen/llvm.rs:40:54
1:54.81 |
1:54.81 40 | pub unsafe fn __shuffle_vector8<const IDX: [u32; 8], T, U>(x: T, y: T) -> U
1:54.81 | ----------------------^--^- help: reorder the parameters: lifetimes, then types, then consts: <T, U, const IDX: [u32; 8]>
1:54.81 error: type parameters must be declared prior to const parameters
1:54.81 --> /var/tmp/portage/www-client/firefox-91.1.0/work/firefox-91.1.0/third_party/rust/packed_simd/src/codegen/llvm.rs:50:56
1:54.81 |
1:54.81 50 | pub unsafe fn __shuffle_vector16<const IDX: [u32; 16], T, U>(x: T, y: T) -> U
1:54.81 | -----------------------^--^- help: reorder the parameters: lifetimes, then types, then consts: <T, U, const IDX: [u32; 16]>
1:54.81 error: type parameters must be declared prior to const parameters
1:54.81 --> /var/tmp/portage/www-client/firefox-91.1.0/work/firefox-91.1.0/third_party/rust/packed_simd/src/codegen/llvm.rs:60:56
1:54.81 |
1:54.81 60 | pub unsafe fn __shuffle_vector32<const IDX: [u32; 32], T, U>(x: T, y: T) -> U
1:54.81 | -----------------------^--^- help: reorder the parameters: lifetimes, then types, then consts: <T, U, const IDX: [u32; 32]>
1:54.81 error: type parameters must be declared prior to const parameters
1:54.81 --> /var/tmp/portage/www-client/firefox-91.1.0/work/firefox-91.1.0/third_party/rust/packed_simd/src/codegen/llvm.rs:70:56
1:54.81 |
1:54.81 70 | pub unsafe fn __shuffle_vector64<const IDX: [u32; 64], T, U>(x: T, y: T) -> U
1:54.81 | -----------------------^--^- help: reorder the parameters: lifetimes, then types, then consts: <T, U, const IDX: [u32; 64]>
1:54.93 Compiling fallible_collections v0.4.2
so this is solved upstream:
https://github.com/rust-lang/packed_simd/commit/45d5347a0d2187c046a546a477d2a53111cd7713
maybe consider to cherry pick it?
Comment 3•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.
I pulled in the packed-simd update locally (need to refresh checksums), this uncovers another error. Upstream issue: https://github.com/tokio-rs/prost/issues/526
3:09.40 error[E0034]: multiple applicable items in scope
3:09.40 --> /var/tmp/portage/www-client/firefox-91.1.0/work/firefox-91.1.0/third_party/rust/prost-derive/src/lib.rs:111:14
3:09.40 |
3:09.40 111 | .intersperse(quote!(|));
3:09.40 | ^^^^^^^^^^^ multiple intersperse
found
3:09.40 |
3:09.40 = note: candidate #1 is defined in an impl of the trait Iterator
for the type Map<I, F>
3:09.40 = note: candidate #2 is defined in an impl of the trait Itertools
for the type T
3:09.40 help: disambiguate the associated function for candidate #1
3:09.40 |
3:09.40 107 ~ let tags = Iterator::intersperse(field
3:09.40 108 + .tags()
3:09.40 109 + .into_iter()
3:09.40 110 + .map(|tag| quote!(#tag)), {
3:09.40 111 + let mut _s = $crate::__private::TokenStream::new();
3:09.40 112 + $crate::quote_each_token!(_s $($tt));
3:09.40 ...
3:09.40 help: disambiguate the associated function for candidate #2
3:09.40 |
3:09.40 107 ~ let tags = Itertools::intersperse(field
3:09.40 108 + .tags()
3:09.40 109 + .into_iter()
3:09.40 110 + .map(|tag| quote!(#tag)), {
3:09.40 111 + let mut _s = $crate::__private::TokenStream::new();
3:09.40 112 + $crate::quote_each_token!(_s $($tt));
3:09.40 ...
3:09.48 warning: unused import: itertools::Itertools
3:09.48 --> /var/tmp/portage/www-client/firefox-91.1.0/work/firefox-91.1.0/third_party/rust/prost-derive/src/lib.rs:11:5
3:09.48 |
3:09.48 11 | use itertools::Itertools;
3:09.48 | ^^^^^^^^^^^^^^^^^^^^
3:09.48 |
3:09.48 = note: #[warn(unused_imports)]
on by default
3:09.48 For more information about this error, try rustc --explain E0034
.
3:09.49 warning: prost-derive
(lib) generated 1 warning
3:09.49 error: could not compile prost-derive
due to previous error; 1 warning emitted
compressed log is attached
Updated•3 years ago
|
Comment 5•3 years ago
|
||
packed_simd_2 0.3.6
is out as of Sept 9th, which will make that update easier, good find tt.
I'll keep an eye on that prost
issue.
Assignee | ||
Comment 6•3 years ago
|
||
We're not using packed_simd_2, we're using a fork. And the upstream change will break building with older versions.
Assignee | ||
Comment 7•3 years ago
|
||
PR for packed_simd: https://github.com/hsivonen/packed_simd/pull/2
Assignee | ||
Comment 8•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Comment 9•3 years ago
|
||
This applies https://github.com/tokio-rs/prost/commit/edb1464b71528286a6ce74278af05f19c3e0e820
to our copy of prost 0.6.1.
Assignee | ||
Comment 10•3 years ago
|
||
Our copy of mio is already self-vendored, so we don't need a Cargo.toml
change to be able to apply in-tree changes.
Assignee | ||
Comment 11•3 years ago
|
||
Comment 12•3 years ago
|
||
Comment 13•3 years ago
•
|
||
Backed out changeset 9af854b99136 (Bug 1730397) as requested by the dev for causing SM bustages.
Backout link
Push with failures
Failure Log
Updated•3 years ago
|
Assignee | ||
Comment 14•3 years ago
|
||
We'll need a more fine-grained test in packed_simd.
Comment 15•3 years ago
|
||
bugherder |
Assignee | ||
Updated•3 years ago
|
Comment 16•3 years ago
|
||
Looks like a new release of prost
is out that fixes the issue - though, it may introduce new ones until 0.9
is out.
Comment 17•3 years ago
|
||
Assignee | ||
Updated•3 years ago
|
Comment 19•3 years ago
|
||
Comment 20•3 years ago
|
||
bugherder |
Reporter | ||
Comment 21•3 years ago
|
||
since this seems to stick, can I ask here for the backports to the esr91 branch?
Assignee | ||
Comment 22•3 years ago
|
||
Comment on attachment 9241059 [details]
Bug 1730397 - Apply prost-derive fix for function name collision.
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: Build failure with rust 1.56.
- User impact if declined: See above
- Fix Landed on Version: 94
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Trivial rust fixes. We don't need all the patches for a default build, though. The remaining ones only matter for --enable-warnings-as-errors, which we recommend not using.
- String or UUID changes made by this patch:
Assignee | ||
Updated•3 years ago
|
Comment 23•3 years ago
|
||
Comment on attachment 9241059 [details]
Bug 1730397 - Apply prost-derive fix for function name collision.
Approved for 91.2esr.
Updated•3 years ago
|
Comment 24•3 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-esr91/rev/e77ed5b5ed8b
https://hg.mozilla.org/releases/mozilla-esr91/rev/e5a5b3cbb30e
Reporter | ||
Comment 25•3 years ago
|
||
thanks, can confirm working compile with rustc-1.56-beta3
there will be no backport to 93.0, no?
Assignee | ||
Comment 26•3 years ago
|
||
Rust 1.56 is due to release after Firefox 93, so I figured it's not worth. Firefox 94 will be out just a few weeks after rust 1.56.
Description
•