Can't compile XS module on windows

"Rene Novotny" <[email protected]>
Newsgroups gmane.comp.db.postgresql.dbdpg
Message-ID <6006E1F5140A4F5EB955BCBDEBD68128@kukinek1>
Dear dbd-pg staff

Is there some standard way how to compile this module: DBD-Pg-2.8.5 or so  with Postgres 8.3 installed on Windows XP service pack 3
with standard ActiveState perl 5.8.8 installation and Microsoft Visual C ++ 6.0 compiler ?

In ActiveState repository , there's no precompiled version ( for versions 2 and higher )
and i am not able to compile your Pg module ( from version 2.5 up to 2.8.5 ) at all .
Other XS modules get fairly well compiled with ActiveState and Visual c ++ but that one doesn't succede to compile for more than half a year of your latest versions
of DBD-Pg , yet this module should be very welcome and better than DBD-ODBC i am using.

Your hints to compile Postgres and perl from source is not a good idea here since we have to use standard distributions of database and ActiveState perl compiler.

Although your Make file reports "looks good ..." , your source crashes to compile.

Report:


Microsoft Windows XP [Verze 5.1.2600]

C:\TMP\DBD-Pg-2.8.5>set POSTGRES_LIB=C:\Program Files\PostgreSQL\8.3\lib

C:\TMP\DBD-Pg-2.8.5>set POSTGRES_INCLUDE=C:\Program Files\PostgreSQL\8.3\include

C:\TMP\DBD-Pg-2.8.5>perl Makefile.PL
Configuring DBD::Pg 2.8.5
PostgreSQL version: 80300 (default port: 5432)
POSTGRES_HOME: (not set)
POSTGRES_INCLUDE: C:\Program Files\PostgreSQL\8.3\include
POSTGRES_LIB: C:\Program Files\PostgreSQL\8.3\lib
OS: MSWin32
Checking if your kit is complete...
Looks good
Could not eval '
            package ExtUtils::MakeMaker::_version;
            no strict;

            local $VERSION;
            $VERSION=undef; do {
                        use version; our $VERSION = qv('2.8.5');
            }; $VERSION
        ' in Pg.pm: Undefined subroutine &ExtUtils::MakeMaker::_version::qv called at (eval 11) line
 7, <FH> line 20.
WARNING: Setting VERSION via file 'Pg.pm' failed
 at C:/Perl/lib/ExtUtils/MakeMaker.pm line 501
Using DBI 1.58 (for perl 5.008008 on MSWin32-x86-multi-thread) installed in C:/Perl/lib/auto/DBI/
Writing Makefile for DBD::Pg

C:\TMP\DBD-Pg-2.8.5>nmake

Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

cp lib/Bundle/DBD/Pg.pm blib\lib\Bundle\DBD\Pg.pm
cp Pg.pm blib\lib\DBD\Pg.pm
        C:\Perl\bin\perl.exe -p -e "s/~DRIVER~/Pg/g; s/^do\(/dontdo\(/" C:\Perl\lib\auto\DBI\Driver.
xst > Pg.xsi
        C:\Perl\bin\perl.exe C:\Perl\lib\ExtUtils\xsubpp  -typemap C:\Perl\lib\ExtUtils\typemap  Pg.
xs > Pg.xsc && C:\Perl\bin\perl.exe -MExtUtils::Command -e mv Pg.xsc Pg.c
        cl -c  -I"C:\Program Files\PostgreSQL\8.3\include" -IC:\Perl\lib\auto\DBI  -nologo -GF -W3 -
MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DUSE_SITECUSTOM
IZE -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_REA
DFIX -DPGLIBVERSION=80300 -DPGDEFPORT=5432 -MD -Zi -DNDEBUG -O1    -DVERSION=\"undef\"  -DXS_VERSION
=\"undef\"  "-IC:\Perl\lib\CORE"   Pg.c
Pg.c
        cl -c  -I"C:\Program Files\PostgreSQL\8.3\include" -IC:\Perl\lib\auto\DBI  -nologo -GF -W3 -
MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DUSE_SITECUSTOM
IZE -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_REA
DFIX -DPGLIBVERSION=80300 -DPGDEFPORT=5432 -MD -Zi -DNDEBUG -O1    -DVERSION=\"undef\"  -DXS_VERSION
=\"undef\"  "-IC:\Perl\lib\CORE"   dbdimp.c
dbdimp.c
dbdimp.c(295) : error C2275: 'imp_dbh_t' : illegal use of this type as an expression
        C:\Perl\lib\auto\DBI\DBIXS.h(75) : see declaration of 'imp_dbh_t'
dbdimp.c(295) : error C2065: 'imp_dbh' : undeclared identifier
dbdimp.c(299) : error C2223: left of '->com' must point to struct/union
dbdimp.c(300) : error C2223: left of '->com' must point to struct/union
dbdimp.c(302) : error C2223: left of '->com' must point to struct/union
dbdimp.c(302) : error C2223: left of '->com' must point to struct/union
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.

C:\TMP\DBD-Pg-2.8.5>


Could you please look at this and tell me if it is possible to compile your module ?


Thanks in advance
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.