Thread:
I've successfully installed Postgresql in Cygwin, but am having trouble installing the DBD::Pg module for Perl and am getting the following message:
$make
gcc -c -I/include -I/usr/lib/perl5/site_perl/5.6.1/cygwin-multi/auto/DBI -DPERL_
USE_SAFE_PUTENV -fno-strict-aliasing -I/usr/local/include -DUSEIMPORTLIB -O2 -
DVERSION=\"1.01\" -DXS_VERSION=\"1.01\" -I/usr/lib/perl5/5.6.1/cygwin-multi/COR
E Pg.c
In file included from Pg.xs:13:
Pg.h:17: libpq-fe.h: No such file or directory
In file included from /usr/lib/perl5/5.6.1/cygwin-multi/CORE/perlsdio.h:5,
from /usr/lib/perl5/5.6.1/cygwin-multi/CORE/iperlsys.h:300,
from /usr/lib/perl5/5.6.1/cygwin-multi/CORE/perl.h:1947,
from /usr/lib/perl5/site_perl/5.6.1/cygwin-multi/auto/DBI/DBIXS
.h:19,
from Pg.h:39,
from Pg.xs:13:
/usr/include/stdio.h:95: warning: `BUFSIZ' redefined
Pg.h:34: warning: this is the location of the previous definition
make: *** [Pg.o] Error 1
USE_SAFE_PUTENV -fno-strict-aliasing -I/usr/local/include -DUSEIMPORTLIB -O2 -
DVERSION=\"1.01\" -DXS_VERSION=\"1.01\" -I/usr/lib/perl5/5.6.1/cygwin-multi/COR
E Pg.c
In file included from Pg.xs:13:
Pg.h:17: libpq-fe.h: No such file or directory
In file included from /usr/lib/perl5/5.6.1/cygwin-multi/CORE/perlsdio.h:5,
from /usr/lib/perl5/5.6.1/cygwin-multi/CORE/iperlsys.h:300,
from /usr/lib/perl5/5.6.1/cygwin-multi/CORE/perl.h:1947,
from /usr/lib/perl5/site_perl/5.6.1/cygwin-multi/auto/DBI/DBIXS
.h:19,
from Pg.h:39,
from Pg.xs:13:
/usr/include/stdio.h:95: warning: `BUFSIZ' redefined
Pg.h:34: warning: this is the location of the previous definition
make: *** [Pg.o] Error 1
Any help would be appreciated!
--Greg
Hallo Gregory, Am 2001-12-31 um 04:53 schriebst du: > I posted a message about this on the mailing list. > Do you remember what values you used for > POSTGRES_INCUDE and POSTGRES_LIB? I'm not even able to get > make to do the install.. $ set | grep POSTGRES_INCLUDE POSTGRES_INCLUDE=/usr/include/postgresql $ set | grep POSTGRES_LIB POSTGRES_LIB=/usr/lib I wonder why it is neccessary to set these environment variables, but it seems to not working without it. Since it is the default installation location if I build postgresql with --prefix=/usr it really shouldn't be needed. > I'm getting this error > ------------------------------------ > $ make > gcc -c -I/include -I/usr/lib/perl5/site_perl/5.6.1/cygwin-multi/auto/DBI -DPERL_ > USE_SAFE_PUTENV -fno-strict-aliasing -I/usr/local/include -DUSEIMPORTLIB -O2 - > DVERSION=\"1.01\" -DXS_VERSION=\"1.01\" -I/usr/lib/perl5/5.6.1/cygwin-multi/COR > E Pg.c > In file included from Pg.xs:13: > Pg.h:17: libpq-fe.h: No such file or directory > In file included from /usr/lib/perl5/5.6.1/cygwin-multi/CORE/perlsdio.h:5, > from /usr/lib/perl5/5.6.1/cygwin-multi/CORE/iperlsys.h:300, > from /usr/lib/perl5/5.6.1/cygwin-multi/CORE/perl.h:1947, > from /usr/lib/perl5/site_perl/5.6.1/cygwin-multi/auto/DBI/DBIXS > .h:19, > from Pg.h:39, > from Pg.xs:13: > /usr/include/stdio.h:95: warning: `BUFSIZ' redefined > Pg.h:34: warning: this is the location of the previous definition > make: *** [Pg.o] Error 1 > --------------------------------------------------- I'm getting no such errors here. I guess after including the correct headers it should work for you too. I got some problems during `make test' see also: http://testers.cpan.org/search?request=dist&dist=DBD-Pg&macid=130 Probably a permission problem which is fixed here (I have two boxes with Cygwin in use, it is weird, sometimes building a module here fails and there succeeeds, sometimes it is the opposite, but most modules work well on both boxes). Maybe it makes a difference which version on PG you're using, which version of Cygwin is installed... My buildlogs: $ perl Makefile.PL Configuring Pg Remember to actually read the README file ! OS: cygwin Using DBI 1.20 installed in /usr/lib/perl5/site_perl/5.6.1/cygwin-multi/auto/DBI Checking if your kit is complete... Looks good Writing Makefile for DBD::Pg $ make 2>&1 | tee log.make cp Pg.pm blib/lib/DBD/Pg.pm cp dbd-pg.pod blib/lib/DBD/dbd-pg.pod /bin/perl -I/usr/lib/perl5/5.6.1/cygwin-multi -I/usr/lib/perl5/5.6.1 /usr/lib/perl5/5.6.1/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.6.1/ExtUtils/typemapPg.xs > Pg.xsc && mv Pg.xsc Pg.c gcc -c -I/usr/include/postgresql -I/usr/lib/perl5/site_perl/5.6.1/cygwin-multi/auto/DBI -DPERL_USE_SAFE_PUTENV -fno-strict-aliasing-I/usr/local/include -DUSEIMPORTLIB -O2 -DVERSION=\"1.01\" -DXS_VERSION=\"1.01\" -I/usr/lib/perl5/5.6.1/cygwin-multi/CORE Pg.c gcc -c -I/usr/include/postgresql -I/usr/lib/perl5/site_perl/5.6.1/cygwin-multi/auto/DBI -DPERL_USE_SAFE_PUTENV -fno-strict-aliasing-I/usr/local/include -DUSEIMPORTLIB -O2 -DVERSION=\"1.01\" -DXS_VERSION=\"1.01\" -I/usr/lib/perl5/5.6.1/cygwin-multi/CORE dbdimp.c Running Mkbootstrap for DBD::Pg () chmod 644 Pg.bs rm -f blib/arch/auto/DBD/Pg/Pg.dll LD_RUN_PATH="/usr/lib" ld2 -s -L/usr/local/lib Pg.o dbdimp.o -o blib/arch/auto/DBD/Pg/Pg.dll /usr/lib/perl5/5.6.1/cygwin-multi/CORE/libperl5_6_1.a-L/usr/lib -lpq dllwrap --dllname Pg.dll --driver-name gcc --dlltool dlltool --export-all-symbols --as as --output-def libPg.def --output-liblibPg.a \ -s -L/usr/local/lib Pg.o dbdimp.o /usr/lib/perl5/5.6.1/cygwin-multi/CORE/libperl5_6_1.a -L/usr/lib -lpq dllwrap: no export definition file provided dllwrap: creating one, but that may not be what you want mv Pg.dll libPg.a blib/arch/auto/DBD/Pg/ chmod 755 blib/arch/auto/DBD/Pg/Pg.dll cp Pg.bs blib/arch/auto/DBD/Pg/Pg.bs chmod 644 blib/arch/auto/DBD/Pg/Pg.bs Manifying blib/man3/DBD.Pg.3 Manifying blib/man3/DBD.dbd-pg.3 $ make test PERL_DL_NONLAZY=1 /bin/perl -Iblib/arch -Iblib/lib -I/usr/lib/perl5/5.6.1/cygwin-multi -I/usr/lib/perl5/5.6.1 test.pl OS: cygwin DBI->data_sources .......... ok DBI->connect ............... ok $dbh->{Name} ............... ok $dbh->ping ................. ok $dbh->do ................... ok $dbh->table_info ........... ok $dbh->tables ............... ok $dbh->pg_table_attributes .. ok $dbh->prepare .............. ok $dbh->execute .............. ok $sth->{pg_oid_status} ...... ok $sth->{pg_cmd_status} ...... ok $sth->finish ............... ok $sth->bind_param ........... ok $sth->fetchrow_array ....... ok $sth->fetchrow_arrayref .... ok $sth->fetchrow_hashref ..... ok $sth->{NAME} ............... ok $sth->{TYPE} ............... ok $sth->{pg_size} ............ ok $sth->{pg_type} ............ ok $sth->bind_columns ......... ok $sth->fetch ................ ok $sth->bind_col ............. ok $sth->fetch ................ ok $sth->{ChopBlanks} ......... ok $sth->rows ................. ok $dbh->func(putline) ........ ok $dbh->func(getline) ........ ok $dbh->func(lo_import) ...... ok $sth->blob_read ............ ok $dbh->func(lo_open) ........ ok $dbh->func(lo_lseek) ....... ok $dbh->func(lo_read) ........ ok $dbh->func(lo_tell) ........ ok $dbh->func(lo_close) ....... ok $dbh->func(lo_unlink) ...... ok compare blobs .............. ok $dbh->disconnect ........... ok test sequencefinished. Gerrit -- =^..^= mailto:gp@familiehaase.de