Browse Source

Build fixes.

cl-refactor
Gav Wood 11 years ago
parent
commit
3822aef608
  1. 4
      CMakeLists.txt
  2. 22
      alethzero/CMakeLists.txt
  3. 2
      eth/CMakeLists.txt
  4. 2
      exp/CMakeLists.txt
  5. 2
      libethcore/CMakeLists.txt
  6. 2
      libethential/CMakeLists.txt
  7. 2
      libethereum/CMakeLists.txt
  8. 21
      libethereum/State.cpp
  9. 2
      libethereum/State.h
  10. 2
      libevm/CMakeLists.txt
  11. 2
      libevmface/CMakeLists.txt
  12. 2
      liblll/CMakeLists.txt
  13. 2
      libpyserpent/CMakeLists.txt
  14. 6
      libqethereum/CMakeLists.txt
  15. 2
      libserpent/CMakeLists.txt
  16. 2
      lllc/CMakeLists.txt
  17. 2
      neth/CMakeLists.txt
  18. 2
      sc/CMakeLists.txt
  19. 2
      test/CMakeLists.txt
  20. 6
      walleth/CMakeLists.txt

4
CMakeLists.txt

@ -114,7 +114,7 @@ else ()
message(FATAL_ERROR "Your C++ compiler does not support C++11.")
endif ()
if(${TARGET_PLATFORM} STREQUAL "w64")
if("${TARGET_PLATFORM}" STREQUAL "w64")
# set(MINIUPNPC_LS /usr/x86_64-w64-mingw32/lib/libminiupnpc.a)
set(LEVELDB_LS leveldb)
set(CRYPTOPP_LS cryptopp)
@ -124,7 +124,7 @@ else()
find_path(CRYPTOPP_ID cryptlib.h
../cryptopp/src
../../cryptopp/src)
if(NOT ${CRYPTOPP_ID} STREQUAL "CRYPTOPP_ID-NOTFOUND")
if(NOT "${CRYPTOPP_ID}" STREQUAL "CRYPTOPP_ID-NOTFOUND")
message("Local cryptopp OK.")
set(CRYPTOPP_LS ${CRYPTOPP_ID}/../target/build/release/libcryptopp.so)
else()

22
alethzero/CMakeLists.txt

@ -17,7 +17,7 @@ if (APPLE)
set(CMAKE_PREFIX_PATH /usr/local/opt/qt5)
include_directories(/usr/local/opt/qt5/include /usr/local/include)
elseif (${TARGET_PLATFORM} STREQUAL "w64")
elseif ("${TARGET_PLATFORM}" STREQUAL "w64")
set(SRC_LIST ${SRC_LIST} ../windows/qt_plugin_import.cpp)
include_directories(/usr/x86_64-w64-mingw32/include /usr/x86_64-w64-mingw32/include/QtCore /usr/x86_64-w64-mingw32/include/QtGui /usr/x86_64-w64-mingw32/include/QtQuick /usr/x86_64-w64-mingw32/include/QtQml /usr/x86_64-w64-mingw32/include/QtNetwork /usr/x86_64-w64-mingw32/include/QtWidgets /usr/x86_64-w64-mingw32/include/QtWebKit /usr/x86_64-w64-mingw32/include/QtWebKitWidgets)
elseif (UNIX)
@ -25,14 +25,14 @@ elseif (UNIX)
endif ()
#find_package(Qt5Core REQUIRED)
#find_package(Qt5Gui REQUIRED)
#find_package(Qt5Quick REQUIRED)
#find_package(Qt5Qml REQUIRED)
#find_package(Qt5Network REQUIRED)
find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Quick REQUIRED)
find_package(Qt5Qml REQUIRED)
find_package(Qt5Network REQUIRED)
find_package(Qt5Widgets REQUIRED)
#find_package(Qt5WebKit REQUIRED)
#find_package(Qt5WebKitWidgets REQUIRED)
find_package(Qt5WebKit REQUIRED)
find_package(Qt5WebKitWidgets REQUIRED)
qt5_wrap_ui(ui_Main.h Main.ui)
# Set name of binary and add_executable()
@ -58,7 +58,7 @@ else ()
add_executable(${EXECUTEABLE} Main.ui ${SRC_LIST})
endif ()
#qt5_use_modules(${EXECUTEABLE} Core)# Gui Widgets Network WebKit WebKitWidgets)
qt5_use_modules(${EXECUTEABLE} Core)# Gui Widgets Network WebKit WebKitWidgets)
target_link_libraries(${EXECUTEABLE} qethereum ethereum evm ethcore secp256k1 gmp ${CRYPTOPP_LS} serpent lll evmface ethential)
if (APPLE)
@ -70,7 +70,7 @@ if (APPLE)
# will not be set but defaults to release.
set(generator_lowercase "${CMAKE_GENERATOR}")
string(TOLOWER "${CMAKE_GENERATOR}" generator_lowercase)
if (generator_lowercase STREQUAL "xcode")
if ("${generator_lowercase}" STREQUAL "xcode")
# TODO: Not sure how to resolve this. Possibly \${TARGET_BUILD_DIR}
set(binary_build_dir "${CMAKE_CURRENT_BINARY_DIR}/Debug")
else ()
@ -92,7 +92,7 @@ if (APPLE)
DEPENDS ${PROJECT_NAME}
)
elseif (${TARGET_PLATFORM} STREQUAL "w64")
elseif ("${TARGET_PLATFORM}" STREQUAL "w64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-keep-inline-dllexport -static-libgcc -static-libstdc++ -static")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-s -Wl,-subsystem,windows -mthreads -L/usr/x86_64-w64-mingw32/plugins/platforms")
target_link_libraries(${EXECUTEABLE} gcc)

