Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#59387 closed defect (fixed)

webkit2-gtk: rebuild fails since icu 65.1 update due to missing patch for U16_NEXT change

Reported by: ewenmcneill (Ewen McNeill) Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: ewenmcneill (Ewen McNeill), m5comp, kencu (Ken), JohnFHall (John Hall), dershow, mopihopi, nstanger (Nigel Stanger), jjstickel (Jonathan Stickel)
Port: webkit2-gtk

Description

icu was updated by https://github.com/macports/macports-ports/commit/8cf9b206c3c2fcca0e0f6ee2a46f47bc828a3cb7 from 58.2 to 65.1. This resulted in a number of ports needing to be rebuilt, including webkit2-gtk. That commit did bump the webkit2-gtk port revision to cause a rebuild (and a rebuild is also triggered by broken binaries). But unfortunately it seems like it does not build from source any longer (ie with the new icu).

From some hunting around it appears that in order to build with icu 65.1 it will be necessary to apply the patch in https://gitlab.gnome.org/GNOME/jhbuild/commit/e8b48870602c3a8e474e54cf1c6151b98651aae9. It looks like the icu upgrade commit above did apply something very much like that patch to aqua/qt5, but it doesn't seem to have been applied to webkit2-gtk resulting in the build errors on each use of U16_NEXT:

:info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/build/DerivedSources/WebCore/unified-sources/UnifiedSource214.cpp:4:
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.20.5/Source/WebCore/dom/Document.cpp:4691:39: error: expected ';' after do/while statement
:info:build     U16_NEXT(characters, i, length, c)
:info:build                                       ^
:info:build                                       ;
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.20.5/Source/WebCore/dom/Document.cpp:4696:43: error: expected ';' after do/while statement
:info:build         U16_NEXT(characters, i, length, c)
:info:build                                           ^
:info:build                                           ;
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.20.5/Source/WebCore/dom/Document.cpp:4756:46: error: expected ';' after do/while statement
:info:build         U16_NEXT(qualifiedName, i, length, c)
:info:build                                              ^
:info:build                                              ;

