Skip to content

Conversation

@judovana
Copy link
Contributor

@judovana judovana commented Oct 28, 2025

Hi!

I had recently hit an issue with jdk8, which, if build on old system - eg el7, it can not run GUI application on newest system like f42 or similar:

java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.8.0-openjdk-jdk8u462.b05-0.ojdk8~u~upstream.hotspot.release.sdk.el7.x86_64.tarxz/jre/lib/amd64/libfontmanager.so: /lib64/libharfbuzz.so.0: undefined symbol: FT_Get_Color_Glyph_Layer
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1838)
	at java.lang.Runtime.loadLibrary0(Runtime.java:843)
	at java.lang.System.loadLibrary(System.java:1136)
	at sun.font.FontManagerNativeLibrary$1.run(FontManagerNativeLibrary.java:61)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.font.FontManagerNativeLibrary.<clinit>(FontManagerNativeLibrary.java:32)
	at sun.java2d.xr.XRSurfaceData.initXRSurfaceData(XRSurfaceData.java:85)
	at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:137)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)

As per investigations the issue is in duality of freetype, and is solved by 8193017: Import freetype sources into OpenJDK source tree

This is fully based on unfinished #318 , with smal lexception of rebase, and docs adaptation. The change in doc/building.html is unluckily done manually, as make update-build-docs is regenerating half of the universum. Is it desired? Is there some recomended version of pandoc to use?

 pandoc --version
pandoc 3.1.11.1
Features: +server +lua
Scripting engine: Lua 5.4

I had tested builds on windows and several linuxes, run full jtregs and checked the GUI works again. I can link full set of tests if needed (actually many of them are still running).

For record, I built by temurin build wrapper, which needed an change to adapt to this: adoptium/temurin-build#4287


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8193017 needs maintainer approval

Issue

  • JDK-8193017: Import freetype sources into OpenJDK source tree (Bug - P3 - Approved)

Reviewers

Contributors

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk8u-dev.git pull/709/head:pull/709
$ git checkout pull/709

Update a local copy of the PR:
$ git checkout pull/709
$ git pull https://git.openjdk.org/jdk8u-dev.git pull/709/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 709

View PR using the GUI difftool:
$ git pr show -t 709

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk8u-dev/pull/709.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 28, 2025

👋 Welcome back jvanek! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Oct 28, 2025

@judovana This change now passes all automated pre-integration checks.

After integration, the commit message for the final commit will be:

8193017: Import freetype sources into OpenJDK source tree

Co-authored-by: George Adams <[email protected]>
Reviewed-by: andrew

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@gnu-andrew) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk
Copy link

openjdk bot commented Oct 28, 2025

@judovana Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

@judovana judovana changed the title 8193017: Import freetype sources into OpenJDK source tree Backport 58ff4ee8c4ec399528338b59eadea996110366a0 Oct 28, 2025
@openjdk openjdk bot changed the title Backport 58ff4ee8c4ec399528338b59eadea996110366a0 8193017: Import freetype sources into OpenJDK source tree Oct 28, 2025
@openjdk
Copy link

openjdk bot commented Oct 28, 2025

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added the backport Port of a pull request already in a different code base label Oct 28, 2025
@openjdk
Copy link

openjdk bot commented Oct 28, 2025

⚠️ @judovana This backport pull request is too large to be automatically evaluated as clean.

@mlbridge
Copy link

mlbridge bot commented Oct 28, 2025

Webrevs

@judovana
Copy link
Contributor Author

Good. The builds passed. I somehow do not see the issue in the tier1. I had run them on many OSes and many platforms, and all looks good.

intel:

jtreg~tier1-jp8-ojdk8~u~upstream-el7.x86_64-hotspot.release.sdk-el7z.x86_64.vagrant-x11.defaultgc.legacy.lnxagent.jfroff  151/jdk8u472.b06-10.freetype1.ojdk8~u~upstream/SUCCESS/1 day 21 hr ago ; 
jtreg~tier1-jp8-ojdk8~u~upstream-el7.x86_64-hotspot.release.sdk-f42.x86_64.vagrant-x11.defaultgc.legacy.lnxagent.jfron  110/jdk8u472.b06-10.freetype1.ojdk8~u~upstream/UNSTABLE/1 day 21 hr ago ; 
  -  com/sun/jdi/oom/OomDebugTest.java#OomDebugTest  unrelated ot the change
