-
Notifications
You must be signed in to change notification settings - Fork 448
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 clobbered by overtone dependency #274
Comments
Well then... from project.clj:
I guess this may have something to do with it? |
I believe the replacement comes from default Leiningen behavior based on this line in project.clj
If you comment that line out, I don't know why the default for Leiningen is to replace rather than prepend to the path, but this seems to be where to investigate further. |
Sorry, that doesn't seem to be it. Here's the full code: https://gist.github.com/DoodleIncident/8678033 The path output when I |
When I referred to the I'm really not sure what is "the right way" to fix this. You point out a legitimate issue, but it isn't obvious to me what should be done to remedy it. Should Overtone adjust it's project settings? Or is there a best-practice for Leiningen that properly works around this? I think I'll post something to Stack Overflow & see what the experts say. See http://stackoverflow.com/questions/21436744/best-practice-for-a-clojure-library-that-uses-native-libs FWIW, when I was playing with the leap library, I created a library that had the libraries where leiningen expected them to be & uploaded it to clojars. See https://clojars.org/rogerallen/leaplib and https://clojars.org/rogerallen/leaplib-natives. EDIT: added stackoverflow pointer |
You're completely right, sorry for misunderstanding. I actually came across your leaplib-natives clojar and managed to roll my own that included Linux dependencies earlier, so that's all working. Somehow I didn't make the connection that depending on leaplib would fix the issue until just now, though. Thanks for the help! Lein is an awesome tool, but it really gets confusing once you start using multiple dependencies with their own project.clj's. I'll just use clojars at the top level to get around that for now. |
Well I've apparently stumped StackOverflow so I went back and tried again to figure this out. I think I have a workaround, but it isn't a final fix. To do any better, AFAIK we'll need to get Leinigen to change. Please give this a try and let me know if this works. I created a subdir of the project called In the project.clj, I put
WIth this, (along with depending on overtone 0.9.1, I get expected results when doing all of these things...
However, the downside is that after I run this, the Supercollider native dependencies are all stored in the native library paths under leaplib. I guess that isn't all that surprising, but it isn't very sanitary. A "lein clean" doesn't clean up after itself any longer. p.s. I'm far from an expert in this and just trying to understand for my own satisfaction. If anyone has a better ideas bring 'em on... |
Including Overtone in a project seems to do something strange to the java.library.path property. The reported value changes completely, and it is no longer configurable by :jvm-opts.
Reproduction steps (on Linux Mint):
This returns a nice long path that I can append to with the following:
Adding
[overtone "0.9.1"]
to:dependencies
replaces this with a single path that I can't control:I grepped "java.library.path", and overtone/script/java-env seems to be the culprit. Does anyone know the history of this line? Is there a neater way for it to accomplish its purpose?
The text was updated successfully, but these errors were encountered: