Thread: PG compilation

PG compilation

From
km
Date:
Hi,

I would like to know if there is a way to pass an argument to ./configure
to consider compiling with a specific python version ? coz i have many python versions in the system .I presume that
configurewould check for the /usr/bin/python alone, but what if i want /usr/bin/python2.5 to be compiled in ?  

regards ,
KM

Re: PG compilation

From
Shane Ambler
Date:
km wrote:
> Hi,
>
> I would like to know if there is a way to pass an argument to ./configure
> to consider compiling with a specific python version ? coz i have many python versions in the system .I presume that
configurewould check for the /usr/bin/python alone, but what if i want /usr/bin/python2.5 to be compiled in ?  
>

Have a look at ./configure --help


--

Shane Ambler
pgSQL@007Marketing.com

Get Sheeky @ http://Sheeky.Biz

Re: PG compilation

From
km
Date:
> >
> >I would like to know if there is a way to pass an argument to ./configure
> >to consider compiling with a specific python version ? coz i have many
> >python versions in the system .I presume that configure would check for
> >the /usr/bin/python alone, but what if i want /usr/bin/python2.5 to be
> >compiled in ?
>
> Have a look at ./configure --help

ya had looked at '--with-python' option but that is where my question arises - it looks at default python
(/usr/bin/python)and not /usr/local/bin/python2.5 which i need for PL/Python functionality in PG 8.2.1 
one solution is to soft link the /usr/bin/python to /usr/local/bin/python2.5 but i donot want to change the default
pythonon the system as some other programs depend on it. 
so i am looking for a flexibility in configuring PG that it created python modules  with python2.5 only.
any ideas ?

regards,
KM

Re: PG compilation

From
Peter Eisentraut
Date:
km wrote:
> I would like to know if there is a way to pass an argument to
> ./configure to consider compiling with a specific python version ?

configure PYTHON=/usr/bin/python2.5
--
Peter Eisentraut
http://developer.postgresql.org/~petere/

Re: PG compilation

From
km
Date:
On Fri, Jan 12, 2007 at 11:50:19AM +0100, Albe Laurenz wrote:
> > gmake[3]: Entering directory
> `/home/km/postgresql8.2.1/postgresql-8.2.1/src/pl/plpython'
> > gcc -fPIC -Wall -Wmissing-prototypes -Wpointer-arith -Winline
> -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -g
> -fpic -shared -Wl,-soname,libplpython.so.0   plpython.o
> -L/usr/local/lib/python2.5/config -L../../../src/port -lpython2.5
> -lpthread -ldl -lutil -lm -Wl,-rpath,'/usr/local/lib/python2.5/config'
> -o libplpython.so.0.0
> > /usr/bin/ld:
> /usr/local/lib/python2.5/config/libpython2.5.a(abstract.o): relocation
> R_X86_64_32 against `a local symbol' can not be used when making a
> shared object; recompile with -fPIC
> > /usr/local/lib/python2.5/config/libpython2.5.a: could not read
> symbols: Bad value
> > collect2: ld returned 1 exit status
> > gmake[3]: *** [libplpython.so.0.0] Error 1
> > gmake[3]: Leaving directory
> `/home/km/postgresql8.2.1/postgresql-8.2.1/src/pl/plpython'
> >
> > I am on a x86_64 platform.
> > any ideas whats going on here ?
>
> Not really. You should CC the list, because somebody there may know.
>
> You can try the following:
> ar -t /usr/local/lib/python2.5/config/libpython2.5.a abstract.o
> file abstract.o

ya extracted the object file.

> What does the file command tell you?

ya it says :

abstract.o: ELF 64-bit LSB relocatable, AMD x86-64, version 1 (SYSV), not stripped

> Did you build Python yourself or did you install a package?

I had installed python2.5 myself from source package.


regards,
KM