Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wpewebkit,webkitgtk: Bump to version 2.46.1 #509

Merged
merged 8 commits into from
Oct 15, 2024
Merged

wpewebkit,webkitgtk: Bump to version 2.46.1 #509

merged 8 commits into from
Oct 15, 2024

Conversation

psaavedra
Copy link
Member

@psaavedra psaavedra commented Sep 18, 2024

  • Create new recipe for version 2.46.X
  • Delete recipes for version 2.42.5

Changes:

  • Skia is used instead of Cairo for 2D rendering, and GPU rendering is enabled by default.
  • Offscreen Canvas is now enabled by default.
  • Add support for system tracing using Sysprof.
  • Add new API to load settings from a config file.
  • Add a new setting to toggle 2D Canvas acceleration (enabled by default).
  • Undeprecate console messages API and make it available in the 2.0 API.

Release Notes:

Also CI updates in the build tests jobs definitions:

  • Update test jobs definitions to primary build 2.46.X
  • Remove preset for 2.42 and add a new one for 2.42

Copy link
Member

@aperezdc aperezdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@psaavedra Changes LGTM in general. We may want to add this somewhere in wpewebkit.inc, though:

EXTRA_OECMAKE += "-DENABLE_WPE_PLATFORM=OFF"

(See this message in the mailing list, I forgot to make that option disabled by default in the release branch.)

@aperezdc
Copy link
Member

@psaavedra Changes LGTM in general. We may want to add this somewhere in wpewebkit.inc, though:

EXTRA_OECMAKE += "-DENABLE_WPE_PLATFORM=OFF"

(See this message in the mailing list, I forgot to make that option disabled by default in the release branch.)

Actually, that won't work, there's an unconditional SET_AND_EXPOSE_TO_BUILD(), I'm making a patch.

@aperezdc
Copy link
Member

@psaavedra Changes LGTM in general. We may want to add this somewhere in wpewebkit.inc, though:

EXTRA_OECMAKE += "-DENABLE_WPE_PLATFORM=OFF"

(See this message in the mailing list, I forgot to make that option disabled by default in the release branch.)

Actually, that won't work, there's an unconditional SET_AND_EXPOSE_TO_BUILD(), I'm making a patch.

Here's the patch needed to be able to toggle the option: WebKit/WebKit#33819

@psaavedra
Copy link
Member Author

psaavedra commented Sep 18, 2024

@aperezdc , I have a doubt for the GTK build: | -- No package 'sysprof-capture-4' found. Is sysprof really a mandatory depends? Can we set this depends off?

@aperezdc
Copy link
Member

@aperezdc , I have a doubt for the GTK build: | -- No package 'sysprof-capture-4' found. Is sysprof really a mandatory depends? Can we set this depends off?

You can go with -DUSE_SYSTEM_SYSPROF_CAPTURE=OFF to use the bundled copy of the library, or -DUSE_SYSPROF_CAPTURE=OFF to completely disable the feature.

@psaavedra
Copy link
Member Author

we are getting a build error for the WebKitGTK build:

