Re: Installing PL/Python (progress!) - Mailing list pgsql-general

From Chris Hall
Subject Re: Installing PL/Python (progress!)
Date
Msg-id 3DA3F3CD.6070104@verizon.net
Whole thread Raw
In response to PL/Python  (Chris Hall <hall.cj@verizon.net>)
Responses Re: Installing PL/Python (progress!)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
After some digging in various news groups, we added '-export-dynamic' to
link our link flags, and re-built Python *and* Postgres, and re-installed.

Result: now we get a different error message when we try to 'createlang
plpython':

-----( snip )---------------
bash-2.05$ /usr/local/pgsql/bin/createlang plpython template1
ERROR:  Load of file /usr/local/pgsql/lib/plpython.so failed:
/usr/local/lib/python2.2/config/libpython2.2.so: undefined symbol: openpty
createlang: language installation failed
-----( snip )---------------

This constitutes progress, right?

We are doing this as user 'postgres', which is the user postmaster runs as.

If, as user 'postgres', we load python interactively from the command
line, we can import module 'pty', and successfully invoke 'openpty()' -
 it returns: (3, 4).  BTW, we have verified that plpython.so was created
after libpython2.2.so.

Anybody have any ideas?

Chris Hall wrote:

> Our machine is running:
> Python 2.2 (#1, Feb 24 2002, 16:21:58)
> [GCC 2.96 20000731 (Mandrake Linux 8.2 2.96-0.76mdk)] on linux-i386
>
> Our Postgres source is from ftp.postgresql.org[64.49.215.8]:21 (via
> 'wget'):
> -rw-r--r--    1 postgres postgres  9239158 Aug 22 23:25
> postgresql-7.2.2.tar.gz
>
> We had to get the Python 2.2.1 source and fiddle with Postgres' makefile
> '-I' statement (in the appropriate place, we think) to point to the
> Python headers, but everything seemed to build and install OK after that.
>
> We brought up postmaster, added 'plpgsql' to 'template1', no problem.
>   However, when we try to add 'plpython':
>
> [postgres@linuxbox postgres]$ /usr/local/pgsql/bin/createlang plpython
> template1
> ERROR:  Load of file /usr/local/pgsql/lib/plpython.so failed:
> /usr/local/pgsql/lib/plpython.so: undefined symbol: PyExc_IOError
> ERROR:  Load of file /usr/local/pgsql/lib/plpython.so failed:
> /usr/local/pgsql/lib/plpython.so: undefined symbol: PyExc_IOError
> createlang: language installation failed
>
> We noticed 'libplpython.so' in 'src/pl/plpython', so we set
> 'LD_LIBRARY_PATH' - same error.  We also added '/usr/lib/'
> (libpython2.2.so.0.0 is there) to LD_LIBRARY_PATH - no change.
>
> We *love* Python, and think it will be ideal for a good number of our
> stored procedures/functions, and in fact this Postgres installation is
> to support a Zope application we are currently developing/using with
> Postgres 7.2.
>
> We (obviously) are not terribly skilled at installing Postgres (though
> we do usually build from source) - our efforts are directed elsewhere -
> could someone help us with what is probably a blindingly obvious problem
> to a Postgres expert?
>
> Permissions, perhaps?
>

--
One OS to rule them all, one OS to find them,
One OS to bring them all and in the database bind them,
In the Land of Redmond, where the Shadows lie.




pgsql-general by date:

Previous
From: "Shridhar Daithankar"
Date:
Subject: Re: Large databases, performance
Next
From: "Louis-Marie Croisez"
Date:
Subject: access time performance problem