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

macosx-arm64 library build for onnx error #1339

Closed
OuYubin opened this issue Mar 21, 2023 · 2 comments
Closed

macosx-arm64 library build for onnx error #1339

OuYubin opened this issue Mar 21, 2023 · 2 comments

Comments

@OuYubin
Copy link

OuYubin commented Mar 21, 2023

I tried to complete onnx M1 Silicon Support manually, packaged and compiled without problems, and generated the jar files without problems, but when I used it, Throw an exception.

macosx-arm64/libjnionnx.dylib, 0x0001): symbol not found in flat namespace '_onnxGetBackendCompatibility'

the following exception occurred and I was hoping for help. thanks

Exception in thread "main" java.lang.UnsatisfiedLinkError: no jnionnx in java.library.path: /Users/ouyubin/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:2423)
	at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:808)
	at java.base/java.lang.System.loadLibrary(System.java:1893)
	at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:1825)
	at org.bytedeco.javacpp.Loader.load(Loader.java:1416)
	at org.bytedeco.javacpp.Loader.load(Loader.java:1227)
	at org.bytedeco.javacpp.Loader.load(Loader.java:1203)
	at org.bytedeco.onnx.global.onnx.<clinit>(onnx.java:14)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:466)
	at org.bytedeco.javacpp.Loader.load(Loader.java:1282)
	at org.bytedeco.javacpp.Loader.load(Loader.java:1227)
	at org.bytedeco.javacpp.Loader.load(Loader.java:1203)
	at org.bytedeco.onnx.ISchemaRegistry.<clinit>(ISchemaRegistry.java:16)
	at onnx.LoadModel.main(LoadModel.java:9)
Caused by: java.lang.UnsatisfiedLinkError: /Users/ouyubin/.javacpp/cache/onnx-1.12.0-1.5.8-macosx-arm64.jar/org/bytedeco/onnx/macosx-arm64/libjnionnx.dylib: dlopen(/Users/ouyubin/.javacpp/cache/onnx-1.12.0-1.5.8-macosx-arm64.jar/org/bytedeco/onnx/macosx-arm64/libjnionnx.dylib, 0x0001): symbol not found in flat namespace '_onnxGetBackendCompatibility'
	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/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2383)
	at java.base/java.lang.Runtime.load0(Runtime.java:746)
	at java.base/java.lang.System.load(System.java:1857)
	at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:1772)
@saudet
Copy link
Member

saudet commented Mar 21, 2023

We can most likely fix that with a new Info("onnxGetBackendCompatibility").skip():
https://github.com/bytedeco/javacpp/wiki/Mapping-Recipes#skipping-lines-from-header-files

@saudet
Copy link
Member

saudet commented Mar 21, 2023

Duplicate of #1069

@saudet saudet marked this as a duplicate of #1069 Mar 21, 2023
@saudet saudet closed this as completed Mar 21, 2023
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

2 participants