Building PL/Perl procedural language without --with-perl configure flag

Started by postgres userover 9 years ago5 messagesgeneral
Jump to latest
#1postgres user
postgresuser1989@gmail.com

Hi,

I am trying to build PL/Perl procedural language to my PostgreSQL server
installation but I want to do it without passing --with-perl flag to the
configure script of PostgreSQL. It would also help if someone can explain
the meaning of --with-perl flag in a detailed fashion altogether as it
might help me determine the actual process of installing PL/Perl. There are
two parts to the question however how do I get the source of PL/Perl
firstly and how do I build it against an already built version of
PostgreSQL as in when I have the (bin, lib, share) for PostgreSQL and what
all pre-requisites are needed to install PL/Perl in the first place?

Thanks

#2John R Pierce
pierce@hogranch.com
In reply to: postgres user (#1)
Re: Building PL/Perl procedural language without --with-perl configure flag

On 1/15/2017 1:15 AM, postgres user wrote:

I am trying to build PL/Perl procedural language to my PostgreSQL
server installation but I want to do it without passing --with-perl
flag to the configure script of PostgreSQL. It would also help if
someone can explain the meaning of --with-perl flag in a detailed
fashion altogether as it might help me determine the actual process of
installing PL/Perl. There are two parts to the question however how do
I get the source of PL/Perl firstly and how do I build it against an
already built version of PostgreSQL as in when I have the (bin, lib,
share) for PostgreSQL and what all pre-requisites are needed to
install PL/Perl in the first place?

how was this postgres 'already built' edition installed?

the source to plperl is built into postgres, if perl is in your path,
--with-perl should figure out where the libraries it needs are.

--
john r pierce, recycling bits in santa cruz

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3postgres user
postgresuser1989@gmail.com
In reply to: John R Pierce (#2)
Re: Building PL/Perl procedural language without --with-perl configure flag

The already installed Postgres edition was built using the same
installation procedure as mentioned in the docs, but without the use of
--with-perl flag. the point I ask the question is because I want to install
PL/Perl as a separate extension as one does with PostGIS and not along with
Postgres install. Is there a way out to solve that problem of building the
PL/Perl language by somehow creating a custom Makefile as we have for
contrib extensions or PostGIs etc... and then giving it the path of
pg_config hence leading to an installation?

#4Scott Mead
scottm@openscg.com
In reply to: postgres user (#3)
Re: Re: Building PL/Perl procedural language without --with-perl configure flag

On Sun, Jan 15, 2017 at 6:35 AM, postgres user <postgresuser1989@gmail.com>
wrote:

The already installed Postgres edition was built using the same
installation procedure as mentioned in the docs, but without the use of
--with-perl flag. the point I ask the question is because I want to install
PL/Perl as a separate extension as one does with PostGIS and not along with
Postgres install. Is there a way out to solve that problem of building the
PL/Perl language by somehow creating a custom Makefile as we have for
contrib extensions or PostGIs etc... and then giving it the path of
pg_config hence leading to an installation?

The common way of doing this is the following:

1. Download the same source that you used to build your existing postgres
2. In your existing postgres 'bin' directory, run pg_config
-- This will show you the full string passed to configure and your
CFLAGS, LDFLAGS, etc...
3. Re-run configure using the same environment as specified by pg_config,
just add --with-perl
4. Build the server
5. Install the binaries

Note: After building, you could always run a diff between the existing
installation and a new installation and only install the differences.

--
--
Scott Mead
Sr. Architect
*OpenSCG <http://openscg.com&gt;*
http://openscg.com

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: postgres user (#1)
Re: Building PL/Perl procedural language without --with-perl configure flag

postgres user <postgresuser1989@gmail.com> writes:

I am trying to build PL/Perl procedural language to my PostgreSQL server
installation but I want to do it without passing --with-perl flag to the
configure script of PostgreSQL.

Why?

If you don't want to overwrite your existing installation, I'd suggest
reconfigure with --with-perl (and all else the same as before), build,
then cd to src/pl/plperl and do "make install" only in that subdirectory.

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general