progressiveCactus icon indicating copy to clipboard operation
progressiveCactus copied to clipboard

compile error fresh install kyotocabinet

Open FantasticMrFux opened this issue 6 years ago • 7 comments

Can't compile a fresh pulled progressiveCactus. After executing make it fails with the following execpetion:

make[2]: Entering directory '/home/fux/progressiveCactus/submodules/kyotocabinet' g++ -c -I. -I/home/fux/progressiveCactus/submodules/kyotocabinet/include -I/usr/local/include -DNDEBUG -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D__EXTENSIONS__ -D_MYZLIB -D_MYGCCATOMIC -D_KC_PREFIX=""/home/fux/progressiveCactus/submodules/kyotocabinet"" -D_KC_INCLUDEDIR=""/home/fux/progressiveCactus/submodules/kyotocabinet/include"" -D_KC_LIBDIR=""/home/fux/progressiveCactus/submodules/kyotocabinet/lib"" -D_KC_BINDIR=""/home/fux/progressiveCactus/submodules/kyotocabinet/bin"" -D_KC_LIBEXECDIR=""/home/fux/progressiveCactus/submodules/kyotocabinet/libexec"" -D_KC_APPINC=""-I/home/fux/progressiveCactus/submodules/kyotocabinet/include"" -D_KC_APPLIBS=""-L/home/fux/progressiveCactus/submodules/kyotocabinet/lib -lkyotocabinet -lz -lstdc++ -lrt -lpthread -lm -lc "" -O3 -m64 -O3 -g -Wall -funroll-loops -DNDEBUG -I /home/fux/progressiveCactus/submodules/sonLib/lib -I /home/fux/progressiveCactus/submodules/tokyocabinet/include -DHAVE_TOKYO_CABINET=1 -I/home/fux/progressiveCactus/submodules/kyotocabinet/include -I/home/fux/progressiveCactus/submodules/kyototycoon/include -DHAVE_KYOTO_TYCOON=1 -I/home/fux/progressiveCactus/submodules/zlib/include -Wall -fPIC -fsigned-char -g0 -O2 -Wno-unused-but-set-variable -Wno-unused-but-set-parameter kcdbext.cc

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;

make[2]: *** [Makefile:76: kcdbext.o] Error 1

FantasticMrFux avatar Nov 30 '17 19:11 FantasticMrFux

Hi there, I'm getting exactly the same error.

I'm trying to build under easybuild's intel/2017a and foss/2017a if that provides any addition insight...

The error happens both under intel and gcc compilers.

Thank you!!

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;
              ^~~~~
make[2]: *** [kcdbext.o] Error 1
make[2]: Leaving directory `/gpfs/projects/ebb/dir_build/intel/eb.mod/progressiveCactus-2017-10-06-f102445-intel-2017a.eb/progressiveCactus-2017-10-06-f102445/submodules/kyotocabinet'
make[1]: *** [kyotocabinetRule] Error 2
make[1]: Leaving directory `/gpfs/projects/ebb/dir_build/intel/eb.mod/progressiveCactus-2017-10-06-f102445-intel-2017a.eb/progressiveCactus-2017-10-06-f102445/submodules'
make: *** [all] Error 2

jasonsydes avatar Dec 19 '17 03:12 jasonsydes

I ran into the same troubles. It looks to be because of gcc versions (6/7) being less lenient about these type conversions.

Workaround in a comment here: https://github.com/glennhickey/progressiveCactus/issues/76#issuecomment-334714835

Note that once the fix is applied to kcdbext.h, you'll probably run into the same trouble with ktremotedb.h and ktulog.h in kyototycoon. I've got a couple of patches here: https://github.com/robsyme/nf-annotate/tree/master/patches

robsyme avatar Jan 19 '18 03:01 robsyme

Thanks Robert for your help. With the patches the first errors disappeared and the compilation went one but in the end new errors occurred, which are related with the patches:

In file included from impl/sonLibKVDatabase_KyotoTycoon.cpp:34:0:
/scratch/fux/programms/genome_alligner/progressiveCactus/submodules/kyototycoon/include/ktremotedb.h: In member function ‘char* kyototycoon::RemoteDB::Cursor::get_key(size_t*, bool)’:
/scratch/fux/programms/genome_alligner/progressiveCactus/submodules/kyototycoon/include/ktremotedb.h:301:16: error: ‘nullptr’ was not declared in this scope
         return nullptr;
                ^~~~~~~
/scratch/fux/programms/genome_alligner/progressiveCactus/submodules/kyototycoon/include/ktremotedb.h: In member function ‘char* kyototycoon::RemoteDB::Cursor::get_value(size_t*, bool)’:
/scratch/fux/programms/genome_alligner/progressiveCactus/submodules/kyototycoon/include/ktremotedb.h:353:16: error: ‘nullptr’ was not declared in this scope
         return nullptr;
                ^~~~~~~
/scratch/fux/programms/genome_alligner/progressiveCactus/submodules/kyototycoon/include/ktremotedb.h: In member function ‘char* kyototycoon::RemoteDB::Cursor::get(size_t*, const char**, size_t*, int64_t*, bool)’:
/scratch/fux/programms/genome_alligner/progressiveCactus/submodules/kyototycoon/include/ktremotedb.h:414:16: error: ‘nullptr’ was not declared in this scope
         return nullptr;
                ^~~~~~~
/scratch/fux/programms/genome_alligner/progressiveCactus/submodules/kyototycoon/include/ktremotedb.h: In member function ‘char* kyototycoon::RemoteDB::Cursor::seize(size_t*, const char**, size_t*, int64_t*)’:
/scratch/fux/programms/genome_alligner/progressiveCactus/submodules/kyototycoon/include/ktremotedb.h:484:16: error: ‘nullptr’ was not declared in this scope
         return nullptr;

/scratch/fux/programms/genome_alligner/progressiveCactus/submodules/kyototycoon/include/ktulog.h: In member function ‘virtual void kyototycoon::UpdateLogger::AutoFlusher::run()’:
/scratch/fux/programms/genome_alligner/progressiveCactus/submodules/kyototycoon/include/ktulog.h:514:27: error: ‘FLUSHWAIT’ was not declared in this scope
         kc::Thread::sleep(FLUSHWAIT);
                           ^~~~~~~~~
In file included from /scratch/fux/programms/genome_alligner/progressiveCactus/submodules/kyototycoon/include/ktcommon.h:24:0,
                 from /scratch/fux/programms/genome_alligner/progressiveCactus/submodules/kyototycoon/include/ktremotedb.h:19,
                 from impl/sonLibKVDatabase_KyotoTycoon.cpp:34:
/scratch/fux/programms/genome_alligner/progressiveCactus/submodules/kyotocabinet/include/kcdbext.h: In member function ‘char* kyotocabinet::IndexDB::get(const char*, size_t, size_t*)’:
/scratch/fux/programms/genome_alligner/progressiveCactus/submodules/kyotocabinet/include/kcdbext.h:1281:14: error: ‘nullptr’ was not declared in this scope
       return nullptr;
              ^~~~~~~
In file included from /scratch/fux/programms/genome_alligner/progressiveCactus/submodules/kyototycoon/include/ktremotedb.h:25:0,
                 from impl/sonLibKVDatabase_KyotoTycoon.cpp:34:
/scratch/fux/programms/genome_alligner/progressiveCactus/submodules/kyototycoon/include/ktulog.h: At global scope:
/scratch/fux/programms/genome_alligner/progressiveCactus/submodules/kyototycoon/include/ktulog.h:51:10: error: ‘constexpr’ does not name a type; did you mean ‘confstr’?
   static constexpr double FLUSHWAIT = 0.1;
          ^~~~~~~~~
          confstr

Here my compiler version:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --enable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 7.3.1 20180130 (Red Hat 7.3.1-2) (GCC) 

FantasticMrFux avatar Feb 08 '18 14:02 FantasticMrFux

Hi! I have successfully made: configure / make / make check / make install both Kyoto Cabinet & Kyoto Tycoon by using this fork: https://github.com/carlosefr/kyoto

This way was suggested in "Still mantained" issue: https://github.com/alticelabs/kyoto/issues/31

Sincerely..

antoncom avatar Feb 07 '20 17:02 antoncom

Thanks for the info, I will update, note that progressive cactus is now part of cactus and the official repository is at:

https://github.com/ComparativeGenomicsToolkit/cactus

Anton Gavrilyuk [email protected] writes:

Hi! I have successfully made: configure / make / make check / make install both Kyoto Cabinet & Kyoto Tycoon by using this fork: https://github.com/carlosefr/kyoto

This way was suggested in "Still mantained" issue: https://github.com/alticelabs/kyoto/issues/31

Sincerely..

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/glennhickey/progressiveCactus/issues/95#issuecomment-583527084 Hi! I have successfully made: configure / make / make check / make install both Kyoto Cabinet & Kyoto Tycoon by using this fork: https://github.com/carlosefr/kyoto

This way was suggested in "Still mantained" issue: alticelabs/kyoto#31

Sincerely..

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.*

diekhans avatar Feb 07 '20 19:02 diekhans

Perhaps we want to change the Cactus readme to refer to this version of Kyoto for source builds. I was just having problems building the alticelabs one the other day with a modern gcc.

glennhickey avatar Feb 07 '20 19:02 glennhickey

Already done in the py3 branch.

Glenn Hickey [email protected] writes:

Perhaps we want to change the Cactus readme to refer to this version of Kyoto for source builds. I was just having problems building the alticelabs one the other day with a modern gcc.

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/glennhickey/progressiveCactus/issues/95#issuecomment-583557607 Perhaps we want to change the Cactus readme to refer to this version of Kyoto for source builds. I was just having problems building the alticelabs one the other day with a modern gcc.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.*

diekhans avatar Feb 07 '20 19:02 diekhans