You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Johannes Fahrenkrug <jf...@gebeco.de> on 2004/04/20 12:49:16 UTC

Python bindings/ViewCVS/Swig trouble

Hi everyone,

I am running a Subversion server on Solaris 2.8. I was running a 
version 1.0.1 till this morning; now I'm running a version 1.0.2.
I tried Swig 1.3.21, but had troubles with it (didn't build 
libswigpy.so), so I switched back to Swig 1.3.19.
And I am using a viewcvs1.0-dev CVS build.
After I set everything up, I get this error when I try to connect to 
my viewcvs server:

An Exception Has Occurred
Python Traceback

Traceback (most recent call last):
  File "/usr/local/viewcvs/lib/viewcvs.py", line 2487, in main
    request.run_viewcvs()
  File "/usr/local/viewcvs/lib/viewcvs.py", line 256, in run_viewcvs
    import vclib.svn
  File "/usr/local/viewcvs/lib/vclib/svn/__init__.py", line 27, in ?
    from svn import fs, repos, core, delta
  File "/usr/local/lib/svn-python/svn/fs.py", line 27, in ?
    import libsvn.fs
  File "/usr/local/lib/svn-python/libsvn/fs.py", line 5, in ?
    import _fs
ImportError: ld.so.1: /usr/local/bin/python: fatal: relocation error: 
file /usr/local/lib/python2.3/site-packages/libsvn/_fs.so: symbol 
SWIG_Python_ConvertPtr: referenced symbol not found

I have no idea anymore what to do. 
Can someone please help me fix this problem?

Thanks a lot!

--Johannes.




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: Python bindings/ViewCVS/Swig trouble

Posted by Johannes Fahrenkrug <jf...@gebeco.de>.
Thanks for your help. 
This is what I got:

***********

