Skip to content

Openblas support on Macosx M1 #1171

@poqudrof

Description

@poqudrof

Hello,

I currently struggle with an ugly yet familiar issue, the library cannot load :

UnsatisfiedLinkError: no jniopenblas_nolapack in java.library.path:

I managed to install openblas to the current "stable" version supported by Javacpp presets :  0.3.19, with javaCPP 1.5.7.

With the example code, at version 1.5.7, I get this error (which may not be exactly the same) :

LAPACKE_dgels (row-major, high-level) Example Program Results
[WARNING] 
java.lang.UnsatisfiedLinkError: 'int org.bytedeco.openblas.global.openblas.LAPACKE_dgels(int, byte, int, int, int, double[], int, double[], int)'
    at org.bytedeco.openblas.global.openblas.LAPACKE_dgels (Native Method)
    at ExampleDGELSrowmajor.main (ExampleDGELSrowmajor.java:122)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:254)
    at java.lang.Thread.run (Thread.java:833)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.717 s
[INFO] Finished at: 2022-04-14T17:34:49+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:java (default-cli) on project openblas: An exception occured while executing the Java class. 'int org.bytedeco.openblas.global.openblas.LAPACKE_dgels(int, byte, int, int, int, double[], int, double[], int)' -> [Help 1]

I use Java 17 and want to work with OpenCV in Processing 4 on my Mac. By default Opencv 4.5.5 on OSX comes with Openblas 0.3.20.

The Openblas_nolapack code does have any macosx-arm64 specific code, so maybe it fails at loading some dependencies ?

It is / was reported to work on OSX there #1069 . I saw the other issues with Openblas there bytedeco/javacv#1435, I guess it is not an easy dependency to work with.

Do you have an idea to solve this ?

Cheers,

Jeremy.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions