-
Notifications
You must be signed in to change notification settings - Fork 53
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
Add and package higher-level Java interface #46
Comments
This is a quick and dirty update which includes the higher level Java interface and hopefully enough information for others to compile it (partially addresses #46). The hope is to replace the messy Makefile configuration with something more automatic and user friendly.
Hey @dmcc I have extensive maven/Java background and interested in helping this. I looked into the java sample codes you have written for the first stage and the second stage. So I cloned the repo and compiled it (
and
where you load binary files generated by SWIG; right? How do I get those? |
I looked into the Makefiles and I see that there are arguments for building with SWIG. Will have to install SWIG to generate the binary files. Update: more hoops to jump over. Downloaded SWIG. I had to install this extra library regex via homebrew, because mac is missing it. Went to the first step |
Hey @danyaljj, thanks for looking into this! It's been a while since this
was fresh in my mind, but please keep the thread posted.
load binary files generated by SWIG; right? How do I get those?
Right, these are generated by SWIG (or at least their sources are).
As a side note, I wonder if the binary file would generalize across
operating systems, or I'll have to create different binary files, for each
OS.
I don't think they will necessarily work across OSes, unforutnately. I've
seen cases where Java native extensions include some architecture
information in their filenames to keep the binaries straight.
Update: more hoops to jump over. Downloaded SWIG. I had to install this
extra library regex via homebrew, because mac is missing it.
If possible, please keep track of these steps since we'll probably want to
include them in java/README.rst.
Regarding SWIG_LINKER_FLAGS in the Makefile: Yeah, that's the type of
setting that I would hope we could get maven to set for us. The value for
that is hopelessly platform dependent. Were you able to find a value that
works?
Let me know if you have other questions.
…On Thu, Sep 21, 2017 at 7:25 AM, Daniel Khashabi ***@***.***> wrote:
I looked into the Makefiles and I see that there are arguments for
building with SWIG. Will have to install SWIG to generate the binary files.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#46 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAm5ZdIMboYqnP5g411N7QerDP7ZEKg4ks5sknHOgaJpZM4HKvtu>
.
|
Yup. Noting every time something unexpected happen. Some missing libraries:
I'm getting this when I run
I think the linker is complaining about not finding these function definitions, while I can see that they exist right there in
Not sure what to do with this. Ideas? |
Another try on a fresh ubuntu machine (everything so far was Mac). Here are the things that came up:
Here is how I had to change it, but it might be different from one distribution to another:
make swig-java
And then to run it, one can do:
while it seems like we have everything there in the folders:
|
Thanks for the updates, sounds like progress! For the OS X install, I'm afraid I'm not sure why it's not finding the symbols. Maybe it's missing I just tried a fresh install on Ubuntu (Zesty) -- needed to install It's possible that |
Python has a higher-level interface to SWIG, but the current repository doesn't include one for Java. I've written one for Java. However, it is not well packaged and thus hadn't been checked in previously.
From what I can, the best way to distribute Java native code is as a
.nar
file (http://maven-nar.github.io/), so I hope to move towards that type of system. If you're a Maven/Java packaging expert, please feel free to get involved!The text was updated successfully, but these errors were encountered: