Closed yuzhenpeng closed 4 years ago
This is the source of the build failure
BerkeleyDB.c BerkeleyDB.xs:76:10: fatal error: db.h: No such file or directory
#include <db.h>
^~~~~~ compilation terminated.
make: *** [Makefile:346: BerkeleyDB.o] Error 1
This error is covered in the README file. Look for the section "Missing db.h or libdb.a" for instructions on how to fix the problem.
I install the same version BerkeleyDB,why they different.
BerkeleyDB needs compatible versions of libdb & db.h you have db.h version 6.1.36 and libdb version 6.1.26
I install the same version BerkeleyDB,why they different.
BerkeleyDB needs compatible versions of libdb & db.h you have db.h version 6.1.36 and libdb version 6.1.26
You may already have had a version of BerkeleyDB installed on your system before you installed a new one. On some distributions the library file (libdb
) is included, but the header file (dh.h
) is not. Usually installing the -dev
variant of the berkeley db package will sort out that issue.
What command did you use to install BerkeleyDB?
Some versions of Linux (e.g. RedHat 6, SuSe 6) ship with a C library that has version 2.x of Berkeley DB linked into it. This makes it difficult to build this module with anything other than the version of Berkeley DB that shipped with your Linux release. If you do try to use a different version of Berkeley DB you will most likely get the error described in the "Incompatible versions of db.h and libdb" section of this file.
I think my linux have one version before install a new one. But I cann't find the old one position in linux.
What command did you run to install BerkeleyDB?
Now I fix it by command export LD_PRELOAD=/usr/local/BerkeleyDB-6.1/lib/libdb.so
Thank you.
Good. Closing the ticket.
hello,when I make BerkeleyDB, I met some errors as follow. I don't know why. `$make cp BerkeleyDB.pod blib/lib/BerkeleyDB.pod cp BerkeleyDB.pm blib/lib/BerkeleyDB.pm cp BerkeleyDB/Hash.pm blib/lib/BerkeleyDB/Hash.pm cp BerkeleyDB/Btree.pm blib/lib/BerkeleyDB/Btree.pm cp mkconsts.pl blib/lib/mkconsts.pl cp scan.pl blib/lib/scan.pl Running Mkbootstrap for BerkeleyDB () chmod 644 "BerkeleyDB.bs" "/Bio/home/Yanglab/Yuzhenpeng/miniconda2/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- BerkeleyDB.bs blib/arch/auto/BerkeleyDB/BerkeleyDB.bs 644 "/Bio/home/Yanglab/Yuzhenpeng/miniconda2/bin/perl" "/Bio/home/Yanglab/Yuzhenpeng/miniconda2/lib/5.26.2/ExtUtils/xsubpp" -noprototypes -typemap '/Bio/home/Yanglab/Yuzhenpeng/miniconda2/lib/5.26.2/ExtUtils/typemap' -typemap '/Bio/home/Yanglab/Yuzhenpeng/opt/softwares/BerkeleyDB-0.64/typemap' BerkeleyDB.xs > BerkeleyDB.xsc Warning: Found a 'CODE' section which seems to be using 'RETVAL' but no 'OUTPUT' section. in BerkeleyDB.xs, line 5936 Warning: Found a 'CODE' section which seems to be using 'RETVAL' but no 'OUTPUT' section. in BerkeleyDB.xs, line 5964 mv BerkeleyDB.xsc BerkeleyDB.c /Bio/home/Yanglab/Yuzhenpeng/miniconda2/envs/Forward/bin/..//bin/x86_64-conda_cos6-linux-gnu-gcc -c -I/usr/local/BerkeleyDB/include -D_REENTRANT -D_GNU_SOURCE --sysroot=/Bio/home/Yanglab/Yuzhenpeng/miniconda2/envs/Forward/bin/..//x86_64-conda_cos6-linux-gnu/sysroot -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -DVERSION=\"0.64\" -DXS_VERSION=\"0.64\" -fPIC --sysroot=/Bio/home/Yanglab/Yuzhenpeng/miniconda2/envs/Forward/bin/..//x86_64-conda_cos6-linux-gnu/sysroot "-I/Bio/home/Yanglab/Yuzhenpeng/miniconda2/lib/5.26.2/x86_64-linux-thread-multi/CORE" BerkeleyDB.c BerkeleyDB.xs:76:10: fatal error: db.h: No such file or directory
include
compilation terminated. make: *** [Makefile:346: BerkeleyDB.o] Error 1 ` could you give me some suggestion.