Closed b005t3r closed 3 years ago
That's an issue with old versions of Spring Boot. Please update to 1.5.4.
Can't update, deeplearning4j has the version 1.5.3 set as a dependency, so it'll get used anyway :/
However, I found a simple workaround with creating a symlink to the existing libopenblas.0.dylib
and it looks like this is working just fine. However, I still don't understand how on earth did this work in a standard build.
Of course we can override it with 1.5.4. That's what those dependencies are for.
OK, how do I do that then? :)
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>javacpp</artifactId>
<version>1.5.4</version>
</dependency>
If you're saying that your app can't use a cache for executables because of some policy from Apple, you'll probably need to create that symbolic link manually yes.
No, I mean, how do I change the version of javacpp/javacv that another project wants to use, if that's even possible.
org.nd4j:nd4j-native:jar:1.0.0-beta7:compile
has openblas 1.5.3 set as a dependency:
+- org.nd4j:nd4j-native:jar:1.0.0-beta7:compile [INFO] | +- org.nd4j:nd4j-native:jar:macosx-x86_64:1.0.0-beta7:compile [INFO] | | +- (org.nd4j:nd4j-native:jar:macosx-x86_64:1.0.0-beta7:compile - omitted for cycle) [INFO] | | +- (org.nd4j:nd4j-native:jar:macosx-x86_64:1.0.0-beta7:compile - omitted for duplicate) [INFO] | | +- (org.bytedeco:javacpp:jar:1.5.3:compile - omitted for duplicate) [INFO] | | +- (org.bytedeco:javacpp:jar:macosx-x86_64:1.5.3:compile - omitted for duplicate) [INFO] | | +- (org.bytedeco:openblas:jar:0.3.9-1-1.5.3:compile - omitted for duplicate) [INFO] | | +- (org.bytedeco:openblas:jar:macosx-x86_64:0.3.9-1-1.5.3:compile - omitted for duplicate) [INFO] | | +- (org.nd4j:nd4j-native-api:jar:1.0.0-beta7:compile - omitted for duplicate) [INFO] | | +- (org.nd4j:nd4j-api:jar:1.0.0-beta7:compile - omitted for duplicate) [INFO] | | +- (org.bytedeco:mkl:jar:2020.1-1.5.3:compile - omitted for duplicate) [INFO] | | - (org.bytedeco:mkl:jar:macosx-x86_64:2020.1-1.5.3:compile - omitted for duplicate) [INFO] | +- org.bytedeco:javacpp:jar:1.5.3:compile [INFO] | +- org.bytedeco:javacpp:jar:macosx-x86_64:1.5.3:compile [INFO] | +- org.bytedeco:openblas:jar:0.3.9-1-1.5.3:compile
That's why I used the same version for my project.
Sure, you can override those versions as well. That's what Maven is for: https://maven.apache.org/plugins/maven-dependency-plugin/examples/resolving-conflicts-using-the-dependency-tree.html
Hah, OK, I'll give it a go :) So, to be clear, with 1.5.4 I no longer need OpenBLAS or the OpenBLAS built for this version no longer has the missing binary issue?
It's not "missing", it still needs to be able to create a symbolic link.
OK, so I would still need to create a symlink for my build? What's the gain then?
It might not change anything. Let me know if you give it a try though.
I like it how we often have those small conversations on how not to change anything :)
I've run into issues with my app which has OpenBLAS added as a dependency (via deeplearning4j and OpenCV, I think, not sure if it is even necessary).
When the app is started, I get this:
It looks like it can't load the
libopenblas_nolapack.0.dylib
which is correct, because there is no such file, however there is a jni lib created for that file (libjniopenblas_nolapack.dylib
).The only caveat is all of that happens when I build the whole project as a single jar file (
mvn clean compile assembly:single -U
), move all of the libs to a separate directory (they need to be in a separate dir, so they can be signed when creating a build for the Mac App Store) and run the app with'-Djava.library.path=libDir
. This is the first time I had issues with this however, everything else loads up just fine, so I'm wondering what might be special about this particular lib. Any ideas on how I can fix it?Here's a list of my project's dependencies: