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

Building Python bindings

From: Aaron Bingham <abingham_at_alumni.sfu.ca>
Date: 2005-04-09 12:10:03 CEST

Hi,

I am having troubling building the SWIG Python bindings. I am running
on Debian Woody, and have installed Python-2.3.5, httpd-2.0.53,
SWIG-1.3.21, and subversion-1.1.3 from source using the Graft package
manager. Apache and the Subversion module for Apache work flawlessly,
but my build of the SWIG Python bindings is still broken.

SWIG was configured like this:

./configure --prefix=/pkgs/SWIG-1.3.21 --with-python=/usr/local/bin/python

make; make install did not install libswigpy.so, so I tried following
the instructions at http://wiki.bwerp.net/Subversion and ran the
following commands:

echo '%module swigrun' > swigrun.i
swig -runtime -python swigrun.i
gcc -I/usr/local/include/python2.3 -fpic -c swigrun_wrap.c
gcc -shared swigrun_wrap.o -o libswigpy.so
install -o root -g root -m 755 libswigpy.so /pkgs/SWIG-1.3.21/lib

I then ran graft -i SWIG-1.3.21 to make the package available to
other software.

Subversion was configured like this:

./configure --prefix=/pkgs/subversion-1.1.3 \
    --with-apr=/usr/local/bin/apr-config \
    --with-apr-util=/usr/local/bin/apu-config --with-apxs \
    --enable-swig-bindings=python

After make and make install and graft -i, I ran make swig-py and make
install-swig-py, and graft -i once more.

Now, when I try to use the svn module, I get results as follows:

bingham@213-203-244-183:~/work/svn$ python
Python 2.3.5 (#1, Mar 16 2005, 20:58:04)
[GCC 2.95.4 20011002 (Debian prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import svn
>>> from svn import fs
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/pkgs/subversion-1.1.3/lib/svn-python/svn/fs.py", line 28, in ?
    import libsvn.fs
  File "/pkgs/subversion-1.1.3/lib/svn-python/libsvn/fs.py", line 5, in ?
    import _fs
ImportError: libswigpy.so: cannot open shared object file: No such file or directory

LDD gives the following output for _fs.so:

bingham@213-203-244-183:~/work/svn$ ldd /usr/local/lib/python2.3/site-packages/libsvn/_fs.so
        libswigpy.so => not found
        libsvn_swig_py-1.so.0 => /pkgs/subversion-1.1.3/lib/libsvn_swig_py-1.so.0 (0x40012000)
        libsvn_fs-1.so.0 => /pkgs/subversion-1.1.3/lib/libsvn_fs-1.so.0 (0x40017000)
        libsvn_subr-1.so.0 => /pkgs/subversion-1.1.3/lib/libsvn_subr-1.so.0 (0x4001c000)
        libc.so.6 => /lib/libc.so.6 (0x4003d000)
        libswigpy.so => not found
        libsvn_delta-1.so.0 => /pkgs/subversion-1.1.3/lib/libsvn_delta-1.so.0 (0x4015a000)
        libaprutil-0.so.0 => /pkgs/httpd-2.0.53/lib/libaprutil-0.so.0 (0x40161000)
        libdb.so.2 => /lib/libdb.so.2 (0x40176000)
        libexpat.so.0 => /pkgs/httpd-2.0.53/lib/libexpat.so.0 (0x40183000)
        libapr-0.so.0 => /pkgs/httpd-2.0.53/lib/libapr-0.so.0 (0x4019f000)
        librt.so.1 => /lib/librt.so.1 (0x401be000)
        libm.so.6 => /lib/libm.so.6 (0x401cf000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x401f0000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x4021d000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x40231000)
        libdl.so.2 => /lib/libdl.so.2 (0x40246000)
        libsvn_fs_fs-1.so.0 => /pkgs/subversion-1.1.3/lib/libsvn_fs_fs-1.so.0 (0x40249000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaaa000)

This despite a symlink libswigpy.so being present in /usr/local/lib
and /usr/local/lib being present in /etc/ld.so.conf. Other libraries
in /usr/local/lib seem to be found without trouble.

Any ideas?

Thanks,

Aaron Bingham

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Apr 9 12:18:47 2005

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

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