2
eth/CMakeLists.txt

@ -25,7 +25,7 @@ if(READLINE_LS)
target_link_libraries(${EXECUTABLE} ${READLINE_LS})
endif()
if (${TARGET_PLATFORM} STREQUAL "w64")
if ("${TARGET_PLATFORM}" STREQUAL "w64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
target_link_libraries(${EXECUTABLE} boost_system-mt-s)
target_link_libraries(${EXECUTABLE} boost_filesystem-mt-s)

2
exp/CMakeLists.txt

@ -16,7 +16,7 @@ target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LS})
endif()
target_link_libraries(${EXECUTABLE} ${LEVELDB_LS})
if (${TARGET_PLATFORM} STREQUAL "w64")
if ("${TARGET_PLATFORM}" STREQUAL "w64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
target_link_libraries(${EXECUTABLE} gcc)
target_link_libraries(${EXECUTABLE} gdi32)

2
libethcore/CMakeLists.txt

@ -24,7 +24,7 @@ endif()
target_link_libraries(${EXECUTABLE} ${LEVELDB_LS})
target_link_libraries(${EXECUTABLE} ${CRYPTOPP_LS})
if(${TARGET_PLATFORM} STREQUAL "w64")
if("${TARGET_PLATFORM}" STREQUAL "w64")
target_link_libraries(${EXECUTABLE} boost_system-mt-s)
target_link_libraries(${EXECUTABLE} boost_filesystem-mt-s)
target_link_libraries(${EXECUTABLE} boost_thread_win32-mt-s)

2
libethential/CMakeLists.txt

@ -22,7 +22,7 @@ include_directories(..)
target_link_libraries(${EXECUTABLE} ethential)
if(${TARGET_PLATFORM} STREQUAL "w64")
if("${TARGET_PLATFORM}" STREQUAL "w64")
include_directories(/usr/x86_64-w64-mingw32/include/cryptopp)
target_link_libraries(${EXECUTABLE} boost_system-mt-s)
target_link_libraries(${EXECUTABLE} boost_thread_win32-mt-s)

2
libethereum/CMakeLists.txt

@ -28,7 +28,7 @@ target_link_libraries(${EXECUTABLE} ${LEVELDB_LS})
target_link_libraries(${EXECUTABLE} ${CRYPTOPP_LS})
target_link_libraries(${EXECUTABLE} gmp)
if(${TARGET_PLATFORM} STREQUAL "w64")
if("${TARGET_PLATFORM}" STREQUAL "w64")
target_link_libraries(${EXECUTABLE} boost_system-mt-s)
target_link_libraries(${EXECUTABLE} boost_filesystem-mt-s)
target_link_libraries(${EXECUTABLE} boost_thread_win32-mt-s)

21
libethereum/State.cpp

@ -362,9 +362,7 @@ bool State::sync(BlockChain const& _bc, h256 _block, BlockInfo const& _bi)
for (auto it = chain.rbegin(); it != chain.rend(); ++it)
{
auto b = _bc.block(*it);
m_currentBlock.populate(b);
m_currentBlock.verifyInternals(b);
enact(b, BlockInfo());
enact(b);
cleanup(true);
}
}
@ -391,7 +389,6 @@ u256 State::enactOn(bytesConstRef _block, BlockInfo const& _bi, BlockChain const
biGrandParent.populate(_bc.block(biParent.parentHash));
sync(_bc, _bi.parentHash);
resetCurrent();
m_currentBlock = _bi;
m_previousBlock = biParent;
return enact(_block, biGrandParent);
}
@ -507,11 +504,11 @@ bool State::sync(TransactionQueue& _tq, bool* _changed)
return ret;
}
u256 State::enact(bytesConstRef _block, BlockInfo const& _grandParent)
u256 State::enact(bytesConstRef _block, BlockInfo const& _grandParent, bool _checkNonce)
{
// m_currentBlock is assumed to be prepopulated and reset.
#if !RELEASE
#if !ETH_RELEASE
BlockInfo bi(_block);
assert(m_previousBlock.hash == bi.parentHash);
assert(m_currentBlock.parentHash == bi.parentHash);
@ -521,6 +518,10 @@ u256 State::enact(bytesConstRef _block, BlockInfo const& _grandParent)
if (m_currentBlock.parentHash != m_previousBlock.hash)
throw InvalidParentHash();
// Populate m_currentBlock with the correct values.
m_currentBlock.populate(_block, _checkNonce);
m_currentBlock.verifyInternals(_block);
// cnote << "playback begins:" << m_state.root();
// cnote << m_state;
@ -540,7 +541,7 @@ u256 State::enact(bytesConstRef _block, BlockInfo const& _grandParent)
// Invalid state root
cnote << m_state.root() << "\n" << m_state;
cnote << *this;
cnote << "INVALID: " << hex << tr[1].toInt<u256>();
cnote << "INVALID: " << tr[1].toHash<h256>();
throw InvalidTransactionStateRoot();
}
if (tr[2].toInt<u256>() != gasUsed())
@ -653,9 +654,9 @@ bool State::amIJustParanoid(BlockChain const& _bc)
try
{
cnote << "PARANOIA root:" << s.rootHash();
s.m_currentBlock.populate(&block.out(), false); // don't check nonce for this since we haven't mined it yet.
s.m_currentBlock.verifyInternals(&block.out());
s.enact(&block.out(), BlockInfo());
// s.m_currentBlock.populate(&block.out(), false);
// s.m_currentBlock.verifyInternals(&block.out());
s.enact(&block.out(), BlockInfo(), false); // don't check nonce for this since we haven't mined it yet.
s.cleanup(false);
return true;
}

