Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Installing DB_File on Windows

by Gangabass (Vicar)
on Oct 05, 2009 at 05:09 UTC ( [id://799162]=perlquestion: print w/replies, xml ) Need Help??

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

I have problem installing DB_File on my Windows box (Windows 7, ActiveState perl version 5.10).

This thread on ActiveState site tell me that: <quote>build of DB_File on all platforms except 5.10 for Linux-64 bit is blocked</quote>.

I have downloaded and installed Berkeley DB from Oracle site (db-4.8.24.msi). And after that i have tried to install DB_File from CPAN. Here is result:

Microsoft Windows [Version 6.1.7600] (c) C:\Users\roman.2GIS>perl -MCPAN -e "shell" Set up gcc environment - 3.4.5 (mingw-vista special r3) cpan shell -- CPAN exploration and modules installation (v1.9402) Enter 'h' for help. cpan> install DB_File Fetching with LWP: http://ppm.activestate.com/CPAN/authors/01mailrc.txt.gz Going to read 'C:\Perl\cpan\sources\authors\01mailrc.txt.gz' ...................................................................... +......DONE Fetching with LWP: http://ppm.activestate.com/CPAN/modules/02packages.details.txt.gz Going to read 'C:\Perl\cpan\sources\modules\02packages.details.txt.gz' Database was generated on Sat, 03 Oct 2009 08:27:42 GMT ...................................................................... +......DONE Fetching with LWP: http://ppm.activestate.com/CPAN/modules/03modlist.data.gz Going to read 'C:\Perl\cpan\sources\modules\03modlist.data.gz' ...................................................................... +......DONE Going to write C:\Perl\cpan\Metadata Running install for module 'DB_File' Running make for P/PM/PMQS/DB_File-1.820.tar.gz Fetching with LWP: http://ppm.activestate.com/CPAN/authors/id/P/PM/PMQS/DB_File-1.820.t +ar.gz Fetching with LWP: http://ppm.activestate.com/CPAN/authors/id/P/PM/PMQS/CHECKSUMS Checksum for C:\Perl\cpan\sources\authors\id\P\PM\PMQS\DB_File-1.820.t +ar.gz ok Scanning cache C:\Perl/cpan/build for sizes DONE DB_File-1.820/ DB_File-1.820/MANIFEST DB_File-1.820/Changes DB_File-1.820/DB_File.pm DB_File-1.820/DB_File_BS DB_File-1.820/config.in DB_File-1.820/ppport.h DB_File-1.820/DB_File.xs DB_File-1.820/t/ DB_File-1.820/t/db-recno.t DB_File-1.820/t/pod.t DB_File-1.820/t/db-hash.t DB_File-1.820/t/db-btree.t DB_File-1.820/version.c DB_File-1.820/fallback.h DB_File-1.820/fallback.xs DB_File-1.820/README DB_File-1.820/dbinfo DB_File-1.820/patches/ DB_File-1.820/patches/5.004 DB_File-1.820/patches/5.005_01 DB_File-1.820/patches/5.6.0 DB_File-1.820/patches/5.005_03 DB_File-1.820/patches/5.004_05 DB_File-1.820/patches/5.004_04 DB_File-1.820/patches/5.004_01 DB_File-1.820/patches/5.004_03 DB_File-1.820/patches/5.005 DB_File-1.820/patches/5.004_02 DB_File-1.820/patches/5.005_02 DB_File-1.820/META.yml DB_File-1.820/typemap DB_File-1.820/hints/ DB_File-1.820/hints/sco.pl DB_File-1.820/hints/dynixptx.pl DB_File-1.820/Makefile.PL CPAN.pm: Going to build P/PM/PMQS/DB_File-1.820.tar.gz Set up gcc environment - 3.4.5 (mingw-vista special r3) Parsing config.in... Looks Good. Checking if your kit is complete... Looks good Note (probably harmless): No library found for -ldb Writing Makefile for DB_File cp DB_File.pm blib\lib\DB_File.pm AutoSplitting blib\lib\DB_File.pm (blib\lib\auto\DB_File) C:/Perl/site/bin/gcc.exe -c -I/usr/local/BerkeleyDB/include -DNDEB +UG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPRIVLI +B_LAST_IN_ INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MS +VCRT_READF IX -DHASATTRIBUTE -fno-strict-aliasing -mms-bitfields -O2 -DVE +RSION=\"1. 820\" -DXS_VERSION=\"1.82\" "-IC:\Perl\lib\CORE" -D_NOT_CORE -DmD +B_Prefix_t =size_t -DmDB_Hash_t=u_int32_t version.c version.c:30:16: db.h: No such file or directory dmake.exe: Error code 129, while making 'version.o' PMQS/DB_File-1.820.tar.gz C:\Perl\site\bin\dmake.exe -- NOT OK Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible Failed during this command: PMQS/DB_File-1.820.tar.gz : make NO cpan>

I'm sure the problem is on this line: Note (probably harmless): No library found for -ldb. But how i can resolve this issue?

Replies are listed 'Best First'.
Re: Installing DB_File on Windows
by Anonymous Monk on Oct 05, 2009 at 07:31 UTC

      I think you're right but i can't find libdb.a file on my system. db.h header file is there but i have full install of Berkeley DB and check whole disk for libdb.a with no result.

        I think you're right but i can't find libdb.a file on my system

        It's quite possible that the import lib that shipped with the msi package that you installed had a different name - eg is there a 'db.lib' ? If you can identify the import lib (irrespective of the name it has), then simply create a copy of it called 'libdb.a' in a location where it will be found, and MinGW should have no trouble linking to it.

        Once that warning about Note (probably harmless): No library found for -ldb goes away, you're a chance to succeed.

        Cheers,
        Rob
        Where did you install it?

        What I did last time was download zip version, unzip, start msys and

        cd db-4.7.25/build_unix sh ../dist/configure make
        Then switch back to cmd.exe
        cd ../perl/DB_File perl -pi.orig -e "s!^(INCLUDE|LIB)\s.*!$1\t= ../../build_unix/!" confi +g.in perl Makefile.PL dmake test dmake install
Re: Installing DB_File on Windows
by Anonymous Monk on Oct 13, 2009 at 06:52 UTC
    Set the Berkeley DB lib and inc path appropriately in config.in
Re: Installing DB_File on Windows
by Anonymous Monk on Jan 19, 2010 at 10:36 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-03-19 04:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found