Bug 197352 - [Flatpak] webkit-build fails due to missing GTK2 in build environment
Summary: [Flatpak] webkit-build fails due to missing GTK2 in build environment
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Other
Hardware: Unspecified Linux
: P2 Normal
Assignee: Adrian Perez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-04-28 08:07 PDT by Adrian Perez
Modified: 2019-05-07 09:16 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.77 KB, patch)
2019-05-07 07:52 PDT, Adrian Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Perez 2019-04-28 08:07:36 PDT
Just tested from a fresh repository (right after running “git clean -xdf”):

 % update-webkitgtk-flatpak
 [lots of output, build completes just fine]

 % build-webkit --gtk
 [cmake output, eventually fails with:]

 -- Checking for module 'gtk+-2.0'
 --   Package 'gtk+-2.0', required by 'virtual:world', not found
 CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
   Could NOT find GTK2 (missing: GTK2_INCLUDE_DIRS GTK2_LIBRARIES) (Required
   is at least version "2.24.10")
 Call Stack (most recent call first):
   /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
   Source/cmake/FindGTK2.cmake:49 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
   Source/cmake/OptionsGTK.cmake:290 (find_package)
   Source/cmake/WebKitCommon.cmake:56 (include)
   CMakeLists.txt:167 (include)

 -- Configuring incomplete, errors occurred!
Comment 1 Adrian Perez 2019-04-28 08:13:14 PDT
As a workaround, once can use instead:

 % build-webkit --gtk --cmakeargs='-DENABLE_PLUGIN_PROCESS_GTK2=OFF'

but in my opinion developers should not need to pass anything special
to “build-webkit” to get a vanilla build done with the usual development
compilation options.

From what I understand, this is because the Flatpak SDK is not shipping
GTK2 anymore, which means we have two ways to go about this:

 a.) Add GTK2 to our local build manifest.
 b.) When building inside the Flatpak environment, automatically
     disable the GTK2 plugin process.

While I would prefer to to (b.) —and in the long run that is what
will happen— at the moment we support the option, and threfore I think
that we should routinely build with the option enabled to make sure
the code does not bitrot, so right now I think we should go for (a.).
Comment 2 Michael Catanzaro 2019-04-28 08:46:55 PDT
That's weird, because we never had GTK2 in gnome-build-meta.
Comment 3 Adrian Perez 2019-05-07 07:52:16 PDT
Created attachment 369282 [details]
Patch
Comment 4 Philippe Normand 2019-05-07 08:20:32 PDT
Comment on attachment 369282 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=369282&action=review

> Tools/flatpak/org.webkit.GTK.yaml:101
> +  config-opts:

Can examples also be disabled?
Comment 5 Adrian Perez 2019-05-07 08:40:20 PDT
(In reply to Philippe Normand from comment #4)
> Comment on attachment 369282 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=369282&action=review
> 
> > Tools/flatpak/org.webkit.GTK.yaml:101
> > +  config-opts:
> 
> Can examples also be disabled?

Unfortunately, there is no flag in the autotools configure script
to disable the examples :-/
Comment 6 WebKit Commit Bot 2019-05-07 09:15:17 PDT
Comment on attachment 369282 [details]
Patch

Clearing flags on attachment: 369282

Committed r245011: <https://trac.webkit.org/changeset/245011>
Comment 7 WebKit Commit Bot 2019-05-07 09:15:19 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2019-05-07 09:16:19 PDT
<rdar://problem/50542468>