Closed nudgegoonies closed 8 months ago
Interesting. Thanks for the report! We did change the build platform for Linux/x64 for JDK21, but I've replicated this on Linux/aarch64 which hasn't changed so it's not related to that.
Noting that most other openjdk providers seem to ship their own freetype library. Temurin does not
https://github.com/adoptium/temurin-build/pull/3557 indicates we changed the behaviour for JDK21+ as a result of discussions in https://github.com/adoptium/temurin-build/issues/3504.
FYI @andrew-m-leonard - we should probably call this out in https://adoptium.net/blog/2024/01/eclipse-temurin-8u402-11022-1710-and-2102-available but it seems we may have a change in behaviour here which was not expected.
Noting that installing libfreetype-dev
alongside libfreetype6
should resolve this, as it includes the desired libfreetype.so
symlink under /usr/lib/
not sure I understand the "scenario" ? libfontmanager.so and libfreetype.so are within the same directory
Is this an Installer issue maybe?
not sure I understand the "scenario" ? libfontmanager.so and libfreetype.so are within the same directory
Is this an Installer issue maybe?
Quite likely - it looks like it's present in the tarball (which I hadn't checked earlier but not the installed .deb
...
Assigning George as he agreed to look at this in the PMC potentially as part of his investigations of https://github.com/adoptium/installer/issues/801 in case they can both be tested together
I believe @steelhead31 has resolved this now, so I'll leave him to add some closing comments :-)
The initial bug was fixed in adoptium/installer#812 , which then subsequently required republished of the JDK21.0.2+13 release packages, which was complete via PR adoptium/installer#824 , in addition s390x support was added adoptium/installer#827 and a bug identified and fixed in the JRE 21 RPM packages which was also fixed adoptium/installer#831. All the new installer packages have been published to the jfrog artifactory, and can be identified with the suffixed spec version of -2 ( and -3 for the ppc64le JRE fix ).
Thank you!
Debian images (e.g. tag eclipse-temurin:21.0.2_13-jdk
, https://hub.docker.com/layers/library/eclipse-temurin/21.0.2_13-jdk/images/sha256-723e15b2ddb23812fcb49eb688717f926545504e69a24b8f3b2135777de1c3b9?context=explore) appear to have been rebuilt 11days ago and we found some builds on our CI infra to fail with
java.lang.RuntimeException: Fontconfig head is null, check your fonts or fonts configuration at
java.desktop/sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1263) at
java.desktop/sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:221) at
java.desktop/sun.awt.FontConfiguration.init(FontConfiguration.java:105) at
java.desktop/sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:696) at
java.desktop/sun.font.SunFontManager$2.run(SunFontManager.java:352) at
java.desktop/sun.font.SunFontManager$2.run(SunFontManager.java:309) at
java.base/java.security.AccessController.doPrivileged(AccessController.java:319) at
java.desktop/sun.font.SunFontManager.<init>(SunFontManager.java:309) at
java.desktop/sun.awt.FcFontManager.<init>(FcFontManager.java:35) at
java.desktop/sun.awt.X11FontManager.<init>(X11FontManager.java:55) at
java.desktop/sun.font.PlatformFontInfo.createFontManager(PlatformFontInfo.java:37) at
java.desktop/sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:51) at
java.desktop/sun.font.SunFontManager.getInstance(SunFontManager.java:242) at
java.desktop/sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:260) at
java.desktop/sun.java2d.SunGraphics2D.getFontMetrics(SunGraphics2D.java:862) at
org.jfree.chart.text.G2TextMeasurer.getStringWidth(G2TextMeasurer.java:63) at
org.jfree.chart.text.TextUtils.nextLineBreak(TextUtils.java:227) at
org.jfree.chart.text.TextUtils.createTextBlock(TextUtils.java:168) at
org.jfree.chart.title.TextTitle.arrangeRR(TextTitle.java:628) at
org.jfree.chart.title.TextTitle.arrange(TextTitle.java:496) at
org.jfree.chart.JFreeChart.drawTitle(JFreeChart.java:1260) at
org.jfree.chart.JFreeChart.draw(JFreeChart.java:1150) at
org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1343) at
org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1324) at
org.jfree.chart.ChartUtils.writeChartAsPNG(ChartUtils.java:144) at
org.jfree.chart.ChartUtils.writeChartAsPNG(ChartUtils.java:98) at
Is this directly related? If so, shall I create a ticket in the containers project?
I think that's different enough to warrant creation of another issue. What are you running when you get that error? It would be good to have a recreate since just running the image with jshell doesn't seem to show that exception. If you can determine if it is reproducible outside the container image that would also be useful to know.
Debian images (e.g. tag
eclipse-temurin:21.0.2_13-jdk
, https://hub.docker.com/layers/library/eclipse-temurin/21.0.2_13-jdk/images/sha256-723e15b2ddb23812fcb49eb688717f926545504e69a24b8f3b2135777de1c3b9?context=explore) appear to have been rebuilt 11days ago and we found some builds on our CI infra to fail withjava.lang.RuntimeException: Fontconfig head is null, check your fonts or fonts configuration at java.desktop/sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1263) at java.desktop/sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:221) at java.desktop/sun.awt.FontConfiguration.init(FontConfiguration.java:105) at java.desktop/sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:696) at java.desktop/sun.font.SunFontManager$2.run(SunFontManager.java:352) at java.desktop/sun.font.SunFontManager$2.run(SunFontManager.java:309) at java.base/java.security.AccessController.doPrivileged(AccessController.java:319) at java.desktop/sun.font.SunFontManager.<init>(SunFontManager.java:309) at java.desktop/sun.awt.FcFontManager.<init>(FcFontManager.java:35) at java.desktop/sun.awt.X11FontManager.<init>(X11FontManager.java:55) at java.desktop/sun.font.PlatformFontInfo.createFontManager(PlatformFontInfo.java:37) at java.desktop/sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:51) at java.desktop/sun.font.SunFontManager.getInstance(SunFontManager.java:242) at java.desktop/sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:260) at java.desktop/sun.java2d.SunGraphics2D.getFontMetrics(SunGraphics2D.java:862) at org.jfree.chart.text.G2TextMeasurer.getStringWidth(G2TextMeasurer.java:63) at org.jfree.chart.text.TextUtils.nextLineBreak(TextUtils.java:227) at org.jfree.chart.text.TextUtils.createTextBlock(TextUtils.java:168) at org.jfree.chart.title.TextTitle.arrangeRR(TextTitle.java:628) at org.jfree.chart.title.TextTitle.arrange(TextTitle.java:496) at org.jfree.chart.JFreeChart.drawTitle(JFreeChart.java:1260) at org.jfree.chart.JFreeChart.draw(JFreeChart.java:1150) at org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1343) at org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1324) at org.jfree.chart.ChartUtils.writeChartAsPNG(ChartUtils.java:144) at org.jfree.chart.ChartUtils.writeChartAsPNG(ChartUtils.java:98) at
Is this directly related? If so, shall I create a ticket in the containers project?
I am wondering if the container image needs "fontconfig" installing ?
@sxa ok will create an issue later and see if I can create a minimal demo to reproduce it
@andrew-m-leonard fontconfig should already be installed but I'll try to verify if that is a "should" or actually present
What are you trying to do? Do something that uses the font manager.
Expected behaviour: It should work like with Temurin 17 JDK.
Observed behaviour: Error in java when using Temurin 21 JDK:
Any other comments: Can be verified by using ldd libfontmanager.so | grep freetype: temurin 17:
libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fbccc335000)
in comparison to temurin 21:libfreetype.so => not found
debian package is temurin-21-jdk in version 21.0.2.0.0+13 operating system is Debian 12