Re: development setup and libdir

From: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: development setup and libdir
Date: 2010-01-30 21:39:37
Message-ID: 20100130223937.674a177c@dawn.webthatworks.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 30 Jan 2010 11:06:02 -0500
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it> writes:
> > ... I can't make install (provided it works as expected, I
> > didn't try yet) since I sincerely hope that my user doesn't have
> > write right on whatever is pointed by $libdir.
>
> Why not? In order to install a C function, you have to be
> superuser, which means you already have the keys to the kingdom
> database-wise. There is no reason to not give a developer of C
> functions write access on $libdir. He could do whatever he wanted
> inside the C code anyway.

It is becoming a more serious issue than what I thought...
Debian install everything in
/usr/lib/postgresql/8.3/lib/
-rw-r--r-- 1 root root
so definitively it would be hard to write there.

Still I'd like to keep a standard installation of Debian and just
compile my extension somewhere else where the postgres user can read.

I just discovered that depending on the postgres version .so are
created with different names (module.so vs libmodule.so) and then
renamed. Since I'd like to use as much as possible of all the magic
that pgxs and provided makefile do... and I may discover that the
renaming is not the only change between versions, I'd prefer all
this magic happens using make install.

I've read I can use prefix.
From my understanding you can set prefix from configure but:
- maybe you've just installed debian -dev package
- running configure for each extension you'd like to place in a
different path is just a pain especially if you would really like
to keep configuration identical with the exception of the install
dir

I've tried to
export USE_PGSX=1; make install /mydir
export USE_PGSX=1; make install prefix=/mydir
with no success. make still try to copy stuff
in /usr/lib/postgresql/...

What am I supposed to do to install modules where I want?

thanks

--
Ivan Sergio Borgonovo
http://www.webthatworks.it

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Matteo Beccati 2010-01-30 21:43:50 Re: mailing list archiver chewing patches
Previous Message Joe Conway 2010-01-30 21:18:48 Re: mailing list archiver chewing patches