jtreg~tier1-jp8-ojdk8~u~upstream-el7.x86_64-hotspot.fastdebug.sdk-el7z.x86_64.vagrant-x11.defaultgc.legacy.lnxagent.jfroff  125/jdk8u472.b06-10.freetype1.ojdk8~u~upstream/SUCCESS/1 day 21 hr ago ; 
jtreg~tier1-jp8-ojdk8~u~upstream-el7.x86_64-hotspot.release.sdk-el8z.x86_64.vagrant-x11.defaultgc.legacy.lnxagent.jfron  123/jdk8u472.b06-10.freetype1.ojdk8~u~upstream/SUCCESS/1 day 21 hr ago ; 
jtreg~tier1-jp8-ojdk8~u~upstream-el7.x86_64-hotspot.release.sdk-f41.x86_64.vagrant-x11.defaultgc.legacy.lnxagent.jfron  105/jdk8u472.b06-10.freetype1.ojdk8~u~upstream/SUCCESS/1 day 21 hr ago ; 
jtreg~tier1-jp8-ojdk8~u~upstream-el7.x86_64-hotspot.fastdebug.sdk-el7z.x86_64.vagrant-x11.defaultgc.legacy.lnxagent.jfron  139/jdk8u472.b06-10.freetype1.ojdk8~u~upstream/SUCCESS/1 day 21 hr ago ; 
jtreg~tier1-jp8-ojdk8~u~upstream-el7.x86_64-hotspot.fastdebug.sdk-f42.x86_64.vagrant-x11.defaultgc.legacy.lnxagent.jfron  77/jdk8u472.b06-10.freetype1.ojdk8~u~upstream/SUCCESS/1 day 21 hr ago ; 
jtreg~tier1-jp8-ojdk8~u~upstream-el7.x86_64-hotspot.release.sdk-el9.x86_64.vagrant-x11.defaultgc.legacy.lnxagent.jfron  74/jdk8u472.b06-10.freetype1.ojdk8~u~upstream/SUCCESS/1 day 21 hr ago ; 
jtreg~tier1-jp8-ojdk8~u~upstream-el7.x86_64-hotspot.release.sdk-el9.x86_64.vagrant-x11.defaultgc.legacy.lnxagent.jfroff  81/jdk8u472.b06-10.freetype1.ojdk8~u~upstream/SUCCESS/1 day 21 hr ago ; 
jtreg~tier1-jp8-ojdk8~u~upstream-el7.x86_64-hotspot.fastdebug.sdk-el9.x86_64.vagrant-x11.defaultgc.legacy.lnxagent.jfron  74/jdk8u472.b06-10.freetype1.ojdk8~u~upstream/SUCCESS/1 day 21 hr ago ; 
jtreg~tier1-jp8-ojdk8~u~upstream-el7.x86_64-hotspot.fastdebug.sdk-f42.x86_64.vagrant-x11.defaultgc.legacy.lnxagent.jfroff  74/jdk8u472.b06-10.freetype1.ojdk8~u~upstream/SUCCESS/1 day 21 hr ago ; 
jtreg~tier1-jp8-ojdk8~u~upstream-el7.x86_64-hotspot.release.sdk-f41.x86_64.vagrant-x11.defaultgc.legacy.lnxagent.jfroff  111/jdk8u472.b06-10.freetype1.ojdk8~u~upstream/SUCCESS/1 day 21 hr ago ; 
jtreg~tier1-jp8-ojdk8~u~upstream-el7.x86_64-hotspot.fastdebug.sdk-f41.x86_64.vagrant-x11.defaultgc.legacy.lnxagent.jfroff  73/jdk8u472.b06-10.freetype1.ojdk8~u~upstream/SUCCESS/1 day 21 hr ago ; 
jtreg~tier1-jp8-ojdk8~u~upstream-el7.x86_64-hotspot.fastdebug.sdk-el9.x86_64.vagrant-x11.defaultgc.legacy.lnxagent.jfroff  82/jdk8u472.b06-10.freetype1.ojdk8~u~upstream/SUCCESS/1 day 22 hr ago ; 
jtreg~tier1-jp8-ojdk8~u~upstream-el7.x86_64-hotspot.release.sdk-el8z.x86_64.vagrant-x11.defaultgc.legacy.lnxagent.jfroff  149/jdk8u472.b06-10.freetype1.ojdk8~u~upstream/SUCCESS/1 day 22 hr ago ; 
jtreg~tier1-jp8-ojdk8~u~upstream-el7.x86_64-hotspot.release.sdk-f42.x86_64.vagrant-x11.defaultgc.legacy.lnxagent.jfroff  121/jdk8u472.b06-10.freetype1.ojdk8~u~upstream/SUCCESS/1 day 22 hr ago ; 
jtreg~tier1-jp8-ojdk8~u~upstream-el7.x86_64-hotspot.fastdebug.sdk-el8z.x86_64.vagrant-x11.defaultgc.legacy.lnxagent.jfroff  126/jdk8u472.b06-10.freetype1.ojdk8~u~upstream/SUCCESS/1 day 22 hr ago ; 
jtreg~tier1-jp8-ojdk8~u~upstream-el7.x86_64-hotspot.release.sdk-el7z.x86_64.vagrant-x11.defaultgc.legacy.lnxagent.jfron  120/jdk8u472.b06-10.freetype1.ojdk8~u~upstream/SUCCESS/1 day 22 hr ago ; 
jtreg~tier1-jp8-ojdk8~u~upstream-el7.x86_64-hotspot.fastdebug.sdk-el8z.x86_64.vagrant-x11.defaultgc.legacy.lnxagent.jfron  123/jdk8u472.b06-10.freetype1.ojdk8~u~upstream/SUCCESS/1 day 22 hr ago ; 
jtreg~tier1-jp8-ojdk8~u~upstream-win2022.x86_64-hotspot.release.sdk-win2022.x86_64.vagrant-x11.defaultgc.legacy.lnxagent.jfroff  89/jdk8u472.b06-10.freetype1.ojdk8~u~upstream/SUCCESS/1 day 22 hr ago ; 

Noni-ntels may look wilder, but there is no new failure. And they are mostly not running GUI anyway...

@judovana
Copy link
Contributor Author

Also all the full jtregs finished on all arches x osses I have handy. The com/sun/jdi/oom/OomDebugTest.java#OomDebugTest on f42 seems to be popping up a bit more often then I would like. Will investigate more, but still looks unrelated.

@zzambers
Copy link
Contributor

zzambers commented Oct 29, 2025

Would be nice to have in-tree freetype as in later jdks

As when person is not careful bundling freetype, it can end up linking against system hafrbuzz (which, in turn, has cyclic dependency on freetype). This may, in better case, fail the build. In worst case, build may seemingly look ok, but cause runtime linking error (in description), when run on newer OS (newer than build one).

For reference, issue and workaround in temurin-build:
issue: adoptium/temurin-build#4159
workaround: adoptium/temurin-build#4238

Also --with-freetype-src on windows does not work with recent freetype versions, due to changes to vcxproj confugrations:

configure: Trying to compile freetype sources with PlatformToolset=v143 to /home/tester/temurinbuild-1756203907/workspace/libs/freetype/lib64/ ...
configure: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)
configure: error: Consider building freetype manually and using --with-freetype instead.

(and older freetype such as 2.9.1 need to be used)

@openjdk openjdk bot added the approval Requires approval; will be removed when approval is received label Oct 29, 2025
@judovana
Copy link
Contributor Author

:38:43.3378937Z FAILED: gc/concurrentMarkSweep/CheckAllocateAndSystemGC.java
2025-10-28T14:38:43.3379819Z FAILED: gc/concurrentMarkSweep/SystemGCOnForegroundCollector.java

