Bug 146583

Summary: [GTK] Can't build with USE_LIBHYPHEN=OFF
Product: WebKit Reporter: Emilio Pozuelo Monfort <pochu27>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: mcatanzaro, mrobinson
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Emilio Pozuelo Monfort 2015-07-03 02:55:49 PDT
[GTK] Can't build with USE_LIBHYPHEN=OFF
Comment 1 Emilio Pozuelo Monfort 2015-07-03 02:58:46 PDT
Created attachment 256089 [details]
Patch
Comment 2 Emilio Pozuelo Monfort 2015-07-03 03:00:32 PDT
Building with -DUSE_LIBHYPHEN=OFF I get:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
HYPHEN_LIBRARIES (ADVANCED)
    linked by target "WebCore" in directory /home/emilio/src/WebKit/Source/WebCore
    linked by target "WebCorePlatformGTK" in directory /home/emilio/src/WebKit/Source/WebCore
    linked by target "WebCorePlatformGTK2" in directory /home/emilio/src/WebKit/Source/WebCore

The attached patch fixes it.
Comment 3 Martin Robinson 2015-07-03 07:30:51 PDT
This is strange. If USE_LIBHYPHEN is off, find_package(Hyphen) shouldn't be executed [1]. I'm not sure why the HYPHEN_LIBRARIES would be set to NOTFOUND if it wasn't executed.

1. See line 429 in Source/cmake/OptionsGTK.cmake
Comment 4 Michael Catanzaro 2015-07-03 08:48:43 PDT
I can't reproduce this bug. Emilio, do you get the same issue with -DENABLE_CREDENTIAL_STORAGE=OFF or -DENABLE_GEOLOCATION=OFF? All work fine for me.
Comment 5 Emilio Pozuelo Monfort 2015-07-06 01:04:40 PDT
I have a dirty tree and a build going on. I'll do some more checking once that's over and report bug. I'll also install libhyphen and try to disable it (which is what you're doing I guess, whereas I don't have libhyphen installed).
Comment 6 Emilio Pozuelo Monfort 2015-07-06 01:45:59 PDT
Ok, I now what happened:

I don't have libhyphen-dev installed. So a first build with something like:

$ Tools/Scripts/build-webkit --gtk --cmakeargs="-DENABLE_WAYLAND_TARGET=ON -DENABLE_GLES2=ON -DENABLE_ACCELERATED_2D_CANVAS=OFF -DENABLE_MEDIA_STREAM=OFF" --makeargs="-j5"

failed, because libhyphen wasn't found but it wasn't explicitly disabled. A subsequent:

$ Tools/Scripts/build-webkit --gtk --cmakeargs="-DENABLE_WAYLAND_TARGET=ON -DENABLE_GLES2=ON -DENABLE_ACCELERATED_2D_CANVAS=OFF -DENABLE_MEDIA_STREAM=OFF  -DUSE_LIBHYPHEN=OFF" --makeargs="-j5"

failed again, because apparently one needs to remove the build dir for new configure-time flags to take effect (or maybe there's a flag to force it). Anyway, that's what confused me.

I have verified that things work fine after something like `rm -rf WebKitBuild/Release', so I'm closing this bug. Sorry for the trouble.
Comment 7 Martin Robinson 2015-07-06 07:14:43 PDT
(In reply to comment #6)

> failed again, because apparently one needs to remove the build dir for new
> configure-time flags to take effect (or maybe there's a flag to force it).
> Anyway, that's what confused me.


I'm really shouldn't need to remove the build directory between invocations. That said, I think that if you find yourself needing to do this, you can simply remove the CMakeCache.txt file and not have to build absolutely everything again.
Comment 8 Csaba Osztrogonác 2015-09-14 10:56:18 PDT
Comment on attachment 256089 [details]
Patch

Cleared review? from attachment 256089 [details] so that this bug does not appear in http://webkit.org/pending-review.  If you would like this patch reviewed, please attach it to a new bug (or re-open this bug before marking it for review again).