Re: <AWT Dev> libfontmanager.so: undefined symbol: hb_font_destroy in openjdk17~14

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: <AWT Dev> libfontmanager.so: undefined symbol: hb_font_destroy in openjdk17~14

Philip Race
Moving this to the right list.

There's lots of missing information in your email.

1) I don't know what a debian sid is. Internet suggests it is some
upstream dev version
Is this reproducible on any shipping distro ?

2) Where exactly did you get the openjdk build 17 ? Was it from
https://jdk.java.net/17/ or somewhere else ?
Please show the output of "java -version" to help confirm it.

3) What does  "ls -l lib/libfontmanager.so" show ?

4) What was the JDK version you had immediately before this and where
did you get that ?

5) Does either JDK 11u or JDK15u work in this respect on that system ?

-phil

On 3/19/21 6:03 AM, mc36 wrote:

> hi,
> just upgraded from openjdk17~11 to openjdk17~14
> (https://packages.debian.org/sid/main/openjdk-17-jdk) on my debian
> sid. i quickly noticed that something is wrong so i ended up with the
> below sample app.
> i'm not a big c coder so all i was able to do is that i got the
> libharfbuzz sources
> (https://packages.debian.org/unstable/libharfbuzz-dev) and checked
> that i have that version and the function is there.
> i would appreciate some idea what else should i try?
> thanks,
> csaba
>
>
> mc36@noti:~$ cat a.java
>
> import java.awt.Graphics2D;
> import java.awt.image.BufferedImage;
>
> public class a {
>
>     public static void main(String[] args) throws Exception {
>         BufferedImage img = new BufferedImage(100, 100,
> BufferedImage.TYPE_INT_RGB);
>         Graphics2D g2d = img.createGraphics();
>     }
>
> }
>
>
> mc36@noti:~$ javac a.java
> mc36@noti:~$ java a
> Exception in thread "main" java.lang.UnsatisfiedLinkError:
> /usr/lib/jvm/java-17-openjdk-amd64/lib/libfontmanager.so:
> /usr/lib/jvm/java-17-openjdk-amd64/lib/libfontmanager.so: undefined
> symbol: hb_font_destroy
>         at java.base/jdk.internal.loader.NativeLibraries.load(Native
> Method)
>         at
> java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:383)
>         at
> java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:227)
>         at
> java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:169)
>         at
> java.base/jdk.internal.loader.NativeLibraries.findFromPaths(NativeLibraries.java:310)
>         at
> java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:280)
>         at
> java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2392)
>         at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:808)
>         at java.base/java.lang.System.loadLibrary(System.java:1893)
>         at
> java.desktop/sun.font.FontManagerNativeLibrary$1.run(FontManagerNativeLibrary.java:57)
>         at
> java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
>         at
> java.desktop/sun.font.FontManagerNativeLibrary.<clinit>(FontManagerNativeLibrary.java:32)
>         at
> java.desktop/sun.java2d.xr.XRSurfaceData.initXRSurfaceData(XRSurfaceData.java:104)
>         at
> java.desktop/sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:122)
>         at
> java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
>         at
> java.desktop/sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:59)
>         at
> java.desktop/sun.awt.PlatformGraphicsInfo.createGE(PlatformGraphicsInfo.java:36)
>         at
> java.desktop/java.awt.GraphicsEnvironment$LocalGE.createGE(GraphicsEnvironment.java:93)
>         at
> java.desktop/java.awt.GraphicsEnvironment$LocalGE.<clinit>(GraphicsEnvironment.java:84)
>         at
> java.desktop/java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:106)
>         at
> java.desktop/java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1181)
>         at a.main(a.java:9)
> mc36@noti:~$

Reply | Threaded
Open this post in threaded view
|

Re: <AWT Dev> libfontmanager.so: undefined symbol: hb_font_destroy in openjdk17~14

mc36
hi,
please dont! i got ~15 and the issue is gone!
(but answering line by line, who knows)
thanks,
cs


On 3/29/21 6:41 PM, Philip Race wrote:
Moving this to the right list.

There's lots of missing information in your email.

1) I don't know what a debian sid is. Internet suggests it is some upstream dev version
Is this reproducible on any shipping distro ?
yesss, it is. https://www.debian.org/
the only difference that you replace stable to unstable/sid/experimental,depending how brave you're.... :)

 

2) Where exactly did you get the openjdk build 17 ? Was it from https://jdk.java.net/17/ or somewhere else ?
Please show the output of "java -version" to help confirm it.

sudo apt install openjdk-17-jre -- to get the latest build of them....
at the moment i see the following version:

mc36@noti:~$ java -version
openjdk version "17-ea" 2021-09-14
OpenJDK Runtime Environment (build 17-ea+15-Debian-1)
OpenJDK 64-Bit Server VM (build 17-ea+15-Debian-1, mixed mode, sharing)
mc36@noti:~$

 

3) What does  "ls -l lib/libfontmanager.so" show ?
 

mc36@noti:~$ find /lib/ -name libfontmanager.so
/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libfontmanager.so
/lib/jvm/java-15-openjdk-amd64/lib/libfontmanager.so
/lib/jvm/java-16-openjdk-amd64/lib/libfontmanager.so
/lib/jvm/java-13-openjdk-amd64/lib/libfontmanager.so
/lib/jvm/java-11-openjdk-amd64/lib/libfontmanager.so
/lib/jvm/java-14-openjdk-amd64/lib/libfontmanager.so
/lib/jvm/java-17-openjdk-amd64/lib/libfontmanager.so
mc36@noti:~$ ls -lsa /lib/jvm/java-17-openjdk-amd64/lib/libfontmanager.so
56 -rw-r--r-- 1 root root 55960 Mar 25 10:31 /lib/jvm/java-17-openjdk-amd64/lib/libfontmanager.so
mc36@noti:~$


 
4) What was the JDK version you had immediately before this and where did you get that ?
 
i have all that is available in the distro, but it depends, my older installations have something from java6 times :)

 
5) Does either JDK 11u or JDK15u work in this respect on that system ?
 

yesss, right now, every installed jvm works perfectly, i olny saw the issue with 17~14!!!!
then, for a while i sudo update-alternatives --config java 'ed to 16, but when they bumped
to ~15, the i reverted to auto, that is 17, and the issue is completely gone, now all the
jvms i have works fine!


 
Reply | Threaded
Open this post in threaded view
|

Re: <AWT Dev> libfontmanager.so: undefined symbol: hb_font_destroy in openjdk17~14

Philip Race


On 3/29/21 8:14 PM, mc36 wrote:
hi,
please dont! i got ~15 and the issue is gone!

please don't do what ?

(but answering line by line, who knows)
thanks,
cs

Ok. So it looks like you are using some debian build of openjdk and it seems likely
it can't find the system libharfbuzz.so since that symbol is very basic.

If you use the one from https://jdk.java.net/17/ I expect it will work since it does
what the JDK 15 does that I suggested.

I can't tell what the JDK 16 you have does since I'd need to see an ls -l of your
/lib/jvm/java-16-openjdk-amd64/lib/libfontmanager.so

-phil.



On 3/29/21 6:41 PM, Philip Race wrote:
Moving this to the right list.

There's lots of missing information in your email.

1) I don't know what a debian sid is. Internet suggests it is some upstream dev version
Is this reproducible on any shipping distro ?
yesss, it is. https://www.debian.org/
the only difference that you replace stable to unstable/sid/experimental,depending how brave you're.... :)

 

2) Where exactly did you get the openjdk build 17 ? Was it from https://jdk.java.net/17/ or somewhere else ?
Please show the output of "java -version" to help confirm it.

sudo apt install openjdk-17-jre -- to get the latest build of them....
at the moment i see the following version:

mc36@noti:~$ java -version
openjdk version "17-ea" 2021-09-14
OpenJDK Runtime Environment (build 17-ea+15-Debian-1)
OpenJDK 64-Bit Server VM (build 17-ea+15-Debian-1, mixed mode, sharing)
mc36@noti:~$

 

3) What does  "ls -l lib/libfontmanager.so" show ?
 

mc36@noti:~$ find /lib/ -name libfontmanager.so
/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libfontmanager.so
/lib/jvm/java-15-openjdk-amd64/lib/libfontmanager.so
/lib/jvm/java-16-openjdk-amd64/lib/libfontmanager.so
/lib/jvm/java-13-openjdk-amd64/lib/libfontmanager.so
/lib/jvm/java-11-openjdk-amd64/lib/libfontmanager.so
/lib/jvm/java-14-openjdk-amd64/lib/libfontmanager.so
/lib/jvm/java-17-openjdk-amd64/lib/libfontmanager.so
mc36@noti:~$ ls -lsa /lib/jvm/java-17-openjdk-amd64/lib/libfontmanager.so
56 -rw-r--r-- 1 root root 55960 Mar 25 10:31 /lib/jvm/java-17-openjdk-amd64/lib/libfontmanager.so
mc36@noti:~$


 
4) What was the JDK version you had immediately before this and where did you get that ?
 
