Skip to content
This repository has been archived by the owner on Mar 2, 2019. It is now read-only.

LinkError on GUI apps on MacOS #4

Closed
helenmasters opened this issue Sep 5, 2017 · 6 comments
Closed

LinkError on GUI apps on MacOS #4

helenmasters opened this issue Sep 5, 2017 · 6 comments
Assignees
Labels

Comments

@helenmasters
Copy link

We are seeing an issue on OSX when we try to run any GUI applications. It looks as though /Users/jenkins/workspace is hardcoded so cannot be resolved on the user's machine.

Exception in thread "main" java.lang.UnsatisfiedLinkError: /Users/helenmasters/sdks/check/jdk8u144-b01/jre/lib/libfontmanager.dylib: dlopen(/Users/helenmasters/sdks/check/jdk8u144-b01/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/helenmasters/sdks/check/jdk8u144-b01/jre/lib/libfontmanager.dylib
  Reason: image not found
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1845)
	at java.lang.Runtime.loadLibrary0(Runtime.java:870)
	at java.lang.System.loadLibrary(System.java:1122)
	at sun.lwawt.macosx.LWCToolkit$1.run(LWCToolkit.java:93)
	at sun.lwawt.macosx.LWCToolkit$1.run(LWCToolkit.java:80)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.lwawt.macosx.LWCToolkit.<clinit>(LWCToolkit.java:79)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:264)
	at java.awt.Toolkit$2.run(Toolkit.java:860)
	at java.awt.Toolkit$2.run(Toolkit.java:855)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:854)
	at javax.swing.UIManager.getSystemLookAndFeelClassName(UIManager.java:611)
	at javax.swing.UIManager$1.run(UIManager.java:1233)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.swing.UIManager.loadSwingProperties(UIManager.java:1228)
	at javax.swing.UIManager.initialize(UIManager.java:1457)
	at javax.swing.UIManager.maybeInitialize(UIManager.java:1426)
	at javax.swing.UIManager.getUI(UIManager.java:1006)
	at javax.swing.JPanel.updateUI(JPanel.java:126)
	at javax.swing.JPanel.<init>(JPanel.java:86)
	at javax.swing.JPanel.<init>(JPanel.java:109)
	at javax.swing.JPanel.<init>(JPanel.java:117)
	at citmsxa.<init>(citmsxa.java:11)
	at citmsxa.main(citmsxa.java:376)

Here is the output from the otool command suggesting that the path is incorrect...

helens-mbp:check helenmasters$ otool -L /Users/helenmasters/sdks/check/jdk8u144-b01/jre/lib/libfontmanager.dylib
/Users/helenmasters/sdks/check/jdk8u144-b01/jre/lib/libfontmanager.dylib:
	@rpath/libfontmanager.dylib (compatibility version 1.0.0, current version 1.0.0)
	/Users/jenkins/workspace/openjdk_build_x86-64_macos/openjdk/installedfreetype/lib/libfreetype.6.dylib (compatibility version 12.0.0, current version 12.0.0)
	@rpath/libawt.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
	/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0)
	@rpath/libjava.dylib (compatibility version 1.0.0, current version 1.0.0)
	@rpath/libjvm.dylib (compatibility version 1.0.0, current version 1.0.0)
@gdams gdams added the bug label Sep 5, 2017
@Diagoras
Copy link

Diagoras commented Sep 6, 2018

FWIW, I'm having the same issue. It's currently blocking us from migrating an application to AdoptOpenJDK.

@karianna
Copy link
Member

karianna commented Sep 7, 2018

@johnoliver LMK if you want this moved to the build repo as a bug

@johnoliver
Copy link
Member

I think this was fixed, can you try a recent binary from https://github.com/AdoptOpenJDK/openjdk8-binaries/releases

@karianna karianna closed this as completed Sep 7, 2018
@Diagoras
Copy link

Diagoras commented Sep 10, 2018

@johnoliver Hey, I tried with the Hotspot jdk8u-2018-07-26-16-12 release for MacOS, but ran into the same issue. Specifically:

Fatal(java.lang.UnsatisfiedLinkError: /Users/[username]/Downloads/jdk8u181-b13/jre/lib/libfontmanager.dylib: dlopen(/Users/[username]/Downloads/jdk8u181-b13/jre/lib/libfontmanager.dylib, 1): Library not loaded: @rpath/libfreetype.6.dylib
  Referenced from: /Users/[username]/Downloads/jdk8u181-b13/jre/lib/libfontmanager.dylib
  Reason: image not found
)

Can we reopen this issue?

@karianna karianna reopened this Sep 10, 2018
@karianna
Copy link
Member

Reopened, but I'll shift it to the build repo

@karianna
Copy link
Member

This issue was moved to adoptium/temurin-build#489

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

No branches or pull requests

5 participants