RFR: 8227808: Make GTK3 libraries mandatory for building on Linux
Ambarish Rapte
arapte at openjdk.java.net
Thu Dec 5 17:53:23 UTC 2019
On Thu, 5 Dec 2019 12:04:00 GMT, Johan Vos <jvos at openjdk.org> wrote:
> On Thu, 5 Dec 2019 07:36:31 GMT, Ambarish Rapte <arapte at openjdk.org> wrote:
>
>> Need for the change [[JDK-8227808](https://bugs.openjdk.java.net/browse/JDK-8227808)]:
>> Currently GTK3 is the default on Linux. However, there is build logic that will skip building glassgtk3 if the gtk3 development libraries are not installed. This creates a situation where the build will succeed, but the resulting JavaFX library will fail to run unless you explicitly force GTK2 with "-Djdk.gtk.version=2".
>>
>> How to verify the change:
>> On a Linux system without gtk2 and gtk3 packages,
>> 1. Clone jfx and run gradle sdk.
>> -> Build should fail with an error for missing GTK3 packages.
>>
>> 2. Install gtk3 packages, remove build directory and run gradle clean sdk.
>> -> Build should fail with an error for missing GTK2 packages.
>>
>> 3. Install gtk2 packages, remove build directory and run gradle clean sdk.
>> -> Build should finish without any error.
>>
>> Build verification:
>> 1. Run a JavaFX application with -Djdk.gtk.verbose=true
>> Verify the verbose message, the default glassgtk3 library should be used.
>>
>> 2. Run a JavaFX application with -Djdk.gtk.verbose=true -Djdk.gtk.version=2
>> Verify the verbose message, glassgtk2 library should be used.
>>
>> 3. Run a JavaFX application with -Djdk.gtk.verbose=true -Djdk.gtk.version=3
>> Verify the verbose message, glassgtk3 library should be used.
>>
>> ----------------
>>
>> Commits:
>> - 57157900: 8227808: Make GTK3 libraries mandatory for building on Linux
>>
>> Changes: https://git.openjdk.java.net/jfx/pull/61/files
>> Webrev: https://webrevs.openjdk.java.net/jfx/61/webrev.00
>> Issue: https://bugs.openjdk.java.net/browse/JDK-8227808
>> Stats: 18 lines in 1 file changed: 0 ins; 10 del; 8 mod
>> Patch: https://git.openjdk.java.net/jfx/pull/61.diff
>> Fetch: git fetch https://git.openjdk.java.net/jfx pull/61/head:pull/61
>
> buildSrc/linux.gradle line 225:
>
>> 224: LINUX.glass.glass.compiler = compiler
>> 225: LINUX.glass.glass.ccFlags = [ccFlags, gtk2CCFlags, gtk3CCFlags, "-Werror"].flatten()
>> 226: LINUX.glass.glass.linker = linker
>
> while this compiles, it might be confusing as it will pull in both the gtk2 and gtk3 headers and there is overlap.
Hi Johan,
Thanks for verifying the change, I also verified build by removing the gtk flags.
I shall remove these flags and update the PR.
PR: https://git.openjdk.java.net/jfx/pull/61
More information about the openjfx-dev
mailing list