glennhickey / progressiveCactus

Distribution package for the Prgressive Cactus multiple genome aligner. Dependencies are linked as submodules
Other
83 stars 26 forks source link

Error with kyotocabinet member function. #76

Open yifangt opened 7 years ago

yifangt commented 7 years ago

I had error at make step: In file included from kcdbext.cc:16:0:

kcdbext.h: In member function 'char* kyotocabinet::IndexDB::get(const char*, size_t, size_t*)':
kcdbext.h:1281:14: error: cannot convert 'bool' to 'char*' in return
       return false;
              ^~~~~
Makefile:76: recipe for target 'kcdbext.o' failed
make[2]: *** [kcdbext.o] Error 1
make[2]: Leaving directory '/home/yifang/download-software/progressiveCactus/submodules/kyotocabinet'
Makefile:53: recipe for target 'kyotocabinetRule' failed
make[1]: *** [kyotocabinetRule] Error 2
make[1]: Leaving directory '/home/yifang/download-software/progressiveCactus/submodules'
Makefile:10: recipe for target 'all' failed
make: *** [all] Error 2

I am using Linux,

$ uname -a
Linux Box2 4.3.0-1-amd64 #1 SMP Debian 4.3.3-5 (2016-01-04) x86_64 GNU/Linux
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 6.2.0-10' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 6.2.0 20161027 (Debian 6.2.0-10) 

Thanks for any help on the issue.

robsyme commented 7 years ago

It looks like an issue with kyotocabinet when ussing gcc 6/7: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=811627

One possible workaround would be to include that patch from here: http://pkgs.fedoraproject.org/cgit/rpms/kyotocabinet.git/commit/?h=f24&id=988ed3a17b1a5ba659c4f3758b5a262859b0e4e1

--- kyotocabinet-1.2.76/kcdbext.h   2016-05-25 11:32:53.591866016 +0200
+++ kyotocabinet-1.2.76/kcdbext.h   2012-05-24 18:27:59.000000000 +0200
@@ -1278,7 +1278,7 @@
     if (omode_ == 0) {
       set_error(_KCCODELINE_, BasicDB::Error::INVALID, "not opened");
       *sp = 0;
-      return false;
+      return nullptr;
     }
     if (!cache_) return db_.get(kbuf, ksiz, sp);
     size_t dvsiz = 0;