Summary: | [GTK] r186800 broke the build on Ubuntu 14.04 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Csaba Osztrogonác <ossy> | ||||||||
Component: | New Bugs | Assignee: | Michael Catanzaro <mcatanzaro> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | cgarcia, clopez, commit-queue, mcatanzaro, mrobinson, ossy | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 146057 | ||||||||||
Attachments: |
|
Description
Csaba Osztrogonác
2015-08-03 08:38:37 PDT
So, ubuntu builds GTK+ without wayland support, I guess we should detect that. We can get that info from the targets variable of the pkg-config file. One more thing, I tested the build on Ubuntu 15.04 too, the build works fine. (In reply to comment #1) > So, ubuntu builds GTK+ without wayland support, I guess we should detect > that. That's what we were doing until r185788 when I intentionally removed that behavior. I somewhat prefer requiring the user to explicitly disable the Wayland backend. But I think it's reasonable to autodetect it, since there's no way autodetection could cause the feature to be disabled accidentally; if your GTK+ has no Wayland support then you really don't need WebKitGTK+ to have it either. The same argument could be made to support how we currently handle CairoGL. (In reply to comment #1) > We can get that info from the targets variable of the pkg-config file. You already have GTK3_SUPPORTS_X11 and GTK3_SUPPORTS_WAYLAND, so the thing to do is to check them and set ENABLE_X11_TARGET and ENABLE_WAYLAND_TARGET accordingly. This has to be done after calling find_package(GTK3) and *before* calling WEBKIT_OPTION_END. This will require dropping the required GTK+ version from the call to find_package, since it's not possible to know until after WEBKIT_OPTION_END, and then checking it manually in an if statement using the VERSION_LESS operator after WEBKIT_OPTION_END. (In reply to comment #4) > (In reply to comment #1) > > We can get that info from the targets variable of the pkg-config file. > > You already have GTK3_SUPPORTS_X11 and GTK3_SUPPORTS_WAYLAND, so the thing > to do is to check them and set ENABLE_X11_TARGET and ENABLE_WAYLAND_TARGET > accordingly. This has to be done after calling find_package(GTK3) and > *before* calling WEBKIT_OPTION_END. This will require dropping the required > GTK+ version from the call to find_package, since it's not possible to know > until after WEBKIT_OPTION_END, and then checking it manually in an if > statement using the VERSION_LESS operator after WEBKIT_OPTION_END. Could you write a patch instead of telling us how to do it? :-) Of course :) but you have to wait until my trip is done; if you get impatient, there is your solution. (In reply to comment #0) > After http://trac.webkit.org/changeset/186800 I got the following > build error on my Ubuntu 14.04 (with Clang 3.5 compiler) > > -- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so > CMake Error at Source/cmake/OptionsGTK.cmake:423 (message): > Recompile GTK+ with Wayland backend to use ENABLE_WAYLAND_TARGET > Call Stack (most recent call first): > CMakeLists.txt:164 (include) > > > -- Configuring incomplete, errors occurred! > See also > "/home/webkit/WebKit/WebKitBuild/Release/CMakeFiles/CMakeOutput.log". > See also "/home/webkit/WebKit/WebKitBuild/Release/CMakeFiles/CMakeError.log". > > > It seems GTK3_SUPPORTS_WAYLAND is false for some reason. Is > it possible to make the build work or should I disable Wayland? I think this may get fixed just by doing: $ rm -fr WebKitBuild $ Tools/gtk/install-dependencies $ Tools/Scripts/update-webkitgtk-libs We ship GTK+-3.16 on the JHBuild, but the Wayland headers have to be installed _before_ building the GTK+ we ship in the JHBuild. Otherwise the configure script of GTK+ will disable the support for wayland. (In reply to comment #7) > I think this may get fixed just by doing: > > $ rm -fr WebKitBuild > $ Tools/gtk/install-dependencies > $ Tools/Scripts/update-webkitgtk-libs > > We ship GTK+-3.16 on the JHBuild, but the Wayland headers have to be > installed _before_ building the GTK+ we ship in the JHBuild. Otherwise the > configure script of GTK+ will disable the support for wayland. This was a one-time issue caused by running install-dependencies before Wayland support was added. I don't think we need to change anything here. But I will change PlatformGTK.cmake to allow automagic detection of X11/Wayland support. (In reply to comment #8) > (In reply to comment #7) > > I think this may get fixed just by doing: > > > > $ rm -fr WebKitBuild > > $ Tools/gtk/install-dependencies > > $ Tools/Scripts/update-webkitgtk-libs > > > > We ship GTK+-3.16 on the JHBuild, but the Wayland headers have to be > > installed _before_ building the GTK+ we ship in the JHBuild. Otherwise the > > configure script of GTK+ will disable the support for wayland. > > This was a one-time issue caused by running install-dependencies before > Wayland support was added. I don't think we need to change anything here. > But I will change PlatformGTK.cmake to allow automagic detection of > X11/Wayland support. Unfortunately it didn't fix the issue for me, GTK is still built without Wayland support for some reason. ... checking for wayland-scanner... /usr/bin/wayland-scanner checking for WAYLAND_DEPENDENCIES... no ... GTK+ 3.16.4 =========== GDK backends: x11 X11 extensions: XKB Xinerama XI2.2 XRANDR XFIXES Composite DAMAGE Print backends: file lpr Dynamic modules: yes Included immodules: none colord support: no libcanberra support: no Introspection: yes Debugging: minimum Documentation: no ... GTK's config.log ----------------- ... configure:20330: checking for wayland-scanner configure:20348: found /usr/bin/wayland-scanner configure:20361: result: /usr/bin/wayland-scanner configure:20370: $PKG_CONFIG --exists --print-errors "$WAYLAND_DEPENDENCIES" Requested 'wayland-client >= 1.5.91' but version of Wayland Client is 1.4.0 Requested 'wayland-cursor >= 1.5.91' but version of Wayland Cursor is 1.4.0 configure:20373: $? = 1 configure:20379: checking for WAYLAND_DEPENDENCIES configure:20386: result: no ... It seems the problem is that 14.04 ships older wayland than GTK+ need. Created attachment 259760 [details]
Patch
(Please do test on Ubuntu; I have not built GTK+ without the Wayland backend.) (In reply to comment #11) > (Please do test on Ubuntu; I have not built GTK+ without the Wayland > backend.) thanks, will check tomorrow Comment on attachment 259760 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=259760&action=review > Source/cmake/OptionsGTK.cmake:80 > -WEBKIT_OPTION_DEFINE(ENABLE_X11_TARGET "Whether to enable support for the X11 windowing target." PUBLIC ON) > -WEBKIT_OPTION_DEFINE(ENABLE_WAYLAND_TARGET "Whether to enable support for the Wayland windowing target." PUBLIC ON) > +WEBKIT_OPTION_DEFINE(ENABLE_X11_TARGET "Whether to enable support for the X11 windowing target." PUBLIC ${ENABLE_X11_TARGET_DEFAULT}) > +WEBKIT_OPTION_DEFINE(ENABLE_WAYLAND_TARGET "Whether to enable support for the Wayland windowing target." PUBLIC ${ENABLE_WAYLAND_TARGET_DEFAULT}) I got the following error: CMake Error at Source/cmake/OptionsGTK.cmake:80 (WEBKIT_OPTION_DEFINE): WEBKIT_OPTION_DEFINE Macro invoked with incorrect arguments for macro named: WEBKIT_OPTION_DEFINE It seems ENABLE_WAYLAND_TARGET_DEFAULT is empty here and not OFF. Created attachment 259851 [details]
Patch
(Again, please test this on Ubuntu.) (In reply to comment #15) > (Again, please test this on Ubuntu.) I got the following build error: ../../Source/WebCore/platform/graphics/PlatformDisplay.cpp:69:5: error: unknown type name 'GdkDisplay' GdkDisplay* display = gdk_display_manager_get_default_display(gdk_display_manager_get()); ^ ../../Source/WebCore/platform/graphics/PlatformDisplay.cpp:69:67: error: use of undeclared identifier 'gdk_display_manager_get' GdkDisplay* display = gdk_display_manager_get_default_display(gdk_display_manager_get()); Created attachment 259853 [details]
Patch
(In reply to comment #17) > Created attachment 259853 [details] > Patch It builds fine for me on 14.04. Comment on attachment 259853 [details] Patch Clearing flags on attachment: 259853 Committed r188929: <http://trac.webkit.org/changeset/188929> All reviewed patches have been landed. Closing bug. |