i have all that is available in the distro, but it depends, my older installations have something from java6 times :)

 
5) Does either JDK 11u or JDK15u work in this respect on that system ?
 

yesss, right now, every installed jvm works perfectly, i olny saw the issue with 17~14!!!!
then, for a while i sudo update-alternatives --config java 'ed to 16, but when they bumped
to ~15, the i reverted to auto, that is 17, and the issue is completely gone, now all the
jvms i have works fine!


 

Reply | Threaded
Open this post in threaded view
|

Re: <AWT Dev> libfontmanager.so: undefined symbol: hb_font_destroy in openjdk17~14

Philip Race
PS also I'd be interested to know the output of
ldd /lib/jvm/java-17-openjdk-amd64/lib/libfontmanager.so

It should resolve libharfbuzz.so in some system directory

I've double-checked the test build I did on Ubuntu 20.10 for JDK 17 b14 and it works fine
finding libharfbuzz there.

So my current best guess is it is related to how your distro built it ..


-phil.



On 3/29/21 10:33 PM, Philip Race wrote:


On 3/29/21 8:14 PM, mc36 wrote:
hi,
please dont! i got ~15 and the issue is gone!

please don't do what ?

(but answering line by line, who knows)
thanks,
cs

Ok. So it looks like you are using some debian build of openjdk and it seems likely
it can't find the system libharfbuzz.so since that symbol is very basic.

If you use the one from https://jdk.java.net/17/ I expect it will work since it does
what the JDK 15 does that I suggested.

I can't tell what the JDK 16 you have does since I'd need to see an ls -l of your
/lib/jvm/java-16-openjdk-amd64/lib/libfontmanager.so

-phil.



On 3/29/21 6:41 PM, Philip Race wrote:
Moving this to the right list.

There's lots of missing information in your email.

1) I don't know what a debian sid is. Internet suggests it is some upstream dev version
Is this reproducible on any shipping distro ?
yesss, it is. https://www.debian.org/
the only difference that you replace stable to unstable/sid/experimental,depending how brave you're.... :)

 

2) Where exactly did you get the openjdk build 17 ? Was it from https://jdk.java.net/17/ or somewhere else ?
Please show the output of "java -version" to help confirm it.

sudo apt install openjdk-17-jre -- to get the latest build of them....
at the moment i see the following version:

mc36@noti:~$ java -version
openjdk version "17-ea" 2021-09-14
OpenJDK Runtime Environment (build 17-ea+15-Debian-1)
OpenJDK 64-Bit Server VM (build 17-ea+15-Debian-1, mixed mode, sharing)
mc36@noti:~$

 

3) What does  "ls -l lib/libfontmanager.so" show ?
 

mc36@noti:~$ find /lib/ -name libfontmanager.so
/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libfontmanager.so
/lib/jvm/java-15-openjdk-amd64/lib/libfontmanager.so
/lib/jvm/java-16-openjdk-amd64/lib/libfontmanager.so
/lib/jvm/java-13-openjdk-amd64/lib/libfontmanager.so
/lib/jvm/java-11-openjdk-amd64/lib/libfontmanager.so
/lib/jvm/java-14-openjdk-amd64/lib/libfontmanager.so
/lib/jvm/java-17-openjdk-amd64/lib/libfontmanager.so
mc36@noti:~$ ls -lsa /lib/jvm/java-17-openjdk-amd64/lib/libfontmanager.so
56 -rw-r--r-- 1 root root 55960 Mar 25 10:31 /lib/jvm/java-17-openjdk-amd64/lib/libfontmanager.so
mc36@noti:~$


 
4) What was the JDK version you had immediately before this and where did you get that ?
 
i have all that is available in the distro, but it depends, my older installations have something from java6 times :)

 
5) Does either JDK 11u or JDK15u work in this respect on that system ?
 

yesss, right now, every installed jvm works perfectly, i olny saw the issue with 17~14!!!!
then, for a while i sudo update-alternatives --config java 'ed to 16, but when they bumped
to ~15, the i reverted to auto, that is 17, and the issue is completely gone, now all the
jvms i have works fine!


 


Reply | Threaded
Open this post in threaded view
|

Re: <AWT Dev> libfontmanager.so: undefined symbol: hb_font_destroy in openjdk17~14

Philip Race


On 3/30/21 11:31 PM, mc36 wrote:
>
> please find below, but, again, it's jre17~15, where everything seems fine.

Oh that's what you mean by the incomprehensible
" please dont! i got ~15 and the issue is gone!"

So it was some one-off problem with the build 14 from your distro.

I think this points to how important it is to first complain there and
not here.

-phil.