[PATCH] Freetype Directory Bug On zLinux

Adam Farley8 adam.farley at uk.ibm.com
Wed Jan 17 11:17:43 UTC 2018

>On 2018-01-16 18:54, Erik Joelsson wrote:
>> On 2018-01-16 09:50, Erik Joelsson wrote:
>>> On 2018-01-16 09:03, Adam Farley8 wrote:
>>>> >Configure already looks in:
>>>> >$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU-linux-gnu
>>>> >Which I would expect to cover your case, unless there is a mismatch
>>>> >between s390 and s390x here. Is your OPENJDK_TARGET_CPU set to s390 
>>>> >s390x in this case? If this discrepancy between arch names cannot be
>>>> >resolved, then a special case like the one you propose is needed.
>>>> I have tried and tried, and cannot find this code line in the JDK,
>>>> anywhere. Nor can I find variations on it. The closest I can find is 
>>>> list of possible locations, but these are hard-coded (and don't have
>>>> OPENJDK_TARGET_CPU in their code), and none are s390 or s390x.
>>>> Please spell out exactly where this line is, as I have no idea.
>>> I'm referring to this block:
>>>           if test "x$FOUND_FREETYPE" != xyes; then
>>>             FREETYPE_BASE_DIR="$SYSROOT/usr"
>>>             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
>>> [$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-linux-gnu], [well-known 
>>> location])
>>>             else
>>> [$FREETYPE_BASE_DIR/lib/i386-linux-gnu], [well-known location])
>>>               if test "x$FOUND_FREETYPE" != xyes; then
>>> [$FREETYPE_BASE_DIR/lib32], [well-known location])
>>>               fi
>>>             fi
>>>           fi

I'm embarassed that it took me this long to figure out you were referring 
to the jdk10 code. I was scouring my copy of the jdk9 source and wondering
what on earth you were talking about. Whoops. :)

>>> Reading it again I realize that the directory is only searched for 
>>> 64bit builds. Looking in platforms.m4, I see that s390 is 32bit and 
>>> s390x is 64bit. This means it will work fine for s390x, but not for 
>>> s390. Given that your libraries are found in a directory with s390x 
>>> in the name, I assume that you actually do want to produce a 64bit 
>>> build, or am I missing something? If you need this to work for 32bit, 
>>> then it's possible we need to tweak something. I think it wouldn't be 
>>> such a bad idea to always search 
>>> $SYSROOT/usr/lib/$OPENJDK_TARGET_CPU-linux-gnu, regardless of 
>>> architecture.
>> Are the libraries in your s390x directory 32bit or 64bit? Am I correct 
>> in assuming that the x suffix is signifying 64bit instead of 32bit?
>Yes, s390x means 64-bit. We do not support 32-bit s390, so I don't think 
>it's likely that Adam was trying to build that.
>Just like we sometimes just say "sparc" when we really mean "sparcv9", I 
>presume that "s390" here really mean "s390x".
>I'm guessing that the config.guess script (and our wrapper) perhaps is 
>not 100% correct in determining s390x. It has certainly not seen much 

For some reason my code now works perfectly. I am 100% certain that this
defect was occuring before I installed a selection of packages on the
machine, so I figure one of these, or something else I did, resulted
in the correct s390x being passed.

I'll try to figure out what has happened.

P.S. I'm trying to build s390x (64bit) on a 64bit machine. I don't know
where the code was getting s390.

>> /Erik
>>> Also note that your proposed code checked for 
>>> OPENJDK_TARGET_CPU_ARCH=s390, that's a different variable than 
>>> OPENJDK_TARGET_CPU. The arch in our model is more of a family of 
>>> cpus, ignoring things like address width.
>>> /Erik
>>>> Thanks everyone for your time. We'll get to the bottom of this! :)
>>>> 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