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

java.library.path is overridden when there is a native dependency #2447

Open
yerlikayahamza opened this issue Jul 12, 2018 · 1 comment
Open
Labels

Comments

@yerlikayahamza
Copy link

I am working in a project where I've native dependencies managed by lein (i.e rxtx) and native dependencies managed externally (Matlab). Documentation says that one should use jvm-opts to set the value of java.library.path. Following correctly sets the property,

(defproject asd "0.1.0-SNAPSHOT"
   :dependencies [[org.clojure/clojure "1.8.0"]]
   :jvm-opts ["-Djava.library.path=/Matlab/bin/glnxa64/"])

However if you add a native dependency,

 (defproject asd "0.1.0-SNAPSHOT"
    :dependencies [[org.clojure/clojure "1.8.0"]
                   [rxtx22 "1.0.6"]]
    :jvm-opts ["-Djava.library.path=/Matlab/bin/glnxa64/"])

Changes the path to target/native/linux/. Checking CLI options used by lein, both -Ds are there however the one added by lein overrides the user supplied one.

@technomancy
Copy link
Owner

You're right; it would be better to alter the existing setting rather than overriding it. Happy to take a patch for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants