in reply to Re: Static linking of DB_File
in thread Static linking of DB_File

I tried above commands. But I am encountering few errors

cd GDBM_File perl Makefile.PL make perl
gcc -c -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"1.14\" -DXS_VERSION=\"1.14\" "-I../.." GDBM_File.c GDBM_File.xs:7:18: error: gdbm.h: No such file or directory GDBM_File.xs:16: error: expected specifier-qualifier-list before \u2018GDBM_FILE\u2019 GDBM_File.xs:22: error: expected \u2018=\u2019, \u2018,\u2019, \u2018;\u2019, \u2018asm\u2019 or \u2018__attribute__\u2019 before \u2018datum_key\u2019 GDBM_File.xs:23: error: expected \u2018=\u2019, \u2018,\u2019, \u2018;\u2019, \u2018asm\u2019 or \u2018__attribute__\u2019 before \u2018datum_value\u2019 GDBM_File.xs:24: error: expected \u2018=\u2019, \u2018,\u2019, \u2018;\u2019, \u2018asm\u2019 or \u2018__attribute__\u2019 before \u2018datum_key_copy\u2019 ./const-xs.inc: In function \u2018XS_GDBM_File_AUTOLOAD\u2019: ./const-xs.inc:137: warning: format \u2018%d\u2019 expects type \u2018int\u2019, but argument 4 has type \u2018line_t\u2019 ./const-xs.inc:142: warning: format \u2018%d\u2019 expects type \u2018int\u2019, but argument 4 has type \u2018line_t\u2019 GDBM_File.xs: In function \u2018XS_GDBM_File_TIEHASH\u2019:

DB_File, GDBM_File, SDBM_File, ODBM_File and NDBM_File are core perl modules. But I noticed that only SDBM_File being installed. So I am trying to install rest of the modules manually. Any help is really appreciated

Replies are listed 'Best First'.
Re^3: Static linking of DB_File
by Anonymous Monk on Jun 20, 2011 at 06:30 UTC

    But I am encountering few errors

    Listen to the error message :)

    GDBM_File.xs:7:18: error: gdbm.h: No such file or directory GDBM_File.xs:16

    http://cpansearch.perl.org/src/JESSE/perl-5.14.1/ext/GDBM_File/Makefile.PL

    LIBS => ["-lgdbm", "-ldbm"]

    GDBM_File is the perl interface to libgdbm, which you need to have installed if you wish to install GDBM_File

    DB_File, GDBM_File, SDBM_File, ODBM_File and NDBM_File are core perl modules. But I noticed that only SDBM_File being installed. So I am trying to install rest of the modules manually. Any help is really appreciated

    See AnyDBM_File, it explains, SDBM comes with perl (i'm sure other docs like READMEs explain this also), the rest are provided by the operating-system. You don't need all of them :)