Magnar Sveen
Magnar Sveen
What is the function of libv8wrapper btw? Would it be a possible strategy to just use libv8 directly? Seems like that would simplify the loading quite a bit.
The Java ZeroMQ wrapper has this working, by the way. It doesn't have the issue with one native lib depending on another, tho. https://github.com/zeromq/jzmq/blob/master/src/org/zeromq/EmbeddedLibraryTools.java
Ok, moving along at a halting pace. :) If I avoid `File/createTempFile` and instead create it myself with the proper name, then I can load both `libv8` and `libv8wrapper`. Success!
@pbiggar Sorry about the rubberducking. :) Would you mind giving this a go? ``` cl (require '[clojure.java.io :as io]) (import '[java.io File FileOutputStream]) (defn- find-binary-path [] (let [os-name (System/getProperty "os.name")...
I'd be happy to do it myself, but running `lein test` in `clj-v8/clj-v8` gives me a very familiar error out of the box: ``` Caused by: java.lang.UnsatisfiedLinkError: Unable to load...
The code above only works on Mac atm, since I included `dylib`. I'm working on a version that uses `so` on linux.
Here's the code that finds .so instead of .dylib on linux. ``` cl (defn- find-file-path-fragments [] (let [os-name (System/getProperty "os.name") os-arch (System/getProperty "os.arch")] (case [os-name os-arch] ["Mac OS X" "x86_64"]...
Okay, so here's the deal: - the jna.NativeLibrary loader requires that the file is to be found on disk. - if it is on disk, but already loaded, then it...
The comments above chronicle my blundering steps towards the solution, but the pull request works in all cases that I know of. There might be regressions that I don't know...
Let me add that I've tested the pull request code on both OSX and Linux (Ubuntu), both with clj-v8 as a regular dependency and bundled in an uberjar. So as...