>strings /usr/local/lib/libswigpy.so
<Global variables>
Global variables {
Unknown C global variable
swigvarlink
this
NULL
thisown
Type error. Expected %s
Expected a pointer
0123456789abcdef
>swig -version

SWIG Version 1.3.19
Copyright (c) 1995-1998
University of Utah and the Regents of the University of California
Copyright (c) 1998-2002
University of Chicago
Compiled with g++

Please see http://www.swig.org for reporting bugs and further 
information

**********

> Do:
> find / -name libswigpy.so

> Then do:
> strings /usr/lib64/libswigpy.so | grep SWIG_Python

> On the file you find...  If there are no SWIG_Python symbols found 
then
> you have 1.3.19 or older...  If there are then you have 1.3.20 or
> newer...  If you have multiple copies of the runtimes installed it can
> create the behavior you're seeing.

Hmmm..... like I thought, so it must be 1.3.19. Does that mean that 
the swig-python bindings need something newer than 1.3.19?

-Johannes.





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: Python bindings/ViewCVS/Swig trouble

Posted by Ben Reser <be...@reser.org>.
On Wed, Apr 21, 2004 at 10:50:59AM +0000, Johannes Fahrenkrug wrote:
> Ok, I tried that. Unfortunately swig doesn't have a -v or --version 
> switch.

Actually it does:

swig -version

> But I deleted the swig binary and the swig libraries and 
> compiled swig-1.3.19 again and installed it again (with 
> install-runtime and everything).
> Everything worked fine. Then I ran a »make clean« in my 
> subversion-1.0.2 source dir, ran a ./config.nice and a »make« and 
> »make install«. All that worked smoothly. (The config script found 
> swig-1.3.19 and also told me that it was configuring swig python 
> bindings.)
> Then I ran »make swig-py«. I got a couple of these warnings:
> 
> /bin/bash /home/jfa/subversion-1.0.2/libtool --silent --mode=compile 
> gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/lib  
> -DSOLARIS2=8 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT  
> -I/home/jfa/subversion-1.0.2/subversion/bindings/swig  
> -I/home/jfa/subversion-1.0.2/subversion/include  
> -I/usr/local/lib/swig1.3  -DSVN_SWIG_VERSION=103019  
> -I/usr/local/apache2/include -I/usr/local/apache2/include 
> -I/usr/local/BerkeleyDB.4.2/include -I/usr/local/include 
> -I/home/jfa/subversion-1.0.2/subversion/bindings/swig  
> -I/home/jfa/subversion-1.0.2/subversion/include  
> -I/usr/local/lib/swig1.3  -DSVN_SWIG_VERSION=103019  
> -I/usr/local/apache2/include -I/usr/local/apache2/include 
> -I/usr/local/BerkeleyDB.4.2/include -I/usr/local/include 
> -I/usr/local/include/python2.3 -prefer-pic -c -o 
> subversion/bindings/swig/python/svn_client.lo 
> subversion/bindings/swig/python/svn_client.c
> In file included from /usr/local/include/python2.3/stringobject.h:10,
>                  from /usr/local/include/python2.3/Python.h:83,
>                  from subversion/bindings/swig/python/svn_client.c:14:
> /opt/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/include/stdarg.h:170: 
> warning: redefinition of `va_list'
> /usr/include/stdio.h:120: warning: `va_list' previously declared here
> cd subversion/bindings/swig/python && /bin/bash 
> /home/jfa/subversion-1.0.2/libtool --silent --mode=link gcc -shared -L/usr/local/lib -rpath /usr/local/lib/svn-python/libsvn 
> -avoid-version -module -o _client.la svn_client.lo -lswigpy 
> ../../../../subversion/bindings/swig/libsvn_swig_py-1.la 
> ../../../../subversion/libsvn_client/libsvn_client-1.la -lsocket
> 
> Then I ran »make install-swig-py« and I got a couple of these 
> warnings:
> 
> cd subversion/bindings/swig/python ; /bin/bash 
> /home/jfa/subversion-1.0.2/libtool --mode=install 
> /home/jfa/subversion-1.0.2/ac-helpers/install-sh -c _wc.la 
> /usr/local/lib/svn-python/libsvn/_wc.la
> libtool: install: warning: relinking `_wc.la'
> cd /home/jfa/subversion-1.0.2/subversion/bindings/swig/python; 
> /bin/bash /home/jfa/subversion-1.0.2/libtool --mode=relink gcc -shared 
> -L/usr/local/lib -rpath /usr/local/lib/svn-python/libsvn 
> -avoid-version -module -o _wc.la svn_wc.lo -lswigpy 
> ../../../../subversion/bindings/swig/libsvn_swig_py-1.la 
> ../../../../subversion/libsvn_wc/libsvn_wc-1.la -lsocket
> /usr/ccs/bin/ld -G -h _wc.so -o .libs/_wc.so  svn_wc.lo  
> -R/usr/local/lib  
> -L/home/jfa/subversion-1.0.2/subversion/libsvn_diff/.libs 
> -L/usr/local/apache2/lib 
> -L/home/jfa/subversion-1.0.2/subversion/libsvn_subr/.libs 
> -L/home/jfa/subversion-1.0.2/subversion/libsvn_delta/.libs 
> -L/usr/local/BerkeleyDB.4.2/lib -L/usr/local/lib -lswigpy 
> -lsvn_swig_py-1 -lsvn_wc-1 -lsocket   -lc
> /home/jfa/subversion-1.0.2/ac-helpers/install-sh -c .libs/_wc.soT 
> /usr/local/lib/svn-python/libsvn/_wc.so
> chmod +x /usr/local/lib/svn-python/libsvn/_wc.so
> /home/jfa/subversion-1.0.2/ac-helpers/install-sh -c .libs/_wc.lai 
> /usr/local/lib/svn-python/libsvn/_wc.la
> /home/jfa/subversion-1.0.2/ac-helpers/install-sh -c .libs/_wc.a 
> /usr/local/lib/svn-python/libsvn/_wc.a
> ranlib /usr/local/lib/svn-python/libsvn/_wc.a
> chmod 644 /usr/local/lib/svn-python/libsvn/_wc.a

Nothing above looks particularly wrong.
 
> And the errors remained when I tried to run viewcvs. I also get a 
> similar error when I run 
> python -c »from svn import client«
> 
> Btw, I got the warnings mentioned above from the start. They didn't 
> just occur now...
> 
> I hope these warnings mean something to someone :)

If you're still getting the error about missing symbols you still have a
mismatched runtime version.

Do:
find / -name libswigpy.so

Then do:
strings /usr/lib64/libswigpy.so | grep SWIG_Python

On the file you find...  If there are no SWIG_Python symbols found then
you have 1.3.19 or older...  If there are then you have 1.3.20 or
newer...  If you have multiple copies of the runtimes installed it can
create the behavior you're seeing.


-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Python bindings/ViewCVS/Swig trouble

Posted by Johannes Fahrenkrug <jf...@gebeco.de>.
Hi again,

> On Tue, Apr 20, 2004 at 12:49:16PM +0000, Johannes Fahrenkrug wrote:
> > Hi everyone,
> >
> > I am running a Subversion server on Solaris 2.8. I was running a
> > version 1.0.1 till this morning; now I'm running a version 1.0.2.
> > I tried Swig 1.3.21, but had troubles with it (didn't build
> > libswigpy.so), so I switched back to Swig 1.3.19.
> > And I am using a viewcvs1.0-dev CVS build.
> > After I set everything up, I get this error when I try to connect to
> > my viewcvs server:
> >
> > An Exception Has Occurred
> > Python Traceback
<snip>
> > ImportError: ld.so.1: /usr/local/bin/python: fatal: relocation error:
> > file /usr/local/lib/python2.3/site-packages/libsvn/_fs.so: symbol
> > SWIG_Python_ConvertPtr: referenced symbol not found
<snip>

> This looks like you have the swig executable installed from 1.3.21 
while
> having the 1.3.19 runtimes installed.  See the documentation in
> subversion/bindings/INSTALL on how to install SWIG.  Note the:
>     * run 'make && make runtime && make install && make 
install-runtime'
> line.

Ok, I tried that. Unfortunately swig doesn't have a -v or --version 
switch. But I deleted the swig binary and the swig libraries and 
compiled swig-1.3.19 again and installed it again (with 
install-runtime and everything).
Everything worked fine. Then I ran a »make clean« in my 
subversion-1.0.2 source dir, ran a ./config.nice and a »make« and 
»make install«. All that worked smoothly. (The config script found 
swig-1.3.19 and also told me that it was configuring swig python 
bindings.)
Then I ran »make swig-py«. I got a couple of these warnings:

/bin/bash /home/jfa/subversion-1.0.2/libtool --silent --mode=compile 
gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/lib  
-DSOLARIS2=8 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT  
-I/home/jfa/subversion-1.0.2/subversion/bindings/swig  
-I/home/jfa/subversion-1.0.2/subversion/include  
-I/usr/local/lib/swig1.3  -DSVN_SWIG_VERSION=103019  
-I/usr/local/apache2/include -I/usr/local/apache2/include 
-I/usr/local/BerkeleyDB.4.2/include -I/usr/local/include 
-I/home/jfa/subversion-1.0.2/subversion/bindings/swig  
-I/home/jfa/subversion-1.0.2/subversion/include  
-I/usr/local/lib/swig1.3  -DSVN_SWIG_VERSION=103019  
-I/usr/local/apache2/include -I/usr/local/apache2/include 
-I/usr/local/BerkeleyDB.4.2/include -I/usr/local/include 
-I/usr/local/include/python2.3 -prefer-pic -c -o 
subversion/bindings/swig/python/svn_client.lo 
subversion/bindings/swig/python/svn_client.c
In file included from /usr/local/include/python2.3/stringobject.h:10,
                 from /usr/local/include/python2.3/Python.h:83,
                 from subversion/bindings/swig/python/svn_client.c:14:
/opt/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/include/stdarg.h:170: 
warning: redefinition of `va_list'
/usr/include/stdio.h:120: warning: `va_list' previously declared here
cd subversion/bindings/swig/python && /bin/bash 
/home/jfa/subversion-1.0.2/libtool --silent --mode=link gcc -shared 
-L/usr/local/lib -rpath /usr/local/lib/svn-python/libsvn 
-avoid-version -module -o _client.la svn_client.lo -lswigpy 
../../../../subversion/bindings/swig/libsvn_swig_py-1.la 
../../../../subversion/libsvn_client/libsvn_client-1.la -lsocket

Then I ran »make install-swig-py« and I got a couple of these 
warnings:

cd subversion/bindings/swig/python ; /bin/bash 
/home/jfa/subversion-1.0.2/libtool --mode=install 
/home/jfa/subversion-1.0.2/ac-helpers/install-sh -c _wc.la 
/usr/local/lib/svn-python/libsvn/_wc.la
libtool: install: warning: relinking `_wc.la'
cd /home/jfa/subversion-1.0.2/subversion/bindings/swig/python; 
/bin/bash /home/jfa/subversion-1.0.2/libtool --mode=relink gcc -shared 
-L/usr/local/lib -rpath /usr/local/lib/svn-python/libsvn 
-avoid-version -module -o _wc.la svn_wc.lo -lswigpy 
../../../../subversion/bindings/swig/libsvn_swig_py-1.la 
../../../../subversion/libsvn_wc/libsvn_wc-1.la -lsocket
/usr/ccs/bin/ld -G -h _wc.so -o .libs/_wc.so  svn_wc.lo  
-R/usr/local/lib  
-L/home/jfa/subversion-1.0.2/subversion/libsvn_diff/.libs 
-L/usr/local/apache2/lib 
-L/home/jfa/subversion-1.0.2/subversion/libsvn_subr/.libs 
-L/home/jfa/subversion-1.0.2/subversion/libsvn_delta/.libs 
-L/usr/local/BerkeleyDB.4.2/lib -L/usr/local/lib -lswigpy 
-lsvn_swig_py-1 -lsvn_wc-1 -lsocket   -lc
/home/jfa/subversion-1.0.2/ac-helpers/install-sh -c .libs/_wc.soT 
/usr/local/lib/svn-python/libsvn/_wc.so
chmod +x /usr/local/lib/svn-python/libsvn/_wc.so
/home/jfa/subversion-1.0.2/ac-helpers/install-sh -c .libs/_wc.lai 
/usr/local/lib/svn-python/libsvn/_wc.la
/home/jfa/subversion-1.0.2/ac-helpers/install-sh -c .libs/_wc.a 
/usr/local/lib/svn-python/libsvn/_wc.a
ranlib /usr/local/lib/svn-python/libsvn/_wc.a
chmod 644 /usr/local/lib/svn-python/libsvn/_wc.a

And the errors remained when I tried to run viewcvs. I also get a 
similar error when I run 
python -c »from svn import client«

Btw, I got the warnings mentioned above from the start. They didn't 
just occur now...

I hope these warnings mean something to someone :)

All help is very much appreciated...

-Johannes.






---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: Python bindings/ViewCVS/Swig trouble

Posted by Ben Reser <be...@reser.org>.
On Tue, Apr 20, 2004 at 12:49:16PM +0000, Johannes Fahrenkrug wrote:
> Hi everyone,
> 
> I am running a Subversion server on Solaris 2.8. I was running a 
> version 1.0.1 till this morning; now I'm running a version 1.0.2.
> I tried Swig 1.3.21, but had troubles with it (didn't build 
> libswigpy.so), so I switched back to Swig 1.3.19.
> And I am using a viewcvs1.0-dev CVS build.
> After I set everything up, I get this error when I try to connect to 
> my viewcvs server:
> 
> An Exception Has Occurred
> Python Traceback
> 
> Traceback (most recent call last):
>   File "/usr/local/viewcvs/lib/viewcvs.py", line 2487, in main
>     request.run_viewcvs()
>   File "/usr/local/viewcvs/lib/viewcvs.py", line 256, in run_viewcvs
>     import vclib.svn
>   File "/usr/local/viewcvs/lib/vclib/svn/__init__.py", line 27, in ?
>     from svn import fs, repos, core, delta
>   File "/usr/local/lib/svn-python/svn/fs.py", line 27, in ?
>     import libsvn.fs
>   File "/usr/local/lib/svn-python/libsvn/fs.py", line 5, in ?
>     import _fs
> ImportError: ld.so.1: /usr/local/bin/python: fatal: relocation error: 
> file /usr/local/lib/python2.3/site-packages/libsvn/_fs.so: symbol 
> SWIG_Python_ConvertPtr: referenced symbol not found
> 
> I have no idea anymore what to do. 
> Can someone please help me fix this problem?

This looks like you have the swig executable installed from 1.3.21 while
having the 1.3.19 runtimes installed.  See the documentation in
subversion/bindings/INSTALL on how to install SWIG.  Note the:
    * run 'make && make runtime && make install && make install-runtime'
line.

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org