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

Re: Progress towards a usable SWIG/Java build

From: Gustav Munkby <grddev_at_gmx.net>
Date: 2004-03-13 15:38:28 CET

Daniel Rall wrote:
> Daniel L. Rall wrote:
> ...
>
>> Even though both apr and aprutil are mentioned in build.conf as deps
>> for libsvn_swig_java, they do not appear to be getting auto-loaded
>> when loading libsvn_swig_java from Java using System.loadLibrary().
>> Thoughts?
>>
>> dlr@despot:dlr$ (export
>> LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/dlr/src/svn/subversion/bindings/swig/.libs:/usr/local/apr/lib";
>> java -classpath
>> .:/home/dlr/src/svn/subversion/bindings/swig/java/build/svn-api.jar test)
>> Initializing SVN native resources...
>> Exception in thread "main" java.lang.UnsatisfiedLinkError: apr_initialize
>> at org.tigris.subversion.swig.coreJNI.apr_initialize(Native
>> Method)
>> at org.tigris.subversion.swig.core.apr_initialize(core.java:23)
>> at
>> org.tigris.subversion.util.NativeResources.initialize(NativeResources.java:100)
>>
>> at test.main(test.java:9)
>
>
> For some reason libsvn_swig_py.so dynamically links to apr_initialize,
> while libsvn_swig_java.so does not. Why?
>
> svn$ nm -o subversion/bindings/swig/.libs/libsvn_swig_.so | grep apr_init
> subversion/bindings/swig/.libs/libsvn_swig_py-1.so: U
> apr_initialize
>
>

make swig-java
cd subversion/bindings/swig
gcc -g -pthread -shared -o libsvn_swig_java-1.so swigutil_java.o
java/.libs/*.o -lsvn_client-1 -lsvn_wc-1 -lsvn_ra-1 -lsvn_fs-1
-lsvn_delta-1 -lsvn_subr-1 -lsvn_repos-1

produces a functional libsvn_swig_java-1.so (linked against correct
libraries, and importing apr_initialize as it's supposed to)

a little more libtoolish version (taken form the actual build, but added
"java/*.lo" and most of the .la entries):

/bin/sh ../../../libtool --silent --mode=link gcc -g -pthread
-DNEON_ZLIB -DNEON_SSL -rpath /usr/lib -o libsvn_swig_java-1.la
swigutil_java.lo java/*.lo
../../../subversion/libsvn_client/libsvn_client-1.la
../../../subversion/libsvn_wc/libsvn_wc-1.la
../../../subversion/libsvn_ra/libsvn_ra-1.la
../../../subversion/libsvn_fs/libsvn_fs-1.la
../../../subversion/libsvn_delta/libsvn_delta-1.la
../../../subversion/libsvn_subr/libsvn_subr-1.la
../../../subversion/libsvn_repos/libsvn_repos-1.la
/usr/lib/libaprutil-0.la -lgdbm -ldb -lexpat /usr/lib/libapr-0.la -lrt
-lm -lcrypt -lnsl -ldl -lz

For one that doesn't know (and doesn't understand) what are the purpose
of all the generated _client.so and so forth?

!g <-- confused

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Mar 13 15:38:53 2004

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.