Re: SPI & file locations

From: Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
To: Mike Mascari <mascarm(at)mascari(dot)com>, Ron Peterson <rpeterson(at)yellowbank(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, tgl(at)sss(dot)pgh(dot)pa(dot)us
Subject: Re: SPI & file locations
Date: 2000-05-26 23:20:33
Message-ID: 00052619360400.00745@lorc.wgcr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Fri, 26 May 2000, Mike Mascari wrote:
> Ron Peterson wrote:
> > After installation, shouldn't everything you need be in
> > /usr/local/pgsql?

Too many assumptions are in the source that the source will always be there.
Not necessarily true!

> I too have run into this dependency problem. The number of
> headers required to compile an SPI code module is around 80, if I
> recall correctly. Lamar Owen was good enough to include those
> headers as apart of the RPM distribution and they would go into
> /usr/include/pgsql. I believe he got the dependency list from
> Oliver Elphick who manages the Debian package, so that should be

For PostgreSQL 7.0-2 and above, the SPI header list is dynamically generated
during package build and manually copied into place using the following
one-liner:

/lib/cpp -M -I. -I../backend executor/spi.h |xargs -n 1|grep \\W|grep -v ^/|grep -v spi.h | sort |cpio -pdu $RPM_BUILD_ROOT/usr/include/pgsql

Replace $RPM_BUILD_ROOT/usr/include/pgsql with the directory of your choice,
and run this one-liner when the cwd is in src/include in the PostgreSQL source
tree. The sort is optional, of course.

This could easily enough be included in the make install, couldn't it?
(Tom? Anyone?) I realize that GNU grepisms (or is \W common?) are used above,
but, after all, I _know_ my one-liner in the RPM spec file installation section
is going to be running on RedHat with a complete development environment, so it
wasn't designed to be portable. I also realize the regexps could be tuned to
only need a single grep invocation, but, it works and works nicely as-is in the
RPM building environment.

Oh, BTW, there's the same number of header includes as there were with 6.5.3,
but there are differences in the list.... SPI development CAN be done without
26+ MB of source code taking up space -- Mike is _doing_ it, IIRC. In fact,
Mike is the one who prodded me to get it working in the RPMs.

--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Smith 2000-05-26 23:30:31 Re: INSERT WITH SELECT help
Previous Message Alfred Perlstein 2000-05-26 23:01:44 Re: Update Performance from 6.5.0 to 6.5.3 to 7.0

Browse pgsql-hackers by date

  From Date Subject
Next Message Lamar Owen 2000-05-26 23:36:31 Re: SPI & file locations
Previous Message Andy Joseph 2000-05-26 23:00:10 where is libpq-fe.h