From be7cbbc0d1f45acdf804d419e236207e96086571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gianguido=20Sor=C3=A0?= Date: Wed, 9 Mar 2016 15:11:56 +0100 Subject: [PATCH 1/6] removed redundant "--std=c++11;" flag for nvcc --- libethash-cuda/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libethash-cuda/CMakeLists.txt b/libethash-cuda/CMakeLists.txt index 9fed4faa6..7666a5b59 100644 --- a/libethash-cuda/CMakeLists.txt +++ b/libethash-cuda/CMakeLists.txt @@ -5,7 +5,7 @@ FIND_PACKAGE(CUDA REQUIRED) file(GLOB SRC_LIST "*.cpp" "*.cu") file(GLOB HEADERS "*.h" "*.cuh") -set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};--std=c++11;--disable-warnings;--ptxas-options=-v;-use_fast_math;-lineinfo) +set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};--disable-warnings;--ptxas-options=-v;-use_fast_math;-lineinfo) LIST(APPEND CUDA_NVCC_FLAGS_RELEASE -O3) LIST(APPEND CUDA_NVCC_FLAGS_DEBUG -G) @@ -25,4 +25,4 @@ CUDA_ADD_LIBRARY(${EXECUTABLE} STATIC ${SRC_LIST} ${HEADERS}) TARGET_LINK_LIBRARIES(${EXECUTABLE} ${CUDA_LIBRARIES} ethash) install( TARGETS ${EXECUTABLE} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib ) -install( FILES ${HEADERS} DESTINATION include/${EXECUTABLE} ) \ No newline at end of file +install( FILES ${HEADERS} DESTINATION include/${EXECUTABLE} ) From adc3a75eff0818bae7037629e0568db09dc8b4a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gianguido=20Sor=C3=A0?= Date: Wed, 9 Mar 2016 15:31:26 +0100 Subject: [PATCH 2/6] removed -Werror --- cmake/EthCompilerSettings.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/EthCompilerSettings.cmake b/cmake/EthCompilerSettings.cmake index 5fcb7d353..9cb19dec3 100644 --- a/cmake/EthCompilerSettings.cmake +++ b/cmake/EthCompilerSettings.cmake @@ -3,7 +3,7 @@ # C++11 check and activation if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") - set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-unknown-pragmas -Wextra -Werror -pedantic -DSHAREDLIB -fPIC ${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-unknown-pragmas -Wextra -pedantic -DSHAREDLIB -fPIC ${CMAKE_CXX_FLAGS}") set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -DETH_DEBUG") set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG -DETH_RELEASE") set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG -DETH_RELEASE") From 184d3f49a68c02d93df3bbe7e6543bfb13e94296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gianguido=20Sor=C3=A0?= Date: Wed, 9 Mar 2016 15:31:36 +0100 Subject: [PATCH 3/6] enforce Crypto++ 5.6.2 as minimum version --- cmake/EthDependencies.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmake/EthDependencies.cmake b/cmake/EthDependencies.cmake index f5fdae74f..3e7d2c34f 100644 --- a/cmake/EthDependencies.cmake +++ b/cmake/EthDependencies.cmake @@ -41,9 +41,11 @@ message(STATUS "ctest path: ${CTEST_COMMAND}") # Dependencies must have a version number, to ensure reproducible build. The version provided here is the one that is in the extdep repository. If you use system libraries, version numbers may be different. -find_package (CryptoPP 5.6.2 EXACT REQUIRED) -message(" - CryptoPP header: ${CRYPTOPP_INCLUDE_DIRS}") -message(" - CryptoPP lib : ${CRYPTOPP_LIBRARIES}") +if (CRYPTOPP_FOUND) + # find_package (CryptoPP 5.6.2 REQUIRED) + message(" - CryptoPP header: ${CRYPTOPP_INCLUDE_DIRS}") + message(" - CryptoPP lib : ${CRYPTOPP_LIBRARIES}") +endif() find_package (LevelDB REQUIRED) message(" - LevelDB header: ${LEVELDB_INCLUDE_DIRS}") From fbc540c980f27011734ef005febbc1383608ec06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gianguido=20Sor=C3=A0?= Date: Wed, 9 Mar 2016 16:01:23 +0100 Subject: [PATCH 4/6] bad version check, now really enforcing Crypto++ to 5.6.2 minimum --- cmake/EthDependencies.cmake | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cmake/EthDependencies.cmake b/cmake/EthDependencies.cmake index 3e7d2c34f..10fd84a2b 100644 --- a/cmake/EthDependencies.cmake +++ b/cmake/EthDependencies.cmake @@ -41,11 +41,9 @@ message(STATUS "ctest path: ${CTEST_COMMAND}") # Dependencies must have a version number, to ensure reproducible build. The version provided here is the one that is in the extdep repository. If you use system libraries, version numbers may be different. -if (CRYPTOPP_FOUND) - # find_package (CryptoPP 5.6.2 REQUIRED) - message(" - CryptoPP header: ${CRYPTOPP_INCLUDE_DIRS}") - message(" - CryptoPP lib : ${CRYPTOPP_LIBRARIES}") -endif() +find_package (CryptoPP 5.6.2 REQUIRED) +message(" - CryptoPP header: ${CRYPTOPP_INCLUDE_DIRS}") +message(" - CryptoPP lib : ${CRYPTOPP_LIBRARIES}") find_package (LevelDB REQUIRED) message(" - LevelDB header: ${LEVELDB_INCLUDE_DIRS}") From e571effac9f1c297620b206d9528e92bd0fb6395 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gianguido=20Sor=C3=A0?= Date: Wed, 9 Mar 2016 16:22:21 +0100 Subject: [PATCH 5/6] backport of commit https://github.com/ethereum/libethereum/pull/143 for boost 1.60 --- libethcore/Ethash.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libethcore/Ethash.cpp b/libethcore/Ethash.cpp index 6026828dc..62715c722 100644 --- a/libethcore/Ethash.cpp +++ b/libethcore/Ethash.cpp @@ -111,7 +111,7 @@ void Ethash::BlockHeaderRaw::verifyParent(BlockHeaderRaw const& _parent) if (m_gasLimit < c_minGasLimit || m_gasLimit <= _parent.m_gasLimit - _parent.m_gasLimit / c_gasLimitBoundDivisor || m_gasLimit >= _parent.m_gasLimit + _parent.m_gasLimit / c_gasLimitBoundDivisor) - BOOST_THROW_EXCEPTION(InvalidGasLimit() << errinfo_min((bigint)_parent.m_gasLimit - _parent.m_gasLimit / c_gasLimitBoundDivisor) << errinfo_got((bigint)m_gasLimit) << errinfo_max((bigint)_parent.m_gasLimit + _parent.m_gasLimit / c_gasLimitBoundDivisor)); + BOOST_THROW_EXCEPTION(InvalidGasLimit() << errinfo_min((bigint)_parent.m_gasLimit - _parent.m_gasLimit / c_gasLimitBoundDivisor) << errinfo_got((bigint)m_gasLimit) << errinfo_max((bigint)_parent.m_gasLimit + _parent.m_gasLimit / c_gasLimitBoundDivisor)); } void Ethash::BlockHeaderRaw::populateFromParent(BlockHeaderRaw const& _parent) From bf0cd52b26a501d94fdc2149b9f45445b9cbc7a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gianguido=20Sor=C3=A0?= Date: Wed, 9 Mar 2016 16:39:42 +0100 Subject: [PATCH 6/6] wrong parenthesis, duh --- libethcore/Ethash.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libethcore/Ethash.cpp b/libethcore/Ethash.cpp index 62715c722..211b6896a 100644 --- a/libethcore/Ethash.cpp +++ b/libethcore/Ethash.cpp @@ -111,7 +111,7 @@ void Ethash::BlockHeaderRaw::verifyParent(BlockHeaderRaw const& _parent) if (m_gasLimit < c_minGasLimit || m_gasLimit <= _parent.m_gasLimit - _parent.m_gasLimit / c_gasLimitBoundDivisor || m_gasLimit >= _parent.m_gasLimit + _parent.m_gasLimit / c_gasLimitBoundDivisor) - BOOST_THROW_EXCEPTION(InvalidGasLimit() << errinfo_min((bigint)_parent.m_gasLimit - _parent.m_gasLimit / c_gasLimitBoundDivisor) << errinfo_got((bigint)m_gasLimit) << errinfo_max((bigint)_parent.m_gasLimit + _parent.m_gasLimit / c_gasLimitBoundDivisor)); + BOOST_THROW_EXCEPTION(InvalidGasLimit() << errinfo_min((bigint)(_parent.m_gasLimit - _parent.m_gasLimit / c_gasLimitBoundDivisor)) << errinfo_got((bigint)m_gasLimit) << errinfo_max((bigint)(_parent.m_gasLimit + _parent.m_gasLimit / c_gasLimitBoundDivisor))); } void Ethash::BlockHeaderRaw::populateFromParent(BlockHeaderRaw const& _parent)