Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac : jdk_sound :javax/sound/midi/Devices/InitializationHang.java failed with Execution failed: `main' threw exception: java.lang.UnsatisfiedLinkError #136

Closed
sophia-guo opened this issue Oct 4, 2017 · 11 comments

Comments

@sophia-guo
Copy link
Contributor

22:48:35 ACTION: main -- Failed. Execution failed: `main' threw exception: java.lang.UnsatisfiedLinkError: /Users/jenkins/workspace/openjdk8_test_x86-64_macos/openjdkbinary/j2sdk-image/jre/lib/libfontmanager.dylib: dlopen(/Users/jenkins/workspace/openjdk8_test_x86-64_macos/openjdkbinary/j2sdk-image/jre/lib/libfontmanager.dylib, 1): Library not loaded: /Users/jenkins/workspace/openjdk_build_x86-64_macos/openjdk/installedfreetype/lib/libfreetype.6.dylib Referenced from: /Users/jenkins/workspace/openjdk8_test_x86-64_macos/openjdkbinary/j2sdk-image/jre/lib/libfontmanager.dylib Reason: image not found
22:48:35 REASON: Assumed action based on file name: run main InitializationHang 
22:48:35 TIME:   3.06 seconds
22:48:35 messages:
22:48:35 command: main InitializationHang
22:48:35 reason: Assumed action based on file name: run main InitializationHang 
22:48:35 Mode: othervm
22:48:35 elapsed time (seconds): 3.06
22:48:35 configuration:
22:48:35 STDOUT:
22:48:35 STDERR:
22:48:35 2017-10-03 13:48:33.067 java[68473:33415094] 13:48:33.066 ERROR:     MIDIClientLib.cpp:199: Initialize: Couldn't connect to com.apple.midiserver; CoreMIDI will not be usable
22:48:35 2017-10-03 13:48:33.068 java[68473:33415094] 13:48:33.068 ERROR:     ObjectTreeCache.h:54: ObjectTreeAccessor: ObjectTreeCache: refresh status 268435459
22:48:35 2017-10-03 13:48:33.069 java[68473:33415094] 13:48:33.069 ERROR:     ObjectTreeCache.h:54: ObjectTreeAccessor: ObjectTreeCache: refresh status 268435459
22:48:35 java.lang.UnsatisfiedLinkError: /Users/jenkins/workspace/openjdk8_test_x86-64_macos/openjdkbinary/j2sdk-image/jre/lib/libfontmanager.dylib: dlopen(/Users/jenkins/workspace/openjdk8_test_x86-64_macos/openjdkbinary/j2sdk-image/jre/lib/libfontmanager.dylib, 1): Library not loaded: /Users/jenkins/workspace/openjdk_build_x86-64_macos/openjdk/installedfreetype/lib/libfreetype.6.dylib
22:48:35   Referenced from: /Users/jenkins/workspace/openjdk8_test_x86-64_macos/openjdkbinary/j2sdk-image/jre/lib/libfontmanager.dylib
22:48:35   Reason: image not found
22:48:35 	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
22:48:35 	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
22:48:35 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1845)
22:48:35 	at java.lang.Runtime.loadLibrary0(Runtime.java:870)
22:48:35 	at java.lang.System.loadLibrary(System.java:1122)
22:48:35 	at sun.lwawt.macosx.LWCToolkit$1.run(LWCToolkit.java:93)
22:48:35 	at sun.lwawt.macosx.LWCToolkit$1.run(LWCToolkit.java:80)
22:48:35 	at java.security.AccessController.doPrivileged(Native Method)
22:48:35 	at sun.lwawt.macosx.LWCToolkit.(LWCToolkit.java:79)
22:48:35 	at java.lang.Class.forName0(Native Method)
22:48:35 	at java.lang.Class.forName(Class.java:264)
@sophia-guo sophia-guo added the mac label Oct 4, 2017
@karianna karianna added the bug label Oct 7, 2017
@smlambert
Copy link
Contributor

smlambert commented Dec 1, 2017

Image not found, seems we are missing a library:
j2sdk-image/jre/lib/libfontmanager.dylib

@karianna @gdams do you know if that library is expected to be there as part of an AdoptOpenJDK build?

@smlambert smlambert added the java8 label Dec 1, 2017
@karianna
Copy link
Contributor

karianna commented Dec 2, 2017

@smlambert I can confirm that this should exist (checked against a few other OpenJDK derivatives).

@akolarkunnu
Copy link
Contributor

akolarkunnu commented Jan 5, 2018

Here actual error message is
"Library not loaded: /Users/jenkins/workspace/openjdk_build_x86-64_macos/openjdk/installedfreetype/lib/libfreetype.6.dylib Referenced from: /Users/jenkins/workspace/openjdk8_test_x86-64_macos/openjdkbinary/j2sdk-image/jre/lib/libfontmanager.dylib"

So we are missing the library libfreetype.6.dylib not libfontmanager.dylib.
Also I can confirm that both libfreetype.6.dylib and libfontmanager.dylib are exist in jre/lib directory. But it is referring to the location "/Users/jenkins/workspace/openjdk_build_x86-64_macos/openjdk/installedfreetype/lib" for libfreetype.6.dylib.

It should refer to jre/lib for libfreetype.6.dylib.
So it has to correct in build configuration. This freetype related scripts are there in files https://github.com/AdoptOpenJDK/openjdk-build/blob/master/makejdk.sh makejdk-any-platform.sh sbin/common-functions.sh

@akolarkunnu
Copy link
Contributor

#137 is a duplicate of this bug.

@akolarkunnu
Copy link
Contributor

There are a lot of other test cases also fails because of this reason:
java/beans/EventHandler/Test6179222.java
java/beans/EventHandler/Test6788531.java
java/beans/PropertyChangeSupport/Test4682386.java
java/beans/PropertyChangeSupport/TestSynchronization.java
java/beans/PropertyEditor/6380849/TestPropertyEditor.java
java/beans/PropertyEditor/TestFontClass.java
java/beans/PropertyEditor/TestFontClassJava.java
java/beans/PropertyEditor/TestFontClassNull.java
etc

About 35 test cases fails because of this.

@akolarkunnu
Copy link
Contributor

So I would suggest to prioritize the the openjdk-build bug adoptium/temurin-build#202

@sophia-guo
Copy link
Contributor Author

#135 is a duplicate of this according to comment above.

@akolarkunnu
Copy link
Contributor

#135 need not be a duplicate of this, java.lang.Error: could not find editor for class java.awt.Color can happen if test machine is headless. Also that happen in both linux and mac. Nevertheless, let's validate that once this bug is resolved.

@akolarkunnu
Copy link
Contributor

New failure because of this:
com/sun/jdi/RedefineCrossEvent.java

@smlambert
Copy link
Contributor

Mani provided a build (with the changes in PR openjdk-build/216), that seem to correct the missing libfreetype lib problem. The few remaining failures are likely related to the x11 server issue

@smlambert
Copy link
Contributor

Closing as now listed in summary issue #346

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

No branches or pull requests

4 participants