Are the failing jtregs. Do not seem to be related though

Am also digging in 32windows time-outs, and can not see culprit. @zzambers any ideas?

@zzambers
Copy link
Contributor

zzambers commented Nov 3, 2025

:38:43.3378937Z FAILED: gc/concurrentMarkSweep/CheckAllocateAndSystemGC.java
2025-10-28T14:38:43.3379819Z FAILED: gc/concurrentMarkSweep/SystemGCOnForegroundCollector.java

Are the failing jtregs. Do not seem to be related though

Am also digging in 32windows time-outs, and can not see culprit. @zzambers any ideas?

There are some unstable tests on x86 (32-bit) and probably unrelated to your PR. Segfault in CheckAllocateAndSystemGC.java seems like JDK-8361833 - known issue.

@zzambers
Copy link
Contributor

zzambers commented Nov 5, 2025

btw. there is also issue with Windows x86 build jobs, where VS2010 installation hangs and jobs get cancelled. I have created PR for that.

Copy link
Member

@gnu-andrew gnu-andrew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking this over. In like manner, I have leveraged my previous review and just compared the diff for your PR with the one for #318. I see building.html is now updated. I also think your choice of keeping the example and removing the freetype part is a better idea than removing the entire thing, even if it deviates from the backported change.

I do think we should test this on Windows & VS2010 before merging, so I will approve this once #712 & #713 are merged and this PR is updated with those changes. In the meantime, please use the contributor command to credit @gdams for his work here.

@gnu-andrew
Copy link
Member

btw. there is also issue with Windows x86 build jobs, where VS2010 installation hangs and jobs get cancelled. I have created PR for that.

Thanks for analysiing the test results and debugging this stalling build job. I observed it when merging the security update in, but had no idea what was causing it. I've reviewed #712 & #713 so we should be able to get them in shortly and then Jiri can merge them into his branch.

@judovana
Copy link
Contributor Author

/contributor add @gdams

@openjdk
Copy link

openjdk bot commented Nov 11, 2025

@judovana
Contributor George Adams <[email protected]> successfully added.

@judovana
Copy link
Contributor Author

Thanks for taking this over. In like manner, I have leveraged my previous review and just compared the diff for your PR with the one for #318. I see building.html is now updated. I also think your choice of keeping the example and removing the freetype part is a better idea than removing the entire thing, even if it deviates from the backported change.

I do think we should test this on Windows & VS2010 before merging, so I will approve this once #712 & #713 are

I had been testing it on windows, but sure, no objection to wait. Thank you!

merged and this PR is updated with those changes. In the meantime, please use the contributor command to credit @gdams for his work here.

done!

@gnu-andrew
Copy link
Member

Thanks for taking this over. In like manner, I have leveraged my previous review and just compared the diff for your PR with the one for #318. I see building.html is now updated. I also think your choice of keeping the example and removing the freetype part is a better idea than removing the entire thing, even if it deviates from the backported change.
I do think we should test this on Windows & VS2010 before merging, so I will approve this once #712 & #713 are

I had been testing it on windows, but sure, no objection to wait. Thank you!

On VS2010? Patches are now merged so just merge into your tree and push, please.

@judovana
Copy link
Contributor Author

judovana commented Nov 11, 2025

nope

configure: Rewriting VS_ENV_CMD to "/cygdrive/c/progra~1/micros~1/2022/commun~1/vc/auxili~1/build/vcvars~2.bat"
configure: Trying to extract Visual Studio environment variables
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.7.6
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x86_x64'

Sorry.

Mergin in progress

@openjdk
Copy link

openjdk bot commented Nov 11, 2025

@judovana Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

@judovana
Copy link
Contributor Author

x86 windows still do not look healthy

ERROR: C:\Users\runneradmin\vs-2010-express-1\VS2010Express1.iso
Cannot open the file as archive
7-Zip 25.01 (x64) : Copyright (c) 1999-2025 Igor Pavlov : 2025-08-03


Scanning the drive for archives:
1 file, 170 bytes (1 KiB)

