Bug 163733

Summary: [EFL] REGRESSION(r207616): Build is broken due to missing libgeoclue-dev package
Product: WebKit Reporter: Csaba Osztrogonác <ossy>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Critical CC: cgarcia, clopez, gyuyoung.kim, hs85.jeong, ossy
Priority: P1    
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 160809    
Attachments:
Description Flags
Patch none

Description Csaba Osztrogonác 2016-10-20 08:51:03 PDT
I tried an EFL WebKit build on a fresh new Ubuntu 16.04 
machine and got the following build error:

In file included from ../../Source/WebCore/platform/geoclue/GeolocationProviderGeoclue1.cpp:27:0:
../../Source/WebCore/platform/geoclue/GeolocationProviderGeoclue.h:32:36: fatal error: geoclue/geoclue-master.h: No such file or directory
compilation terminated.

It seems https://trac.webkit.org/changeset/204445 is the culprit.

geoclue/geoclue-master.h is in libgeoclue-dev package, 
but after r204445, only libgeoclue-2-dev is installed.

But the question is what is the proper fix?
- adding geoclue-2.0 to <efl|gtk>/install-dependencies
  --> isn't enough, because USE(GEOCLUE2) isn't exposed to the build
- Source/cmake/OptionsEfl.cmake should use SET_AND_EXPOSE_TO_BUILD similar to GTK 
- fixing the geoclue 1 build
- removing the geoclue path
- whatever else

Additionally I got the following warnings which should be fixed or suppressed:
DerivedSources/WebCore/Geoclue2Interface.c: In function 'geoclue_manager_complete_get_client':
DerivedSources/WebCore/Geoclue2Interface.c:673:21: warning: unused parameter 'object' [-Wunused-parameter]
DerivedSources/WebCore/Geoclue2Interface.c: In function 'geoclue_manager_complete_add_agent':
DerivedSources/WebCore/Geoclue2Interface.c:693:21: warning: unused parameter 'object' [-Wunused-parameter]
DerivedSources/WebCore/Geoclue2Interface.c: In function 'geoclue_client_complete_start':
DerivedSources/WebCore/Geoclue2Interface.c:2373:20: warning: unused parameter 'object' [-Wunused-parameter]
DerivedSources/WebCore/Geoclue2Interface.c: In function 'geoclue_client_complete_stop':
DerivedSources/WebCore/Geoclue2Interface.c:2391:20: warning: unused parameter 'object' [-Wunused-parameter]


note: I just reported this bug, but have no time and interest 
in fixing it myself. I'm going to upload my WIP patch, feel 
free to pick it up if it is important for somebody.
Comment 1 Csaba Osztrogonác 2016-10-20 08:57:39 PDT
Created attachment 292201 [details]
Patch

WIP patch, it fixes the geoclue 2 build.
Comment 2 Gyuyoung Kim 2016-10-20 19:18:15 PDT
Comment on attachment 292201 [details]
Patch

LGTM.
Comment 3 Carlos Garcia Campos 2016-10-20 22:25:42 PDT
(In reply to comment #0)
> I tried an EFL WebKit build on a fresh new Ubuntu 16.04 
> machine and got the following build error:
> 
> In file included from
> ../../Source/WebCore/platform/geoclue/GeolocationProviderGeoclue1.cpp:27:0:
> ../../Source/WebCore/platform/geoclue/GeolocationProviderGeoclue.h:32:36:
> fatal error: geoclue/geoclue-master.h: No such file or directory
> compilation terminated.
> 
> It seems https://trac.webkit.org/changeset/204445 is the culprit.
> 
> geoclue/geoclue-master.h is in libgeoclue-dev package, 
> but after r204445, only libgeoclue-2-dev is installed.
> 
> But the question is what is the proper fix?
> - adding geoclue-2.0 to <efl|gtk>/install-dependencies
>   --> isn't enough, because USE(GEOCLUE2) isn't exposed to the build
> - Source/cmake/OptionsEfl.cmake should use SET_AND_EXPOSE_TO_BUILD similar
> to GTK 
> - fixing the geoclue 1 build
> - removing the geoclue path
> - whatever else
> 
> Additionally I got the following warnings which should be fixed or
> suppressed:
> DerivedSources/WebCore/Geoclue2Interface.c: In function
> 'geoclue_manager_complete_get_client':
> DerivedSources/WebCore/Geoclue2Interface.c:673:21: warning: unused parameter
> 'object' [-Wunused-parameter]
> DerivedSources/WebCore/Geoclue2Interface.c: In function
> 'geoclue_manager_complete_add_agent':
> DerivedSources/WebCore/Geoclue2Interface.c:693:21: warning: unused parameter
> 'object' [-Wunused-parameter]
> DerivedSources/WebCore/Geoclue2Interface.c: In function
> 'geoclue_client_complete_start':
> DerivedSources/WebCore/Geoclue2Interface.c:2373:20: warning: unused
> parameter 'object' [-Wunused-parameter]
> DerivedSources/WebCore/Geoclue2Interface.c: In function
> 'geoclue_client_complete_stop':
> DerivedSources/WebCore/Geoclue2Interface.c:2391:20: warning: unused
> parameter 'object' [-Wunused-parameter]

This is generated code, Michael suppressed those warnings in GTK+ build in r206381 with:

set_source_files_properties(${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c PROPERTIES COMPILE_FLAGS -Wno-unused-parameter)

> 
> note: I just reported this bug, but have no time and interest 
> in fixing it myself. I'm going to upload my WIP patch, feel 
> free to pick it up if it is important for somebody.
Comment 4 Csaba Osztrogonác 2016-10-21 06:29:59 PDT
Comment on attachment 292201 [details]
Patch

Clearing flags on attachment: 292201

Committed r207668: <http://trac.webkit.org/changeset/207668>
Comment 5 Csaba Osztrogonác 2016-10-21 06:30:07 PDT
All reviewed patches have been landed.  Closing bug.