60.7.2 fails to build with rust 1.36.0
Categories
(Firefox Build System :: General, defect)
Tracking
(firefox-esr60 fixed, firefox-esr68 unaffected, firefox67 unaffected, firefox67.0.1 unaffected, firefox68 unaffected, firefox69 unaffected)
Tracking | Status | |
---|---|---|
firefox-esr60 | --- | fixed |
firefox-esr68 | --- | unaffected |
firefox67 | --- | unaffected |
firefox67.0.1 | --- | unaffected |
firefox68 | --- | unaffected |
firefox69 | --- | unaffected |
People
(Reporter: gaston, Unassigned)
Details
(Keywords: regression)
Currently testing rust 1.36.0 on OpenBSD, 68 beta & 67 build fine on i386/amd64 but it seems 60.7.2 (and tor-browser, which derivates from it) choke on some rust code in servo:
error[E0277]: the type `std::cell::UnsafeCell<std::option::Option<std::boxed::Box<std::cell::RefCell<regex::exec::ProgramCacheInner>>>>` ma
y contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
--> servo/components/style/build_gecko.rs:387:14
|
387 | impl ParseCallbacks for Callbacks {
| ^^^^^^^^^^^^^^ `std::cell::UnsafeCell<std::option::Option<std::boxed::Box<std::cell::RefCell<regex::exec::ProgramCacheIn
ner>>>>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
|
= help: within `(std::string::String, regex::RegexSet)`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::Unsaf
eCell<std::option::Option<std::boxed::Box<std::cell::RefCell<regex::exec::ProgramCacheInner>>>>`
= note: required because it appears within the type `thread_local::CachedThreadLocal<std::cell::RefCell<regex::exec::ProgramCacheInner>
>`
= note: required because it appears within the type `regex::internal::Exec`
= note: required because it appears within the type `regex::RegexSet`
= note: required because it appears within the type `(std::string::String, regex::RegexSet)`
= note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `std::ptr::NonNull<(std::string::String, regex
::RegexSet)>`
= note: required because it appears within the type `hashbrown::raw::RawTable<(std::string::String, regex::RegexSet)>`
= note: required because it appears within the type `hashbrown::map::HashMap<std::string::String, regex::RegexSet, std::collections::ha
sh_map::RandomState>`
= note: required because it appears within the type `std::collections::HashMap<std::string::String, regex::RegexSet>`
= note: required because it appears within the type `build_gecko::bindings::generate_structs::Callbacks`
error[E0277]: the type `std::cell::UnsafeCell<regex::exec::ProgramCacheInner>` may contain interior mutability and a reference may not be s
afely transferrable across a catch_unwind boundary
--> servo/components/style/build_gecko.rs:387:14
|
387 | impl ParseCallbacks for Callbacks {
| ^^^^^^^^^^^^^^ `std::cell::UnsafeCell<regex::exec::ProgramCacheInner>` may contain interior mutability and a reference m
ay not be safely transferrable across a catch_unwind boundary
|
= help: within `(std::string::String, regex::RegexSet)`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::Unsaf
eCell<regex::exec::ProgramCacheInner>`
= note: required because it appears within the type `std::cell::RefCell<regex::exec::ProgramCacheInner>`
= note: required because it appears within the type `std::marker::PhantomData<std::cell::RefCell<regex::exec::ProgramCacheInner>>`
= note: required because it appears within the type `thread_local::ThreadLocal<std::cell::RefCell<regex::exec::ProgramCacheInner>>`
= note: required because it appears within the type `thread_local::CachedThreadLocal<std::cell::RefCell<regex::exec::ProgramCacheInner>
>`
= note: required because it appears within the type `regex::internal::Exec`
= note: required because it appears within the type `regex::RegexSet`
= note: required because it appears within the type `(std::string::String, regex::RegexSet)`
= note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `std::ptr::NonNull<(std::string::String, regex
::RegexSet)>`
= note: required because it appears within the type `hashbrown::raw::RawTable<(std::string::String, regex::RegexSet)>`
= note: required because it appears within the type `hashbrown::map::HashMap<std::string::String, regex::RegexSet, std::collections::ha
sh_map::RandomState>`
= note: required because it appears within the type `std::collections::HashMap<std::string::String, regex::RegexSet>`
= note: required because it appears within the type `build_gecko::bindings::generate_structs::Callbacks`
error[E0277]: the type `std::cell::UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable acros
s a catch_unwind boundary
--> servo/components/style/build_gecko.rs:387:14
|
387 | impl ParseCallbacks for Callbacks {
| ^^^^^^^^^^^^^^ `std::cell::UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transfer
rable across a catch_unwind boundary
|
= help: within `(std::string::String, regex::RegexSet)`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::Unsaf
eCell<isize>`
= note: required because it appears within the type `std::cell::Cell<isize>`
= note: required because it appears within the type `std::cell::RefCell<regex::exec::ProgramCacheInner>`
= note: required because it appears within the type `std::marker::PhantomData<std::cell::RefCell<regex::exec::ProgramCacheInner>>`
= note: required because it appears within the type `thread_local::ThreadLocal<std::cell::RefCell<regex::exec::ProgramCacheInner>>`
= note: required because it appears within the type `thread_local::CachedThreadLocal<std::cell::RefCell<regex::exec::ProgramCacheInner>
>`
= note: required because it appears within the type `regex::internal::Exec`
= note: required because it appears within the type `regex::RegexSet`
= note: required because it appears within the type `(std::string::String, regex::RegexSet)`
= note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `std::ptr::NonNull<(std::string::String, regex
::RegexSet)>`
= note: required because it appears within the type `hashbrown::raw::RawTable<(std::string::String, regex::RegexSet)>`
= note: required because it appears within the type `hashbrown::map::HashMap<std::string::String, regex::RegexSet, std::collections::ha
sh_map::RandomState>`
= note: required because it appears within the type `std::collections::HashMap<std::string::String, regex::RegexSet>`
= note: required because it appears within the type `build_gecko::bindings::generate_structs::Callbacks`
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0277`.
error: Could not compile `style`.
To learn more, run the command again with --verbose.
gmake[3]: *** [/usr/obj/ports/firefox-esr-60.7.2/firefox-60.7.2/config/rules.mk:979: force-cargo-library-build] Error 101
of course the same codebase is fine with rust 1.35.0, and i didnt see anything obvious in https://hg.mozilla.org/releases/mozilla-esr60/shortlog that says "fix build with rust 1.36.0".
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Comment 1•5 years ago
|
||
Trying a thunderbird 60.7.2 build too, but i suppost it will also fail.
Reporter | ||
Comment 2•5 years ago
|
||
This failure raises some questions:
- is taskcluster testing future/new rust releases in advance (i guess so), or it's the job of rust developers to test the ecosystem before a release ?
- should it test esr branches in addition to release/beta/central ?
- should the bug be filed to servo ?
- is it something local to openbsd, or it also fails on tier1 archs and i didnt found an existing bug to dupe ?
Comment 3•5 years ago
|
||
I just finished the build of thunderbird 60.7.2 and it built fine with OpenBSD port (and rustc 1.36).
Comment 4•5 years ago
|
||
Our policy has generally been that beta/release/ESR are expected to not compile with any other version of rust besides the minimum listed in rust.configure. I filed bug 1562625 for making configure tell you that.
Comment 5•5 years ago
|
||
(To be clear, this is not just "OpenBSD is tier 3"; we have this policy for tier 1 platforms as well.)
Reporter | ||
Comment 6•5 years ago
|
||
That's.. pretty hostile to many third-parties distributing firefox :)
You're basically trying to enforce the rust compiler version to follow firefox updates in that case.... and you cant assume everyone can use rustup to get the rust version you want. Most packaging systems dont allow free network access to build systems, so even on platforms where rustup works, it might not fly.
Comment 7•5 years ago
|
||
(In reply to Landry Breuil (:gaston) from comment #6)
That's.. pretty hostile to many third-parties distributing firefox :)
You're basically trying to enforce the rust compiler version to follow firefox updates in that case.... and you cant assume everyone can use rustup to get the rust version you want. Most packaging systems dont allow free network access to build systems, so even on platforms where rustup works, it might not fly.
I don't understand this objection. Comment 4 says that for ESR, say, we don't support any version other than 1.24:
https://searchfox.org/mozilla-esr60/source/build/moz.configure/rust.configure#70
How is that "enforcing the rust compiler version to follow firefox updates"?
Or is the objection that many other packages on the system will use the newer Rust version, and Firefox is being the odd one out trying to use some older version?
Reporter | ||
Comment 8•5 years ago
|
||
So far, we had no issues building -release and -esr with newer releases of rust. Even if it was not supported (i'm learning it now), it was working.
Updating rust, we test for all its consumers, and for the odd ones that fail to compile with the newer version, usually there's a newer release or a patch floating around to fix the build failure, and we can move on. So yes firefox is the odd one trying to enforce the use of an older version..
Comment hidden (obsolete) |
Comment 10•5 years ago
|
||
This turns out to be a regression in Rust: https://github.com/rust-lang/rust/issues/62301
Comment 11•5 years ago
|
||
The fix was backported to 1.36.0, could you try the latest build? https://internals.rust-lang.org/t/rust-1-36-0-pre-release-testing/10490/5
Comment 12•5 years ago
|
||
(In reply to Simon Sapin (:SimonSapin) from comment #11)
The fix was backported to 1.36.0, could you try the latest build? https://internals.rust-lang.org/t/rust-1-36-0-pre-release-testing/10490/5
firefox-esr 60.7.2 build fine with rust 1.36.0 now. thanks !
Updated•5 years ago
|
Description
•