Обсуждение: Support for DBD::PgSPI with Pg 7.4.8?

Поиск
Список
Период
Сортировка

Support for DBD::PgSPI with Pg 7.4.8?

От
Scott Cain
Дата:
Hello,

I am wondering if there is support for DBD::PgSPI in PostgreSQL 7.4.8
(that is, should I be able to build DBD::PgSPI with this Pg?).  I tried
to make it to no avail (make failed with several errors).  This is on a
Fedora Core 3 box with RPM installed postgres.

Any suggestions would be appreciated!

Thanks,
Scott

------------
Here is the output of make:

[root@localhost DBD-PgSPI-0.02]# export POSTGRES_HOME=/var/lib/pgsql
[root@localhost DBD-PgSPI-0.02]# perl Makefile.PL
Configuring PgSPI
Remember to actually read the README file !
OS: linux
Multiple copies of Driver.xst found in: /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBI/
/usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi/auto/DBI/at Makefile.PL line 25
 
Using DBI 1.48 (for perl 5.008005 on i386-linux-thread-multi) installed in
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBI/
Checking if your kit is complete...
Looks good
Writing Makefile for DBD::PgSPI
[root@localhost DBD-PgSPI-0.02]# make
cp PgSPI.pm blib/lib/DBD/PgSPI.pm
/usr/bin/perl /usr/lib/perl5/5.8.5/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5.8.5/ExtUtils/typemap  PgSPI.xs >
PgSPI.xsc&& mv PgSPI.xsc PgSPI.c
 
gcc -c  -I/var/lib/pgsql/include -I/var/lib/pgsql/backend -I/var/lib/pgsql/interfaces/libpq
-I/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBI/-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-DDEBUGGING-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/include/gdbm-g   -DVERSION=\"0.02\" -DXS_VERSION=\"0.02\" -fPIC
"-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE"  PgSPI.c
 
In file included from PgSPI.xs:14:
PgSPI.h:16:22: postgres.h: No such file or directory
PgSPI.h:17:21: funcapi.h: No such file or directory
PgSPI.h:18:26: executor/spi.h: No such file or directory
PgSPI.h:26:20: ppport.h: No such file or directory
In file included from PgSPI.h:32,                from PgSPI.xs:14:
dbdimp.h:36: error: syntax error before "TupleDesc"
dbdimp.h:36: warning: no semicolon at end of struct or union
dbdimp.h:37: warning: data definition has no type or storage class
dbdimp.h:47: error: syntax error before '*' token
dbdimp.h:47: warning: data definition has no type or storage class
dbdimp.h:52: error: syntax error before '}' token
PgSPI.xs: In function `XS_DBD__PgSPI__st__prepare':
PgSPI.xs:175: error: dereferencing pointer to incomplete type
PgSPI.xs: In function `XS_DBD__PgSPI__st_execute':
PgSPI.xs:233: error: dereferencing pointer to incomplete type
PgSPI.xs:234: error: dereferencing pointer to incomplete type
PgSPI.xs:235: error: dereferencing pointer to incomplete type
PgSPI.xs: In function `XS_DBD__PgSPI__st_finish':
PgSPI.xs:294: error: dereferencing pointer to incomplete type
PgSPI.xs:301: error: dereferencing pointer to incomplete type
PgSPI.xs: In function `XS_DBD__PgSPI__st_DESTROY':
PgSPI.xs:345: error: dereferencing pointer to incomplete type
PgSPI.xs:346: error: dereferencing pointer to incomplete type
PgSPI.xs:351: error: dereferencing pointer to incomplete type
PgSPI.xs:352: error: dereferencing pointer to incomplete type
PgSPI.xs:352: error: dereferencing pointer to incomplete type
PgSPI.xs:352: error: dereferencing pointer to incomplete type
PgSPI.xs:354: error: dereferencing pointer to incomplete type
PgSPI.xs: In function `boot_DBD__PgSPI':
PgSPI.xs:36: error: invalid application of `sizeof' to incomplete type
`/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBI/DBIXS.h'
make: *** [PgSPI.o] Error 1

-- 
------------------------------------------------------------------------
Scott Cain, Ph. D.                                         cain@cshl.edu
GMOD Coordinator (http://www.gmod.org/)                     216-392-3087
Cold Spring Harbor Laboratory



Re: Support for DBD::PgSPI with Pg 7.4.8?

От
Tom Lane
Дата:
Scott Cain <cain@cshl.edu> writes:
> gcc -c  -I/var/lib/pgsql/include -I/var/lib/pgsql/backend -I/var/lib/pgsql/interfaces/libpq
-I/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBI/-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-DDEBUGGING-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/include/gdbm-g   -DVERSION=\"0.02\" -DXS_VERSION=\"0.02\" -fPIC
"-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE"  PgSPI.c
 
> In file included from PgSPI.xs:14:
> PgSPI.h:16:22: postgres.h: No such file or directory
> PgSPI.h:17:21: funcapi.h: No such file or directory
> PgSPI.h:18:26: executor/spi.h: No such file or directory
> PgSPI.h:26:20: ppport.h: No such file or directory

Either you don't have those header files available, or the PgSPI
makefile is confused about where to look for them --- the
-I/var/lib/pgsql/include -I/var/lib/pgsql/backend switches look
like rather generic guesses as to where they are...

All the other errors are probably just cascading from that.
        regards, tom lane


Re: Support for DBD::PgSPI with Pg 7.4.8?

От
Scott Cain
Дата:
Tom,

Thanks! Of course I should have figured that out on my own.  Anyway, to
get it to work, I had to modify the Makefile.PL file for the
distribution.  It requires a $POSTGRES_HOME environment variable, which
doesn't help in Fedora, because files are spread all over the place.  I
just added a few items to the include list so that the appropriate
header files would be found.

Thanks,
Scott


On Wed, 2005-07-13 at 13:36 -0400, Tom Lane wrote:
> Scott Cain <cain@cshl.edu> writes:
> > gcc -c  -I/var/lib/pgsql/include -I/var/lib/pgsql/backend -I/var/lib/pgsql/interfaces/libpq
-I/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBI/-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-DDEBUGGING-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/include/gdbm-g   -DVERSION=\"0.02\" -DXS_VERSION=\"0.02\" -fPIC
"-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE"  PgSPI.c
 
> > In file included from PgSPI.xs:14:
> > PgSPI.h:16:22: postgres.h: No such file or directory
> > PgSPI.h:17:21: funcapi.h: No such file or directory
> > PgSPI.h:18:26: executor/spi.h: No such file or directory
> > PgSPI.h:26:20: ppport.h: No such file or directory
> 
> Either you don't have those header files available, or the PgSPI
> makefile is confused about where to look for them --- the
> -I/var/lib/pgsql/include -I/var/lib/pgsql/backend switches look
> like rather generic guesses as to where they are...
> 
> All the other errors are probably just cascading from that.
> 
>             regards, tom lane
-- 
------------------------------------------------------------------------
Scott Cain, Ph. D.                                         cain@cshl.edu
GMOD Coordinator (http://www.gmod.org/)                     216-392-3087
Cold Spring Harbor Laboratory