2
libethereum/State.h

@ -283,7 +283,7 @@ private:
/// Execute the given block, assuming it corresponds to m_currentBlock. If _grandParent is passed, it will be used to check the uncles.
/// Throws on failure.
u256 enact(bytesConstRef _block, BlockInfo const& _grandParent = BlockInfo());
u256 enact(bytesConstRef _block, BlockInfo const& _grandParent = BlockInfo(), bool _checkNonce = true);
// Two priviledged entry points for transaction processing used by the VM (these don't get added to the Transaction lists):
// We assume all instrinsic fees are paid up before this point.

2
libevm/CMakeLists.txt

@ -28,7 +28,7 @@ endif()
target_link_libraries(${EXECUTABLE} ${LEVELDB_LS})
target_link_libraries(${EXECUTABLE} ${CRYPTOPP_LS})
if(${TARGET_PLATFORM} STREQUAL "w64")
if("${TARGET_PLATFORM}" STREQUAL "w64")
target_link_libraries(${EXECUTABLE} boost_system-mt-s)
target_link_libraries(${EXECUTABLE} boost_filesystem-mt-s)
target_link_libraries(${EXECUTABLE} boost_thread_win32-mt-s)

2
libevmface/CMakeLists.txt

@ -19,7 +19,7 @@ include_directories(..)
target_link_libraries(${EXECUTABLE} ethential)
if(${TARGET_PLATFORM} STREQUAL "w64")
if("${TARGET_PLATFORM}" STREQUAL "w64")
target_link_libraries(${EXECUTABLE} boost_thread_win32-mt-s)
target_link_libraries(${EXECUTABLE} iphlpapi)
target_link_libraries(${EXECUTABLE} ws2_32)

