Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile error fresh install kyotocabinet #95

Open
FantasticMrFux opened this issue Nov 30, 2017 · 7 comments
Open

compile error fresh install kyotocabinet #95

FantasticMrFux opened this issue Nov 30, 2017 · 7 comments

Comments

@FantasticMrFux
Copy link

FantasticMrFux commented Nov 30, 2017

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

@jasonsydes
Copy link
Contributor

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

@robsyme
Copy link
Contributor

robsyme commented Jan 19, 2018

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: #76 (comment)

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

@FantasticMrFux
Copy link
Author

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) 

@antoncom
Copy link

antoncom commented Feb 7, 2020

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: AlticeLabsProjects/kyoto#31

Sincerely..

@diekhans
Copy link

diekhans commented Feb 7, 2020 via email

@glennhickey
Copy link
Owner

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.

@diekhans
Copy link

diekhans commented Feb 7, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants