You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Fancher, Bruce" <bf...@hfmus.com> on 2004/12/28 06:49:31 UTC

Subversion Python bindings breaking on SWIG_TypeQuery

Hi.  I'm still having trouble with the python bindings, and SWIG_TypeQuery in particular.  From googling I see that I'm not the only one who's had similar problems, but I couldn't find a solution to the problem I'm having.

In a nutshell, when I try to test the Subversion python bindings, I get this:

[root@meatwad subversion-1.1.1]# tools/examples/svnlook.py
Traceback (most recent call last):
  File "tools/examples/svnlook.py", line 23, in ?
    from svn import core, fs, delta, repos
  File "/usr/local/lib/svn-python/svn/core.py", line 21, in ?
    from libsvn.core import *
  File "/usr/local/lib/svn-python/libsvn/core.py", line 5, in ?
    import _core
ImportError: /usr/local/lib/libsvn_swig_py-1.so.0: undefined symbol: SWIG_TypeQuery

I find SWIG_Python_TypeQuery, not SWIG_TypeQuery:

[root@meatwad subversion-1.1.1]# ldd /usr/local/lib/libsvn_swig_py-1.so.0 | grep libswigpy
        libswigpy.so.0 => /usr/local/lib/libswigpy.so.0 (0xb75f7000)

[root@meatwad subversion-1.1.1]# nm -A /usr/local/lib/libswigpy.so | grep -i SWIG_TypeQuery

[root@meatwad bruce]# nm -A /usr/local/lib/libswigpy.so | grep -i SWIG_Python_TypeQuery
/usr/local/lib/libswigpy.so:000012dc T SWIG_Python_TypeQuery

Although I see a few statements like #define SWIG_TypeQuery SWIG_Python_TypeQuery in both the subversion and swig source trees.  So, where is SWIG_TypeQuery supposed to be coming from?  Is SWIG not building correctly on my system or is the problem elsewhere?

Any help would be appreciated.

Thanks,

Bruce Fancher


Re: Subversion Python bindings breaking on SWIG_TypeQuery

Posted by John Szakmeister <jo...@szakmeister.net>.
On Tuesday 28 December 2004 01:49, Fancher, Bruce wrote:
> Hi.  I'm still having trouble with the python bindings, and
> SWIG_TypeQuery in particular.  From googling I see that I'm not the
> only one who's had similar problems, but I couldn't find a solution to
> the problem I'm having.
>
> In a nutshell, when I try to test the Subversion python bindings, I get
> this:
>
> [root@meatwad subversion-1.1.1]# tools/examples/svnlook.py
> Traceback (most recent call last):
>   File "tools/examples/svnlook.py", line 23, in ?
>     from svn import core, fs, delta, repos
>   File "/usr/local/lib/svn-python/svn/core.py", line 21, in ?
>     from libsvn.core import *
>   File "/usr/local/lib/svn-python/libsvn/core.py", line 5, in ?
>     import _core
> ImportError: /usr/local/lib/libsvn_swig_py-1.so.0: undefined symbol:
> SWIG_TypeQuery

It's bogus.  There is no SWIG_TypeQuery.  There is definitely something 
wrong with your build.

> I find SWIG_Python_TypeQuery, not SWIG_TypeQuery:
>
> [root@meatwad subversion-1.1.1]# ldd
> /usr/local/lib/libsvn_swig_py-1.so.0 | grep libswigpy libswigpy.so.0 =>
> /usr/local/lib/libswigpy.so.0 (0xb75f7000)
>
> [root@meatwad subversion-1.1.1]# nm -A /usr/local/lib/libswigpy.so |
> grep -i SWIG_TypeQuery
>
> [root@meatwad bruce]# nm -A /usr/local/lib/libswigpy.so | grep -i
> SWIG_Python_TypeQuery /usr/local/lib/libswigpy.so:000012dc T
> SWIG_Python_TypeQuery

The latter one is what's supposed to be there.

> Although I see a few statements like #define SWIG_TypeQuery
> SWIG_Python_TypeQuery in both the subversion and swig source trees. 
> So, where is SWIG_TypeQuery supposed to be coming from?  Is SWIG not
> building correctly on my system or is the problem elsewhere?

I imagine that something isn't building correctly on your system.  I've 
compiled both the 1.1.1 and the trunk/ bindings, and they compile and 
work just fine on my box.

> Any help would be appreciated.

Can you provide more information about the machine your trying to compile 
on?  Which OS?  Which version of SWIG?  IIRC, I saw another post where 
you had tried a couple of different versions.  Perhaps, there is some 
left over crud for the previous SWIG version that's causing a failure?

FWIW, I'm running SuSE 9.1, which has SWIG 1.3.21 and Python 2.3.3.  I've 
also got this running on SuSE 9.2, which has SWIG 1.3.21 and Python 
2.3.4.

-John

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