Re: RFR: 8255790: GTKL: Java 16 crashes on initialising GTKL on Manjaro Linux [v3]

2021-10-05 Thread Andrew John Hughes
On Tue, 16 Mar 2021 16:56:22 GMT, Phil Race  wrote:

>> From a build perspective this partially reverts 
>> https://bugs.openjdk.java.net/browse/JDK-8249821 except that it keeps 
>> the harfbuzz sources separate and still supports building and running 
>> against a system harfbuzz which is only of interest or relevance on Linux.
>> 
>> I ended up having to go this way because its is the least unsatisfactory 
>> solution.
>> I did not want us to build a devkit to link against a system linux only to 
>> find we couldn't use it at runtime
>> because too many systems have to old a version of harfbuzz.
>> 
>> This solves the Manjaro Linux problem and I've manually verified building 
>> against a system hardbuxz on Ubuntu 20.10
>> 
>> There are couple of incidental fixes in here too
>> - "libharfbuzz" should not have been in the EXTRA_HEADERS var when building 
>> against a system version
>> - harfbuzz/hb-ucdn is gone and should not be listed as a header directory 
>> needed to build the bundled copy
>> - I expect it also resolves https://bugs.openjdk.java.net/browse/JDK-8262502
>
> Phil Race has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   8255790: GTKL: Java 16 crashes on initialising GTKL on Manjaro Linux

Yes, it would fail at runtime, perhaps in subtle ways if the issue is not a 
missing function but a difference in behaviour.

In the scenario I'm considering, the build and runtime environments are 
effectively the same, as we're building packages for Fedora or RHEL on a 
specific version of that OS, which is then provided for that OS alone. We tend 
to use system libraries where possible as we know the library is going to be 
the same or newer than what we built against, and we benefit from fixes to the 
system library without rebuilding OpenJDK.

Rather than relying on failures being found in an older environment at runtime, 
I'd like the build to check it is being built against is suitable. With that 
early build failure, we can then flip those builds to using the in-tree library.

You do, however, make a good point that this check can be overridden at runtime 
if the build is run on a different system. So, if possible, it would be good to 
also have a runtime check if there is some clear entry point to add one.

I'll try and look into a fix for both once the October security update cycle is 
out of the way. That's taking up most of my time right now.

-

PR: https://git.openjdk.java.net/jdk/pull/2982


Re: RFR: 8255790: GTKL: Java 16 crashes on initialising GTKL on Manjaro Linux [v3]

2021-09-23 Thread Magnus Ihse Bursie
On Wed, 15 Sep 2021 19:43:45 GMT, Andrew John Hughes  wrote:

>> Phil Race has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   8255790: GTKL: Java 16 crashes on initialising GTKL on Manjaro Linux
>
> You mention that "too many systems have to old a version of harfbuzz".
> Is the required version defined somewhere? There's no check in configure for 
> either a version or a required symbol:
> https://github.com/openjdk/jdk/blob/cbffecc61e4a9ac1172926ef4f20d918d73adde9/make/autoconf/lib-bundled.m4#L291
> 
> With undefined symbols also being left to runtime (hence why JDK-8272332 
> doesn't show up during build), it seems this could lead to sporadic runtime 
> failures if OpenJDK is unknowingly built against a harfbuzz that is too old.

@gnu-andrew Maybe I'm misunderstanding here, but if symbol lookup is done at 
runtime, then the failure would occur if the JDK is *run* on a system with a 
too old harfbuzz, not if it is *built* on it. So it seems you want runtime 
checks, not build-time checks, right?

-

PR: https://git.openjdk.java.net/jdk/pull/2982


Re: RFR: 8255790: GTKL: Java 16 crashes on initialising GTKL on Manjaro Linux [v3]

2021-09-15 Thread Philip Race

You are right there's no check. One could be added by a motivated party ..
The minimum for Linux may be as old as 1.2.3  but safer is 2.3.1 since 
we rely on that for AAT font support.
I can't (quickly) speak to any important bug fixes in later releases we 
may need, just API / functionality.


-phi.

On 9/15/21 12:47 PM, Andrew John Hughes wrote:

On Tue, 16 Mar 2021 16:56:22 GMT, Phil Race  wrote:


 From a build perspective this partially reverts 
https://bugs.openjdk.java.net/browse/JDK-8249821 except that it keeps
the harfbuzz sources separate and still supports building and running against a 
system harfbuzz which is only of interest or relevance on Linux.

I ended up having to go this way because its is the least unsatisfactory 
solution.
I did not want us to build a devkit to link against a system linux only to find 
we couldn't use it at runtime
because too many systems have to old a version of harfbuzz.

This solves the Manjaro Linux problem and I've manually verified building 
against a system hardbuxz on Ubuntu 20.10

There are couple of incidental fixes in here too
- "libharfbuzz" should not have been in the EXTRA_HEADERS var when building 
against a system version
- harfbuzz/hb-ucdn is gone and should not be listed as a header directory 
needed to build the bundled copy
- I expect it also resolves https://bugs.openjdk.java.net/browse/JDK-8262502

Phil Race has updated the pull request incrementally with one additional commit 
since the last revision:

   8255790: GTKL: Java 16 crashes on initialising GTKL on Manjaro Linux

You mention that "too many systems have to old a version of harfbuzz".
Is the required version defined somewhere? There's no check in configure for 
either a version or a required symbol:
https://github.com/openjdk/jdk/blob/cbffecc61e4a9ac1172926ef4f20d918d73adde9/make/autoconf/lib-bundled.m4#L291

With undefined symbols also being left to runtime (hence why JDK-8272332 
doesn't show up during build), it seems this could lead to sporadic runtime 
failures if OpenJDK is unknowingly built against a harfbuzz that is too old.

-

PR: https://git.openjdk.java.net/jdk/pull/2982




Re: RFR: 8255790: GTKL: Java 16 crashes on initialising GTKL on Manjaro Linux [v3]

2021-09-15 Thread Andrew John Hughes
On Tue, 16 Mar 2021 16:56:22 GMT, Phil Race  wrote:

>> From a build perspective this partially reverts 
>> https://bugs.openjdk.java.net/browse/JDK-8249821 except that it keeps 
>> the harfbuzz sources separate and still supports building and running 
>> against a system harfbuzz which is only of interest or relevance on Linux.
>> 
>> I ended up having to go this way because its is the least unsatisfactory 
>> solution.
>> I did not want us to build a devkit to link against a system linux only to 
>> find we couldn't use it at runtime
>> because too many systems have to old a version of harfbuzz.
>> 
>> This solves the Manjaro Linux problem and I've manually verified building 
>> against a system hardbuxz on Ubuntu 20.10
>> 
>> There are couple of incidental fixes in here too
>> - "libharfbuzz" should not have been in the EXTRA_HEADERS var when building 
>> against a system version
>> - harfbuzz/hb-ucdn is gone and should not be listed as a header directory 
>> needed to build the bundled copy
>> - I expect it also resolves https://bugs.openjdk.java.net/browse/JDK-8262502
>
> Phil Race has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   8255790: GTKL: Java 16 crashes on initialising GTKL on Manjaro Linux

You mention that "too many systems have to old a version of harfbuzz".
Is the required version defined somewhere? There's no check in configure for 
either a version or a required symbol:
https://github.com/openjdk/jdk/blob/cbffecc61e4a9ac1172926ef4f20d918d73adde9/make/autoconf/lib-bundled.m4#L291

With undefined symbols also being left to runtime (hence why JDK-8272332 
doesn't show up during build), it seems this could lead to sporadic runtime 
failures if OpenJDK is unknowingly built against a harfbuzz that is too old.

-

PR: https://git.openjdk.java.net/jdk/pull/2982


Re: RFR: 8255790: GTKL: Java 16 crashes on initialising GTKL on Manjaro Linux [v3]

2021-03-16 Thread Alexander Zvegintsev
On Tue, 16 Mar 2021 16:56:22 GMT, Phil Race  wrote:

>> From a build perspective this partially reverts 
>> https://bugs.openjdk.java.net/browse/JDK-8249821 except that it keeps 
>> the harfbuzz sources separate and still supports building and running 
>> against a system harfbuzz which is only of interest or relevance on Linux.
>> 
>> I ended up having to go this way because its is the least unsatisfactory 
>> solution.
>> I did not want us to build a devkit to link against a system linux only to 
>> find we couldn't use it at runtime
>> because too many systems have to old a version of harfbuzz.
>> 
>> This solves the Manjaro Linux problem and I've manually verified building 
>> against a system hardbuxz on Ubuntu 20.10
>> 
>> There are couple of incidental fixes in here too
>> - "libharfbuzz" should not have been in the EXTRA_HEADERS var when building 
>> against a system version
>> - harfbuzz/hb-ucdn is gone and should not be listed as a header directory 
>> needed to build the bundled copy
>> - I expect it also resolves https://bugs.openjdk.java.net/browse/JDK-8262502
>
> Phil Race has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   8255790: GTKL: Java 16 crashes on initialising GTKL on Manjaro Linux

Marked as reviewed by azvegint (Reviewer).

-

PR: https://git.openjdk.java.net/jdk/pull/2982


Re: RFR: 8255790: GTKL: Java 16 crashes on initialising GTKL on Manjaro Linux [v3]

2021-03-16 Thread Magnus Ihse Bursie
On Tue, 16 Mar 2021 16:56:22 GMT, Phil Race  wrote:

>> From a build perspective this partially reverts 
>> https://bugs.openjdk.java.net/browse/JDK-8249821 except that it keeps 
>> the harfbuzz sources separate and still supports building and running 
>> against a system harfbuzz which is only of interest or relevance on Linux.
>> 
>> I ended up having to go this way because its is the least unsatisfactory 
>> solution.
>> I did not want us to build a devkit to link against a system linux only to 
>> find we couldn't use it at runtime
>> because too many systems have to old a version of harfbuzz.
>> 
>> This solves the Manjaro Linux problem and I've manually verified building 
>> against a system hardbuxz on Ubuntu 20.10
>> 
>> There are couple of incidental fixes in here too
>> - "libharfbuzz" should not have been in the EXTRA_HEADERS var when building 
>> against a system version
>> - harfbuzz/hb-ucdn is gone and should not be listed as a header directory 
>> needed to build the bundled copy
>> - I expect it also resolves https://bugs.openjdk.java.net/browse/JDK-8262502
>
> Phil Race has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   8255790: GTKL: Java 16 crashes on initialising GTKL on Manjaro Linux

Marked as reviewed by ihse (Reviewer).

-

PR: https://git.openjdk.java.net/jdk/pull/2982


Re: RFR: 8255790: GTKL: Java 16 crashes on initialising GTKL on Manjaro Linux [v3]

2021-03-16 Thread Phil Race
> From a build perspective this partially reverts 
> https://bugs.openjdk.java.net/browse/JDK-8249821 except that it keeps 
> the harfbuzz sources separate and still supports building and running against 
> a system harfbuzz which is only of interest or relevance on Linux.
> 
> I ended up having to go this way because its is the least unsatisfactory 
> solution.
> I did not want us to build a devkit to link against a system linux only to 
> find we couldn't use it at runtime
> because too many systems have to old a version of harfbuzz.
> 
> This solves the Manjaro Linux problem and I've manually verified building 
> against a system hardbuxz on Ubuntu 20.10
> 
> There are couple of incidental fixes in here too
> - "libharfbuzz" should not have been in the EXTRA_HEADERS var when building 
> against a system version
> - harfbuzz/hb-ucdn is gone and should not be listed as a header directory 
> needed to build the bundled copy
> - I expect it also resolves https://bugs.openjdk.java.net/browse/JDK-8262502

Phil Race has updated the pull request incrementally with one additional commit 
since the last revision:

  8255790: GTKL: Java 16 crashes on initialising GTKL on Manjaro Linux

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/2982/files
  - new: https://git.openjdk.java.net/jdk/pull/2982/files/f668b327..a92a146c

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=2982=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=2982=01-02

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2982.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2982/head:pull/2982

PR: https://git.openjdk.java.net/jdk/pull/2982