RFR: 8255240: Mobile builds need to exclude some modules [v3]
Magnus Ihse Bursie
ihse at openjdk.java.net
Tue Nov 3 00:35:57 UTC 2020
On Mon, 2 Nov 2020 23:55:41 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:
>> Now that you mention it, I do remember some fuss long time ago about headless requiring X11. Hmmm. That means that any attempt to use headless is definitely out of bounds for this patch. Maybe the best way for this patch is then to exclude the java.desktop module for iOS and Android in Modules.gmk.
>>
>> But I'll look into headless once more to see if I can figure out if it *really* needs X11 or if it's just some sloppy programming.
>
> Good news! It turned out that java.desktop can build just fine without X11 if you just want headless.
>
> A quick and dirty hack to confirm that this works for you too:
> diff --git a/make/autoconf/libraries.m4 b/make/autoconf/libraries.m4
> index 5120918aed2..42a641c3228 100644
> --- a/make/autoconf/libraries.m4
> +++ b/make/autoconf/libraries.m4
> @@ -46,7 +46,7 @@ AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
> else
> # All other instances need X11, even if building headless only, libawt still
> # needs X11 headers.
> - NEEDS_LIB_X11=true
> + NEEDS_LIB_X11=false
> fi
>
> # Check if fontconfig is needed
>
> I'll open a separate bug to get a fix in mainline so that X11 is not required for headless builds.
See. https://bugs.openjdk.java.net/browse/JDK-8255785
-------------
PR: https://git.openjdk.java.net/mobile/pull/10
More information about the mobile-dev
mailing list