Opened 7 years ago

Closed 6 years ago

#55278 closed update (fixed)

webkit2-gtk-devel @2.19.1: progress in attempts to build this version

Reported by: kencu (Ken) Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version:
Keywords: security Cc: dbevans (David B. Evans), yan12125 (Chih-Hsuan Yen)
Port: webkit2-gtk-devel

Description

I thought I'd open a ticket to follow along attempts to get webkit2-gtk-devel to build the current version 2.19.1. This may not in the end be possible, as it appears that the darwin code has been stripped out of webkit2-gtk sometime in the past 18 months, and it seems to be geared towards windows and linux now.

Nonetheless, intrepid explorer, I thought I'd try. I have it building to a certain point (13%) and then it fails with this ruby command:

make[2]: Entering directory `/opt/local/var/macports/build/_opt_myports_www_webkit2-gtk-devel/webkit2-gtk-devel/work/build'
[ 13%] Generating ../../DerivedSources/JavaScriptCore/LLIntAssembly.h
cd /opt/local/var/macports/build/_opt_myports_www_webkit2-gtk-devel/webkit2-gtk-devel/work/build/DerivedSources/JavaScriptCore && /opt/local/bin/ruby2.4 /opt/local/var/macports/build/_opt_myports_www_webkit2-gtk-devel/webkit2-gtk-devel/work/webkitgtk-2.19.1/Source/JavaScriptCore/offlineasm/asm.rb -I/opt/local/var/macports/build/_opt_myports_www_webkit2-gtk-devel/webkit2-gtk-devel/work/build/DerivedSources/JavaScriptCore/ /opt/local/var/macports/build/_opt_myports_www_webkit2-gtk-devel/webkit2-gtk-devel/work/webkitgtk-2.19.1/Source/JavaScriptCore/llint/LowLevelInterpreter.asm /opt/local/var/macports/build/_opt_myports_www_webkit2-gtk-devel/webkit2-gtk-devel/work/build/bin/LLIntOffsetsExtractor /opt/local/var/macports/build/_opt_myports_www_webkit2-gtk-devel/webkit2-gtk-devel/work/build/DerivedSources/JavaScriptCore/LLIntAssembly.h

with this error:

offlineasm: No magic values found. Skipping assembly file generation.

and there I got stuck. I'll post up the patches I've used for anyone interested in trying this further.

Attachments (3)

portfile-webkit2gtkdevel.patch (6.7 KB) - added by kencu (Ken) 7 years ago.
patch-Source-WTF-wtf-ramsize.cpp.diff (2.6 KB) - added by kencu (Ken) 7 years ago.
patch-Source-WTF-wtf-threads-Signals.cpp.diff (360 bytes) - added by kencu (Ken) 7 years ago.

Download all attachments as: .zip

Change History (26)

Changed 7 years ago by kencu (Ken)

Changed 7 years ago by kencu (Ken)

Changed 7 years ago by kencu (Ken)

comment:1 Changed 7 years ago by yan12125 (Chih-Hsuan Yen)

FWIW, I had once tried to build webkit2-gtk 2.18.0 on 10.12 with some patches. It builds but crashes on startup. Not sure how many things are changed between 2.18.0 and 2.19.1, though.

comment:2 Changed 7 years ago by yan12125 (Chih-Hsuan Yen)

Cc: yan12125 added

comment:3 Changed 7 years ago by mf2k (Frank Schima)

Cc: dbevans added
Owner: set to jeremyhu
Status: newassigned
Summary: webkit2-gtk-devel @2.19.1: progress in attemps to build this versionwebkit2-gtk-devel @2.19.1: progress in attempts to build this version

Don't forget to Cc the port maintainers.

comment:4 in reply to:  1 Changed 7 years ago by kencu (Ken)

Replying to yan12125:

FWIW, I had once tried to build webkit2-gtk 2.18.0 on 10.12 with some patches. It builds but crashes on startup. Not sure how many things are changed between 2.18.0 and 2.19.1, though.

Looks like we came across similar issues. I like some of your fixes better.

I'll try building your version and see where I get. Thanks.

comment:5 in reply to:  3 Changed 7 years ago by kencu (Ken)

Replying to mf2k:

Don't forget to Cc the port maintainers.

Thanks, Frank. I have developed the impression that Dave and Jeremy have more or less divested themselves of this port due to lack of upstream support for Darwin, but I could be wrong about that.

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

If so, they should remove themselves as maintainers.

comment:7 Changed 7 years ago by kencu (Ken)

Yan - your 2.18.0 version built through without trouble on high sierra for me. I subbed my Ramsize.cpp patch instead of yours, as you mentioned your webkit2-gtk crashed on startup and that seemed to me to be the most likely reason that might happen. I didn't try building your version as it is (at least for now).

Whether that was the issue or not, it works for me with both surf and epiphany. I'll admit, I thought it would be harder to get the darwin build working again after seeing the darwin code stripped out. I'm encouraged! I'd like to see if the gtk2 plugins can be set to work again, as I saw you had disabled those - was there some reason you disabled them?

I'll try re-enabling them and see what happens, then try building it on some older systems as well. If it all works, we could probably consider rotating webkit2-gtk-devel to webkit2-gtk, and then using 2.18.0 as the new webkit2-gtk-devel --- and then see if 2.19.1 will build.

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

Success, I think. webkit2-gtk @2.18.0 builds fine with the +gtk2 plugins enabled, and with a little bit of jiggy-jiggy, builds and runs on 10.6.8 as well. That's rewarding. 10.6.8 is hurting for a new browser plan, and epiphany with webkit2-gtk @2.18.0 is a pretty new browser to use.

$ port -v installed webkit2-gtk
The following ports are currently installed:
  webkit2-gtk @2.18.0_0+gtk2+x11 (active) platform='darwin 10' archs='x86_64' date='2017-11-10T15:13:21-0800'

I think we're getting close to a PR here. We would rotate the current webkit2-gtk-devel to be webkit2-gtk, and this port can become the new webkit2-gtk-devel. Then we can work on bumping it a bit further to 2.19.1, which is the current version release last week.

comment:9 Changed 7 years ago by kencu (Ken)

If you'd like to test this out, webkit2-gtk @2.18.0 in a working state is presently here <https://github.com/kencu/myports/tree/master/www/webkit2-gtk>.

comment:10 Changed 7 years ago by kencu (Ken)

This new version of webkit2-gtk would allow us to upgrade to a much newer version of epiphany as well, I believe.

comment:11 Changed 7 years ago by kencu (Ken)

And indeed, epiphany 3.26.2 builds without much trouble against webkit2-gtk 2.18.0. The portfile is here for anyone who would like to test out this new version of epiphany <https://github.com/kencu/myports/tree/master/gnome/epiphany>.

There is a hiccup with the install_name_tool during meson builds, and the directory is set incorrectly. This needs a proper fix, but I hacked together specific fixes for epiphany for now.

comment:12 Changed 7 years ago by yan12125 (Chih-Hsuan Yen)

Cool! Glad that my WIP patch can help. And it's exciting that it can work with correct patches! Looking forward to the actual PR!

I remove gtk2 just because I don't need it and I'd like to concentrate on WebKit issues that gtk2/gtk3 differences :)

comment:13 Changed 6 years ago by yan12125 (Chih-Hsuan Yen)

As a program I use now requires webkit2-gtk >= 2.20, I managed to update this port to 2.20.3: https://github.com/yan12125/macports-ports/tree/wip-update-webkit2-gtk/www/webkit2-gtk

comment:14 Changed 6 years ago by l2dy (Zero King)

Keywords: security added

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

Yeah, the webkitgtk2 version we have in MacPorts now is SO OLD it probably automatically sends your credit card number to foreign criminals on launch.

Unfortunately the webkit group have made it almost impossible to keep up the builds -- the webkit2gtk builds do not support Darwin without tricks, and the Apple build of webkit -- I forget just now -- but we don't use it in MacPorts.

ANYONE using webkit2gtk will have to accept that it is not a modern, secure browser and never will be unless they start supporting Darwin better.

(If we're worried about a pdf file tying up a processor, that would a security risk of 1/106 compared to this.)

comment:16 Changed 6 years ago by yan12125 (Chih-Hsuan Yen)

kencu: how do you think about commiting a Portfile that works for *some* new systems first, and then fix them for older systems?

comment:17 Changed 6 years ago by kencu (Ken)

Indeed. Good plan. The issue I had with older systems was mostly working around the differences in the gcc headers vs the libc++ headers. I was hoping libc++ would just be standard be now...

comment:18 Changed 6 years ago by yan12125 (Chih-Hsuan Yen)

FYI: I added a WIP PR at https://github.com/macports/macports-ports/pull/2039. I didn't check whether files/patch-snowleopard-* are still viable or not.

comment:19 Changed 6 years ago by yan12125 (Chih-Hsuan Yen)

Hi kencu, how do you think about changing the title of this ticket to "webkit2-gtk @2.20.3: progress in attempts to build this version"? Looks like recent efforts are primarily about the stable version instead of the -devel one.

comment:20 Changed 6 years ago by yan12125 (Chih-Hsuan Yen)

And for webkit2-gtk-devel - an idea is marking it replace_by webkit2-gtk. Keeping a webkit2-gtk port up-to-date is already a big headache; two such ports are horrible.

comment:21 Changed 6 years ago by yan12125 (Chih-Hsuan Yen)

In 1be5ae51f2a2c1d061d3c05718c3559324c03f9c/macports-ports (master):

webkit2-gtk: update to 2.20.3

Notable changes:

  • Source/WebKit2 is renamed to Source/WebKit [1]
  • DatabaseProcess is renamed to StorageProcess [2]
  • testb3 is now enabled in developer mode only [3]
  • PR-157554.patch is superseded by patch-WTF-wtf-Randomdevice.diff

There are also patches for 2.18.0 during this upgrade [4]. Some of them
are not necessary as of 2.20.3. Specificially,

  • patch-disable-mach-exceptions.diff: no longer needed after [5]
  • patch-fix-include-path.diff: no longer needed after [6]

See also: #55278

[skip ci]

[1] https://github.com/WebKit/webkit/commit/7f8a4a6dab6e75a624a97e5ce47de5626476b67d
[2] https://bugs.webkit.org/show_bug.cgi?id=174879
[3] https://github.com/WebKit/webkit/commit/e276ecde58923cb70dcfbc52544c6b81b661dac4
[4] https://github.com/kencu/myports/tree/master/www/webkit2-gtk/files
[5] https://github.com/WebKit/webkit/commit/ebd290d9fba427a15c6fd8227e022fbc72cc8765
[6] https://github.com/WebKit/webkit/commit/1f8841aad73175256656a31d7d43fff1e069ba73

Co-authored-by: Ken Cunningham <kencu@…>

comment:22 Changed 6 years ago by kencu (Ken)

Looks like I have some work to do to fix the builds for 10.4 to 10.9.

Re: the -devel subport. The idea is that this submission might have become that -devel subport for a while, until we figured out all the warts and then moved it to the be the main port. I'm not too fussed either way about that.

comment:23 Changed 6 years ago by kencu (Ken)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.