Обсуждение: Unable to make DBD-Pg-2.13.1

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

Unable to make DBD-Pg-2.13.1

От
"Mark"
Дата:
I'm new to PostgreSQL. Just installed the latest version, 8.3.7, on my
FreeBSD system (client + server). All went well...

Until I tried to install DBD-Pg-2.13.1 (for Perl) thereafter. And I'm
getting the weirdest errors that just won't go away (see below). Does
anyone know what the cause might be? Or better still, how to fix it? :)

Thanks,

- Mark


Vmware: {root} % /usr/local/bin/perl Makefile.PL
Configuring DBD::Pg 2.13.1
PostgreSQL version: 80307 (default port: 5432)
POSTGRES_HOME: /usr/local/PostgreSQL
POSTGRES_INCLUDE: /usr/local/PostgreSQL/include
POSTGRES_LIB: /usr/local/PostgreSQL/lib -lssl -lcrypto
OS: freebsd
Using DBI 1.607 (for perl 5.008008 on i386-freebsd-64int) installed in
/usr/local/standard-perl/lib/perl5/site_perl/5.8.8/mach/auto/DBI/
Writing Makefile for DBD::Pg
Vmware: {root} % make
cc -c  -I/usr/local/PostgreSQL/include -I/usr/local/standard-perl/lib/perl5/site_perl/5.8.8/mach/auto/DBI
  -DAPPLLIB_EXP="/usr/local/standard-perl/lib/perl5/5.8.8/BSDPAN" -DHAS_FPSETMASK
 -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include -DPGLIBVERSION=80307
 -DPGDEFPORT=5432 -O -pipe   -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree
 -Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"2.13.1\"  -DXS_VERSION=\"2.13.1\"
 -DPIC -fPIC "-I/usr/local/standard-perl/lib/perl5/5.8.8/mach/CORE"   Pg.c
cc -c  -I/usr/local/PostgreSQL/include -I/usr/local/standard-perl/lib/perl5/site_perl/5.8.8/mach/auto/DBI
  -DAPPLLIB_EXP="/usr/local/standard-perl/lib/perl5/5.8.8/BSDPAN" -DHAS_FPSETMASK
 -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include -DPGLIBVERSION=80307
 -DPGDEFPORT=5432 -O -pipe   -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree
 -Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"2.13.1\"  -DXS_VERSION=\"2.13.1\"
 -DPIC -fPIC "-I/usr/local/standard-perl/lib/perl5/5.8.8/mach/CORE"
dbdimp.c
dbdimp.c: In function `pg_st_prepare_statement':
dbdimp.c:2122: warning: assignment makes pointer from integer without a cast
dbdimp.c: In function `pg_db_cancel':
dbdimp.c:4649: `PGcancel' undeclared (first use in this function)
dbdimp.c:4649: (Each undeclared identifier is reported only once
dbdimp.c:4649: for each function it appears in.)
dbdimp.c:4649: `cancel' undeclared (first use in this function)
dbdimp.c:4650: syntax error before `char'
dbdimp.c:4675: `errbuf' undeclared (first use in this function)
dbdimp.c:4693: `result' undeclared (first use in this function)
dbdimp.c:4700: `status' undeclared (first use in this function)
dbdimp.c: In function `handle_old_async':
dbdimp.c:4762: `PGcancel' undeclared (first use in this function)
dbdimp.c:4762: `cancel' undeclared (first use in this function)
dbdimp.c:4763: syntax error before `char'
dbdimp.c:4769: `cresult' undeclared (first use in this function)
dbdimp.c:4769: `errbuf' undeclared (first use in this function)
*** Error code 1

Re: Unable to make DBD-Pg-2.13.1

От
Craig Ringer
Дата:
Mark wrote:
> I'm new to PostgreSQL. Just installed the latest version, 8.3.7, on my
> FreeBSD system (client + server). All went well...
>
> Until I tried to install DBD-Pg-2.13.1 (for Perl) thereafter. And I'm
> getting the weirdest errors that just won't go away (see below). Does
> anyone know what the cause might be? Or better still, how to fix it? :)

What is "cc" in this context?

cc -v

> cc -c  -I/usr/local/PostgreSQL/include -I/usr/local/include

Is it possible that you have old or conflicting PostgreSQL headers in
/usr/local/include ? Or even in /usr/include ?

--
Craig Ringer

Re: Unable to make DBD-Pg-2.13.1

От
Tom Lane
Дата:
Craig Ringer <craig@postnewspapers.com.au> writes:
> Mark wrote:
>> Until I tried to install DBD-Pg-2.13.1 (for Perl) thereafter. And I'm
>> getting the weirdest errors that just won't go away (see below). Does
>> anyone know what the cause might be? Or better still, how to fix it? :)

> Is it possible that you have old or conflicting PostgreSQL headers in
> /usr/local/include ? Or even in /usr/include ?

The PGcancel typedef was added in 8.0, so the complaints about that
suggest strongly that a pre-8.0 version of libpq-fe.h is being read.

            regards, tom lane

Re: Unable to make DBD-Pg-2.13.1

От
"Mark"
Дата:
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: vrijdag 1 mei 2009 16:37
To: Craig Ringer
Cc: Mark; pgsql-bugs@postgresql.org
Subject: Re: [BUGS] Unable to make DBD-Pg-2.13.1

Craig Ringer <craig@postnewspapers.com.au> writes:

>> Mark wrote:

>>> Until I tried to install DBD-Pg-2.13.1 (for Perl) thereafter. And I'm
>>> getting the weirdest errors that just won't go away (see below). Does
>>> anyone know what the cause might be? Or better still, how to fix it?

>> Is it possible that you have old or conflicting PostgreSQL headers in
>> /usr/local/include ? Or even in /usr/include ?

> The PGcancel typedef was added in 8.0, so the complaints about that
> suggest strongly that a pre-8.0 version of libpq-fe.h is being read.

Thanks! You're right. :) Though I (thought I) had removed all remnants of
older installs (like the /usr/local/include/postgres/ directory and such),
seems the single /usr/local/include/libpq-fe.h file still lingered on. I
explicitely specified the he pg_config file at its new location, though,
as being at:

/usr/local/PostgreSQL/bin/pg_config

But "/usr/local/PostgreSQL/bin" wasn't on the path at compile time, so
that may have accounted for something, too.

P.S. This morning I already found out about the stray libpq-fe.h file, as
I was building a pgsql.so extension for PHP, and phpinfo.php reported a
7.1.4 client. I did a grep then on all include dirs, and found the old
stub. Oddly enough, I didn't think far enough to realize this might cause
DBD-Pg-2.13.1 to fail to build properly, too. Doh! :)

All is fine again. :)

- Mark