2
liblll/CMakeLists.txt

@ -21,7 +21,7 @@ target_link_libraries(${EXECUTABLE} evmface)
target_link_libraries(${EXECUTABLE} ethential)
if(${TARGET_PLATFORM} STREQUAL "w64")
if("${TARGET_PLATFORM}" STREQUAL "w64")
target_link_libraries(${EXECUTABLE} boost_system-mt-s)
target_link_libraries(${EXECUTABLE} boost_thread_win32-mt-s)
target_link_libraries(${EXECUTABLE} iphlpapi)

2
libpyserpent/CMakeLists.txt

@ -20,7 +20,7 @@ target_link_libraries(${EXECUTABLE} evmface)
target_link_libraries(${EXECUTABLE} ethential)
target_link_libraries(${EXECUTABLE} ${PYTHON_LS})
if(${TARGET_PLATFORM} STREQUAL "w64")
if("${TARGET_PLATFORM}" STREQUAL "w64")
target_link_libraries(${EXECUTABLE} boost_python_win32-mt-s)
target_link_libraries(${EXECUTABLE} boost_thread_win32-mt-s)
target_link_libraries(${EXECUTABLE} iphlpapi)

6
libqethereum/CMakeLists.txt

@ -18,7 +18,7 @@ if (APPLE)
set(CMAKE_PREFIX_PATH /usr/local/opt/qt5)
include_directories(/usr/local/opt/qt5/include /usr/local/include)
elseif (${TARGET_PLATFORM} STREQUAL "w64")
elseif ("${TARGET_PLATFORM}" STREQUAL "w64")
set(SRC_LIST ${SRC_LIST} ../windows/qt_plugin_import.cpp)
elseif (UNIX)
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ";$ENV{QTDIR}/lib/cmake")
@ -72,7 +72,7 @@ if (APPLE)
# will not be set but defaults to release.
set(generator_lowercase "${CMAKE_GENERATOR}")
string(TOLOWER "${CMAKE_GENERATOR}" generator_lowercase)
if (generator_lowercase STREQUAL "xcode")
if ("${generator_lowercase}" STREQUAL "xcode")
# TODO: Not sure how to resolve this. Possibly \${TARGET_BUILD_DIR}
set(binary_build_dir "${CMAKE_CURRENT_BINARY_DIR}/Debug")
else ()
@ -96,7 +96,7 @@ if (APPLE)
)
endif ()
elseif (${TARGET_PLATFORM} STREQUAL "w64")
elseif ("${TARGET_PLATFORM}" STREQUAL "w64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-keep-inline-dllexport -static-libgcc -static-libstdc++ -static")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-s -Wl,-subsystem,windows -mthreads -L/usr/x86_64-w64-mingw32/plugins/platforms")
target_link_libraries(${EXECUTABLE} gcc)

2
libserpent/CMakeLists.txt

