[redland-dev] Troubles in building java bindings

Attilio Fiandrotti fiandro at tiscali.it
Sat Apr 29 19:15:47 BST 2006


Dave Beckett wrote:
> Attilio Fiandrotti wrote:
> 
>>Hi
>>
>>I'm trying to build java bindings from SVN (i'm working with 10882
>>version from SVN) using sun's sdk 1.4.2_11.
>>I configured bindings with
>>
>>sh autogen.sh --with-java=/usr/share/j2sdk1.4.2_11/bin/java
>>--with-jdk=/usr/share/j2sdk1.4.2_11/
>>
>>and later make returns this error message to me
>>
>>here=`pwd`; \
>>        cd org/librdf/redland/; \
>>        swig -v -java -noproxy -module core -package org.librdf.redland
>>-o core_wrap.c ; \
>>        if test -r coreJNI.java; then \
>>          echo "Fixing SWIG 1.3.15+ broken Java API"; \
>>          rm -f core.java SWIGTYPE_*; \
>>          sed -e 's/class coreJNI/public class core/' coreJNI.java >
>>core.java; \
>>          sed -e 's/coreJNI/core/g' core_wrap.c > core_wrap.c.new; \
>>          rm -f core_wrap.c coreJNI.java; \
>>          mv core_wrap.c.new core_wrap.c; \
>>        fi; \
>>        mv core_wrap.c $here; \
>>        mv core.java core.java.in
>>Must specify an input file. Use -help for available options.
> 
> 
> This was an unhelpful error message from 'swig' since it didn't say what
> program wanted an input file.
> 
> It's from this line:
>          swig -v -java -noproxy -module core -package org.librdf.redland
>  -o core_wrap.c ; \
> 
> which is missing a reference to the Redland SWIG interface file, Redland.i.
>  The bindings configure tries to find this by running redland-config --swig
> but this must have failed.
> 
>>From a typical install (debian packages) you get:
> $ redland-config --swig
> /usr/share/redland/Redland.i
> 


uhm.. redland-config was not in my path (i located it in 
/usr/redland/bin/redland-config); now i linked from /usr/bin and it reports

attilio at attilaptop:~/svn/redland/bindings$ redland-config --swig
/usr/redland/share/redland/Redland.i

i then re-checked out from SVN, reconfigured as before, ran make and got

<snip>
gcc "-DPACKAGE_NAME=\"Redland RDF Application Framework bindings\"" 
-DPACKAGE_TARNAME=\"redland-bindings\" -DPACKAGE_VERSION=\"1.0.4.1\" 
"-DPACKAGE_STRING=\"Redland RDF Application Framework bindings 
1.0.4.1\"" -DPACKAGE_BUGREPORT=\"http://bugs.librdf.org/\" 
-DPACKAGE=\"redland-bindings\" -DVERSION=\"1.0.4.1\" -DSTDC_HEADERS=1 
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 
-I. -I. -I/usr/redland/include -I/usr/include/mysql -DBIG_JOINS=1 
-I/usr/include/postgresql -I/usr/share/j2sdk1.4.2_11//include 
-I/usr/share/j2sdk1.4.2_11//include/linux -Wall -Wshadow 
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations 
-Wredundant-decls -g -I/usr/redland/include -I/usr/include/mysql 
-DBIG_JOINS=1 -I/usr/include/postgresql -Wall -Wshadow 
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations 
-Wredundant-decls -g -MT core_wrap.lo -MD -MP -MF .deps/core_wrap.Tpo -c 
core_wrap.c  -fPIC -DPIC -o .libs/core_wrap.o
core_wrap.c:222: warning: no previous prototype for 
'Java_org_librdf_redland_core_librdf_1new_1digest'
core_wrap.c:244: warning: no previous prototype for 
'Java_org_librdf_redland_core_librdf_1free_1digest'
core_wrap.c:255: warning: no previous prototype for 
'Java_org_librdf_redland_core_librdf_1digest_1init'
core_wrap.c:266: warning: no previous prototype for 
'Java_org_librdf_redland_core_librdf_1digest_1update'
...

<snip>

>>do someone knows what am i doing wrong?
> 
> 
> Using Java? :)
> 

well, we were recently forced to a java platform, so now we have to redo 
all we did previously in C# :(

> Well, more seriously, I don't spend much time on them so I still consider
> them experimental.  They probably work if 'make check' works.

still i cannot get them to compile: got any idea by looking at the above 
make output log?

friendly

Attilio


More information about the redland-dev mailing list