Max
Max

Reputation: 725

ODBM_File.xs: too few arguments to function ‘dbmclose’ while building perl

I have been attempting to install Perl 5-22.0 locally on a server (on SUSE Linux x86_64). I was able to run .configure on the source code, but following the make command, I obtained the following error:

CE=2 -Wall -Werror=declaration-after-statement -Wextra -Wc++-compat -Wwrite-strings -O2   -DVERSION=\"1.12\" -DXS_VERSION=\"1.12\" -fPIC "-I../.."   ODBM_File.c
ODBM_File.xs: In function ‘XS_ODBM_File_DESTROY’:
ODBM_File.xs:128: error: too few arguments to function ‘dbmclose’
make[1]: *** [ODBM_File.o] Error 1
make[1]: Leaving directory `/home1/02568/mshpak/perl/perl-5.22.0/ext/ODBM_File'
make[1]: Entering directory `/home1/02568/mshpak/perl/perl-5.22.0/ext/ODBM_File'
cc -c   -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -Wall -Werror=declaration-after-statement -Wextra -Wc++-compat -Wwrite-strings -O2   -DVERSION=\"1.12\" -DXS_VERSION=\"1.12\" -fPIC "-I../.."   ODBM_File.c
ODBM_File.xs: In function ‘XS_ODBM_File_DESTROY’:
ODBM_File.xs:128: error: too few arguments to function ‘dbmclose’
make[1]: *** [ODBM_File.o] Error 1
make[1]: Leaving directory `/home1/02568/mshpak/perl/perl-5.22.0/ext/ODBM_File'
Unsuccessful make(ext/ODBM_File): code=512 at make_ext.pl line 574.
make: *** [lib/auto/ODBM_File/ODBM_File.so] Error 25

What is error code 512, and is there a straightforward way to correct this (presumably something related to the ODBM_File directory's contents)?

Thank you

Upvotes: 0

Views: 625

Answers (1)

ThisSuitIsBlackNot
ThisSuitIsBlackNot

Reputation: 24073

This is a known issue on SUSE Linux:

error: too few arguments to function 'dbmclose'

Building ODBM_File on some (Open)SUSE distributions might run into this error, as the header file is broken. There are two ways to deal with this

  1. Disable the use of ODBM_FILE

    Configure ... -Dnoextensions=ODBM_File
    
  2. Fix the header file, somewhat like this:

    --- a/usr/include/dbm.h  2010-03-24 08:54:59.000000000 +0100
    +++ b/usr/include/dbm.h  2010-03-24 08:55:15.000000000 +0100
    @@ -59,4 +59,4 @@ extern datum  firstkey __P((void));
    
    extern datum   nextkey __P((datum key));
    
    -extern int     dbmclose __P((DBM *));
    +extern int     dbmclose __P((void));
    

Upvotes: 2

Related Questions