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

[PATCH] Explicitly link the python bindings against libpython (was: Re: Major upgrades to SWIG/Python bindings in r15848)

From: David James <james82_at_gmail.com>
Date: 2005-08-27 19:10:14 CEST

On 8/27/05, Justin Erenkrantz <justin@erenkrantz.com> wrote:
> On Sat, Aug 20, 2005 at 02:05:43PM -0400, David James wrote:
> > I've committed some major upgrades to SWIG/Python bindings in r15848
> > (Merged from the python-bindings-improvements branch).
> Given that trunk didn't do squat for me (I ran into similar problems as
> Philip did), I switched back to the branch.
> However, there's a problem here (both in trunk and the branch): how is
> the SWIG generated code supposed to link to anything?
> In my setups, linking consistently fails because of undefined symbols
> that are defined by Python's libraries. Nowhere do I see any mention of
> linking to libpython. Manually defining -lpython2.4 to LSWIGPY works.
> (Note that SWIG_PY_LIBS doesn't get used anywhere, AFAICT.)
> With previous SWIG versions, we'd link against libswigpy (defined at
> configure time as LSWIGPY) - which would link in turn to libpython.
> However, with our current setup, I don't see how that is being done.
> I don't know if get-py-info.py needs to be 'spruced' up or something
> else. (It wasn't touched at all as part of this work; so perhaps it is
> not useful anymore?)
> % python ./get-py-info.py --libs
> % python ./get-py-info.py --link
> gcc -pthread -shared
> Philip's post contained a configure snippet that is almost identical to
> what I get. So, unless I'm missing something, if he tries the branch
> (or trunk after merge), I think he's going to get the same problem.
> I'm kinda stumped as I feel there's some pieces missing that I'm not
> sure where they go or if they are present. -- justin

Hi Justin, Max:

It looks like "get-py-info.py" does not explicitly link Subversion
against libpython. For most people, this works fine, but it's still a
bug. Previously, this bug was hidden because we indirectly link to
libpython when we use the SWIG 1.3.19-1.3.21 runtime libraries.

In r10450, Max Bowsher patched "get-py-info.py" to explicitly link
Subversion against libpython on the Cygwin platform. In this patch, I
have upgraded Max's code to run on all platforms. I have also upgraded
Max's code to be compatible with Python 2.2.

Justin, does this solve your problem?

* build/get-py-info.py:
  (ldshared_process): Explicitly link the python bindings against




David James -- http://www.cs.toronto.edu/~james

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

Received on Sat Aug 27 19:11:05 2005

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.