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

Copy 2D on GPU - Error while loading native library "JOCL_2_0_2-apple-unknown" #69

Open
jsalas-field opened this issue Feb 14, 2025 · 0 comments

Comments

@jsalas-field
Copy link

jsalas-field commented Feb 14, 2025

Apple M2 MacOS Sonoma 14.5

Wanted to crop an image using CLIJ2 and got the following error:

ImageJ 1.54g; Java 13.0.6 [64-bit]; Mac OS X 14.5; 4681MB of 8000MB (58%)
 
java.lang.UnsatisfiedLinkError: Error while loading native library "JOCL_2_0_2-apple-unknown"
Operating system name: Mac OS X
Architecture         : aarch64
Architecture bit size: 64
---(start of nested stack traces)---
Stack trace from the attempt to load the library as a file:
java.lang.UnsatisfiedLinkError: no JOCL_2_0_2-apple-unknown in java.library.path: [/Users/jon/Library/Java/Extensions, /Library/Java/Extensions, /Network/Library/Java/Extensions, /System/Library/Java/Extensions, /usr/lib/java, .]
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2680)
	at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:807)
	at java.base/java.lang.System.loadLibrary(System.java:1909)
	at org.jocl.LibUtils.loadLibrary(LibUtils.java:144)
	at org.jocl.CL.loadNativeLibrary(CL.java:65)
	at org.jocl.CL.<clinit>(CL.java:51)
	at net.haesleinhuepf.clij.clearcl.backend.jocl.ClearCLBackendJOCL.<clinit>(ClearCLBackendJOCL.java:69)
	at net.haesleinhuepf.clij.clearcl.backend.ClearCLBackends.getBestBackend(ClearCLBackends.java:100)
	at net.haesleinhuepf.clij.CLIJ.getAvailableDeviceNames(CLIJ.java:212)
	at net.haesleinhuepf.clij.macro.AbstractCLIJPlugin.run(AbstractCLIJPlugin.java:263)
	at ij.plugin.filter.PlugInFilterRunner.processOneImage(PlugInFilterRunner.java:266)
	at ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:114)
	at ij.IJ.runUserPlugIn(IJ.java:246)
	at ij.IJ.runPlugIn(IJ.java:210)
	at ij.Executer.runCommand(Executer.java:152)
	at ij.Executer.run(Executer.java:70)
	at java.base/java.lang.Thread.run(Thread.java:830)
Stack trace from the attempt to load the library as a resource:
java.io.IOException: No resource found with name '/lib/libJOCL_2_0_2-apple-unknown.dylib'
	at org.jocl.LibUtils.writeResourceToFile(LibUtils.java:341)
	at org.jocl.LibUtils.loadLibraryResource(LibUtils.java:269)
	at org.jocl.LibUtils.loadLibrary(LibUtils.java:159)
	at org.jocl.CL.loadNativeLibrary(CL.java:65)
	at org.jocl.CL.<clinit>(CL.java:51)
	at net.haesleinhuepf.clij.clearcl.backend.jocl.ClearCLBackendJOCL.<clinit>(ClearCLBackendJOCL.java:69)
	at net.haesleinhuepf.clij.clearcl.backend.ClearCLBackends.getBestBackend(ClearCLBackends.java:100)
	at net.haesleinhuepf.clij.CLIJ.getAvailableDeviceNames(CLIJ.java:212)
	at net.haesleinhuepf.clij.macro.AbstractCLIJPlugin.run(AbstractCLIJPlugin.java:263)
	at ij.plugin.filter.PlugInFilterRunner.processOneImage(PlugInFilterRunner.java:266)
	at ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:114)
	at ij.IJ.runUserPlugIn(IJ.java:246)
	at ij.IJ.runPlugIn(IJ.java:210)
	at ij.Executer.runCommand(Executer.java:152)
	at ij.Executer.run(Executer.java:70)
	at java.base/java.lang.Thread.run(Thread.java:830)
---(end of nested stack traces)---

	at org.jocl.LibUtils.loadLibrary(LibUtils.java:194)
	at org.jocl.CL.loadNativeLibrary(CL.java:65)
	at org.jocl.CL.<clinit>(CL.java:51)
	at net.haesleinhuepf.clij.clearcl.backend.jocl.ClearCLBackendJOCL.<clinit>(ClearCLBackendJOCL.java:69)
	at net.haesleinhuepf.clij.clearcl.backend.ClearCLBackends.getBestBackend(ClearCLBackends.java:100)
	at net.haesleinhuepf.clij.CLIJ.getAvailableDeviceNames(CLIJ.java:212)
	at net.haesleinhuepf.clij.macro.AbstractCLIJPlugin.run(AbstractCLIJPlugin.java:263)
	at ij.plugin.filter.PlugInFilterRunner.processOneImage(PlugInFilterRunner.java:266)
	at ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:114)
	at ij.IJ.runUserPlugIn(IJ.java:246)
	at ij.IJ.runPlugIn(IJ.java:210)
	at ij.Executer.runCommand(Executer.java:152)
	at ij.Executer.run(Executer.java:70)
	at java.base/java.lang.Thread.run(Thread.java:830)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant