Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Install CPAN BerkeleyDB module on Windows 7 (64 bit)

by Anonymous Monk
on Apr 05, 2012 at 14:12 UTC ( #963680=perlquestion: print w/replies, xml ) Need Help??

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

I have been trying to install the BerkeleyDB CPAN module on my Windows 7 (x86_64) PC without any luck (BerkeleyDB::Hash is what I need). I have 64 bit ActivePerl and Oracle Berkeley DB 11gR2 5.3.15 installed. First I tried installing using the command :

cpan install BerkeleyDB

This came back with the error:

It looks like the installation of dmake and MinGW has failed. You wil +l not be able to run Makefile commands or compile C extension code. Please che +ck your internet connection and your proxy settings!
So I installed Microsoft Windows SDK for Windows 7 and .NET Framework 4. Then I installed cpanm cpan App::cpanminus And when I tried running:
cpanm BerkeleyDB<code> I got the error: <code>Note (probably harmless): No library found for -llibdb Note (probably harmless): No library found for bufferoverflowU.lib
So I edited the config.in file and changed the lib and include paths to:
INCLUDE = C:\PROGRA~2\Oracle\BERKEL~1.15\include LIB = C:\PROGRA~2\Oracle\BERKEL~1.15\lib
Now when I ran perl makefile.pl, the warning about -llibdb went away. When I tried running: nmake I got errors:
Creating library blib\arch\auto\BerkeleyDB\BerkeleyDB.lib and object b +lib\arc h\auto\BerkeleyDB\BerkeleyDB.exp BerkeleyDB.obj : error LNK2001: unresolved external symbol __heap_exis +t BerkeleyDB.obj : error LNK2001: unresolved external symbol db_version BerkeleyDB.obj : error LNK2001: unresolved external symbol db_strerror BerkeleyDB.obj : error LNK2001: unresolved external symbol db_env_crea +te BerkeleyDB.obj : error LNK2001: unresolved external symbol db_create BerkeleyDB.obj : error LNK2001: unresolved external symbol db_sequence +_create blib\arch\auto\BerkeleyDB\BerkeleyDB.dll : fatal error LNK1120: 6 unre +solved ext ernals NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual S +tudio 10.0 \VC\Bin\amd64\link.EXE"' : return code '0x460' Stop.
I've nearly lost all hope of ever building this module successfully on my PC. Has anyone been lucky with this? Many thanks, SN

Replies are listed 'Best First'.
Re: Install CPAN BerkeleyDB module on Windows 7 (64 bit)
by Corion (Pope) on Apr 05, 2012 at 14:15 UTC

    What does the "Microsoft Windows SDK for Windows 7 and .NET Framework 4" have to do with " dmake and MinGW" ?

    You will have to install dmake and the MinGW C compiler, for example by downloading Strawberry Perl or installing them via ppm (which seems to have failed already in your case). Installing the Windows SDK won't help in that case.

      From what I understand, there is no MinGW C compiler for 64 bit Windows (at least on ActiveState PPM), which is why I downloaded the SDK. The compiler that came with the SDK seems to be fine.
Re: Install CPAN BerkeleyDB module on Windows 7 (64 bit)
by mbethke (Hermit) on Apr 05, 2012 at 14:30 UTC
    Sounds like some kind of version problem. Here's from BerkeleyDB.xs:
    int has_heap() CODE: #ifdef AT_LEAST_DB_5_2 RETVAL = __heap_exist() ; #else RETVAL = 0 ; #endif
    So __heap_exist() gets called only if AT_LEAST_DB_5_2 is set (presumably because it's not there in older lib versions) and it's set in your compilation where it shouldn't. Maybe the configuration script finds a newer version of the library on your system but then you're linking against the old one?
Re: Install CPAN BerkeleyDB module on Windows 7 (64 bit)
by Anonymous Monk on Apr 06, 2012 at 00:01 UTC

    Did you compile libdb yourself?

      No, I got it with the BerkeleyDB installation.

        No, I got it with the BerkeleyDB installation.

        Which one?

        What do you get when you run  dumpbin /EXPORTS ...libdb.lib , do you get db_version?

        Does  findstr /s /m /i /l db_version C:\PROGRA~2\Oracle\BERKEL~1.15\lib\* list any matches?

        What did you edit in config.in?

Re: Install CPAN BerkeleyDB module on Windows 7 (64 bit)
by flexvault (Monsignor) on Apr 07, 2012 at 11:29 UTC

    Dear Anon Monk,

    Did you get a solution? If not, I may know a way to help.

    "Well done is better than well said." - Benjamin Franklin

      Hi flexvault,

      Unfortunately not yet..Still trying to get it to work..Any help would be greatly appreciated.

      Many thanks,

      SN (sidni)

        I too struggeled, using Win7 x64 and the latest ActiveState Perl, when I tried to install custom PPMs.

        By pure coincidence, noticed some place a link to ActiveState's PPM repository (or links from here to CPAN). Also on this page, quite simple explanation on how to install - what a relief because I never got the "cpan App::cpanminus" to work either.

        Long Story Short; it seems that your BerkelyeDB module is not available for Win (among many OSs) http://code.activestate.com/ppm/BerkeleyDB/

        Good Luck

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://963680]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2021-01-17 00:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?