From: | Dario Beraldi <dario(dot)beraldi(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Installing plpython3u |
Date: | 2015-10-15 16:08:58 |
Message-ID: | CAEa0nG7oC+WBtnap=LY6Nz5i3dF9NXEAeRfMb-MnPKA142L3ew@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 15 October 2015 at 16:29, Dario Beraldi <dario(dot)beraldi(at)gmail(dot)com> wrote:
>
>
>
>
>
> On 15 October 2015 at 16:23, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>> Dario Beraldi <dario(dot)beraldi(at)gmail(dot)com> writes:
>> >> It might be worth cd'ing into the src/pl/plpython subdirectory and
>> >> manually doing "make install" there to see what it prints.
>>
>> > Here we go:
>> > cd
>> >
>> /data/sblab-home/berald01/applications/postgresql/postgresql-9.3.5/src/pl/plpython
>> > make install
>> > make: Nothing to be done for `install'.
>>
>> That, and the fact that your "ls" shows no derived files, means that the
>> Makefile is choosing not to do anything, which a look at the Makefile
>> says must be because shared_libpython isn't getting set. (As of 9.5
>> we've changed that to not fail silently, but in 9.3 this is what it does.)
>>
>> There are two possibilities here: either your python3 installation does
>> not include a shared-library version of libpython, or it does but the
>> configure+Make process is failing to detect that. Probably should
>> establish which of those it is before going further.
>>
>> regards, tom lane
>>
>
> Ahh, I guess this answers the question then:
>
> cd
> /data/sblab-home/berald01/applications/postgresql/postgresql-9.3.5/src/pl/plpython/
> make
>
> *** Cannot build PL/Python because libpython is not a shared library.
> *** You might have to rebuild your Python installation. Refer to
> *** the documentation for details.
>
Ok, this seems to have done the trick:
# Get python and install as shared library:
wget http://python.org/ftp/python/3.5.0/Python-3.5.0.tar.xz
tar xf Python-3.5.0.tar.xz
cd Python-3.5.0
./configure --enable-shared \
--prefix=$HOME \
LDFLAGS="-Wl,--rpath=$HOME/lib"
make
make altinstall
# Re-configure postgres
cd /Users/berald01/applications/postgresql/postgresql-9.3.5/
./configure --prefix=$HOME --with-python PYTHON=~/bin/python3.5
make
make install
# Create python3 lang:
createlang plpython3u sblab
From | Date | Subject | |
---|---|---|---|
Next Message | AI Rumman | 2015-10-15 16:36:27 | Re: pgpool ssl handshake failure |
Previous Message | Dario Beraldi | 2015-10-15 15:29:26 | Re: Installing plpython3u |