You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Christopher Ness <ch...@nesser.org> on 2005/04/11 04:12:40 UTC
ViewCVS Python Bindings
Hi all,
I've been having problems building the python bindings. Or at least I
think I'm having problems since ViewCVS doesn't work for me throwing
errors.
Reading the INSTALL files for both SVN and ViewCVS has gotten me to
here. My PYTHONPATH is set, but I can't import `svn.repos` until I
import `svn`. I have no idea why.
[root@jackd opt]# python
Python 2.2.3 (#1, Oct 15 2003, 23:33:35)
[GCC 3.3.1 20030930 (Red Hat Linux 3.3.1-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/lib/python2.2', '/usr/lib/python2.2/plat-linux2',
'/usr/lib/python2.2/lib-dynload', '/usr/lib/python2.2/site-packages',
'/usr/lib/python2.2/site-packages/gtk-2.0', '/usr/local/lib/svn-python']
>>> import svn.repos
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/src/build/403267-i386/install/usr/lib/python2.2/site-
packages/svn/repos.py", line 17, in ?
File "/usr/src/build/403267-i386/install/usr/lib/python2.2/site-
packages/libsvn/repos.py", line 4, in ?
ImportError: /usr/lib/python2.2/site-packages/libsvn/_repos.so:
undefined symbol: svn_swig_py_thunk_log_receiver
>>> import svn
>>> import svn.repos
>>>
I am building SVN 1.1.4 from the release tarball
SWIG Version 1.3.24
Python version is old [see above] (from an FC1 RPM).
I'd really like to build from source instead of using a package.
Thanks,
Chris
--
Software Engineering IV,
McMaster University
PGP Public Key: http://www.nesser.org/pgp-key/
00:07:29 up 2 days, 12:11, 4 users, load average: 1.14, 0.50, 0.26
http://www.gnu.org/philosophy/no-word-attachments.html
Re: ViewCVS Python Bindings
Posted by Christopher Ness <ch...@nesser.org>.
On Tue, 2005-12-04 at 21:40 -0400, Christopher Ness wrote:
> On Mon, 2005-11-04 at 23:21 +0100, Max Bowsher wrote:
> > Could this be an old version? You could try deleting it, and reinstalling
> > the Python bindings.
>
> Alright, so here is how I went about trying to do just that. Stick with
> me because the problem still persists, this is a bit of information
> overload.
Ok, I'm really confused now because this morning the bindings work just
fine in python and ViewCVS is churning out my repository.
Could there have been some linking or rebuilding of a symbol database
that took place as a nightly job?
Or was it just "magic server healing pixie dust"[1]?
Cheers,
Chris
--
Software Engineering IV,
McMaster University
PGP Public Key: http://www.nesser.org/pgp-key/
12:43:22 up 1 day, 16:15, 3 users, load average: 0.54, 0.38, 0.29
http://www.gnu.org/philosophy/no-word-attachments.html
[1] - Taken as a quote from an IBM commercial.
Re: ViewCVS Python Bindings
Posted by Christopher Ness <ch...@nesser.org>.
On Mon, 2005-11-04 at 23:21 +0100, Max Bowsher wrote:
> Could this be an old version? You could try deleting it, and reinstalling
> the Python bindings.
Alright, so here is how I went about trying to do just that. Stick with
me because the problem still persists, this is a bit of information
overload.
I went to my library directory. Luckily it is not very busy in there
since I don't build that many things from scratch.
[root@jackd lib]# pwd
/usr/local/lib
[root@jackd lib]# rm -rf *svn*
[root@jackd lib]# rm -f *neon*
I `rm -rf`'d my extracted tarball to get a fresh source directory. I
just checked the MD5 sums and they match, so it's not a bad tarball.
[root@jackd sandbox]# ./configure \
--with-ssl \
--with-berkeley-db=/usr/local/BerkeleyDB.4.2 \
--with-swig=/usr/local/bin/swig &> ~/svn-configure-Apr12.out
The interesting parts are here...
[root@jackd sandbox]# grep "ython\|swig" ~/svn-configure-Apr12.out
checking for python2... /usr/bin/python2
checking for Python 2.0 or newer
configure: Enabled swig binding: perl
configure: Enabled swig binding: python
configure: Enabled swig binding: java
checking swig version... 1.3.24
checking for swig library directory... /usr/local/share/swig/1.3.24
configure: Configuring python swig binding
checking if swig needs -L for its libraries... -L/usr/local/share/swig
checking for Python includes... -I/usr/include/python2.2
checking for compiling Python extensions... gcc -DNDEBUG -O2 -g -pipe -
march=i386 -mcpu=i686 -D_GNU_SOURCE -fPIC -fPIC
checking for linking Python extensions... gcc -shared
checking for linking Python libraries...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ is this ok if blank?
config.status: creating subversion/bindings/swig/perl/native/Makefile.PL
mkdir subversion/bindings/swig/java/build
So I did a `make && make install` then a `make swig-py && make install-
swig-py`
Same damn error when I try to `import svn.repos` in the python
interpreter.
ImportError: /usr/lib/python2.2/site-packages/libsvn/_repos.so:
undefined symbol: svn_swig_py_thunk_log_receiver
But strings shows the symbol exists in the file somewhere.
[root@jackd subversion-1.1.4]# strings /usr/lib/python2.2/site-
packages/libsvn/_repos.so | grep thunk
svn_swig_py_thunk_log_receiver
I've attached the gzip'd text capture of swig-python make && make
install, maybe someone will be able to pick something out of it.
One last thing, I had some libraries in /usr/lib from an _OLD_ binary
client 0.32.1-5 (remember FC1), that shouldn't be effecting my build
should it? Anyway, I removed the RPM with -e.
Cheers,
Chris
--
Software Engineering IV,
McMaster University
PGP Public Key: http://www.nesser.org/pgp-key/
21:10:41 up 1 day, 42 min, 5 users, load average: 0.08, 0.06, 0.07
http://www.gnu.org/philosophy/no-word-attachments.html
Re: ViewCVS Python Bindings
Posted by Max Bowsher <ma...@ukf.net>.
Christopher Ness wrote:
> On Mon, 2005-11-04 at 16:47 +0100, Max Bowsher wrote:
>>> Do I need to put /usr/local/lib in the PYTHONPATH as well?
>>
>> No, that's not what PYTHONPATH is for, at all.
>>
>> What does "ldd path/to/libsvn/_repos.so" say?
>
> [root@jackd root]# ldd /usr/local/lib/svn-python/libsvn/_repos.so
...
> libsvn_swig_py-1.so.0 => /usr/local/lib/libsvn_swig_py-1.so.0
...
Curious, it certainly seems to be finding it OK.
Could this be an old version? You could try deleting it, and reinstalling
the Python bindings.
>>> There were some warnings about relinking when I did a `make install-
>>> swig-py` but I thought that was just because I already had those shared
>>> libraries in ld.so.config.
>>
>> You made edits to ld.so.config?
>
> Yes, added /usr/local/lib/svn-python/libsvn like `make install-swig-py`
> told me to. Then I ran `ldconfig` as root to update.
Oh. Don't bother. That's just libtool spitting out general blobs of advice
which are actually irrelevant in this case.
> Before we go any further here is my configure line in case I messed up.
>
> ./configure --with-ssl --with-berkeley-db=/usr/local/BerkeleyDB.4.2 --
> enable-swig-bindings --with-swig=/usr/local/bin/swig
Hmm. Drop the --enable-swig-bindings. I don't think it could be causing this
problem, but it's DEFINITELY not required. (in fact I've disposed of that
option entirely in 1.2)
Also, I presume /usr/local/bin is in your path,
so --with-swig=/usr/local/bin/swig is entirely optional.
Max.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: ViewCVS Python Bindings
Posted by Christopher Ness <ch...@nesser.org>.
On Mon, 2005-11-04 at 16:47 +0100, Max Bowsher wrote:
> > Do I need to put /usr/local/lib in the PYTHONPATH as well?
>
> No, that's not what PYTHONPATH is for, at all.
>
> What does "ldd path/to/libsvn/_repos.so" say?
[root@jackd root]# ldd /usr/local/lib/svn-python/libsvn/_repos.so
linux-gate.so.1 => (0xffffe000)
libsvn_swig_py-1.so.0 => /usr/local/lib/libsvn_swig_py-1.so.0
(0xb7fe7000)
libsvn_repos-1.so.0 => /usr/local/lib/libsvn_repos-1.so.0
(0xb7fd3000)
libsvn_subr-1.so.0 => /usr/local/lib/libsvn_subr-1.so.0
(0xb7fb2000)
libc.so.6 => /lib/tls/libc.so.6 (0xb7e67000)
libsvn_delta-1.so.0 => /usr/local/lib/libsvn_delta-1.so.0
(0xb7e5f000)
libaprutil-0.so.0 => /usr/local/apr/lib/libaprutil-0.so.0
(0xb7e4b000)
libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0xb7e44000)
libdb-4.2.so => /usr/local/BerkeleyDB.4.2/lib/libdb-4.2.so
(0xb7d99000)
libexpat.so.0 => /usr/lib/libexpat.so.0 (0xb7d79000)
libapr-0.so.0 => /usr/local/apr/lib/libapr-0.so.0 (0xb7d5b000)
librt.so.1 => /lib/tls/librt.so.1 (0xb7d46000)
libm.so.6 => /lib/tls/libm.so.6 (0xb7d24000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7cf7000)
libnsl.so.1 => /lib/libnsl.so.1 (0xb7ce2000)
libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb7cd2000)
libdl.so.2 => /lib/libdl.so.2 (0xb7ccf000)
libsvn_fs-1.so.0 => /usr/local/lib/libsvn_fs-1.so.0 (0xb7cca000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
libsvn_fs_fs-1.so.0 => /usr/local/lib/libsvn_fs_fs-1.so.0
(0xb7cb6000)
libsvn_fs_base-1.so.0 => /usr/local/lib/libsvn_fs_base-1.so.0
(0xb7c9a000)
> >> The versions you quote should be fine, though, if you can work out why
> >> your
> >> build is broken.
> >
> > Finishing up exams this week, then I'll have some more time. Any idea
> > how I should go about debugging my build? I don't really know where to
> > start.
> >
> > There were some warnings about relinking when I did a `make install-
> > swig-py` but I thought that was just because I already had those shared
> > libraries in ld.so.config.
>
> You made edits to ld.so.config?
Yes, added /usr/local/lib/svn-python/libsvn like `make install-swig-py`
told me to. Then I ran `ldconfig` as root to update.
[root@jackd root]# cat /etc/ld.so.conf
/usr/lib/mysql
/usr/X11R6/lib
/usr/lib/qt-3.1/lib
/usr/local/BerkeleyDB.4.2/lib
/usr/local/lib
/usr/local/apache2/modules
/usr/lib
/home/nesscg/sandbox/php-4.3.10/libs
/usr/local/apache2/php/lib
/usr/local/lib/svn-python/libsvn
Before we go any further here is my configure line in case I messed up.
./configure --with-ssl --with-berkeley-db=/usr/local/BerkeleyDB.4.2 --
enable-swig-bindings --with-swig=/usr/local/bin/swig
The script found my perl and python binaries in /usr/bin
Thanks for the help, much appreciated.
Chris
--
Software Engineering IV,
McMaster University
PGP Public Key: http://www.nesser.org/pgp-key/
12:38:31 up 4 min, 3 users, load average: 0.33, 0.67, 0.34
http://www.gnu.org/philosophy/no-word-attachments.html
Re: ViewCVS Python Bindings
Posted by Max Bowsher <ma...@ukf.net>.
Christopher Ness wrote:
> On Mon, 2005-11-04 at 10:50 +0100, Max Bowsher wrote:
>> This is NOT success the second time, it's just Python noticing that it
>> already tried, and turning the second "import svn.repos" into a no-op.
>
> Ah! Ok, sorry my python isn't very polished.
>
>>> I am building SVN 1.1.4 from the release tarball
>>> SWIG Version 1.3.24
>>> Python version is old [see above] (from an FC1 RPM).
>>>
>>> I'd really like to build from source instead of using a package.
>>
>> It sounds like libsvn_swig_py is missing/not-found.
>
> [root@jackd lib]# pwd
> /usr/local/lib
> [root@jackd lib]# ls -la libsvn_swig_py*
> -rw-r--r-- 1 root root 140248 Apr 11 00:31 libsvn_swig_py-1.a
> -rwxr-xr-x 1 root root 1159 Apr 11 00:31 libsvn_swig_py-1.la
> lrwxrwxrwx 1 root root 25 Apr 11 00:31 libsvn_swig_py-1.so ->
> libsvn_swig_py-1.so.0.0.0
> lrwxrwxrwx 1 root root 25 Apr 11 00:31 libsvn_swig_py-1.so.0 ->
> libsvn_swig_py-1.so.0.0.0
> -rwxr-xr-x 1 root root 119744 Apr 11 00:31 libsvn_swig_py-1.so.0.0.0
>
> Do I need to put /usr/local/lib in the PYTHONPATH as well?
No, that's not what PYTHONPATH is for, at all.
What does "ldd path/to/libsvn/_repos.so" say?
>> The versions you quote should be fine, though, if you can work out why
>> your
>> build is broken.
>
> Finishing up exams this week, then I'll have some more time. Any idea
> how I should go about debugging my build? I don't really know where to
> start.
>
> There were some warnings about relinking when I did a `make install-
> swig-py` but I thought that was just because I already had those shared
> libraries in ld.so.config.
You made edits to ld.so.config?
Max.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: ViewCVS Python Bindings
Posted by Christopher Ness <ch...@nesser.org>.
On Mon, 2005-11-04 at 10:50 +0100, Max Bowsher wrote:
> This is NOT success the second time, it's just Python noticing that it
> already tried, and turning the second "import svn.repos" into a no-op.
Ah! Ok, sorry my python isn't very polished.
> > I am building SVN 1.1.4 from the release tarball
> > SWIG Version 1.3.24
> > Python version is old [see above] (from an FC1 RPM).
> >
> > I'd really like to build from source instead of using a package.
>
> It sounds like libsvn_swig_py is missing/not-found.
[root@jackd lib]# pwd
/usr/local/lib
[root@jackd lib]# ls -la libsvn_swig_py*
-rw-r--r-- 1 root root 140248 Apr 11 00:31 libsvn_swig_py-1.a
-rwxr-xr-x 1 root root 1159 Apr 11 00:31 libsvn_swig_py-1.la
lrwxrwxrwx 1 root root 25 Apr 11 00:31 libsvn_swig_py-1.so -> libsvn_swig_py-1.so.0.0.0
lrwxrwxrwx 1 root root 25 Apr 11 00:31 libsvn_swig_py-1.so.0 -> libsvn_swig_py-1.so.0.0.0
-rwxr-xr-x 1 root root 119744 Apr 11 00:31 libsvn_swig_py-1.so.0.0.0
Do I need to put /usr/local/lib in the PYTHONPATH as well?
> The versions you quote should be fine, though, if you can work out why your
> build is broken.
Finishing up exams this week, then I'll have some more time. Any idea
how I should go about debugging my build? I don't really know where to
start.
There were some warnings about relinking when I did a `make install-
swig-py` but I thought that was just because I already had those shared
libraries in ld.so.config.
Cheers,
Chris
--
Software Engineering IV,
McMaster University
PGP Public Key: http://www.nesser.org/pgp-key/
08:03:56 up 2 days, 20:07, 2 users, load average: 0.20, 0.21, 0.14
http://www.gnu.org/philosophy/no-word-attachments.html
Re: ViewCVS Python Bindings
Posted by Max Bowsher <ma...@ukf.net>.
Christopher Ness wrote:
> Hi all,
>
> I've been having problems building the python bindings. Or at least I
> think I'm having problems since ViewCVS doesn't work for me throwing
> errors.
>
> Reading the INSTALL files for both SVN and ViewCVS has gotten me to
> here. My PYTHONPATH is set, but I can't import `svn.repos` until I
> import `svn`. I have no idea why.
>
> [root@jackd opt]# python
> Python 2.2.3 (#1, Oct 15 2003, 23:33:35)
> [GCC 3.3.1 20030930 (Red Hat Linux 3.3.1-6)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import sys
>>>> sys.path
> ['', '/usr/lib/python2.2', '/usr/lib/python2.2/plat-linux2',
> '/usr/lib/python2.2/lib-dynload', '/usr/lib/python2.2/site-packages',
> '/usr/lib/python2.2/site-packages/gtk-2.0', '/usr/local/lib/svn-python']
>>>> import svn.repos
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File "/usr/src/build/403267-i386/install/usr/lib/python2.2/site-
> packages/svn/repos.py", line 17, in ?
> File "/usr/src/build/403267-i386/install/usr/lib/python2.2/site-
> packages/libsvn/repos.py", line 4, in ?
> ImportError: /usr/lib/python2.2/site-packages/libsvn/_repos.so:
> undefined symbol: svn_swig_py_thunk_log_receiver
>>>> import svn
>>>> import svn.repos
>>>>
This is NOT success the second time, it's just Python noticing that it
already tried, and turning the second "import svn.repos" into a no-op.
> I am building SVN 1.1.4 from the release tarball
> SWIG Version 1.3.24
> Python version is old [see above] (from an FC1 RPM).
>
> I'd really like to build from source instead of using a package.
It sounds like libsvn_swig_py is missing/not-found.
The versions you quote should be fine, though, if you can work out why your
build is broken.
Max.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org