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

Static linking of MKL library #601

Closed
alois-bissuel opened this issue Aug 16, 2018 · 4 comments
Closed

Static linking of MKL library #601

alois-bissuel opened this issue Aug 16, 2018 · 4 comments

Comments

@alois-bissuel
Copy link

I successfully used the mkl preset. Thanks for the very good work!

Now I would like to use this preset on a server where MKL is not installed. From what I understood, the MKL is not bundled in the jar available on Maven Central for licensing issue.

Is there a way to do it, preferably without meddling in javacpp source code?

Below is my unsuccessful (and maybe clumsy) attempt at doing it on macos (though my compilation target is Linux):

I have seen that the compilation flags were taken from https://github.com/bytedeco/javacpp/blob/master/src/main/resources/org/bytedeco/javacpp/properties/macosx-x86_64.properties

I thus added a "static" field in the "compiler" property in mkl/src/main/java/org/bytedeco/javacpp/presets/mkl_rt.java

I called maven trying to pass the "static" property as follows:
mvn install -Dplatform.compiler.static="-static" --projects mkl

But maven tells me just before calling clang++ that the static property was not found:
[WARNING] Could not get the property named "platform.compiler.static"

I am taking the right path?

@saudet
Copy link
Member

saudet commented Aug 16, 2018

We just need remove the <copyLibs>false</copyLibs> line here and it should get bundled properly:
https://github.com/bytedeco/javacpp-presets/blob/master/mkl/pom.xml#L59

@saudet saudet closed this as completed Aug 16, 2018
@saudet
Copy link
Member

saudet commented Aug 16, 2018

Please let me know if this isn't working properly though, thanks!

@alois-bissuel
Copy link
Author

Thanks a lot for the quick answer. It worked on my mac, and I am now trying on Linux.

@saudet
Copy link
Member

saudet commented Jan 7, 2019

BTW, the new license actually permits redistributing the libraries, so they are now being bundled! Enjoy

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