Re: cvs tip broken build for plpython

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: cvs tip broken build for plpython
Date: 2004-10-11 20:54:15
Message-ID: 416AF2F7.3020706@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:

>"Andrew Dunstan" <andrew(at)dunslane(dot)net> writes:
>
>
>>>On my FC3 installation, there is a /usr/lib/libpython2.3.so.1.0
>>>... do you have anything comparable?
>>>
>>>
>
>
>
>>No, except the non-standard one on the openoffice libs. Building as shared
>>lib only became a part of standard python in release 2.3 - see
>>http://www.python.org/doc/2.3.4/whatsnew/node20.html
>>
>>
>
>I've committed some changes to try to use the shared library where
>available, while continuing to work if it isn't:
>
>* If distutils reports values for LIBDIR and LDLIBRARY, and the latter
>looks like a shared library name, then use -L$LIBDIR -l$LDLIBRARY (after
>suitable hacking on the library name).
>
>* Otherwise use -L$CONFIGDIR -lpython$VERSION.
>
>The latter case duplicates what we have done in past versions, so it
>should theoretically work as well (or poorly) as ever. The test
>conditions may still need fine-tuning though. I do not have a pre-2.3
>Python to try it with --- would you test please?
>
>

Works for me. It ran this and was happy:

ccache gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes
-Wmissing-declarations -fpic -shared -Wl,-soname,libplpython.so.0
plpython.o -L../../../src/port -L/usr/lib/python2.2/config -lpython2.2
-ldl -lpthread -lutil -lm -o libplpython.so.0.0

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Treat 2004-10-11 21:30:11 Re: PL/PgSQL for counting all rows in all tables.
Previous Message Tom Lane 2004-10-11 20:31:09 Making rpath a bit more flexible