Search code examples
perlmongodbcygwincpan

Unable to install MongoDB perl


I've got a new Win7-64bit box at work, replacing an old XP-32bit box. In both cases I am using Cygwin perl. Despite having previously installed and used perl MongoDB module on the old box, I haven't yet been able to install it with cpan on the new box. I have successfully installed other modules (e.g. YAML) on the new box, but MongoDB is failing on one of its prerequisites Config::AutoConf which fails with:

Looks like you failed 12 tests of 28.

Is there a known problem with Config::AutoConf on 64-bit? Any suggestions on how to proceed?

# Found AWK as /usr/bin/gawk
# Found SED as /usr/bin/sed
# Found EGREP as /usr/bin/egrep
t/01.checkprog.t .. ok
t/02.compile.t .... 4/?
#   Failed test 'PERL_VERSION_STRING declared'
#   at t/02.compile.t line 40.
t/02.compile.t .... 8/?
#   Failed test 'PERL_API_* declared'
#   at t/02.compile.t line 43.
t/02.compile.t .... 9/?
#   Failed test 'perl_parse() declared'
#   at t/02.compile.t line 48.

#   Failed test 'I32 is valid type'
#   at t/02.compile.t line 53.
t/02.compile.t .... 11/?
#   Failed test '[SAH]V * are valid types'
#   at t/02.compile.t line 56.
t/02.compile.t .... 12/?
#   Failed test 'I32 has size of n/a bytes'
#   at t/02.compile.t line 61.
t/02.compile.t .... 13/?
#   Failed test 'Could determined sizes for I32, SV *, AV, HV *, SV.sv_refcnt'
#   at t/02.compile.t line 63.
t/02.compile.t .... 14/?
#   Failed test 'have struct av.sv_any member'
#   at t/02.compile.t line 70.
t/02.compile.t .... 16/?
#   Failed test 'have struct hv.sv_any and struct STRUCT_SV.sv_any members'
#   at t/02.compile.t line 73.
t/02.compile.t .... 17/?
#   Failed test 'Align of I32'
#   at t/02.compile.t line 78.
t/02.compile.t .... 18/?
#   Failed test 'Align of SV.sv_refcnt'
#   at t/02.compile.t line 80.
t/02.compile.t .... 19/?
#   Failed test 'Could determined sizes for I32, U32, AV, HV *, SV.sv_refcnt'
#   at t/02.compile.t line 82.
# Looks like you failed 12 tests of 28.

Solution

  • Config::AutoConf requires a number of prerequisite compiler toolchain, libraries, and header files to function correctly. On Cygwin, installing the gcc and g++ packages should get you everything you need.