Grokbase Groups Perl dbd-pg July 2008
FAQ
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

Search Discussions

  • Andrew Dunstan at Jul 21, 2008 at 4:18 pm

    Rene Novotny wrote:
    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.

    See http://pgfoundry.org/frs/?group_id=1000199 for precompiled binaries


    cheers

    andrew
  • Greg Sabino Mullane at Jul 21, 2008 at 9:05 pm
    See http://pgfoundry.org/frs/?group_id=1000199 for precompiled binaries
    Ugh. As much as I hate looking a gift horse in the mouth, that site is a
    mess. Can we remove all but the latest version, and get a newer version
    on it? There's also no indication which version a person should be downloading.

    - --
    Greg Sabino Mullane [email protected]
    End Point Corporation
    PGP Key: 0x14964AC8 200807211705
    http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
  • Greg Sabino Mullane at Jul 21, 2008 at 9:02 pm
    The binaries are a good option, but they are a little out of date.
    ' in Pg.pm: Undefined subroutine &ExtUtils::MakeMaker::_version::qv called at (eval 11) line
    You need to install the "version" module to get past this particular error.
    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
    Note sure what's going on here. One of these days I'll fin the time to break out the
    'ol Windows compiler. Right after I find a Windows box to run it on...

    - --
    Greg Sabino Mullane [email protected]
    PGP Key: 0x14964AC8 200807211701
    http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
  • T.J. Ferraro at Jul 25, 2008 at 4:20 am
    Well, below is the problem that kept me from keeping up with releases.
    Not sure where it came from or why I started getting it. I thought maybe
    because postgres on windows was now setup to be compiled specifically
    with VS2005 and I was using VS2003 that that was the problem. So, I
    finally got ahold of 05, and well, I'm still getting the problem. I
    tried passing ENABLE_SSPI=1 to the nmake command when compiling postgres since a few of the errors seemed related to SSPI
    but it didn't seem to change anything. I assume that, even though
    postgres compiles fine, that this is a postgres issue and not a DBD-Pg
    issue? Should I send a message off to pgsql-bugs? If I can fix this
    long standing problem I've had I'm sure I can keep up with your two week release cycle Greg ;)



    libpq.lib(fe-connect.obj) : error LNK2019: unresolved external symbol __[email protected] referenced in function _closePGconn

    libpq.lib(fe-connect.obj) : error LNK2019: unresolved external symbol
    __[email protected] referenced in function _closePGconn

    libpq.lib(fe-auth.obj) : error LNK2019: unresolved external symbol
    [email protected] referenced in function _pg_SSPI_continue

    libpq.lib(fe-auth.obj) : error LNK2019: unresolved external symbol
    _Initia[email protected] referenced in function _pg_SSPI_continue

    libpq.lib(fe-auth.obj) : error LNK2019: unresolved external symbol
    _Acqu[email protected] referenced in function _pg_SSPI_startup

    blib\arch\auto\DBD\Pg\Pg.dll : fatal error LNK1120: 5 unresolved externals

    NMAKE : fatal error U1077: 'C:\VS8\VC\BIN\link.EXE' : return code '0x460'

    Stop.



    T.J.





    Greg Sabino Mullane wrote:

    -----BEGIN PGP SIGNED MESSAGE-----

    Hash: RIPEMD160






    See http://pgfoundry.org/frs/?group_id=1000199 for precompiled binaries




    Ugh. As much as I hate looking a gift horse in the mouth, that site is a

    mess. Can we remove all but the latest version, and get a newer version

    on it? There's also no indication which version a person should be downloading.



    - --

    Greg Sabino Mullane [email protected]

    End Point Corporation

    PGP Key: 0x14964AC8 200807211705

    http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
  • Greg Sabino Mullane at Jul 25, 2008 at 1:26 pm

    Not sure where it came from or why I started getting it. I thought maybe ...
    Should I send a message off to pgsql-bugs? If I can fix this
    long standing problem I've had I'm sure I can keep up with your
    two week release cycle Greg ;)
    Well you got further than I did. :) I actually tried a fresh Windows
    install of Perl and Postgres, but could not compile as the Postgres
    INCLUDE directory seemed to be missing.
    libpq.lib(fe-connect.obj) : error LNK2019: unresolved external symbol
    __[email protected] referenced in function _closePGconn
    Google seems to suggest this is due to a missing secur32.dll or
    not including Security.h. But I'm not a Windows programmer, so
    email to -hackers (probably not -bugs) is probably a good idea.

    - --
    Greg Sabino Mullane [email protected]
    PGP Key: 0x14964AC8 200807250924
    http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
  • T.J. Ferraro at Jul 28, 2008 at 3:32 am
    Bingo, adding -lsecur32 to the libs directive in Makefile.PL fixes the problem.



    Anyways, managed to get 2.8.7 compiled and up. Also, got the easy urls working, too.



    So, to install, choose one of:



    ppm install http://dbdpgppm.projects.postgresql.org/DBD-Pg-5.10.ppd

    ppm install http://dbdpgppm.projects.postgresql.org/DBD-Pg-5.10s.ppd



    ppm install http://dbdpgppm.projects.postgresql.org/DBD-Pg-5.8.ppd

    ppm install http://dbdpgppm.projects.postgresql.org/DBD-Pg-5.8s.ppd



    ppm install http://dbdpgppm.projects.postgresql.org/DBD-Pg-5.6.ppd

    ppm install http://dbdpgppm.projects.postgresql.org/DBD-Pg-5.6s.ppd



    Also, the following files may be needed:

    http://dbdpgppm.projects.postgresql.org/msvcr80.zip

    http://dbdpgppm.projects.postgresql.org/openssl.zip




    T.J.



    Greg Sabino Mullane wrote:

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: RIPEMD160



    Not sure where it came from or why I started getting it. I thought maybe

    ...

    Should I send a message off to pgsql-bugs? If I can fix this
    long standing problem I've had I'm sure I can keep up with your
    two week release cycle Greg ;)


    Well you got further than I did. :) I actually tried a fresh Windows
    install of Perl and Postgres, but could not compile as the Postgres
    INCLUDE directory seemed to be missing.


    libpq.lib(fe-connect.obj) : error LNK2019: unresolved external symbol
    __[email protected] referenced in function _closePGconn


    Google seems to suggest this is due to a missing secur32.dll or
    not including Security.h. But I'm not a Windows programmer, so
    email to -hackers (probably not -bugs) is probably a good idea.

    - --
    Greg Sabino Mullane [email protected]
    PGP Key: 0x14964AC8 200807250924
    http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
  • Greg Sabino Mullane at Jul 28, 2008 at 6:36 pm

    Bingo, adding -lsecur32 to the libs directive in Makefile.PL
    fixes the problem.
    Great. Is that something we should commit to that file? If so, just
    let me know exactly what and where.
    Excellent, thanks, I'll try to find a Windows box to try them out. I see the
    version name is now in the file name, +1. Maybe we could make the name
    a little longer and indicate that the second half is the Perl version?

    DBD-Pg-2.8.7-Perl5.10.ppd

    And perhaps label things better so that it's clear that it's ordered by
    Perl version on the page? I realize we might have to fight against the
    limitations of pgfoundry.org on some of that. If so, let me know, I've got
    access to that code as well. :)

    Thanks for your work on this, it is greatly appreciated. We should think
    about getting this into the ActiveState and stackbuilder repos as well.

    - --
    Greg Sabino Mullane [email protected]
    End Point Corporation
    PGP Key: 0x14964AC8 200807281435
    http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
  • T.J. Ferraro at Jul 29, 2008 at 3:46 am
    Greg Sabino Mullane wrote:

    Bingo, adding -lsecur32 to the libs directive in Makefile.PL
    fixes the problem.


    Great. Is that something we should commit to that file? If so, just
    let me know exactly what and where.



    Sure, looks like you've already got a mechanism setup for appending to the LIBS key in the opts hash based on OS.



    Changing

    $opts{LIBS}[0] .= " -L$msdir";

    to

    $opts{LIBS}[0] .= " -L$msdir -lsecur32";



    Should do the trick.





    Anyways, managed to get 2.8.7 compiled and up. Also, got the easy
    urls working, too.



    So, to install, choose one of:
    ppm install http://dbdpgppm.projects.postgresql.org/DBD-Pg-5.10.ppd
    ppm install http://dbdpgppm.projects.postgresql.org/DBD-Pg-5.10s.ppd
    ppm install http://dbdpgppm.projects.postgresql.org/DBD-Pg-5.8.ppd
    ppm install http://dbdpgppm.projects.postgresql.org/DBD-Pg-5.8s.ppd
    ppm install http://dbdpgppm.projects.postgresql.org/DBD-Pg-5.6.ppd
    ppm install http://dbdpgppm.projects.postgresql.org/DBD-Pg-5.6s.ppd

    Also, the following files may be needed:
    http://dbdpgppm.projects.postgresql.org/msvcr80.zip
    http://dbdpgppm.projects.postgresql.org/openssl.zip


    Excellent, thanks, I'll try to find a Windows box to try them out. I see the
    version name is now in the file name, +1. Maybe we could make the name
    a little longer and indicate that the second half is the Perl version?

    DBD-Pg-2.8.7-Perl5.10.ppd


    I'll make the change for 2.8.8 onward. :)



    And perhaps label things better so that it's clear that it's ordered by
    Perl version on the page? I realize we might have to fight against the
    limitations of pgfoundry.org on some of that. If so, let me know, I've got
    access to that code as well. :)


    It seems to organize it based on upload order. I'll be sure to upload everything related to 5.6 first, 5.8 second, 5.10 third :)





    Thanks for your work on this, it is greatly appreciated. We should think
    about getting this into the ActiveState and stackbuilder repos as well

    If you know an easy way to get that done let me know :)



    T.J.
  • Greg Sabino Mullane at Jul 29, 2008 at 11:31 am

    $opts{LIBS}[0] .= " -L$msdir -lsecur32";
    Done, thanks.
    I'll make the change for 2.8.8 onward. :)
    Great, won't be long (2.9.0 actually, due to the new {ReadOnly} functionality.
    By the way, I really like Andrew's rollback everything idea too, I
    wonder if we can work that in there as well....)
    Thanks for your work on this, it is greatly appreciated. We should think
    about getting this into the ActiveState and stackbuilder repos as well
    If you know an easy way to get that done let me know :)

    I've not idea how the process for ActiveState works, but Stack Builder
    is Magnus and Dave. I'll mention it to them next time I bump into
    them.

    - --
    Greg Sabino Mullane [email protected]
    PGP Key: 0x14964AC8 200807290730
    http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdbd-pg @
categoriesperl
postedJul 21, '08 at 11:17a
activeJul 29, '08 at 11:31a
posts10
users4
websiteperl.org

People

Translate

site design / logo © 2023 Grokbase