Skip to content

Commit

Permalink
#2053 remove hunter
Browse files Browse the repository at this point in the history
  • Loading branch information
olehnikolaiev committed Dec 3, 2024
2 parents 29e03c9 + 46c2dcd commit 816a265
Show file tree
Hide file tree
Showing 19 changed files with 71 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/functional-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
jobs:
functional-tests:
name: Functional tests for ${{ inputs.version }}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
SKALED_RELEASE: ${{ inputs.version }}
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ jobs:
- name: install packages
run: |
sudo apt-get -y remove libzmq* || true
sudo apt-get -y install software-properties-common gcc-9 g++-9 || true
sudo apt-get -y install software-properties-common gcc-11 g++-11 || true
- name: Use g++-9 and gcov-9 by default
- name: Use g++-11 and gcov-11 by default
run: |
echo "Updating all needed alternatives"
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-9 9
sudo update-alternatives --install /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-9 9
sudo update-alternatives --install /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-9 9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-11 11
sudo update-alternatives --install /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-11 11
sudo update-alternatives --install /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-11 11
echo "Checking alternative for gcc"
which gcc
gcc --version
Expand Down Expand Up @@ -88,8 +88,8 @@ jobs:
${ { matrix.config.name } }-ccache-
- name: Build dependencies
run: |
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
export CMAKE_BUILD_TYPE=RelWithDebInfo
cd deps
Expand All @@ -99,8 +99,8 @@ jobs:
cd ..
- name: Configure all
run: |
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
export CMAKE_BUILD_TYPE=RelWithDebInfo
mkdir -p build
Expand All @@ -110,8 +110,8 @@ jobs:
cd ..
- name: Build all
run: |
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
export CMAKE_BUILD_TYPE=RelWithDebInfo
cd build
Expand All @@ -122,8 +122,8 @@ jobs:
cd ..
- name: Configure historic state build
run: |
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
export CMAKE_BUILD_TYPE=RelWithDebInfo
mkdir -p build-historic
Expand All @@ -133,8 +133,8 @@ jobs:
cd ..
- name: Build historic state version
run: |
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
export CMAKE_BUILD_TYPE=RelWithDebInfo
cd build-historic
Expand Down
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ include( FindClangFormat )

set( Boost_USE_STATIC_LIBS ON )
set( Boost_USE_MULTITHREADED ON )
set( BOOST_ROOT ${CMAKE_PREFIX_PATH} )
set( BOOST_INCLUDEDIR "${CMAKE_PREFIX_PATH}/include" )
set( BOOST_LIBRARYDIR "${CMAKE_PREFIX_PATH}/lib" )
set( Boost_NO_BOOST_CMAKE ON )
set( Boost_NO_SYSTEM_PATHS ON )
#hunter_add_package( Boost COMPONENTS program_options filesystem system thread context fiber log chrono test)
find_package( Boost CONFIG REQUIRED program_options filesystem system thread context fiber log chrono)

Expand Down Expand Up @@ -185,7 +190,6 @@ if( TESTS )
include( ProjectBinaryen )
endif()


