Jarrod Roberson
2008-Mar-07 20:10 UTC
[Xapian-discuss] how to compile java-swig under linux.
ok, I am moving my development environment for the java portion of my application to linux (Centos 5 to be specific). I have found I can still do my python development on Windows. At least Komodo and Intellij IDEA run on both windows and linux! :-) I lost my Mac due to a job change :-(. Anyway, long story short, I am trying to get the java-swig bindings to build and am having no luck. xapian-core 1.0.5 builds fine, I got the python bindings builidng fine as well. Just as plain and simple as it was on OSX. This is what I am getting as output. [jhr at localhost java-swig]$ make make all-am make[1]: Entering directory `/home/jhr/xapian-bindings-1.0.5/java-swig' /usr/lib/jvm/java-1.6.0-sun-1.6.0.04/bin/javac -classpath .:. -d . Auto.java ./XapianJNI.java:192: cannot find symbol symbol : class Sorter location: class XapianJNI public final static native void Enquire_setSortByKey__SWIG_0(long jarg1, Enquire jarg1_, long jarg2, Sorter jarg2_, boolean jarg3); ^ ./XapianJNI.java:193: cannot find symbol symbol : class Sorter location: class XapianJNI public final static native void Enquire_setSortByKey__SWIG_1(long jarg1, Enquire jarg1_, long jarg2, Sorter jarg2_); ^ ./XapianJNI.java:194: cannot find symbol symbol : class Sorter location: class XapianJNI public final static native void Enquire_setSortByKeyThenRelevance__SWIG_0(long jarg1, Enquire jarg1_, long jarg2, Sorter jarg2_, boolean jarg3); ^ ./XapianJNI.java:195: cannot find symbol symbol : class Sorter location: class XapianJNI public final static native void Enquire_setSortByKeyThenRelevance__SWIG_1(long jarg1, Enquire jarg1_, long jarg2, Sorter jarg2_); ^ ./XapianJNI.java:196: cannot find symbol symbol : class Sorter location: class XapianJNI public final static native void Enquire_setSortByRelevanceThenKey__SWIG_0(long jarg1, Enquire jarg1_, long jarg2, Sorter jarg2_, boolean jarg3); ^ ./XapianJNI.java:197: cannot find symbol symbol : class Sorter location: class XapianJNI public final static native void Enquire_setSortByRelevanceThenKey__SWIG_1(long jarg1, Enquire jarg1_, long jarg2, Sorter jarg2_); ^ ./XapianJNI.java:457: cannot find symbol symbol : class Sorter location: class XapianJNI public final static native String Sorter_apply(long jarg1, Sorter jarg1_, long jarg2, Document jarg2_); ^ ./XapianJNI.java:460: cannot find symbol symbol : class Sorter location: class XapianJNI public final static native void Sorter_director_connect(Sorter obj, long cptr, boolean mem_own, boolean weak_global); ^ ./XapianJNI.java:461: cannot find symbol symbol : class Sorter location: class XapianJNI public final static native void Sorter_change_ownership(Sorter obj, long cptr, boolean take_or_release); ^ ./XapianJNI.java:463: cannot find symbol symbol : class MultiValueSorter location: class XapianJNI public final static native String MultiValueSorter_apply(long jarg1, MultiValueSorter jarg1_, long jarg2, Document jarg2_); ^ ./XapianJNI.java:464: cannot find symbol symbol : class MultiValueSorter location: class XapianJNI public final static native void MultiValueSorter_add__SWIG_0(long jarg1, MultiValueSorter jarg1_, long jarg2, boolean jarg3); ^ ./XapianJNI.java:465: cannot find symbol symbol : class MultiValueSorter location: class XapianJNI public final static native void MultiValueSorter_add__SWIG_1(long jarg1, MultiValueSorter jarg1_, long jarg2); ^ ./XapianJNI.java:492: cannot find symbol symbol : class Sorter location: class XapianJNI public static String SwigDirector_Sorter_apply(Sorter self, long doc) { ^ ./Enquire.java:99: cannot find symbol symbol : class Sorter location: class Enquire public void setSortByKey(Sorter sorter, boolean ascending) { ^ ./Enquire.java:103: cannot find symbol symbol : class Sorter location: class Enquire public void setSortByKey(Sorter sorter) { ^ ./Enquire.java:107: cannot find symbol symbol : class Sorter location: class Enquire public void setSortByKeyThenRelevance(Sorter sorter, boolean ascending) { ^ ./Enquire.java:111: cannot find symbol symbol : class Sorter location: class Enquire public void setSortByKeyThenRelevance(Sorter sorter) { ^ ./Enquire.java:115: cannot find symbol symbol : class Sorter location: class Enquire public void setSortByRelevanceThenKey(Sorter sorter, boolean ascending) { ^ ./Enquire.java:119: cannot find symbol symbol : class Sorter location: class Enquire public void setSortByRelevanceThenKey(Sorter sorter) { ^ ./DateValueRangeProcessor.java:39: DateValueRangeProcessor(long,boolean) is already defined in DateValueRangeProcessor public DateValueRangeProcessor(long valno_, boolean prefer_mdy_) { ^ ./Enquire.java:100: cannot find symbol symbol : variable Sorter location: class Enquire XapianJNI.Enquire_setSortByKey__SWIG_0(swigCPtr, this, Sorter.getCPtr(sorter), sorter, ascending); ^ ./Enquire.java:104: cannot find symbol symbol : variable Sorter location: class Enquire XapianJNI.Enquire_setSortByKey__SWIG_1(swigCPtr, this, Sorter.getCPtr(sorter), sorter); ^ ./Enquire.java:108: cannot find symbol symbol : variable Sorter location: class Enquire XapianJNI.Enquire_setSortByKeyThenRelevance__SWIG_0(swigCPtr, this, Sorter.getCPtr(sorter), sorter, ascending); ^ ./Enquire.java:112: cannot find symbol symbol : variable Sorter location: class Enquire XapianJNI.Enquire_setSortByKeyThenRelevance__SWIG_1(swigCPtr, this, Sorter.getCPtr(sorter), sorter); ^ ./Enquire.java:116: cannot find symbol symbol : variable Sorter location: class Enquire XapianJNI.Enquire_setSortByRelevanceThenKey__SWIG_0(swigCPtr, this, Sorter.getCPtr(sorter), sorter, ascending); ^ ./Enquire.java:120: cannot find symbol symbol : variable Sorter location: class Enquire XapianJNI.Enquire_setSortByRelevanceThenKey__SWIG_1(swigCPtr, this, Sorter.getCPtr(sorter), sorter); ^ 26 errors make[1]: *** [Auto.class] Error 1 make[1]: Leaving directory `/home/jhr/xapian-bindings-1.0.5/java-swig' make: *** [all] Error 2 [jhr at localhost java-swig]$
Jarrod Roberson wrote:> ok, I am moving my development environment for the java portion of my > application to linux (Centos 5 to be specific). > I have found I can still do my python development on Windows. At least > Komodo and Intellij IDEA run on both windows and linux! :-) I lost my Mac > due to a job change :-(. > > Anyway, long story short, I am trying to get the java-swig bindings to build > and am having no luck. > xapian-core 1.0.5 builds fine, I got the python bindings builidng fine as > well. Just as plain and simple as it was on OSX. > This is what I am getting as output. > > [jhr at localhost java-swig]$ make > make all-am > make[1]: Entering directory `/home/jhr/xapian-bindings-1.0.5/java-swig' > /usr/lib/jvm/java-1.6.0-sun-1.6.0.04/bin/javac -classpath .:. -d . Auto.java > ./XapianJNI.java:192: cannot find symbol > symbol : class Sorter > location: class XapianJNI > public final static native void Enquire_setSortByKey__SWIG_0(long jarg1, > Enquire jarg1_, long jarg2, Sorter jarg2_, boolean jarg3);Interestingly I had a go at making a Windows MSVC build file for the Java Swig bindings on Friday, and got exactly the same errors - I'm in no way a Java expert so gave up at that point! If we can solve this we might thus be able to help with your original issue, Jarrod... Cheers Charlie
On Fri, Mar 07, 2008 at 03:10:03PM -0500, Jarrod Roberson wrote:> /usr/lib/jvm/java-1.6.0-sun-1.6.0.04/bin/javac -classpath .:. -d . Auto.java > ./XapianJNI.java:192: cannot find symbol > symbol : class SorterLooks like java-swig/Makefile.am needs updating with the extra java sources which SWIG generates for the new classes. I'll try to sort that out for 1.0.6. Cheers, Olly