[jdk11u-dev] RFR: 8348597: Update HarfBuzz to 10.4.0 [v3]
Antonio Vieiro
avieiro at openjdk.org
Thu Aug 14 09:14:33 UTC 2025
On Tue, 20 May 2025 09:43:38 GMT, Antonio Vieiro <avieiro at openjdk.org> wrote:
>> Backport of [JDK-8348597](https://bugs.openjdk.org/browse/JDK-8348597) from JDK17 that updates HarfBuzz to 10.4.0 (which [improves drawing performande by 10+% and includes different build fixes](https://newreleases.io/project/github/harfbuzz/harfbuzz/release/10.4.0)). Backport is not clean because it required adapting `make/lib/Awt2dLibraries.gmk` to fit JDK11.
>>
>> Even though the backport built correctly, the resulting `jdk/lib/libfontmanager.so` contained undefined symbols that caused Swing tests to fail with `UnsatisfiedLinkError`. This is because JDK11 is missing [JDK-8319197](https://bugs.openjdk.org/browse/JDK-8319197) that excludes hb-subset from compilation, so this is also included as the second commit in the pull request.
>>
>> While at it, a third commit adds an additional `-Wno-attributes` flag to `HARFBUZZ_DISABLED_WARNINGS_CXX_gcc`, restoring the capability to build JDK11 on Linux with `gcc-4.8.5` (this is an old version of gcc, dating from 2015, but it's still the system gcc version in RHEL-7).
>>
>> Tested
>>
>> - on Windows 10 with `jdk:jfc_demo`.
>> - on Linux with `jdk:jfc_demo`, with
>> - `gcc 4.8.5/harfbuzz-1.7.5 (x86_64 & s390x)`,
>> - `gcc 8.5.0/harfbuzz-1.7.5 (x86_64)`,
>> - `gcc 11.5.0/harfbuzz-2.7.4 (x86_64)`
>> - and `gcc 14.2.1/harfbuzz-9.0.0 (x86_64)`
>>
>> with both `--with-harfbuzz=system` and `--with-harfbuzz=bundled`.
>
> Antonio Vieiro has updated the pull request incrementally with one additional commit since the last revision:
>
> Rearrange Awt2dLibraries.gmk as per review
Hi. Sorry for the delay.
Here's a list of some of the compiler flags and the commits in 17 where they were introduced. This may help us see what we should include here and what may want to backport later.
- `dangling-pointer stringop-overflow` in `DISABLED_WARNINGS_gcc`:
This was introduced in 2023 as [8300692: GCC 12 reports some compiler warnings in bundled freetype](https://github.com/openjdk/jdk17u-dev/commit/5fd778be5a40a45523d9200c866a73ddb577bd56).
- `danglling-reference` in `HARFBUZZ_DISABLED_WARNINGS_CXX_gcc`:
This was introduced in 2023 as [8308283: Build failure with GCC12 & GCC13](https://github.com/openjdk/jdk17u-dev/commit/e3dad43a7dda8be42caf5ccaed4dfe0d51a52cf5)
- `calloc-transposed-args` in `HARFBUZZ_DISABLED_WARNINGS_CXX_gcc`:
This one from 2024, introduced in [8324243: Compilation failures in java.desktop module with gcc 14](https://github.com/openjdk/jdk17u-dev/commit/0e524e2f476835885b34e221e64d8e12a9a1d792)
- `attributes` We're introducing it here to be able to build on `rhel7` with the system bundled `gcc-4.8`. Otherwise the build fails with the new harfbuzz code, with errors similar to:
./src/java.desktop/share/native/libharfbuzz/hb-serialize.hh:627:59: error: 'returns_nonnull' attribute directive ignored [-Werror=attributes]
Type *start_embed (const Type *obj HB_UNUSED = nullptr) const
I think I'll trim out as many flags of these flags as possible in this commit, just to be able to build with `gcc8` on `rhel7` and with `gcc10` (GHA). We may want to backport the stuff above to be able to build on more platforms.
-------------
PR Comment: https://git.openjdk.org/jdk11u-dev/pull/3026#issuecomment-3187671929
More information about the jdk-updates-dev
mailing list