Bug 238932 - [GTK] Revisit required vs. optional dependencies
Summary: [GTK] Revisit required vs. optional dependencies
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Michael Catanzaro
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-07 07:09 PDT by Michael Catanzaro
Modified: 2023-02-21 14:18 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2022-04-07 07:09:02 PDT
For GTK 4, we should make sure that certain dependencies are required from the start. Most importantly, we should require libwpe and wpebackend-fdo to ensure nobody is still using -DUSE_WPE_RENDERER=OFF.

I think we should also require libepoxy, and also libsoup 3 (if that's not required already).
Comment 1 Carlos Garcia Campos 2022-04-08 00:57:46 PDT
Yes, the idea is to make all deps that are optional because of the deps policy mandatory for gtk4 build (soup3 and wpe for sure)
Comment 2 Michael Catanzaro 2022-04-08 07:58:23 PDT
Other libs we could possibly require: libmanette (doesn't exist in RHEL, but probably should), libsecret, enchant, libhyphen, libtasn1, openjpeg, woff2, lcms2

Stuff we probably (?) don't want to require: jpegxl (experimental), libnotify (deprecated and bad), libgcrypt (bad, could be replaced with OpenSSL WebCrypto backend), avif (experimental), thunder
Comment 3 Michael Catanzaro 2023-02-06 07:57:03 PST
(In reply to Michael Catanzaro from comment #2)
> libmanette (doesn't exist in RHEL, but probably should)

Maybe this one is also not useful on embedded devices that won't ever be connected to gamepads.

> openjpeg

Looks like Apple is considering removing JPEG 2000 from Safari; if so, we could remove rather than require this. Maybe we should poke them regarding that again.

> libgcrypt (bad, could be replaced with OpenSSL WebCrypto backend),

I don't think we have time to make this change now. It should be safe to require OpenSSL in the future because OpenSSL is an extremely common dependency and it's guaranteed to be installed almost everywhere.

> avif (experimental)

This one is no longer experimental.
Comment 4 Adrian Perez 2023-02-06 15:43:28 PST
(In reply to Michael Catanzaro from comment #3)
> (In reply to Michael Catanzaro from comment #2)
> > libmanette (doesn't exist in RHEL, but probably should)
> 
> Maybe this one is also not useful on embedded devices that won't ever be
> connected to gamepads.

No strong opinion here, it can go either way IMO.

> > openjpeg
> 
> Looks like Apple is considering removing JPEG 2000 from Safari; if so, we
> could remove rather than require this. Maybe we should poke them regarding
> that again.

More info here: https://github.com/WebKit/WebKit/pull/3824 -- and yes, let's
try and ask, if Safari won't load JPEG2000 images anymore, I would be more
than happy of removing the decoder for the GLib ports.

> > libgcrypt (bad, could be replaced with OpenSSL WebCrypto backend),
> 
> I don't think we have time to make this change now. It should be safe to
> require OpenSSL in the future because OpenSSL is an extremely common
> dependency and it's guaranteed to be installed almost everywhere.

Agreed, let's do it later.

> > avif (experimental)
> 
> This one is no longer experimental.

+1, let's enable it
Comment 5 Michael Catanzaro 2023-02-21 11:44:55 PST
Apple has not responded to my ping regarding JPEG 2000. Since we want to remove it, let's not make it mandatory. Let's just not change anything.
Comment 6 Michael Catanzaro 2023-02-21 12:37:30 PST
Here's my review of all PUBLIC build options. Opinions please. I decided to bias towards removing as many options as possible and so went a little crazy proposing to remove everything. Tell me what I can and cannot get away with. ;)

Do we need to keep options that are only useful for embedded systems? I figure we recommend WPE port for such uses nowadays, and if you want to use GTK anyway, then you can probably build the desktopy dependencies? If we do still want GTK to not keep options useful for embedded systems, then many of my recommendations would need to change.

ENABLE_DOCUMENTATION: keep?

ENABLE_GLES2: remove? If you don't have real OpenGL available, you should probably be using WPE port instead? (keep if embedded is still important)

ENABLE_INTROSPECTION: remove? Even if you won't use it, it's a harmless and ubiquitous dependency for GTK ecosystem.

ENABLE_JOURNALD_LOG: remove because libelogind is a thing, so we can require this without actually requiring systemd

ENABLE_QUARTZ_TARGET: remove because if GTK supports Quartz you want it enabled, and if not you don't

ENABLE_WAYLAND_TARGET: remove because ditto

ENABLE_X11_TARGET: remove because ditto

USE_GBM: remove? If you don't have GBM available, you should probably be using WPE port instead? (keep if embedded is still important?)

USE_GTK4: keep, although now that we have branched, it's time to invert it to USE_GTK3

USE_JPEGXL: keep until browsers come to some consensus on JPEG XL

USE_LCMS: remove, color management no longer optional

USE_LIBHYPHEN: remove, hyphenation no longer optional

USE_LIBSECRET: remove, secret storage no longer optional

USE_OPENGL_OR_ES: remove, we're all tired of the build failure bug reports

USE_OPENJPEG: already changed my mind about comment #5, we should require this until we get a clearer commitment from Apple on removing JPEG 2000 from Safari

USE_SOUP2: keep for now (but not forever)

USE_WOFF2: remove, web fonts no longer optional

ENABLE_BUBBLEWRAP_SANDBOX: remove, require it if on Linux and disable it otherwise

ENABLE_DRAG_SUPPORT: remove, there is not even any external dependency here

ENABLE_GAMEPAD: remove, gamepads no longer optional (keep if embedded is still important)

ENABLE_MINIBROWSER: keep

ENABLE_PDFJS: remove? (it *is* kinda heavy) (keep if embedded is still important)

ENABLE_SPELLCHECK: remove, spellcheck no longer optional

ENABLE_TOUCH_EVENTS: remove, no external dependency here anyway

ENABLE_WEB_CRYPTO: remove, no longer optional

ENABLE_WEBDRIVER: remove?

USE_AVIF: remove, no longer optional

ENABLE_VIDEO: remove? If you don't want video, you should probably be building WPE port instead? (keep if embedded is still important)

ENABLE_WEB_AUDIO: remove because ditto? (keep if embedded is still important)

ENABLE_MEDIA_SOURCE: definitely remove, should simply depend on ENABLE_VIDEO

I think all of the above changes are actually safe enough to make for both GTK 3 and GTK 4. Even the recently-added dependencies (LCMS, AVIF) are ubiquitous and unlikely to cause trouble anywhere realistic.
Comment 7 Michael Catanzaro 2023-02-21 12:40:14 PST
P.S. I see no need to make these changes for 2.40 since they could be slightly disruptive. I would save them for 2.42.