Shared libpython, PIC, whinery (was Re: Embedding python in .so, /libpython2.2.a not position independent (hp-ux)??

Oleg Broytmann phd at phd.pp.ru
Wed Jan 16 07:36:53 EST 2002


On Wed, Jan 16, 2002 at 02:10:25PM +0200, Ville Vainio wrote:
> My question is: why is libpython not built to be position
> independent in the first place? That doesn't cause platform depence,

   It does.

> does it? In the minimun, there should be a hint in the Makefile
> somewhere suggesting that you could make it PIC, by uncommenting
> something or whatever. The current approach requires a bit too much
> hacking to be easily repeatable (by code maintainers etc.).

   Why too much hacking? Thats' my build script (compiled from many sources
on the Net, mostly from the http://mini.net/pub/ts2/minotaur.html)

make distclean
OPT="-O2 -fPIC" ./configure $*
make || exit 1

mkdir .extract
(cd .extract; ar xv ../libpython2.2.a)
gcc -shared -o libpython2.2.so .extract/*.o
rm -rf .extract

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.




More information about the Python-list mailing list