(That's all the references to U16_NEXT in the file; see also https://trac.webkit.org/changeset/250747/webkit and https://bugs.webkit.org/show_bug.cgi?id=202600 for more upstream references to this fix.)

webkit-gtk (ie, not webkit2-gtk) did seem to rebuild okay, which seems to be because it did get the extra patch (https://github.com/macports/macports-ports/commit/8cf9b206c3c2fcca0e0f6ee2a46f47bc828a3cb7#diff-ea4a1230839e4382823790f8fb451ce2). But somehow webkit2-gtk (and maybe webkit2-gtk-devel which didn't get a rev bump?) were overlooked. That explains why webkit-gtk builds, but webkit2-gtk does not.

I'm using macOS 10.14.6, without having updated XCode to the 10.15 release. These are the webkit-gtk and webkit2-gtk versions I have installed:

ewen@ashram:/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/www/webkit2-gtk$ port installed | grep webkit
  webkit-gtk @2.4.11_2+video
  webkit-gtk @2.4.11_3+video (active)
  webkit2-gtk @2.20.5_0+gtk2+x11
  webkit2-gtk @2.20.5_1+gtk2+x11 (active)
ewen@ashram:/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/www/webkit2-gtk$ 

Everything else has upgraded/rebuilt correctly after the icu upgrade, except webkit2-gtk:

ewen@ashram:~$ port outdated
The following installed ports are outdated:
webkit2-gtk                    2.20.5_1 < 2.20.5_2       
ewen@ashram:~$ 

Change History (17)

comment:1 Changed 5 years ago by ewenmcneill (Ewen McNeill)

Cc: ewenmcneill added

comment:2 Changed 5 years ago by kencu (Ken)

note there is an open PR to update webkit2-gtk already to a much newer version.

Perhaps that new version takes care of this issue.

comment:3 Changed 5 years ago by ewenmcneill (Ewen McNeill)

I'm assuming you mean https://github.com/macports/macports-ports/pull/5518 to update webkit2-gtk to 2.26.1. It looks like webkit 2.26.1 was released about three weeks go (https://webkitgtk.org/2019/09/23/webkitgtk2.26.1-released.html).

The upstream patch (https://gitlab.gnome.org/GNOME/jhbuild/commit/e8b48870602c3a8e474e54cf1c6151b98651aae9) is a week old, and was merged to master upstream. So I expect it not to be included in webkit 2.26.1. icu 65.1 was only released a couple of weeks ago (https://github.com/unicode-org/icu/releases/tag/release-65-1).

(For anyone else playing along at home, see also #58376, to update webkit2-gtk.)

Thanks for the heads up though,

Ewen

comment:4 Changed 5 years ago by kencu (Ken)

ok, will build it against the new icu and add the patch if needed. Thanks for the heads-up!

comment:5 Changed 5 years ago by m5comp

Cc: m5comp added

comment:6 Changed 5 years ago by mf2k (Frank Schima)

Cc: devans@… removed
Keywords: icu U16_NEXT removed
Owner: set to dbevans
Status: newassigned

comment:7 in reply to:  4 Changed 5 years ago by dbevans (David B. Evans)

Cc: kencu added
Status: assignedaccepted

Replying to kencu:

ok, will build it against the new icu and add the patch if needed. Thanks for the heads-up!

I've done this and confirmed that the problem occurs with the latest version of the port when rebuilt with the icu update. See my comments on the PR. The problem I see is that the error appears to be in the derived source that is generated at build time not in the original distributed source so it's not clear to me how to apply the patch.

At any rate, lets not worry at this point about the old, existing version of the port and concentrate on getting the PR to work with updated icu so it can be committed. Builds using the older icu version work really well so solving this problem is the key, IMO, to merging the PR. Let's move any discussion there to avoid confusion.

comment:8 Changed 5 years ago by kencu (Ken)

We’re back down in Point Roberts, WA, shopping for the day, but I was planning on rebasing this later today, and then adding that patch. Then I think we push and clean up the older system issues as we spot them, if that sounds acceptable.

comment:9 Changed 5 years ago by dbevans (David B. Evans)

Yes, I agree with that with the addition of the runtime dependency on adwaita-icon-theme for the MiniBrowser. But compare the target file at patch time with the derived version that exists at the failure point to see what I'm saying. As far as I can see, the U16_NEXT semicolon issue only exists at the later point in the build. I've also got honey-do tasks to deal with today so I'll leave it to you to work out things when you have time later.

comment:10 Changed 5 years ago by JohnFHall (John Hall)

Cc: JohnFHall added

comment:11 Changed 5 years ago by dershow

Cc: dershow added

comment:12 Changed 5 years ago by mopihopi

Cc: mopihopi added

comment:13 Changed 5 years ago by nstanger (Nigel Stanger)

Cc: nstanger added

comment:14 Changed 5 years ago by jjstickel (Jonathan Stickel)

Cc: jjstickel added

comment:15 Changed 5 years ago by kencu (Ken)

Launched! There are some build failures from the last webkit2-gtk 2.20.1 version just showing up, but the new 2.26.1 version hasn't hit the buildbots yet. I am hopeful!

comment:16 Changed 5 years ago by kencu (Ken)

Resolution: fixed
Status: acceptedclosed

icu patch added to 2.26.1 update.

comment:17 Changed 5 years ago by ewenmcneill (Ewen McNeill)

FTR, the new version (2.26.1) built fine for me on macOS 10.14.6, and left me with no broken/outstanding packages. (It's a fairly slow build locally, so it'd be useful when the auto-builders are able to build it. But my original issue with building it due to the icu changes is fixed.)

Thanks for the quick turn around on fixing the issue,

Ewen

--->  Scanning binaries for linking errors
--->  Found 30 broken files, matching files to ports     
--->  Found 1 broken port, determining rebuild order
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt: webkit2-gtk @2.20.5+gtk2+x11
Continue? [Y/n]: 
--->  Fetching archive for ninja
--->  Attempting to fetch ninja-1.9.0_0.darwin_18.x86_64.tbz2 from https://packages.macports.org/ninja
--->  Attempting to fetch ninja-1.9.0_0.darwin_18.x86_64.tbz2.rmd160 from https://packages.macports.org/ninja
--->  Installing ninja @1.9.0_0
--->  Activating ninja @1.9.0_0
--->  Cleaning ninja
--->  Computing dependencies for enchant2
--->  Fetching archive for enchant2
--->  Attempting to fetch enchant2-2.2.3_0+applespell.darwin_18.x86_64.tbz2 from https://packages.macports.org/enchant2
--->  Attempting to fetch enchant2-2.2.3_0+applespell.darwin_18.x86_64.tbz2.rmd160 from https://packages.macports.org/enchant2
--->  Installing enchant2 @2.2.3_0+applespell
--->  Activating enchant2 @2.2.3_0+applespell
--->  Cleaning enchant2
--->  Computing dependencies for webkit2-gtk
--->  Fetching archive for webkit2-gtk
--->  Attempting to fetch webkit2-gtk-2.26.1_0+minibrowser+x11.darwin_18.x86_64.tbz2 from https://packages.macports.org/webkit2-gtk
--->  Attempting to fetch webkit2-gtk-2.26.1_0+minibrowser+x11.darwin_18.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/webkit2-gtk
--->  Attempting to fetch webkit2-gtk-2.26.1_0+minibrowser+x11.darwin_18.x86_64.tbz2 from http://lil.fr.packages.macports.org/webkit2-gtk
--->  Fetching distfiles for webkit2-gtk
--->  Attempting to fetch webkitgtk-2.26.1.tar.xz from http://aarnet.au.distfiles.macports.org/pub/macports/distfiles/webkit-gtk
--->  Attempting to fetch webkitgtk-2.26.1.tar.xz from https://distfiles.macports.org/webkit-gtk
--->  Verifying checksums for webkit2-gtk                                       
--->  Extracting webkit2-gtk
--->  Applying patches to webkit2-gtk
--->  Configuring webkit2-gtk
--->  Building webkit2-gtk
--->  Staging webkit2-gtk into destroot
--->  Installing webkit2-gtk @2.26.1_0+minibrowser+x11
--->  Cleaning webkit2-gtk
--->  Computing dependencies for webkit2-gtk
--->  Deactivating webkit2-gtk @2.20.5_1+gtk2+x11
--->  Cleaning webkit2-gtk
--->  Activating webkit2-gtk @2.26.1_0+minibrowser+x11
--->  Cleaning webkit2-gtk
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.
ewen@ashram:~$ port outdated
No installed ports are outdated.
ewen@ashram:~$ port installed | grep webkit
  webkit-gtk @2.4.11_2+video
  webkit-gtk @2.4.11_3+video (active)
  webkit2-gtk @2.20.5_0+gtk2+x11
  webkit2-gtk @2.20.5_1+gtk2+x11
  webkit2-gtk @2.26.1_0+minibrowser+x11 (active)
ewen@ashram:~$ 
Note: See TracTickets for help on using tickets.