Bug 164170 - [GTK] Build break by missing geoclue-2.0.
Summary: [GTK] Build break by missing geoclue-2.0.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Hyowon Kim
URL:
Keywords:
Depends on:
Blocks: 164205
  Show dependency treegraph
 
Reported: 2016-10-28 18:55 PDT by Hyowon Kim
Modified: 2016-10-30 08:59 PDT (History)
2 users (show)

See Also:


Attachments
Patch (1.12 KB, patch)
2016-10-28 19:02 PDT, Hyowon Kim
no flags Details | Formatted Diff | Diff
Patch (1.15 KB, patch)
2016-10-30 04:53 PDT, Hyowon Kim
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hyowon Kim 2016-10-28 18:55:46 PDT
I got the following build error on my initial build for WebkitGTK.

-- Checking for module 'geoclue-2.0'
--   No package 'geoclue-2.0' found
-- Could NOT find GEOCLUE2 (missing:  VERSION_OK) 
-- Checking for module 'geoclue'
--   No package 'geoclue' found
-- Could NOT find GEOCLUE (missing:  GEOCLUE_INCLUDE_DIRS GEOCLUE_LIBRARIES) 
CMake Error at Source/cmake/OptionsGTK.cmake:253 (message):
  Geoclue is needed for ENABLE_GEOLOCATION.
Call Stack (most recent call first):
  Source/cmake/WebKitCommon.cmake:47 (include)
  CMakeLists.txt:137 (include)
Comment 1 Hyowon Kim 2016-10-28 19:02:08 PDT
Created attachment 293266 [details]
Patch
Comment 2 Michael Catanzaro 2016-10-29 08:05:08 PDT
Comment on attachment 293266 [details]
Patch

But we do have this function:

        $(aptIfElse libgeoclue-2-dev libgeoclue-dev) \

I guess it is broken for you for some reason, can you debug it?

The pkg-config file should be in the -dev package, so there's no value in installing the base package explicitly.
Comment 3 Hyowon Kim 2016-10-30 04:53:11 PDT
Created attachment 293345 [details]
Patch
Comment 4 Hyowon Kim 2016-10-30 04:53:58 PDT
(In reply to comment #2)
> Comment on attachment 293266 [details]
> Patch
> 
> But we do have this function:
> 
>         $(aptIfElse libgeoclue-2-dev libgeoclue-dev) \
> 
> I guess it is broken for you for some reason, can you debug it?
> 
> The pkg-config file should be in the -dev package, so there's no value in
> installing the base package explicitly.

It seems the pc file name installed by libgeoclue-2-dev is libgeoclue-2, not geoclue-2.
Is my new patch an appropriate correction?
Comment 5 Michael Catanzaro 2016-10-30 08:35:57 PDT
Comment on attachment 293345 [details]
Patch

Ah, yes! Good catch!

Seems that geoclue-2.0.pc ensures the D-Bus service exists (and it's what we use to find it in PlatformGTK.cmake). libgeoclue-2.0 is for the library and it's indeed what we're supposed to use here.
Comment 6 Michael Catanzaro 2016-10-30 08:47:31 PDT
So the reason it builds at all is simple: we do not actually use libgeoclue. Unfortunately while this commit is clearly correct -- the FindGeoClue2 module was broken -- it does mean we're now going to be unnecessarily linking against libgeoclue. :(

And it's slightly tricky to fix, because we still have code to support geoclue1, and that code really does need to link to (the obsolete) libgeoclue. But we don't need to support geoclue1 anymore, since geoclue2 has been around for a long time. So I think we should remove the geoclue1 support entirely, and then we can also remove this unnecessary find module and stop linking to libgeoclue. I filed bug #164205 for this.

I still give your patch r+, since the Find module was broken and that's what you were fixing.
Comment 7 WebKit Commit Bot 2016-10-30 08:59:20 PDT
Comment on attachment 293345 [details]
Patch

Clearing flags on attachment: 293345

Committed r208127: <http://trac.webkit.org/changeset/208127>
Comment 8 WebKit Commit Bot 2016-10-30 08:59:24 PDT
All reviewed patches have been landed.  Closing bug.