[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] gen_base.py should not generate reference to nonexistent library swigjava

From: Kai Nacke <kai.nacke_at_redstar.de>
Date: 2003-02-06 20:51:55 CET

> Hi Kai. You can attempt build the (incomplete) SWIG Java bindings
> using the 'swig-java-ext' and 'swig-java-lib' targets. Can you
> include the build output associated with the problem that you're
> trying to fix?

Hi Daniel!

Ok, please correct me if I am wrong:
make swig-java-lib builds libsvn_swig_java-1
make swig-java-ext runs SWIG on the interface files

I attempt to compile the resulting *.c files via make swig-java.
I copied the COMPILE_JAVA_SWIG, COMPILE_JAVA_WRAPPER and LINK_JAVA_WRAPPER
from the *_PYTHON_* lines in Makefile. With a little bit tweaking (like inserting
SWIG_JAVA_COMPILE and so on), I was able to compile the generated *.c files. But in the link
step of make swig-java, I got the following error:

cd subversion/bindings/swig/java && /bin/sh /usr/src/subversion/libtool --silent --mode=link gcc -shared -rpath /usr/lib/svn-java -avoid-version -module -o _client.la svn_client.lo ../../../../subversion/libsvn_client/libsvn_client-1.la -lswigjava ../../../../subversion/bindings/swig/libsvn_swig_java-1.la
/usr/i486-suse-linux/bin/ld: cannot find -lswigjava
collect2: ld returned 1 exit status
make: *** [subversion/bindings/swig/java/_client.la] Fehler 1

Then I searched through the build system why _client.la depends on -lswigjava
and where I can find this library. The solution was, that gen_base.py generated
this dependency, and that this library - the SWIG runtime library for Java - does
not exist. (This may be wrong - I am no SWIG expert. But the documentation
for SWIG states the following:

C pointers in the Java module are stored in a Java long and cross the JNI
boundary held within this 64 bit number. whereas other SWIG language modules
use an encoding of the pointer in a string. These scripting languages use the
SWIG runtime type checker for type checking as they do not support static type
checking by a compiler. In order to implement static type checking of pointers
within Java, they are wrapped by a simple Java class.

This means that there is no need for functions like SWIG_NewPointerObj()
and then there is no need for a runtime library. Consequently I found hints
to swigjava in the SWIG sources.
)

BTW: I saw that you are modifying swigutil_java.c. If my citation above is right then
all calls to SWIG_NewPointerObj() and SWIG_TypeQuery() are not necessary,
because these functions do not exists.

Kai

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Feb 6 20:50:36 2003

This is an archived mail posted to the Subversion Dev mailing list.