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

Re: [PATCH] Link Python bindings against platform-specific library directory v3 (was: Re: [PATCH] Explicitly link the python bindings against libpython (was: Re: Major upgrades to SWIG/Python bindings in r15848))

From: Justin Erenkrantz <justin_at_erenkrantz.com>
Date: 2005-08-28 18:25:43 CEST

--On August 28, 2005 2:29:33 AM -0400 David James <james82@gmail.com> wrote:

> Justin, does this patch work better?

Nope. Here's some pointers as to what I'm getting and what's incorrect with
each output with your patch. (Trunk emits correct output in each case for me.)

Mac OS X 10.4:

% python ./build/get-py-info.py --link
gcc -Wl,-F. -Wl,-F. -bundle -undefined dynamic_lookup
-Wl,-F/System/Library/Frameworks -framework Python
% python ./build/get-py-info.py --libs
-Wl,-F. -Wl,-F. -bundle -Wl,-F/System/Library/Frameworks -framework

We don't need -F/System/Library/Frameworks, but that's minor. The big problem
is that --libs doesn't have '-framework Python'

Solaris 10:

% python get-py-info.py --link
cc -G -L/pkg/python-2.4/lib -L/pkg/python-2.4/lib/python2.4/config -lpython2.4
% python get-py-info.py --libs
-L/pkg/python-2.4/lib -L/pkg/python-2.4/lib/python2.4/config -lpython2.4

We don't need '-L/pkg/python-2.4/lib' as there's nothing in there.

% python get-py-info.py --link
gcc -pthread -shared -L/usr/lib/python2.4/config -lpython2.4
% python get-py-info.py --libs
-L/usr/lib/python2.4/config -lpython2.4

Again, this is wrong. It should prefer the DSO sitting in /usr/lib. The
'correct' output for Ubuntu would be (and this is what trunk emits):

% python ./build/get-py-info.py --link
gcc -pthread -shared -lpython2.4
% python ./build/get-py-info.py --libs
-lpython2.4

The version of get-py-info.py in trunk has some stat()'s to try to prevent us
from emitting bogus paths and to explicitly prefer DSOs over .a files.

HTH. Thanks. -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Aug 28 18:27:16 2005

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