JDK-8319268 : Build failure with GCC8.3.1 after 8313643
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 22
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • Submitted: 2023-11-02
  • Updated: 2024-05-16
  • Resolved: 2023-11-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17 JDK 21 JDK 22
17.0.12Fixed 21.0.2Fixed 22 b23Fixed
Related Reports
Relates :  
Description
=== Output from failing command(s) repeated here ===
* For target support_native_java.desktop_libfontmanager_hb-ot-layout.o:
/data/codes/bobjdk/src/java.desktop/share/native/libharfbuzz/hb-ot-layout.cc: In function 'hb_bool_t hb_ot_layout_get_font_extents(hb_font_t*, hb_direction_t, hb_tag_t, hb_tag_t, hb_font_extents_t*)':
/data/codes/bobjdk/src/java.desktop/share/native/libharfbuzz/hb-ot-layout.cc:2136:26: error: 'max' may be used uninitialized in this function [-Werror=maybe-uninitialized]
       extents->ascender  = max;
       ~~~~~~~~~~~~~~~~~~~^~~~~
/data/codes/bobjdk/src/java.desktop/share/native/libharfbuzz/hb-ot-layout.cc:2137:26: error: 'min' may be used uninitialized in this function [-Werror=maybe-uninitialized]
       extents->descender = min;
       ~~~~~~~~~~~~~~~~~~~^~~~~
At global scope:
cc1plus: error: unrecognized command line option '-Wno-dangling-reference' [-Werror]
cc1plus: all warnings being treated as errors

* All command lines available in /data/codes/bobjdk/build/linux-x86_64-server-release/make-support/failure-logs.
=== End of repeated output ===

No indication of failed target found.
HELP: Try searching the build log for '] Error'.
HELP: Run 'make doctor' to diagnose build problems.

make[1]: *** [main] Error 1
make: *** [images] Error 2
Comments
Fix request (17u) I'd like to port JDK-8319268 to 17u to unify the code with upstream as requested in: https://github.com/openjdk/jdk17u-dev/pull/2468#discussion_r1601617775
16-05-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/2475 Date: 2024-05-16 01:56:35 +0000
16-05-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk21u/pull/336 Date: 2023-11-07 20:18:19 +0000
07-11-2023

Fix request: 21u A prerequisite to backporting JDK-8313643: without this fix, the build with HarfBuzz 8.2.2 fails on Linux. Clean backport. This fix is included into JDK-8313643 backport. Pull request: https://github.com/openjdk/jdk21u/pull/336
07-11-2023

I'm backporting JDK-8313643, and the build fails in CI on Linux x64 with exactly the same error. The compilers used in 21u and mainline are the same. Yet the build in mainline doesn't fail even if I revert this fix. It's weird.
07-11-2023

Changeset: ec79ab4b Author: xpbob <609083568@qq.com> Committer: Jie Fu <jiefu@openjdk.org> Date: 2023-11-03 03:49:37 +0000 URL: https://git.openjdk.org/jdk/commit/ec79ab4b3cd89c2c0a9c8550cd62433bd6d45266
03-11-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/16468 Date: 2023-11-02 04:29:01 +0000
02-11-2023