AIL-framework icon indicating copy to clipboard operation
AIL-framework copied to clipboard

Manual install fails with gcc 8.2.0

Open doegox opened this issue 5 years ago • 5 comments

FTR the issues I got when trying to install manually on a Debian Sid during the hack.lu workshop:

ardb and its dependencies compile with -Werror but recent gcc 8.2.0 emits some new warnings which make compilation failing.

./installing_deps.sh
...
>>>>> Dowloading RocksDB
--2018-10-18 14:23:11--  https://github.com/facebook/rocksdb/archive/v5.14.2.tar.gz
...
>>>>> Building ROCKSDB
  CC       util/status.o
util/status.cc: In static member function ‘static const char* rocksdb::Status::CopyState(const char*)’:
util/status.cc:28:15: error: ‘char* strncpy(char*, const char*, size_t)’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
   std::strncpy(result, state, cch - 1);
   ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
util/status.cc:19:18: note: length computed here
       std::strlen(state) + 1; // +1 for the null terminator
       ~~~~~~~~~~~^~~~~~~
cc1plus: all warnings being treated as errors

Trying to remove -Werror from AIL-framework/ardb/deps/rocksdb-5.14.2/Makefile & CMakeLists.txt... Failed else where, then trying to remove -Werror from AIL-framework/ardb/src/Makefile and it still failed elsewhere and I gave up, moving to the Docker install.

doegox avatar Oct 20 '18 15:10 doegox

Thanks @doegox I have opened 2 issues in the ardb repo:

https://github.com/yinqiwen/ardb/issues/455 https://github.com/yinqiwen/ardb/issues/454

The quick and dirty fix is to compile with gcc-7 and bump rocksdb to 5.15.10 in ardb/src/Makefile

SteveClement avatar Nov 27 '18 03:11 SteveClement

Is this still ongoing?

blackswanburst avatar Apr 28 '19 07:04 blackswanburst

no idea, not using it at the moment

doegox avatar Apr 28 '19 21:04 doegox

-Werror is doing the trick, it's not great, but it works

Rafiot avatar Apr 28 '19 22:04 Rafiot

I modified the Makefile (ardb/src/Makefile) Line 55 to 5.15.10, like @SteveClement said. Thanks

vitrvm avatar Mar 29 '20 18:03 vitrvm

Fixed in AIL v5.0 The database has been migrated from ARDB to Kvrocks.

Terrtia avatar Jun 06 '23 09:06 Terrtia