Bug 252562 - [GLib] Installed API headers are unusable with the new 2022 API
Summary: [GLib] Installed API headers are unusable with the new 2022 API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adrian Perez
URL:
Keywords: InRadar
Depends on:
Blocks: GTK4
  Show dependency treegraph
 
Reported: 2023-02-20 06:22 PST by Adrian Perez
Modified: 2023-02-20 08:19 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Perez 2023-02-20 06:22:21 PST
Trying to build a recent Epiphany from Git in a clean chroot, after
bulding WebKitGTK with:

  cmake -DPORT=GTK -DUSE_GTK4=ON ...

The when building Epiphany, we get the following error:

[13/277] Compiling C object embed/libephyembed.a.p/ephy-web-view.c.o
FAILED: embed/libephyembed.a.p/ephy-web-view.c.o
ccache cc -Iembed/libephyembed.a.p -Iembed -I../embed -I. -I.. -Ilib -I../lib -I../lib/contrib -I../lib/history -Ilib/sync -I../lib/sync -I../lib/safe-browsing -I/usr/include/cairo -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/gsettings-desktop-schemas -I/usr/include/gtk-4.0 -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/graphene-1.0 -I/usr/lib/graphene-1.0/include -I/usr/include/json-glib-1.0 -I/usr/include/libadwaita-1 -I/usr/include/libsecret-1 -I/usr/include/tss2 -I/usr/include/libsoup-3.0 -I/usr/include/libxml2 -I/home/aperez/.prefix/wkgtk-trunk/include/webkitgtk-6.0 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O2 -g -Werror=declaration -after-statement -Werror=implicit-function-declaration -Wno-cast-function-type -Wno-missing-field-initializers -Wno-unused-parameter -fPIC -mfpmath=sse -msse -msse2 -pthread -mfpmath=sse -msse -msse2 -mfpmath=sse -msse -msse2 -mfpmath=sse -msse -msse2 -MD -MQ embed/libephyembed.a.p/ephy-web-view.c.o -MF embed/libephyembed.a.p/ephy-web-view.c.o.d -o embed/libephyembed.a.p/ephy-web-view.c.o -c ../embed/ephy-web-view.c
In file included from /home/aperez/.prefix/wkgtk-trunk/include/webkitgtk-6.0/webkit/webkit.h:56,
                 from ../embed/ephy-web-view.h:24,
                 from ../embed/ephy-web-view.c:23:
/home/aperez/.prefix/wkgtk-trunk/include/webkitgtk-6.0/webkit/WebKitJavascriptResult.h:31:10: fatal error: JavaScriptCore/JSBase.h: No such file or directory
   31 | #include <JavaScriptCore/JSBase.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~

Indeed, there are headers from the “classic” (non-GLib) API being included:

  % rg -F JavaScriptCore/ ~/.prefix/wkgtk-trunk/include/
  /home/aperez/.prefix/wkgtk-trunk/include/webkitgtk-6.0/webkit/WebKitJavascriptResult.h
  31:// #include <JavaScriptCore/JSBase.h>

  /home/aperez/.prefix/wkgtk-trunk/include/webkitgtk-6.0/webkit/WebKitWebView.h
  61:// #include <JavaScriptCore/JSBase.h>
  %

These includes should not be there with the 2022 API.
Comment 1 Adrian Perez 2023-02-20 06:28:28 PST
Pull request: https://github.com/WebKit/WebKit/pull/10362
Comment 2 EWS 2023-02-20 08:18:12 PST
Committed 260537@main (5f8dc9d4cc01): <https://commits.webkit.org/260537@main>

Reviewed commits have been landed. Closing PR #10362 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2023-02-20 08:19:18 PST
<rdar://problem/105680125>