if (HISTORIC_STATE)
add_definitions(-DHISTORIC_STATE=1)
endif (HISTORIC_STATE)
Expand Down
5 changes: 0 additions & 5 deletions cmake/EthCompilerSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ if( SKALED_HATE_WARNINGS )
add_compile_options( -Wno-error=non-virtual-dtor )
add_compile_options( -Werror -Wno-deprecated-declarations)
add_compile_options( -Wno-error=sign-compare )
#add_compile_options( -Wno-error=reorder )
#add_compile_options( -Wno-error=deprecated )
#add_compile_options( -Wno-error=unused-variable )
#add_compile_options( -Wno-error=unused-parameter )
#add_compile_options( -Wno-error=unused-but-set-variable )
add_compile_options(-Wno-error=int-in-bool-context)
add_compile_options(-Wno-error=address)
add_compile_options(-Wno-error=nonnull-compare)
Expand Down
16 changes: 9 additions & 7 deletions cmake/ProjectBinaryen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ set(binaryen_other_libraries

set(BINARYEN_VERSION 1.37.35)

set(BINARYEN_CMAKE_CXX_FLAGS "-Wno-implicit-fallthrough -Wno-maybe-uninitialized -Wno-range-loop-construct ${CMAKE_CXX_FLAGS}")

ExternalProject_Add(binaryen
PREFIX ${prefix}
DOWNLOAD_NAME binaryen-${BINARYEN_VERSION}.tar.gz
Expand All @@ -46,13 +48,13 @@ ExternalProject_Add(binaryen
URL https://github.com/WebAssembly/binaryen/archive/${BINARYEN_VERSION}.tar.gz
URL_HASH SHA256=19439e41dc576446eaae0c4a8e07d4cd4c40aea7dfb0a6475b925686852f8006
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${prefix}
-DCMAKE_INSTALL_LIBDIR=lib
-DCMAKE_BUILD_TYPE=Release
-DBUILD_STATIC_LIB=ON
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_CXX_FLAGS=-Wno-implicit-fallthrough ${CMAKE_CXX_FLAGS}
-DCMAKE_INSTALL_PREFIX=${prefix}
-DCMAKE_INSTALL_LIBDIR=lib
-DCMAKE_BUILD_TYPE=Release
-DBUILD_STATIC_LIB=ON
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_CXX_FLAGS=${BINARYEN_CMAKE_CXX_FLAGS}
${build_command}
${install_command}
BUILD_BYPRODUCTS ${binaryen_library} ${binaryen_other_libraries}
Expand Down
37 changes: 25 additions & 12 deletions deps/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,6 @@ export TOOLCHAINS_DOWNLOADED_PATH=$TOOLCHAINS_PATH/downloads
export ARM_TOOLCHAIN_NAME=gcc7.2-arm
export ARM_GCC_VER=7.2.0

#export ARM_TOOLCHAIN_NAME=gcc4.8-arm
#export ARM_GCC_VER=4.8.4

export ARM_TOOLCHAIN_PATH=$TOOLCHAINS_PATH/$ARM_TOOLCHAIN_NAME

export ADDITIONAL_INCLUDES="-I$INSTALL_ROOT/include"
Expand Down Expand Up @@ -378,12 +375,12 @@ then
else
if [ "$UNIX_SYSTEM_NAME" = "Linux" ];
then
export CC=$(which gcc-9)
export CC=$(which gcc-11)
if [ -z "${CC}" ];
then
export CC=$(which gcc)
fi
export CXX=$(which g++-9)
export CXX=$(which g++-11)
if [ -z "${CXX}" ];
then
export CXX=$(which g++)
Expand Down Expand Up @@ -2101,18 +2098,20 @@ then
eval mkdir -p build2
cd build2
eval "$CMAKE" "${CMAKE_CROSSCOMPILING_OPTS}" -DCMAKE_INSTALL_PREFIX="$INSTALL_ROOT" -DCMAKE_BUILD_TYPE="$TOP_CMAKE_BUILD_TYPE" \
-DBOOST_ROOT="$INSTALL_ROOT" -DBOOST_LIBRARYDIR="$INSTALL_ROOT/lib" -DBoost_NO_WARN_NEW_VERSIONS=1 -DBoost_DEBUG=ON \
-DBOOST_ROOT="$INSTALL_ROOT" -DBOOST_INCLUDEDIR="${INSTALL_ROOT}/include" -DBOOST_LIBRARYDIR="$INSTALL_ROOT/lib" \
-DBoost_NO_BOOST_CMAKE=ON -DBoost_NO_WARN_NEW_VERSIONS=1 -DBoost_DEBUG=ON \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTS=OFF -DBUILD_BROKEN_TESTS=OFF -DBUILD_HANGING_TESTS=OFF -DBUILD_SLOW_TESTS=OFF \
-DCMAKE_INCLUDE_PATH="${INSTALL_ROOT}/include" \
-DCMAKE_LIBRARY_PATH="${INSTALL_ROOT}/lib" \
-DCMAKE_INCLUDE_PATH="${INSTALL_ROOT}/include" \
-DCMAKE_LIBRARY_PATH="${INSTALL_ROOT}/lib" \
-DCMAKE_PREFIX_PATH=${INSTALL_ROOT} \
..
cd ..
else
cd folly
fi
echo -e "${COLOR_INFO}building it${COLOR_DOTS}...${COLOR_RESET}"
cd build2
cd build2
eval "$MAKE" "${PARALLEL_MAKE_OPTIONS}"
eval "$MAKE" "${PARALLEL_MAKE_OPTIONS}" install
if [ "$DEBUG" = "0" ]; then
Expand Down Expand Up @@ -2235,7 +2234,11 @@ then
eval mkdir -p build2
cd build2
eval "$CMAKE" "${CMAKE_CROSSCOMPILING_OPTS}" -DCMAKE_INSTALL_PREFIX="$INSTALL_ROOT" -DCMAKE_BUILD_TYPE="$TOP_CMAKE_BUILD_TYPE" \
-DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=OFF \
-DBOOST_ROOT="$INSTALL_ROOT" -DBOOST_INCLUDEDIR="${INSTALL_ROOT}/include" -DBOOST_LIBRARYDIR="$INSTALL_ROOT/lib" \
-DBoost_NO_BOOST_CMAKE=ON -DCMAKE_INCLUDE_PATH="${INSTALL_ROOT}/include" \
-DCMAKE_LIBRARY_PATH="${INSTALL_ROOT}/lib" \
-DCMAKE_PREFIX_PATH=${INSTALL_ROOT} \
..
cd ..
else
Expand Down Expand Up @@ -2280,7 +2283,12 @@ then
eval mkdir -p build2
cd build2
eval "$CMAKE" "${CMAKE_CROSSCOMPILING_OPTS}" -DCMAKE_INSTALL_PREFIX="$INSTALL_ROOT" -DCMAKE_BUILD_TYPE="$TOP_CMAKE_BUILD_TYPE" \
-DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=OFF ..
-DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=OFF \
-DBOOST_ROOT="$INSTALL_ROOT" -DBOOST_INCLUDEDIR="${INSTALL_ROOT}/include" -DBOOST_LIBRARYDIR="$INSTALL_ROOT/lib" \
-DBoost_NO_BOOST_CMAKE=ON -DCMAKE_INCLUDE_PATH="${INSTALL_ROOT}/include" \
-DCMAKE_LIBRARY_PATH="${INSTALL_ROOT}/lib" \
-DCMAKE_PREFIX_PATH=${INSTALL_ROOT} \
..
cd ..
else
cd wangle/wangle
Expand Down Expand Up @@ -2326,7 +2334,12 @@ then
eval mkdir -p build2
cd build2
eval "$CMAKE" "${CMAKE_CROSSCOMPILING_OPTS}" -DCMAKE_INSTALL_PREFIX="$INSTALL_ROOT" -DCMAKE_BUILD_TYPE="$TOP_CMAKE_BUILD_TYPE" \
-DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_SAMPLES=OFF -DBUILD_SHARED_LIBS=OFF ..
-DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_SAMPLES=OFF -DBUILD_SHARED_LIBS=OFF \
-DBOOST_ROOT="$INSTALL_ROOT" -DBOOST_INCLUDEDIR="${INSTALL_ROOT}/include" -DBOOST_LIBRARYDIR="$INSTALL_ROOT/lib" \
-DBoost_NO_BOOST_CMAKE=ON -DCMAKE_INCLUDE_PATH="${INSTALL_ROOT}/include" \
-DCMAKE_LIBRARY_PATH="${INSTALL_ROOT}/lib" \
-DCMAKE_PREFIX_PATH=${INSTALL_ROOT} \
..
cd ..
else
cd proxygen
Expand Down
2 changes: 1 addition & 1 deletion libconsensus
Submodule libconsensus updated 1 files
+1 −1 libBLS
1 change: 1 addition & 0 deletions libdevcore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ add_dependencies(devcore secp256k1)
target_compile_options( devcore PRIVATE
-Wno-error=deprecated-copy -Wno-error=unused-result -Wno-error=unused-parameter
-Wno-error=unused-variable -Wno-error=maybe-uninitialized -Wno-error=class-memaccess
-Wno-error=nonnull
)

# Needed to prevent including system-level boost headers:
Expand Down
2 changes: 1 addition & 1 deletion libdevcore/JsonUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void dev::requireJsonFields( json_spirit::mObject const& _o, std::string const&
}

// check field types with validation map
for ( auto const vmap : _validationMap ) {
for ( auto const& vmap : _validationMap ) {
auto const& expectedFieldName = vmap.first;
auto const& expectedFieldPresence = vmap.second.second;
// check that all required fields are in the object
Expand Down
1 change: 1 addition & 0 deletions libdevcore/ManuallyRotatingLevelDB.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <libbatched-io/batched_rotating_db_io.h>

#include <deque>
#include <mutex>
#include <set>
#include <shared_mutex>

Expand Down
1 change: 1 addition & 0 deletions libdevcore/SplitDB.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "SplitDB.h"

#include <memory>
#include <mutex>

namespace dev {
namespace db {
Expand Down
2 changes: 1 addition & 1 deletion libethereum/Account.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ AccountMap dev::eth::jsonToAccountMap( std::string const& _json, u256 const& _de
}

if ( haveStorage )
for ( pair< string, js::mValue > const& j :
for ( pair< string, js::mValue > const j :
accountMaskJson.at( c_storage ).get_obj() )
ret[a].setStorage( u256( j.first ), u256( j.second.get_str() ) );
}
Expand Down
1 change: 1 addition & 0 deletions libethereum/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ add_library( ethereum ${sources} InstanceMonitor.cpp InstanceMonitor.h

target_compile_options( ethereum PRIVATE
-Wno-error=deprecated-copy -Wno-error=unused-result -Wno-error=unused-parameter -Wno-error=unused-variable -Wno-error=maybe-uninitialized
-Wno-error=nonnull
)

target_include_directories( ethereum PRIVATE "${UTILS_INCLUDE_DIR}" ${SKUTILS_INCLUDE_DIRS}
Expand Down
1 change: 1 addition & 0 deletions libp2p/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ target_link_libraries(p2p PUBLIC devcrypto devcore)
target_include_directories(p2p SYSTEM PRIVATE ${CRYPTOPP_INCLUDE_DIR})
target_compile_options( p2p PRIVATE
-Wno-error=deprecated-copy -Wno-error=unused-result -Wno-error=unused-parameter -Wno-error=unused-variable -Wno-error=maybe-uninitialized
-Wno-error=nonnull
)

if(MINIUPNPC)
Expand Down
1 change: 1 addition & 0 deletions libskale/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ target_link_libraries(skale PRIVATE ethereum web3jsonrpc historic skutils
)
target_compile_options( skale PRIVATE
-Wno-error=deprecated-copy -Wno-error=unused-result -Wno-error=unused-parameter -Wno-error=unused-variable -Wno-error=maybe-uninitialized
-Wno-error=nonnull
)

#target_compile_options( skale PRIVATE -Weffc++ )
Expand Down
1 change: 1 addition & 0 deletions libweb3jsonrpc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ target_compile_options( web3jsonrpc PRIVATE
-Wno-error=deprecated-copy -Wno-error=unused-result -Wno-error=unused-parameter -Wno-error=unused-variable -Wno-error=maybe-uninitialized
-Wno-error=pessimizing-move
-Wno-error=stringop-truncation
-Wno-error=nonnull
)

target_link_libraries( web3jsonrpc
Expand Down
1 change: 1 addition & 0 deletions skaled/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ add_executable(${EXECUTABLE_NAME} ${sources})

target_compile_options( ${EXECUTABLE_NAME} PRIVATE
-Wno-error=deprecated-copy -Wno-error=unused-result -Wno-error=unused-parameter -Wno-error=unused-variable -Wno-error=maybe-uninitialized
-Wno-error=nonnull
)

if( APPLE )
Expand Down
2 changes: 1 addition & 1 deletion test/tools/jsontests/vm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ json_spirit::mValue VmTestSuite::doTests( json_spirit::mValue const& _input, boo
if ( s.second == 0 )
keystoDelete.push_back( s.first );
}
for ( auto const key : keystoDelete ) {
for ( auto const& key : keystoDelete ) {
get< 2 >( a.second ).erase( key );
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/unittests/libdevcrypto/SecretStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ BOOST_AUTO_TEST_CASE( import_key_from_file,

BOOST_AUTO_TEST_CASE( import_secret,
*boost::unit_test::precondition( dev::test::run_not_express ) ) {
for ( string const& password : {"foobar", ""} ) {
for ( string const password : {"foobar", ""} ) {
TransientDirectory storeDir;
string priv = "0202020202020202020202020202020202020202020202020202020202020202";

Expand All @@ -137,7 +137,7 @@ BOOST_AUTO_TEST_CASE( import_secret,
}

BOOST_AUTO_TEST_CASE( import_secret_bytesConstRef ) {
for ( string const& password : {"foobar", ""} ) {
for ( string const password : {"foobar", ""} ) {
TransientDirectory storeDir;
string priv = "0202020202020202020202020202020202020202020202020202020202020202";

Expand Down

0 comments on commit 816a265

Please sign in to comment.