OpenSuse 11.3 and compiling Perl 5.12.3
I was trying to compile Perl 5.12.3 on OpenSuse 11.3 for catalyst framework environment. However, during compilation of Perl source code, it exited at ODBM_File.xs (below is small snip from the session, not pasting whole compilation…)
----------------------START------------------------->
./miniperl -Ilib make_ext.pl lib/auto/ODBM_File/ODBM_File.so MAKE=make LIBPERL_A=libperl.a LINKTYPE=dynamic
Making ODBM_File (all)
Running Makefile.PL in ext/ODBM_File
../../miniperl Makefile.PL INSTALLDIRS=perl INSTALLMAN1DIR=none INSTALLMAN3DIR=none PERL_CORE=1 LIBPERL_A=libperl.a
LINKTYPE=dynamic
Processing hints file hints/linux.pl
Writing Makefile for ODBM_File
make[1]: Entering directory `/home/catalyst/perl-5.12.3/ext/ODBM_File'
make[1]: Leaving directory `/home/catalyst/perl-5.12.3/ext/ODBM_File'
Making all in ext/ODBM_File
make all PERL_CORE=1 LIBPERL_A=libperl.a LINKTYPE=dynamic
make[1]: Entering directory `/home/catalyst/perl-5.12.3/ext/ODBM_File'
cp ODBM_File.pm ../../lib/ODBM_File.pm
../../miniperl "-I../../lib" "-I../../lib" ../../lib/ExtUtils/xsubpp -noprototypes -typemap
../../lib/ExtUtils/typemap -typemap typemap ODBM_File.xs > ODBM_File.xsc && mv ODBM_File.xsc ODBM_File.c
cc -c -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-O2 -DVERSION=\"1.07\" -DXS_VERSION=\"1.07\" -fPIC "-I../.." ODBM_File.c
ODBM_File.xs: In function ‘XS_ODBM_File_DESTROY’:
ODBM_File.xs:124:2: error: too few arguments to function ‘dbmclose’
/usr/include/dbm.h:62:12: note: declared here
make[1]: *** [ODBM_File.o] Error 1
make[1]: Leaving directory `/home/catalyst/perl-5.12.3/ext/ODBM_File'
Unsuccessful make(ext/ODBM_File): code=512 at make_ext.pl line 449.
make: *** [lib/auto/ODBM_File/ODBM_File.so] Error 25
catalyst@linux-bk68:~/perl-5.12.3> vi /usr/include/dbm.h
<------------------------END---------------------------
It was observed that ‘dbmclose’ call in ODBM_File.xs is dbmclose(void) to that specified in /usr/include/dbm.h dbmclose __P((DBM *)) on OpenSuse 11.3. Below is snip from session for ODM_FIle.xs and dbm.h file.
--------------------------START--------------------->
catalyst@linux-bk68:~/perl-5.12.3> grep -n dbmclose /home/catalyst/perl-5.12.3/ext/ODBM_File/ODBM_File.xs
15:int dbmclose(void);
25: * DBM on at least Ultrix and HPUX call dbmclose() from dbminit(),
26: * resulting in duplicate free() because dbmclose() does *not*
28: * If some malloc/free calls have been done between dbmclose() and
35:#define dbmclose() ((void) dbminit("/non/exist/ent"))
124: dbmclose();
catalyst@linux-bk68:~/perl-5.12.3>
linux-bk68:/home/catalyst/perl-5.12.3 # grep dbmclose /usr/include/dbm.h
/*extern int dbmclose __P((DBM *));*/
extern int dbmclose __P((void));
linux-bk68:/home/catalyst/perl-5.12.3 #
<-------------------------END-------------------------
This has corrected the problem. However, keeping fingers crossed. Hope it doesn’t break my current system configuration.
Delivered Every Tuesday.
Thank you! You have successfully subscribed to our newsletter.
You should report this bug and patch with perlbug utility.
ReplyDeletehi, I have encountered a similar error when installing perl-5.16.2 on suseLES 11.1, and the error encountered by make is:
ReplyDeleteMaking all in ext/ODBM_File
make all PERL_CORE=1 LIBPERL_A=libperl.a LINKTYPE=dynamic
make[1]: Entering directory `/localdata/samba/perl-5.16.2/ext/ODBM_File'
cc -c -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -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 `/localdata/samba/perl-5.16.2/ext/ODBM_File'
Unsuccessful make(ext/ODBM_File): code=512 at make_ext.pl line 466.
make: *** [lib/auto/ODBM_File/ODBM_File.so] Error 2
I have overcome this error by opening the file ODBM_File.xs at line 128 and adding "db" to the dbmclose function. this sorted the problem and also make test gave 100% success on all tests.
Eu testei no SLES 11 SP2, a solução do fransesco funcionou!!!
DeleteFrancesco, thank's!!!
It also worked for me in SLES 11 SP2 and perl 5.18.2.
DeleteThanks a lot!
LOL. Also work here. for the latest perl distribution.
DeleteHad SLES11SP4. Also the db change work for me on the latest perl SW.
DeleteHi I just tested on SLES 11 SP3 compiling perl 5.16.3 and this approach also solved my problem. Thanks to Franceso
ReplyDeleteThat really helped me out, migrating from HPUX with Perl 5.10.0 --> SLES 11 :-)
ReplyDeleteThanks Francesco !