GNOME Bugzilla – Bug 741866
Fail to build geary in JHBuild because of WebKit-3.0.gir
Last modified: 2017-02-02 09:32:57 UTC
I got error when this command was run: vapigen --pkg=gio-2.0 --pkg=gtk+-3.0 --pkg=libsoup-2.4 --metadatadir=. --metadatadir=webkitgtk-2.4 --library=webkitgtk-3.0 --directory=/home/lantw44/gnome/source/geary/src webkitgtk-2.4/WebKit-3.0-custom.vala `pkg-config --variable=girdir gobject-introspection-1.0`/WebKit-3.0.gir error: /home/lantw44/gnome/devinstall/share/gir-1.0/WebKit-3.0.gir not found Generation failed: 1 error(s), 0 warning(s) I have gobject-introspection installed in JHBuild, so pkg-config returns the path which is under the JHBuild prefix. WebKit-3.0.gir is provided by the system (installed via package manager). It does not exist under the JHBuild prefix.
Created attachment 306235 [details] [review] Fix the build in JHBuild environments
Review of attachment 306235 [details] [review]: Hi Ting-Wei, thanks for reporting this issue. While I could be wrong, I would have thought that in many cases people would be using either all system-installed libraries or all JHbuild-installed libraries, making this a somewhat unusual situation, and making the current patch quite complex for a less common situation. Rather than performing a lot of gymnastics to guess a more appropriate path for WebKit-3.0.gir, I think it would be reasonable to simply add a CMake variable (E.g. WEBKIT_3_0_GIR) that defaults to the current value, i.e. the result of running the pkg-config, such that a user could override it when running CMake, or afterwards. This should be something like a two line patch, which I'd be happy to take.
(In reply to Michael Gratton from comment #2) > Review of attachment 306235 [details] [review] [review]: > > Hi Ting-Wei, thanks for reporting this issue. > > While I could be wrong, I would have thought that in many cases people would > be using either all system-installed libraries or all JHbuild-installed > libraries, making this a somewhat unusual situation, and making the current > patch quite complex for a less common situation. The problem is that geary still uses WebKit1 API, which is no longer supported in WebKitGTK+ >= 2.6. JHbuild only builds the latest version of WebKit, and most GNOME softwares have been converted to use WebKit2 API. If an application still uses WebKit1 API and requires WebKitGTK+ 2.4 to be installed, it has to be provided by the system. > > Rather than performing a lot of gymnastics to guess a more appropriate path > for WebKit-3.0.gir, I think it would be reasonable to simply add a CMake > variable (E.g. WEBKIT_3_0_GIR) that defaults to the current value, i.e. the > result of running the pkg-config, such that a user could override it when > running CMake, or afterwards. This should be something like a two line > patch, which I'd be happy to take. This solution may be good enough for users who manually run cmake, but it still doesn't fix build failure in JHBuild. We cannot know where WebKit-3.0.gir is installed on a system, so we are not able to set correct WEBKIT_3_0_GIR in JHBuild modulesets.
Okay, well if it's because of Geary's use of WebKit1 in that case it is effectively a duplicate of Bug 728002, which I'm working towards a fix for, so hopefully the JHBuild issue will be resolved soon. If a simple port to WK2 won't resolve it, please reopen this bug. Cheers! *** This bug has been marked as a duplicate of bug 728002 ***
Actually, un-duplicating because I also needed to add a few fixes configure to get it to build again. They've been committed to master, so that should be building again from JHBuild. Bug 778066 covers adding it back to the official JHBuild moduleset.