Page MenuHomeFreeBSD

lang/rust: Update to 1.36.0
ClosedPublic

Authored by tobik on Jun 30 2019, 6:48 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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

tobik created this revision.Jun 30 2019, 6:48 AM
tobik edited the test plan for this revision. (Show Details)Jun 30 2019, 10:08 AM
$ 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.

tobik updated this revision to Diff 59243.Jul 1 2019, 7:23 AM
  • Rebase after rP505519
  • Fix build of firefox-esr (ok on 12.0/amd64) and maybe thunderbird (not yet tested)
tobik added a comment.Jul 1 2019, 7:28 AM

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":{}|' \

tobik added a comment.Jul 2 2019, 4:24 AM

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.

tobik updated this revision to Diff 59301.Jul 2 2019, 4:26 AM
tobik added a comment.Jul 2 2019, 6:55 AM

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

pkubaj added a comment.Jul 2 2019, 7:18 AM

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?

pkubaj added a comment.Jul 2 2019, 7:20 AM

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.

tobik updated this revision to Diff 59307.Jul 2 2019, 7:22 AM
  • Sync aarch64 bootstraps
jbeich added a comment.Jul 2 2019, 4:29 PM

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.

tobik updated this revision to Diff 59344.Jul 3 2019, 3:12 PM
  • 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)
jbeich accepted this revision.EditedJul 4 2019, 12:03 AM

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

tobik updated this revision to Diff 59383.Jul 4 2019, 5:39 AM
  • 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).

tobik accepted this revision.Jul 4 2019, 5:40 AM
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.