Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi,I'm trying to compile the BerkeleyDB module (db version 4.1.24) on win2000 with msvc 6.0. I could successfully compile the db. but failed to compile the module. I'm using active perl build 630.
Any one could hilight me on the problem?
Thanks.
The compile error is ============
BerkeleyDB.c BerkeleyDB.xs(1530) : warning C4002: too many actual parameters for ma +cro 'PerlLIO_rename' BerkeleyDB.xs(1530) : error C2059: syntax error : '(' BerkeleyDB.c(1690) : error C2275: 'PerlInterpreter' : illegal use of t +his type as an expression D:\Perl\lib\CORE\perl.h(1499) : see declaration of 'PerlInterp +reter' BerkeleyDB.c(1690) : error C2059: syntax error : ')' BerkeleyDB.c(1691) : error C2275: 'PerlInterpreter' : illegal use of t +his type as an expression D:\Perl\lib\CORE\perl.h(1499) : see declaration of 'PerlInterp +reter' BerkeleyDB.c(1691) : error C2059: syntax error : ')' BerkeleyDB.c(1691) : error C2275: 'PerlInterpreter' : illegal use of t +his type as an expression D:\Perl\lib\CORE\perl.h(1499) : see declaration of 'PerlInterp +reter' BerkeleyDB.c(1691) : error C2059: syntax error : ')' BerkeleyDB.c(1691) : error C2275: 'PerlInterpreter' : illegal use of t +his type as an expression D:\Perl\lib\CORE\perl.h(1499) : see declaration of 'PerlInterp +reter' BerkeleyDB.c(1691) : error C2059: syntax error : ')' BerkeleyDB.c(1694) : fatal error C1013: compiler limit : too many open + parentheses NMAKE : fatal error U1077: 'cl' : return code '0x2' Stop.
==================

Replies are listed 'Best First'.
Re: BerkeleyDB on win32
by tachyon (Chancellor) on Dec 17, 2002 at 08:59 UTC

    It might well be worth contacting the author of the module on this. If you check out the CPAN tester reports it has *never* been tested on Win32, let alone passed. If you read the documentation you will note that there are issues if Berkeley DB is included in the compiled binary of Perl. Although this is no longer the case for vanilla perl it may be an issue with the Active State binary. Active State do not have a PPM which is often a good indication that a module does not compile *easily* at least IMHO. It may be worth trying a different compiler ie gcc and a decent version of make (nmake is typical M$ - vaguely functional) You may well have to compile Perl yourself to as this looks like an issue with the AS distribution to me.

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Re: BerkeleyDB on win32
by Marza (Vicar) on Dec 17, 2002 at 06:26 UTC

    Sounds like you missed a step. Did you check the ref guide?

    Building for Win32

    Other than that; I would contact the author.

      The guide is for the db. I could compile the db without problem. but it's regarding about the perl module compiling.
Re: BerkeleyDB on win32
by PodMaster (Abbot) on Dec 17, 2002 at 21:57 UTC
    I tried building it as well, but I could not do it (similar issues). I have successfully built the version that comes with db-4.0.14, and I have released that on my ppm repository.


    MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
    ** The Third rule of perl club is a statement of fact: pod is sexy.