Skip Menu |

This queue is for tickets about the DBD-Pg CPAN distribution.

Report information
The Basics
Id: 24281
Status: resolved
Priority: 0/
Queue: DBD-Pg

People
Owner: Nobody in particular
Requestors: bryce1 [...] obviously.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.49
Fixed in: (no value)



Subject: Pg.xsi:22: error: invalid application of 'sizeof' to incomplete type 'imp_dbh_t'
On OSX Darwin (the latest Intel version), cpan "install DBD::PG" gives: Configuring DBD::Pg 1.49 Remember to actually read the README file! Path to pg_config? /System/Library/CoreServices/RemoteManagement/rmdb.bundle/bin/pg_config OS: darwin PostgreSQL version: 70303 (default port: 5432) **************** WARNING! Support for servers older than version 7.4 will soon end. It is highly recommended that you upgrade PostgreSQL to a newer version. **************** Checking if your kit is complete... Looks good Note (probably harmless): No library found for -lpq Using DBI 1.53 (for perl 5.008006 on darwin-thread-multi-2level) installed in /Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DBI/ Writing Makefile for DBD::Pg cp Pg.pm blib/lib/DBD/Pg.pm /usr/bin/perl -p -e "s/~DRIVER~/Pg/g; s/^do\(/dontdo\(/" /Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DBI/Driver.xst > Pg.xsi /usr/bin/perl /System/Library/Perl/5.8.6/ExtUtils/xsubpp -typemap /System/Library/Perl/5.8.6/ExtUtils/typemap Pg.xs > Pg.xsc && mv Pg.xsc Pg.c cc -c -I/BinaryCache/NetworkAssistant/NetworkAssistant-879.root~1//System/Library/CoreServices/RemoteManagement/rmdb.bundle/include -I/Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DBI -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include -DPGLIBVERSION=70303 -DPGDEFPORT=5432 -O3 -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"1.49\" -DXS_VERSION=\"1.49\" "-I/System/Library/Perl/5.8.6/darwin-thread-multi-2level/CORE" Pg.c In file included from Pg.xs:14: Pg.h:21:22: error: libpq-fe.h: No such file or directory In file included from Pg.h:47, from Pg.xs:14: dbdimp.h:36: error: parse error before 'PGconn' dbdimp.h:36: warning: no semicolon at end of struct or union dbdimp.h:38: error: parse error before '}' token dbdimp.h:83: error: parse error before 'PGresult' dbdimp.h:83: warning: no semicolon at end of struct or union dbdimp.h:97: error: parse error before '}' token In file included from Pg.c:68: /Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DBI/Driver_xst.h: In function 'dbdxst_bind_params': /Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DBI/Driver_xst.h:53: error: dereferencing pointer to incomplete type /Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DBI/Driver_xst.h:54: error: dereferencing pointer to incomplete type /Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DBI/Driver_xst.h:58: error: dereferencing pointer to incomplete type /Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DBI/Driver_xst.h:59: error: dereferencing pointer to incomplete type /Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DBI/Driver_xst.h:60: error: dereferencing pointer to incomplete type /Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DBI/Driver_xst.h: In function 'dbdxst_fetchall_arrayref': /Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DBI/Driver_xst.h:86: error: dereferencing pointer to incomplete type /Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DBI/Driver_xst.h:87: error: dereferencing pointer to incomplete type /Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DBI/Driver_xst.h:94: error: dereferencing pointer to incomplete type Pg.xsi: In function 'XS_DBD__Pg__db_selectall_arrayref': Pg.xsi:135: error: dereferencing pointer to incomplete type Pg.xsi: In function 'XS_DBD__Pg__db_selectrow_arrayref': Pg.xsi:172: error: dereferencing pointer to incomplete type Pg.xsi: In function 'XS_DBD__Pg__db_commit': Pg.xsi:251: error: dereferencing pointer to incomplete type Pg.xsi:251: error: dereferencing pointer to incomplete type Pg.xsi: In function 'XS_DBD__Pg__db_rollback': Pg.xsi:261: error: dereferencing pointer to incomplete type Pg.xsi:261: error: dereferencing pointer to incomplete type Pg.xsi: In function 'XS_DBD__Pg__db_disconnect': Pg.xsi:271: error: dereferencing pointer to incomplete type Pg.xsi:275: error: dereferencing pointer to incomplete type Pg.xsi:276: error: dereferencing pointer to incomplete type Pg.xsi:277: error: dereferencing pointer to incomplete type Pg.xsi:281: error: dereferencing pointer to incomplete type Pg.xsi:281: error: dereferencing pointer to incomplete type Pg.xsi:283: error: dereferencing pointer to incomplete type Pg.xsi:285: error: dereferencing pointer to incomplete type Pg.xsi:289: error: dereferencing pointer to incomplete type Pg.xsi:289: error: dereferencing pointer to incomplete type Pg.xsi:289: error: dereferencing pointer to incomplete type Pg.xsi: In function 'XS_DBD__Pg__db_STORE': Pg.xsi:303: error: dereferencing pointer to incomplete type Pg.xsi: In function 'XS_DBD__Pg__db_FETCH': Pg.xsi:315: error: dereferencing pointer to incomplete type Pg.xsi: In function 'XS_DBD__Pg__db_DESTROY': Pg.xsi:325: error: dereferencing pointer to incomplete type Pg.xsi:327: error: dereferencing pointer to incomplete type Pg.xsi:327: error: dereferencing pointer to incomplete type Pg.xsi:328: error: dereferencing pointer to incomplete type Pg.xsi:334: error: dereferencing pointer to incomplete type Pg.xsi:335: error: dereferencing pointer to incomplete type Pg.xsi:336: error: dereferencing pointer to incomplete type Pg.xsi:338: error: dereferencing pointer to incomplete type Pg.xsi:339: error: dereferencing pointer to incomplete type Pg.xsi:339: error: dereferencing pointer to incomplete type Pg.xsi:339: error: dereferencing pointer to incomplete type Pg.xsi:340: error: dereferencing pointer to incomplete type Pg.xsi:341: error: dereferencing pointer to incomplete type Pg.xsi:343: error: dereferencing pointer to incomplete type Pg.xsi:344: error: dereferencing pointer to incomplete type Pg.xsi:359: error: dereferencing pointer to incomplete type Pg.xsi:360: error: dereferencing pointer to incomplete type Pg.xsi:361: error: dereferencing pointer to incomplete type Pg.xsi:367: error: dereferencing pointer to incomplete type Pg.xsi:367: error: dereferencing pointer to incomplete type Pg.xsi:367: error: dereferencing pointer to incomplete type Pg.xsi: In function 'XS_DBD__Pg__st_execute': Pg.xsi:567: error: dereferencing pointer to incomplete type Pg.xsi:568: error: dereferencing pointer to incomplete type Pg.xsi: In function 'XS_DBD__Pg__st_finish': Pg.xsi:648: error: dereferencing pointer to incomplete type Pg.xsi:649: error: dereferencing pointer to incomplete type Pg.xsi:653: error: dereferencing pointer to incomplete type Pg.xsi:656: error: dereferencing pointer to incomplete type Pg.xsi:656: error: dereferencing pointer to incomplete type Pg.xsi:656: error: dereferencing pointer to incomplete type Pg.xsi: In function 'XS_DBD__Pg__st_STORE': Pg.xsi:696: error: dereferencing pointer to incomplete type Pg.xsi: In function 'XS_DBD__Pg__st_FETCH_attrib': Pg.xsi:713: error: dereferencing pointer to incomplete type Pg.xsi: In function 'XS_DBD__Pg__st_DESTROY': Pg.xsi:723: error: dereferencing pointer to incomplete type Pg.xsi:725: error: dereferencing pointer to incomplete type Pg.xsi:725: error: dereferencing pointer to incomplete type Pg.xsi:726: error: dereferencing pointer to incomplete type Pg.xsi:731: error: dereferencing pointer to incomplete type Pg.xsi:732: error: dereferencing pointer to incomplete type Pg.xsi:732: error: dereferencing pointer to incomplete type Pg.xsi:732: error: dereferencing pointer to incomplete type Pg.xsi:733: error: dereferencing pointer to incomplete type Pg.xsi:734: error: dereferencing pointer to incomplete type Pg.xsi:736: error: dereferencing pointer to incomplete type Pg.xsi:737: error: dereferencing pointer to incomplete type Pg.xsi:738: error: dereferencing pointer to incomplete type Pg.xsi:746: error: dereferencing pointer to incomplete type Pg.xsi:746: error: dereferencing pointer to incomplete type Pg.xsi:746: error: dereferencing pointer to incomplete type Pg.xs: In function 'XS_DBD__Pg__db_state': Pg.xs:163: error: dereferencing pointer to incomplete type Pg.xs:163: error: dereferencing pointer to incomplete type Pg.xs: In function 'XS_DBD__Pg__db_do': Pg.xs:193: error: dereferencing pointer to incomplete type Pg.xs:194: error: dereferencing pointer to incomplete type Pg.xs: In function 'XS_DBD__Pg__db_pg_savepoint': Pg.xs:245: error: dereferencing pointer to incomplete type Pg.xs:245: error: dereferencing pointer to incomplete type Pg.xs: In function 'XS_DBD__Pg__db_pg_rollback_to': Pg.xs:256: error: dereferencing pointer to incomplete type Pg.xs:256: error: dereferencing pointer to incomplete type Pg.xs: In function 'XS_DBD__Pg__db_pg_release': Pg.xs:267: error: dereferencing pointer to incomplete type Pg.xs:267: error: dereferencing pointer to incomplete type Pg.xs: In function 'XS_DBD__Pg__st_state': Pg.xs:482: error: dereferencing pointer to incomplete type Pg.xs:483: error: dereferencing pointer to incomplete type Pg.xs:483: error: dereferencing pointer to incomplete type Pg.xsi: In function 'boot_DBD__Pg': Pg.xsi:22: error: invalid application of 'sizeof' to incomplete type 'imp_dbh_t' Pg.xsi:23: error: invalid application of 'sizeof' to incomplete type 'imp_sth_t' make: *** [Pg.o] Error 1 /usr/bin/make -- NOT OK Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible Show quoted text
cpan> quit
You are not linking in the -lpq library, which is absolutely necessary to get things working. Make sure all the postgres development packages are installed on your system. Ideally, we should be catching this in the build process and giving a better error (added to TODO).
Subject: Re: [rt.cpan.org #24281] Pg.xsi:22: error: invalid application of 'sizeof' to incomplete type 'imp_dbh_t'
Date: Wed, 18 Jul 2007 11:04:56 -0700
To: bug-DBD-Pg [...] rt.cpan.org
From: Bryce Nesbitt <bryce1 [...] obviously.com>
CPAN's supposed to take care of details like this. DBD::Pg Developers via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=24281 > > > You are not linking in the -lpq library, which is absolutely necessary > to get things working. Make sure all the postgres development packages > are installed on your system. Ideally, we should be catching this in the > build process and giving a better error (added to TODO).
On Wed Jul 18 14:05:20 2007, bryce1@obviously.com wrote: Show quoted text
> CPAN's supposed to take care of details like this.
CPAN cannot catch such library dependencies, but we've made some hacks to the Makefile.PL to catch this and give a decent error message.
From: bryce1 [...] obviously.com
For those who might find this bug report with a google search --- exactly how does one link to that library? What must be linked to the library -- the postgres executable or something in perl?] I expect many users will have a stock binary OSX distribution, yet want to add postgres perl support.
On Sun Jan 06 23:43:28 2008, bryce1@obviously.com wrote: Show quoted text
> For those who might find this bug report with a google search --- > exactly how does one link to that library? What must be linked to the > library -- the postgres executable or something in perl?] > > I expect many users will have a stock binary OSX distribution, yet want > to add postgres perl support.
It is linked in automatically by setting the correct environment variables before calling perl Makefile.PL, and by setting the -lpq flag. You will need to have the libpq development libraries installed, but this should be a standard part of most Postgres distributions. Not sure how OSX handles things: on other platforms, you sometimes need to manually install the "postgresql-devel" package.
Closing. We've also got some more tests in Makefile.PL now that should catch library problems earlier and offer some less confusing (and less verbose) output.