RESOLVED FIXED300382
[WPE] Build regression after libsoup2 removal breaks third-party pkg-config discovery
https://bugs.webkit.org/show_bug.cgi?id=300382
Summary [WPE] Build regression after libsoup2 removal breaks third-party pkg-config d...
Pablo Saavedra
Reported 2025-10-08 01:34:23 PDT
**Description:** A recent commit that removed libsoup2 support has caused a build regression that prevents third-party applications from building against WPEWebKit using `pkg-config`. Commit is: ``` Author: Adrian Perez de Castro <aperez@igalia.com> Date: Tue Oct 7 07:18:51 2025 -0700 [GTK] Remove support for building against libsoup2 https://bugs.webkit.org/show_bug.cgi?id=300163 Canonical link: https://commits.webkit.org/301131@main ``` This change removed the definition of the `SOUP_API_VERSION` variable from the CMake build system, as seen in this diff: ```diff --- a/Source/cmake/OptionsWPE.cmake +++ b/Source/cmake/OptionsWPE.cmake @@ -165,25 +166,14 @@ endif () if (ENABLE_WPE_1_1_API) - set(SOUP_MINIMUM_VERSION 3.0.0) - set(SOUP_API_VERSION 3.0) set(WPE_API_VERSION 1.1) set(WPE_API_MAJOR_VERSION 1) - set(ENABLE_SERVER_PRECONNECT ON) SET_AND_EXPOSE_TO_BUILD(ENABLE_2022_GLIB_API OFF) else () - set(SOUP_MINIMUM_VERSION 3.0.0) - set(SOUP_API_VERSION 3.0) set(WPE_API_VERSION 2.0) set(WPE_API_MAJOR_VERSION 2) - set(ENABLE_SERVER_PRECONNECT ON) SET_AND_EXPOSE_TO_BUILD(ENABLE_2022_GLIB_API ON) endif () -find_package(LibSoup ${SOUP_MINIMUM_VERSION} REQUIRED) - -if (NOT LibSoup_FOUND) - message(FATAL_ERROR "libsoup 3 is required.") -endif () ``` However, multiple `pkg-config` (`.pc.in`) and TOML (`.toml.in`) template files were not updated and still reference the now-undefined `@SOUP_API_VERSION@` variable. This results in malformed `.pc` files being generated. ``` Source/WebKit/gtk/gtk3-webkitgtk.toml.in:dependencies = ["GObject-2.0", "Gio-2.0", "Gtk-@GTK_API_VERSION@.0", "Soup-@SOUP_API_VERSION@"] Source/WebKit/gtk/gtk3-webkitgtk.toml.in:[dependencies."Soup-@SOUP_API_VERSION@"] Source/WebKit/gtk/gtk3-webkitgtk.toml.in:docs_url = "https://gnome.pages.gitlab.gnome.org/libsoup/libsoup-@SOUP_API_VERSION@" Source/WebKit/gtk/webkitgtk-web-process-extension.pc.in:Requires: glib-2.0 @GTK_PC_NAME@ libsoup-@SOUP_API_VERSION@ javascriptcoregtk-@WEBKITGTK_API_VERSION@ Source/WebKit/gtk/webkitgtk-web-process-extension.toml.in:dependencies = ["GObject-2.0", "Gio-2.0", "Soup-@SOUP_API_VERSION@"] Source/WebKit/gtk/webkitgtk-web-process-extension.toml.in:[dependencies."Soup-@SOUP_API_VERSION@"] Source/WebKit/gtk/webkitgtk-web-process-extension.toml.in:docs_url = "https://gnome.pages.gitlab.gnome.org/libsoup/libsoup-@SOUP_API_VERSION@" Source/WebKit/gtk/webkitgtk.pc.in:Requires: glib-2.0 @GTK_PC_NAME@ libsoup-@SOUP_API_VERSION@ javascriptcoregtk-@WEBKITGTK_API_VERSION@ Source/WebKit/gtk/gtk4-webkitgtk.toml.in:dependencies = ["GObject-2.0", "Gio-2.0", "Gtk-@GTK_API_VERSION@.0", "Soup-@SOUP_API_VERSION@"] Source/WebKit/gtk/gtk4-webkitgtk.toml.in:[dependencies."Soup-@SOUP_API_VERSION@"] Source/WebKit/gtk/gtk4-webkitgtk.toml.in:docs_url = "https://gnome.pages.gitlab.gnome.org/libsoup/libsoup-@SOUP_API_VERSION@" Source/WebKit/wpe/wpewebkit.toml.in:dependencies = ["GObject-2.0", "Gio-2.0", "Soup-@SOUP_API_VERSION@"] Source/WebKit/wpe/wpewebkit.toml.in:[dependencies."Soup-@SOUP_API_VERSION@"] Source/WebKit/wpe/wpewebkit.toml.in:docs_url = "https://gnome.pages.gitlab.gnome.org/libsoup/libsoup-@SOUP_API_VERSION@" Source/WebKit/wpe/wpe-web-process-extension.pc.in:Requires: glib-2.0 libsoup-@SOUP_API_VERSION@ wpe-1.0 Source/WebKit/wpe/wpe-webkit-uninstalled.pc.in:Requires: glib-2.0 libsoup-@SOUP_API_VERSION@ wpe-1.0 @WPE_PLATFORM_PC_UNINSTALLED_REQUIRES@ Source/WebKit/wpe/wpe-web-process-extension.toml.in:dependencies = ["GObject-2.0", "Gio-2.0", "Soup-@SOUP_API_VERSION@"] Source/WebKit/wpe/wpe-web-process-extension.toml.in:[dependencies."Soup-@SOUP_API_VERSION@"] Source/WebKit/wpe/wpe-web-process-extension.toml.in:docs_url = "https://gnome.pages.gitlab.gnome.org/libsoup/libsoup-@SOUP_API_VERSION@" Source/WebKit/wpe/wpe-webkit.pc.in:Requires: glib-2.0 libsoup-@SOUP_API_VERSION@ wpe-1.0 @WPE_PLATFORM_PC_REQUIRES@ Source/WebKit/wpe/wpe-web-process-extension-uninstalled.pc.in:Requires: glib-2.0 libsoup-@SOUP_API_VERSION@ wpe-1.0 ``` **Steps to Reproduce:** 1. Build WebKit at a revision after commit `301131@main`. 2. Attempt to build a third-party application against the installed WebKit using Meson and `pkg-config`. For example, with this `meson.build` file: ```meson project('foo-launcher', 'c', version: '1.0', default_options: ['c_std=gnu11']) webkit2_dep = dependency('wpe-webkit-2.0') executable('foo-launcher', 'main.c', dependencies: [webkit2_dep]) ``` 3. The build fails during the dependency lookup phase. **Actual Results:** The Meson build system fails with the following error because the generated `wpe-webkit-2.0.pc` file contains an invalid requirement for `libsoup-`: ``` | Run-time dependency wpe-webkit-2.0 found: NO | | ../git/meson.build:7:14: ERROR: Dependency lookup for wpe-webkit-2.0 with method 'pkgconfig' failed: Could not generate cflags for wpe-webkit-2.0: | Package libsoup- was not found in the pkg-config search path. | Perhaps you should add the directory containing `libsoup-.pc' | to the PKG_CONFIG_PATH environment variable | Package 'libsoup-', required by 'wpe-webkit-2.0', not found ``` **Expected Results:** The build should successfully find the `libsoup-3.0` dependency from `wpe-webkit-2.0` and compile the third-party application.
Attachments
Pablo Saavedra
Comment 1 2025-10-08 01:44:23 PDT
EWS
Comment 2 2025-10-08 05:28:32 PDT
Committed 301201@main (bc743a3f24a0): <https://commits.webkit.org/301201@main> Reviewed commits have been landed. Closing PR #52002 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.