2024-09-19T10:40:08.8312493Z | /home/bot/yocto-webkit-scarthgap/builds/raspberrypi3-mesa-webkitgtk/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/webkitgtk/2.46.0/build/bmalloc/Headers/bmalloc/EligibilityResult.h:35:5: error: expected identifier before numeric constant
2024-09-19T10:40:08.8314249Z |    35 |     Success, 
2024-09-19T10:40:08.8314565Z |       |     ^~~~~~~
2024-09-19T10:40:08.8316408Z | /home/bot/yocto-webkit-scarthgap/builds/raspberrypi3-mesa-webkitgtk/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/webkitgtk/2.46.0/build/bmalloc/Headers/bmalloc/EligibilityResult.h:35:5: error: expected '}' before numeric constant
2024-09-19T10:40:08.8319541Z | In file included from /home/bot/yocto-webkit-scarthgap/builds/raspberrypi3-mesa-webkitgtk/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/webkitgtk/2.46.0/build/bmalloc/Headers/bmalloc/EligibilityResultInlines.h:28,
2024-09-19T10:40:08.8322401Z |                  from /home/bot/yocto-webkit-scarthgap/builds/raspberrypi3-mesa-webkitgtk/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/webkitgtk/2.46.0/build/bmalloc/Headers/bmalloc/IsoHeapInlines.h:31,
2024-09-19T10:40:08.8325041Z |                  from /home/bot/yocto-webkit-scarthgap/builds/raspberrypi3-mesa-webkitgtk/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/webkitgtk/2.46.0/build/WTF/Headers/wtf/TZoneMallocInlines.h:58,
2024-09-19T10:40:08.8327893Z |                  from /home/bot/yocto-webkit-scarthgap/builds/raspberrypi3-mesa-webkitgtk/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/webkitgtk/2.46.0/webkitgtk-2.46.0/Source/WebKit/UIProcess/gtk/PointerLockManagerX11.cpp:34:
2024-09-19T10:40:08.8330867Z | /home/bot/yocto-webkit-scarthgap/builds/raspberrypi3-mesa-webkitgtk/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/webkitgtk/2.46.0/build/bmalloc/Headers/bmalloc/EligibilityResult.h:34:28: note: to match this '{'
2024-09-19T10:40:08.8332470Z |    34 | enum class EligibilityKind {
2024-09-19T10:40:08.8332889Z |       |                            ^
2024-09-19T10:40:08.8334978Z | /home/bot/yocto-webkit-scarthgap/builds/raspberrypi3-mesa-webkitgtk/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/webkitgtk/2.46.0/build/bmalloc/Headers/bmalloc/EligibilityResult.h:35:5: error: expected unqualified-id before numeric constant
2024-09-19T10:40:08.8336719Z |    35 |     Success,
2024-09-19T10:40:08.8337030Z |       |     ^~~~~~~
2024-09-19T10:40:08.8339221Z | /home/bot/yocto-webkit-scarthgap/builds/raspberrypi3-mesa-webkitgtk/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/webkitgtk/2.46.0/build/bmalloc/Headers/bmalloc/EligibilityResult.h:44:22: warning: unnecessary parentheses in declaration of 'EligibilityKind' [-Wparentheses]
2024-09-19T10:40:08.8341210Z |    44 |     EligibilityResult(EligibilityKind);
2024-09-19T10:40:08.8341683Z |       |                      ^~~~~~~~~~~~~~~~~
2024-09-19T10:40:08.8343497Z | /home/bot/yocto-webkit-scarthgap/builds/raspberrypi3-mesa-webkitgtk/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/webkitgtk/2.46.0/build/bmalloc/Headers/bmalloc/EligibilityResult.h:44:22: note: remove parentheses
2024-09-19T10:40:08.8345154Z |    44 |     EligibilityResult(EligibilityKind);
2024-09-19T10:40:08.8345627Z |       |                      ^~~~~~~~~~~~~~~~~
2024-09-19T10:40:08.8346133Z |       |                      -               -
2024-09-19T10:40:08.8348328Z | /home/bot/yocto-webkit-scarthgap/builds/raspberrypi3-mesa-webkitgtk/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/webkitgtk/2.46.0/build/bmalloc/Headers/bmalloc/EligibilityResult.h:44:23: error: field 'EligibilityKind' has incomplete type 'EligibilityResult<Config>'
2024-09-19T10:40:08.8350293Z |    44 |     EligibilityResult(EligibilityKind);
2024-09-19T10:40:08.8350762Z |       |                       ^~~~~~~~~~~~~~~
2024-09-19T10:40:08.8353022Z | /home/bot/yocto-webkit-scarthgap/builds/raspberrypi3-mesa-webkitgtk/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/webkitgtk/2.46.0/build/bmalloc/Headers/bmalloc/EligibilityResult.h:41:8: note: definition of 'struct EligibilityResult<Config>' is not complete until the closing brace
2024-09-19T10:40:08.8355020Z |    41 | struct EligibilityResult {
2024-09-19T10:40:08.8355423Z |       |        ^~~~~~~~~~~~~~~~~
2024-09-19T10:40:08.8357270Z | /home/bot/yocto-webkit-scarthgap/builds/raspberrypi3-mesa-webkitgtk/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/webkitgtk/2.46.0/build/bmalloc/Headers/bmalloc/EligibilityResult.h:45:30: error: expected ')' before '<' token
2024-09-19T10:40:08.8358997Z |    45 |     EligibilityResult(IsoPage<Config>*);
2024-09-19T10:40:08.8359461Z |       |                      ~       ^
2024-09-19T10:40:08.8359896Z |       |                              )

I am not familiar with this code. The error indicates that Success is being treated as a numeric constant or macro, possibly because Success has been defined somewhere else, potentially as a macro or constant.

@psaavedra
Copy link
Member Author

Likely the issue could be related with this flag:

//Whether to enable support for the X11 windowing target.
ENABLE_X11_TARGET:BOOL=ON

@psaavedra psaavedra force-pushed the webkit_2_46 branch 2 times, most recently from bb08c1a to 3c670a0 Compare September 30, 2024 12:11
@aperezdc
Copy link
Member

Maybe you will want to pick WebKitGTK 2.46.1 and wait for the corresponding WPE release 😉.

@psaavedra psaavedra changed the title wpewebkit,webkitgtk: Bump to version 2.46.0 wpewebkit,webkitgtk: Bump to version 2.46.1 Oct 4, 2024
conf/templates/template/presets/wpe-2_46.conf Outdated Show resolved Hide resolved
recipes-browser/wpewebkit/wpewebkit.inc Outdated Show resolved Hide resolved
recipes-browser/wpewebkit/wpewebkit_2.46.0.bb Outdated Show resolved Hide resolved
@psaavedra
Copy link
Member Author

Likely the issue could be related with this flag:

//Whether to enable support for the X11 windowing target.
ENABLE_X11_TARGET:BOOL=ON

issue: https://bugs.webkit.org/show_bug.cgi?id=278858


SRC_URI:class-devupstream = "git://github.com/WebKit/WebKit.git;protocol=https;branch=main"

SRCREV:class-devupstream = "8db1e051cf4a6d7877dd51b81b478e8367d3f052"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eacf9977760d4ea5dfcb736be73ae48c7df16f27 ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that tags belongs to the wpewebkit-2.46.1 branch. Notice that the SRC_URI:class-devupstream points to the main branch what is the default upstream branch for development. In general, I use the latest common commit between the release branch and main (git merge-base main wpewebkit-2.46.1) to set this value.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be eacf9977760d4ea5dfcb736be73ae48c7df16f27, indeed:

The devupstream class uses BBCLASSEXTEND to add a variant of the recipe that fetches from an alternative URI (e.g. Git) instead of a tarball.

When building with devupstream the sources fetched should be the same as without, and in the case of a tarball release, that corresponds to the exact commit used to generate the tarball.

Using any other commit breaks that expectation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Qingwu-Li @aperezdc Ok, your argument has changed my point of view. I have added this additional commit: abd8ebd, as we were using devupstream differently for referencing the upstream top-of-tree

@@ -0,0 +1,19 @@
From: Alberto Garcia <[email protected]>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bertogg Any chance you could send this patch upstream?

Copy link
Member

@aperezdc aperezdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still have a couple of comments.

Also, the build is currently broken with -DENABLE_VIDEO=OFF (both in main and in the 2.46 release branch); there are patches being worked on for this.

recipes-browser/webkitgtk/webkitgtk_2.46.1.bb Outdated Show resolved Hide resolved
recipes-browser/webkitgtk/webkitgtk_2.46.1.bb Outdated Show resolved Hide resolved

SRC_URI:class-devupstream = "git://github.com/WebKit/WebKit.git;protocol=https;branch=main"

SRCREV:class-devupstream = "8db1e051cf4a6d7877dd51b81b478e8367d3f052"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be eacf9977760d4ea5dfcb736be73ae48c7df16f27, indeed:

The devupstream class uses BBCLASSEXTEND to add a variant of the recipe that fetches from an alternative URI (e.g. Git) instead of a tarball.

When building with devupstream the sources fetched should be the same as without, and in the case of a tarball release, that corresponds to the exact commit used to generate the tarball.

Using any other commit breaks that expectation.

Changes:

* Skia is used instead of Cairo for 2D rendering, and GPU rendering is enabled by default.
* Offscreen Canvas is now enabled by default.
* Add support for system tracing using Sysprof.
* Add new API to load settings from a config file.
* Add a new setting to toggle 2D Canvas acceleration (enabled by default).
* Undeprecate console messages API and make it available in the 2.0 API.
* Fix login QR code not shown in WhatsApp web.
* Disable PSON by default again in GTK 3 API versions.
* Disable DMABuf video sink by default to prevent file descriptor leaks.
* Fix the build with GCC 13.
* Fix several crashes and rendering issues.

Release Notes:

* https://wpewebkit.org/release/wpewebkit-2.46.0.html
* https://wpewebkit.org/release/wpewebkit-2.46.1.html

wip
* Create new recipe for version 2.46.1
* Delete recipes for version 2.42.5

Changes:

* Skia is used instead of Cairo for 2D rendering, and GPU rendering is enabled
  by default.
* Offscreen Canvas is now enabled by default.
* Add support for system tracing using Sysprof.
* Add new API to load settings from a config file.
* Add a new setting to toggle 2D Canvas acceleration (enabled by default).
* Undeprecate console messages API and make it available in the 2.0 API.
* Use the Skia CPU renderer by default, which at the moment performs better in
  a number of embedded devices. The GPU renderer is still available and may be
  enabled by setting WEBKIT_SKIA_ENABLE_CPU_RENDERING=0 in the environment.
* Add an ENABLE_WPE_PLATFORM build option to CMake. This is disabled by
  default because the WPEPlatform API is in development and provided as part of
  the 2.46.x releases as a preview feature.
* Fix login QR code not shown in WhatsApp web.
* Fix processes not spawning when process startup is customized using the
  wpe_process_provider API from libwpe.
* Fix mouse simulation with WebDriver when using a classic WPE backend through
  libwpe.
* Disable DMABuf video sink by default to prevent file descriptor leaks.
* Fix building the MiniBrowser.
* Fix the build with libsysprof-capture version 44 and older.
* Fix the build with GCC 13.
* Fix several crashes and rendering issues.

Release Notes:

* https://wpewebkit.org/release/wpewebkit-2.46.0.html
* https://wpewebkit.org/release/wpewebkit-2.46.1.html

Also CI updates in the build tests jobs definitions:

* Update test jobs definitions to primary build 2.46.X
* Remove preset for 2.42 and add a new one for 2.42
While building WPEWebKit on musl-based systems, errors occur due to
the absence of roundevenf and roundeven functions. These are not
available in musl and other non-glibc platforms.

This patch provides fallback implementations for both functions.

Upstream: https://bugs.webkit.org/show_bug.cgi?id=281216
* drm: Fix handling of the scaling factor setting.
* gtk4: Take scaling factor into account for pointer events.
* launcher: Support toggling WebKit features with a new --features/-F
  command line option, when built against WebKit 2.42.0 or newer.
* meson: Fix the build in systems where the ln command cannot
  calculate relative symlink target paths.
* wl: Fix some items in popup menus not being rendered.
* wl: Add support for weston-protocols version 14.

Release Notes:

* https://wpewebkit.org/release/cog-0.18.3.html
* https://wpewebkit.org/release/cog-0.18.4.html
* Fix build issues in some configurations that require en explicit cast to EGLNativeWindowType.
* Fix memory leak when the view backend wl_resource is destroyed.
* Fix wpe_dmabuf_pool object leak.

Release Notes:

* https://wpewebkit.org/release/wpebackend-fdo-1.14.3.html
According to the Yocto documentation [1], the devupstream class uses
BBCLASSEXTEND to create a variant of the recipe that fetches sources
from an alternative URI (e.g., Git) instead of a tarball.

When building with devupstream, the sources fetched should match
those from the non-devupstream build, meaning the exact commit used
to generate the tarball release should be fetched.

- Update various SRCBRANCH and SRCREV fields for devupstream class:
  - Set 'master' as the default branch for pn-cog, pn-libwpe, and
    pn-wpebackend-fdo.
  - Change branch for pn-wpewebkit to 'main'.
- Modify cog recipe (cog_0.18.4.bb):
  - Use branch 'cog-0.18' instead of 'master'.
  - Update SRCREV to 'c4625676a21308e7c82175f1ce9a6c8849f22800'.
- Modify libwpe recipe (libwpe_1.16.0.bb):
  - Use branch 'libwpe-1.16'.
  - Update SRCREV to '782026ce4976a35e9343ba75aefe379b0d8428f7'.
- Modify wpebackend-fdo recipe (wpebackend-fdo_1.14.3.bb):
  - Use branch 'wpebackend-fdo-1.14'.
  - Update SRCREV to '04ccf2ef1753e72345770fb0a60bf38c5a100de8'.
- Remove outdated wpebackend-fdo_devupstream.bb file.
- Modify wpewebkit recipe (wpewebkit_2.46.1.bb):
  - Use branch 'webkitglib/2.46'.
  - Update SRCREV to 'eacf9977760d4ea5dfcb736be73ae48c7df16f27'.

[1] https://docs.yoctoproject.org/ref-manual/classes.html#ref-classes-devupstream
Updated the preferred versions for several components in the
WebKit WPE stack to use specific stable versions, replacing
AUTOINC placeholders for more controlled and predictable builds.

- Set PREFERRED_VERSION_cog to 0.18+https
- Set PREFERRED_VERSION_libwpe to 1.16+https
- Set PREFERRED_VERSION_wpebackend-fdo to 1.14+https
- Set PREFERRED_VERSION_wpebackend-rdk to 1.20221201+git
- Set PREFERRED_VERSION_wpewebkit to 2.46+https
@psaavedra
Copy link
Member Author

I still have a couple of comments.

Also, the build is currently broken with -DENABLE_VIDEO=OFF (both in main and in the 2.46 release branch); there are patches being worked on for this.

Could you be more specific? I see WebKit/WebKit#35004 which is being about to be landed which this partially depends of 2f4378eb7afab. Is this what you are making a reference in you previous comment?

Copy link
Member

@aperezdc aperezdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all the updates to the PR, LGTM!

@psaavedra psaavedra merged commit 71b075a into main Oct 15, 2024
8 checks passed
@psaavedra psaavedra deleted the webkit_2_46 branch October 15, 2024 08:49
@aperezdc
Copy link
Member

I still have a couple of comments.
Also, the build is currently broken with -DENABLE_VIDEO=OFF (both in main and in the 2.46 release branch); there are patches being worked on for this.

Could you be more specific? I see WebKit/WebKit#35004 which is being about to be landed which this partially depends of 2f4378eb7afab. Is this what you are making a reference in you previous comment?

All these three patches to be able to build with multimedia support disabled:

I have backported them all into the webkitglib/2.46 branch:

If you are going to import the patches into meta-webkit, pick them from the release branch, because the second one has some additional fixes by me.

@blino
Copy link

blino commented Oct 15, 2024

If you are going to import the patches into meta-webkit, pick them from the release branch, because the second one has some additional fixes by me.

About the ENABLE(MEDIA_SESSION), I indeed left this part out in commit 2f4378eb7afab.
@aperezdc : are you going to push this to main branch too?

@aperezdc
Copy link
Member

@psaavedra And one more fix for ARM NEON (needed e.g. for the Raspberry Pi 4) → WebKit/WebKit#35244

@blino I will push the ENABLE(MEDIA_SESSION) bits to main, yes.

@psaavedra
Copy link
Member Author

Thanks @aperezdc I will take care of those patches and I will add it in a subsequent PR. 🙇🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants