After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 741866 - Fail to build geary in JHBuild because of WebKit-3.0.gir
Fail to build geary in JHBuild because of WebKit-3.0.gir
Status: RESOLVED FIXED
Product: geary
Classification: Other
Component: build
master
Other FreeBSD
: Normal normal
: 0.12.0
Assigned To: Geary Maintainers
Geary Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-12-22 15:27 UTC by Ting-Wei Lan
Modified: 2017-02-02 09:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix the build in JHBuild environments (2.39 KB, patch)
2015-06-28 12:45 UTC, Ting-Wei Lan
needs-work Details | Review

Description Ting-Wei Lan 2014-12-22 15:27:20 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.
Comment 1 Ting-Wei Lan 2015-06-28 12:45:00 UTC
Created attachment 306235 [details] [review]
Fix the build in JHBuild environments
Comment 2 Michael Gratton 2016-04-03 11:36:34 UTC
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.
Comment 3 Ting-Wei Lan 2016-04-07 04:08:54 UTC
(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.
Comment 4 Michael Gratton 2016-04-08 00:00:07 UTC
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 ***
Comment 5 Michael Gratton 2017-02-02 09:32:57 UTC
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.