Page MenuHomeFreeBSD

lang/rust: Update to 1.36.0
ClosedPublic

Authored by tobik on Jun 30 2019, 6:48 AM.
Tags
None
Referenced Files
F80136694: D20810.diff
Thu, Mar 28, 10:22 AM
Unknown Object (File)
Thu, Feb 29, 9:05 PM
Unknown Object (File)
Feb 24 2024, 2:11 PM
Unknown Object (File)
Feb 23 2024, 11:44 AM
Unknown Object (File)
Jan 15 2024, 2:25 PM
Unknown Object (File)
Jan 15 2024, 7:38 AM
Unknown Object (File)
Jan 7 2024, 3:07 AM
Unknown Object (File)
Jan 7 2024, 1:46 AM

Details

Summary
Test Plan

12.0/amd64 ok, consumers (- Gecko) ok
11.2/i386 ok

@jbeich Can you test the Gecko ports?

@mikael.urankar_gmail.com Can you test on arm?

@pkubaj Can you test on powerpc64?

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

$ cat /poudriere/data/logs/bulk/112amd64-default/latest/.poudriere.ports.failed
mail/thunderbird thunderbird-60.7.2_2 build ??? 1780
www/firefox-esr firefox-esr-60.7.2_1,1 build checksum 2162
error[E0277]: the type `std::cell::UnsafeCell<std::option::Option<std::boxed::Box<std::cell::RefCell<regex::exec::ProgramCacheInner>>>>` may 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::ProgramCacheInner>>>>` 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::UnsafeCell<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::hash_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 safely 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 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::UnsafeCell<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::hash_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 across 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 transferrable across a catch_unwind boundary
    |
    = help: within `(std::string::String, regex::RegexSet)`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell<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::hash_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`.

which was refactored in Firefox 61.

  • Rebase after rP505519
  • Fix build of firefox-esr (ok on 12.0/amd64) and maybe thunderbird (not yet tested)

which was refactored in Firefox 61.

Thanks for checking. I tried cherry picking those changes but they require even more changes since GenerateServoCSSPropList.py is not available on esr60.

Luckily the problem can be fixed with a small patch instead. My guess is that Callbacks is not actually unwind safe though. But it is only used at build time and probably also was not with Rust < 1.36.0.

it's ok on armv6 and armv7. I screwed up the bootstrap on aarch64, I have to regenerate it.

lang/rust/Makefile
145 ↗(On Diff #59215)

Unrelated to the review but can we make the style consistent with the other REINPLACE_CMD?
's|"files":{[^}]*}|"files":{}|' \

In D20810#450684, @mikael.urankar_gmail.com wrote:

it's ok on armv6 and armv7.

Great. Thanks for checking.

I screwed up the bootstrap on aarch64, I have to regenerate it.

Hmm, ok. Let me know when it's ready.

  • Fix build of firefox-esr (ok on 12.0/amd64) and maybe thunderbird (not yet tested)

Thunderbird built fine on 12.0/amd64 too.

lang/rust/Makefile
145 ↗(On Diff #59215)

Let's do some cleanup in a separate commit/review after this one. Sed style is inconsistent (most use ,) in the entire Makefile. It also doesn't really make sense to edit src/stage0.txt 3 times in a row instead of once, shell for loop instead of .for (which forces us to include a bunch of extra \), inconsistent target command formatting, etc.

Re firefox-esr, the OpenBSD devs opened a bug for this: https://bugzilla.mozilla.org/show_bug.cgi?id=1562579. It seems that Mozilla is pretty hostile to packagers that want to build firefox-esr with something other than Rust 1.24.0. Also see https://bugzilla.mozilla.org/show_bug.cgi?id=1562625.

It's ok on aarch64 and ppc64 elfv2

Re firefox-esr, the OpenBSD devs opened a bug for this: https://bugzilla.mozilla.org/show_bug.cgi?id=1562579. It seems that Mozilla is pretty hostile to packagers that want to build firefox-esr with something other than Rust 1.24.0. Also see https://bugzilla.mozilla.org/show_bug.cgi?id=1562625.

Considering that 68 is supposed to be a new ESR, maybe we could upgrade the ESR port too to 68?

Or we could provide a separate Rust port frozen at the version that Mozilla recommends for ESR, updated only after a switch to a new ESR.

  • Sync aarch64 bootstraps

Re firefox-esr, the OpenBSD devs opened a bug for this: https://bugzilla.mozilla.org/show_bug.cgi?id=1562579.

https://github.com/rust-lang/rust/pull/62311 plans to include fix on Rust side, so expect another build for 1.36.0.

Considering that 68 is supposed to be a new ESR, maybe we could upgrade the ESR port too to 68?

www/firefox-esr is less important than mail/thunderbird. And Thunderbird 68 is still at Beta stage.

  • Rebase
  • Update distinfo after upstream pushed some emergency backports to stable
  • Drop Gecko workarounds (untested, test build of firefox-esr on 12.0/amd64 in progress)

firefox-esr (60.8.0) and thunderbird (60.8.0) built fine on 11.2 i386 without files/patch-rust1.36.0.

  • Rebase

firefox-esr (60.8.0) and thunderbird (60.8.0) built fine without files/patch-rust1.36.0.

Same here (just thunderbird 60.7.2).

This revision was not accepted when it landed; it landed in state Needs Review.Jul 4 2019, 2:42 PM
Closed by commit rP505837: lang/rust: Update to 1.36.0 (authored by tobik). · Explain Why
This revision was automatically updated to reflect the committed changes.