[PATCH] Freetype Directory Bug On zLinux

Adam Farley8 adam.farley at uk.ibm.com
Wed Jan 17 16:07:09 UTC 2018

Hi All,

In JDK9 on zLinux 64bit, it seems we don't look for libfreetype.so 
in /usr/lib/$OPENJDK_TARGET_CPU-linux-gnu by default.

If you DO have pkg-config, "configure" searches for freetype in 
several places, including a place relative to gcc, 
(gcc/../../etc) where it uses the correct folder name and finds 

If you DON'T have pkg-config, it searches a few places, gets 
desperate, and ends up in a 64bit-only if statement (where it 
assumes it's running on intel linux and fails trying to check 

As far as I can tell, this is a build bug, and can be fixed 
in one of three ways:

1) We add the aforementioned IF statement, effectively adding 
/usr/lib/s390x-linux-gnu to the list of places configure looks 
for libfreetype.so

2) We add something into the configure files that checks for
the presence of pkg-config before we look for freetype, if
only on zlinux.

3) We backport the jdk10 solution, or a simplified version of it.

Note that we may need to fix the 64bit-only if statement anyway,
as there are many 64-bit locations that are not 64bit linux.


Best Regards

Adam Farley

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

More information about the build-dev mailing list