@ -21,7 +21,7 @@ target_link_libraries(${EXECUTABLE} lll)
target_link_libraries(${EXECUTABLE} evmface)
target_link_libraries(${EXECUTABLE} ethential)
if(${TARGET_PLATFORM} STREQUAL "w64")
if("${TARGET_PLATFORM}" STREQUAL "w64")
target_link_libraries(${EXECUTABLE} boost_thread_win32-mt-s)
target_link_libraries(${EXECUTABLE} iphlpapi)
target_link_libraries(${EXECUTABLE} ws2_32)

2
lllc/CMakeLists.txt

@ -12,7 +12,7 @@ target_link_libraries(${EXECUTABLE} lll)
target_link_libraries(${EXECUTABLE} evmface)
target_link_libraries(${EXECUTABLE} ethential)
if (${TARGET_PLATFORM} STREQUAL "w64")
if ("${TARGET_PLATFORM}" STREQUAL "w64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
target_link_libraries(${EXECUTABLE} gcc)
target_link_libraries(${EXECUTABLE} gdi32)

2
neth/CMakeLists.txt

@ -23,7 +23,7 @@ if(JSONRPC_LS)
target_link_libraries(${EXECUTABLE} ${JSONRPC_LS})
endif()
if (${TARGET_PLATFORM} STREQUAL "w64")
if ("${TARGET_PLATFORM}" STREQUAL "w64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
target_link_libraries(${EXECUTABLE} gcc)
target_link_libraries(${EXECUTABLE} gdi32)

2
sc/CMakeLists.txt

@ -13,7 +13,7 @@ target_link_libraries(${EXECUTABLE} lll)
target_link_libraries(${EXECUTABLE} evmface)
target_link_libraries(${EXECUTABLE} ethential)
if (${TARGET_PLATFORM} STREQUAL "w64")
if ("${TARGET_PLATFORM}" STREQUAL "w64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
target_link_libraries(${EXECUTABLE} gcc)
target_link_libraries(${EXECUTABLE} gdi32)

2
test/CMakeLists.txt

@ -14,7 +14,7 @@ target_link_libraries(testeth secp256k1)
target_link_libraries(testeth gmp)
target_link_libraries(testeth ${CRYPTOPP_LS})
if (${TARGET_PLATFORM} STREQUAL "w64")
if ("${TARGET_PLATFORM}" STREQUAL "w64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
target_link_libraries(testeth boost_system-mt-s)
target_link_libraries(testeth boost_filesystem-mt-s)

6
walleth/CMakeLists.txt

@ -20,7 +20,7 @@ if (APPLE)
set(CMAKE_PREFIX_PATH /usr/local/opt/qt5)
include_directories(/usr/local/opt/qt5/include /usr/local/include)
elseif (${TARGET_PLATFORM} STREQUAL "w64")
elseif ("${TARGET_PLATFORM}" STREQUAL "w64")
set(SRC_LIST ${SRC_LIST} ../windows/qt_plugin_import.cpp)
elseif (UNIX)
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ";$ENV{QTDIR}/lib/cmake")
@ -72,7 +72,7 @@ if (APPLE)
# will not be set but defaults to release.
set(generator_lowercase "${CMAKE_GENERATOR}")
string(TOLOWER "${CMAKE_GENERATOR}" generator_lowercase)
if (generator_lowercase STREQUAL "xcode")
if ("${generator_lowercase}" STREQUAL "xcode")
# TODO: Not sure how to resolve this. Possibly \${TARGET_BUILD_DIR}
set(binary_build_dir "${CMAKE_CURRENT_BINARY_DIR}/Debug")
else ()
@ -96,7 +96,7 @@ if (APPLE)
)
endif ()
elseif (${TARGET_PLATFORM} STREQUAL "w64")
elseif ("${TARGET_PLATFORM}" STREQUAL "w64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-keep-inline-dllexport -static-libgcc -static-libstdc++ -static")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-s -Wl,-subsystem,windows -mthreads -L/usr/x86_64-w64-mingw32/plugins/platforms")
target_link_libraries(${EXECUTEABLE} gcc)

Loading…
Cancel
Save