Extracting archive: C:\Users\runneradmin\vs-2010-express-1\VS2010Express1.iso

Can't open as archive: 1
Files: 0
Size:       0
Compressed: 0

Error: Process completed with exit code 1.

@gnu-andrew
Copy link
Member

It seems to have resolved itself now and is working on my PR, #719

@judovana
Copy link
Contributor Author

thanx! Rerunning.

@openjdk
Copy link

openjdk bot commented Nov 12, 2025

@judovana Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

@judovana
Copy link
Contributor Author

@gnu-andrew it is green!-) @zzambers ty!

@zzambers
Copy link
Contributor

@judovana Wow, completely green, even security infra stuff and all 32-bit tests. Have not seen such for a long time here. Lucky run :)

@judovana
Copy link
Contributor Author

You know.. great PR :). But I think luck had nothing to do with it. Thank you for fixing them.

Copy link
Member

@gnu-andrew gnu-andrew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing looks good.

@gnu-andrew
Copy link
Member

@judovana Wow, completely green, even security infra stuff and all 32-bit tests. Have not seen such for a long time here. Lucky run :)

Clearly GHA is eager for FreeType support too ;)

@gnu-andrew
Copy link
Member

/approve yes

@openjdk
Copy link

openjdk bot commented Nov 12, 2025

@gnu-andrew
8193017: The approval request has been approved.

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed approval Requires approval; will be removed when approval is received labels Nov 12, 2025
@judovana
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Nov 12, 2025
@openjdk
Copy link

openjdk bot commented Nov 12, 2025

@judovana
Your change (at version c6a920c) is now ready to be sponsored by a Committer.

@judovana
Copy link
Contributor Author

Note that I'm not commiter, so would be nice somebody sponsors this. ty! Looking forward to see this in!

@zzambers
Copy link
Contributor

/sponsor

@openjdk
Copy link

openjdk bot commented Nov 12, 2025

Going to push as commit 335fce5.

@openjdk openjdk bot added the integrated Pull request has been integrated label Nov 12, 2025
@openjdk openjdk bot closed this Nov 12, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Nov 12, 2025
@openjdk
Copy link

openjdk bot commented Nov 12, 2025

@zzambers @judovana Pushed as commit 335fce5.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@mrserb
Copy link
Member

mrserb commented Nov 13, 2025

@judovana, are you planning to work on the followup issues to bump the freetype version to match the one used in jdk11+?

@judovana
Copy link
Contributor Author

@mrserb hi! I have no objections to do so, and test that. if it is wanted, which I guess it is. That would be directly to https://bugs.openjdk.org/browse/JDK-8351538 ? Or one by one? Generally any gudidance to save both mine and reviewers cycles Welcomed. Thanx for pointing it out. I wanted to do it as part of the rebase, but Andrew advised against, and that was good intermediate step. Is it supposed to target before January CPU,or rather later?

@judovana
Copy link
Contributor Author

judovana commented Nov 14, 2025

@mrserb Unless you advice differently, I will be backporting one by one, not necessasrily doing PR with each minor (eg 8203367, 2.9.1 is CVE IIReadC) , but will be testing build-ability on old systems.

@judovana
Copy link
Contributor Author

judovana commented Nov 14, 2025

@mrserb Despite from build system, only "

--- jdk/make/lib/Awt2dLibraries.gmk
+++ jdk/make/lib/Awt2dLibraries.gmk
@@ -541,6 +541,7 @@ else
          E_STATEMENT_NOT_REACHED \
          E_END_OF_LOOP_CODE_NOT_REACHED, \
       DISABLED_WARNINGS_microsoft := 4267 4244 4312, \
+      DISABLED_WARNINGS_gcc := implicit-fallthrough, \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN), \
  ))

is present in 2.9.1, it requires openjdk/jdk11u@f74d0ae#diff-a634b106e57d9efbd1270664b8b79b2048b035a109b6f5220c4d39a4293d4458 thoughts? I guess I will bring it on jdk8u mailing list...

Started here: #720

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Port of a pull request already in a different code base integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

4 participants