diff --git a/README.md b/README.md index 82655d32c..63a1c4801 100644 --- a/README.md +++ b/README.md @@ -58,11 +58,15 @@ If you have already cloned the repo and forgot to pass `--recurse-submodules`, e ``` sudo apt update -sudo apt install autoconf build-essential cmake libprocps-dev libtool texinfo wget yasm flex bison btrfs-progs +sudo apt install autoconf build-essential cmake libprocps-dev libtool texinfo wget yasm flex bison btrfs-progs python python3-pip gawk git vim doxygen sudo apt install make build-essential cmake pkg-config libgnutls28-dev libssl-dev unzip zlib1g-dev libgcrypt20-dev docker.io gcc-9 g++-9 gperf clang-format-11 gnutls-dev +sudo apt install nettle-dev libhiredis-dev redis-server google-perftools libgoogle-perftools-dev lcov ``` -NB cmake needs to be of version >=3.31, git of version >=2.18 + + + +NB cmake needs to be of version >=3.21, git of version >=2.18 ### (for Ubuntu 20.10 or later) Set gcc-9 as default compiler ``` @@ -74,14 +78,15 @@ sudo update-alternatives --install /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-to gcc --version ``` -### Build dependencies +# Install latest cmake ``` -cd deps -./build.sh +sudo apt-get purge cmake +sudo snap install cmake --classic ``` -or, if you want to build debug version of skaled + +### Build dependencies ``` cd deps @@ -107,8 +112,6 @@ cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Debug cmake --build build -- -j$(nproc) ``` -Note: Currently only Debug build is supported. - ## Testing diff --git a/deps/build.sh b/deps/build.sh index f8a184049..16f35d527 100755 --- a/deps/build.sh +++ b/deps/build.sh @@ -932,13 +932,8 @@ then cd "$SOURCES_ROOT" if [ ! -d "libiconv-1.15" ]; then - if [ ! -f "libiconv-1.15.tar.gz" ]; - then - echo -e "${COLOR_INFO}downloading it${COLOR_DOTS}...${COLOR_RESET}" - eval "$WGET" --no-check-certificate https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz - fi echo -e "${COLOR_INFO}unpacking it${COLOR_DOTS}...${COLOR_RESET}" - eval tar -xzf libiconv-1.15.tar.gz + eval tar -xzf "$PREDOWNLOADED_ROOT/libiconv-1.15.tar.gz" echo -e "${COLOR_INFO}configuring it${COLOR_DOTS}...${COLOR_RESET}" cd libiconv-1.15 eval ./configure "${CONF_CROSSCOMPILING_OPTS_GENERIC}" --enable-static --disable-shared --prefix="$INSTALL_ROOT" "${CONF_DEBUG_OPTIONS}" diff --git a/deps/pre_downloaded/libiconv-1.15.tar.gz b/deps/pre_downloaded/libiconv-1.15.tar.gz new file mode 100644 index 000000000..abdb6a4f1 Binary files /dev/null and b/deps/pre_downloaded/libiconv-1.15.tar.gz differ diff --git a/libdevcore/Common.cpp b/libdevcore/Common.cpp index 9828da2cc..ec4c0bc53 100644 --- a/libdevcore/Common.cpp +++ b/libdevcore/Common.cpp @@ -165,8 +165,8 @@ void ExitHandler::exitHandler( int nSignalNo, ExitHandler::exit_code_t ec ) { s_ec = ec; } - // indicate failure if signal is not INT or TERM! - if ( s_ec == ec_success && nSignalNo != SIGINT && nSignalNo != SIGTERM ) + // indicate failure if signal is not INT or TERM or internal (-1) + if ( s_ec == ec_success && nSignalNo > 0 && nSignalNo != SIGINT && nSignalNo != SIGTERM ) s_ec = ExitHandler::ec_failure; s_bStop = true; diff --git a/libskutils/include/skutils/stats.h b/libskutils/include/skutils/stats.h index 79650c733..3600d637b 100644 --- a/libskutils/include/skutils/stats.h +++ b/libskutils/include/skutils/stats.h @@ -220,7 +220,7 @@ class element : public skutils::ref_retain_release { element( const char* strSubSystem, const char* strProtocol, const char* strMethod, int /*nServerIndex*/, int /*ipVer*/ ); virtual ~element(); - void stop() const; + void stop(); void setMethod( const char* strMethod ) const; void setError() const; double getDurationInSeconds() const; diff --git a/libskutils/src/stats.cpp b/libskutils/src/stats.cpp index 2d0814992..d77dcbd20 100644 --- a/libskutils/src/stats.cpp +++ b/libskutils/src/stats.cpp @@ -405,7 +405,6 @@ element::element( const char* strSubSystem, const char* strProtocol, const char* strProtocol_ = "N/A"; if ( strMethod_.empty() ) strMethod_ = g_strMethodNameUnknown; - do_register(); } element::~element() { stop(); @@ -420,12 +419,13 @@ void element::do_unregister() { queue::getQueueForSubsystem( strSubSystem_.c_str() ).do_unregister( rttElement ); } -void element::stop() const { +void element::stop() { lock_type lock( mtx() ); if ( isStopped_ ) return; isStopped_ = true; tpEnd_ = skutils::stats::clock::now(); + do_register(); } void element::setMethod( const char* strMethod ) const {