diff options
-rw-r--r-- | cmake/CheckTrezor.cmake | 4 | ||||
-rw-r--r-- | cmake/Version.cmake | 2 | ||||
-rw-r--r-- | contrib/gitian/gitian-linux.yml | 29 | ||||
-rw-r--r-- | src/cryptonote_core/tx_pool.cpp | 5 |
4 files changed, 24 insertions, 16 deletions
diff --git a/cmake/CheckTrezor.cmake b/cmake/CheckTrezor.cmake index d2fe60d92..f600cc0bb 100644 --- a/cmake/CheckTrezor.cmake +++ b/cmake/CheckTrezor.cmake @@ -91,7 +91,7 @@ endif() # Protobuf compilation test if(Protobuf_FOUND AND USE_DEVICE_TREZOR AND TREZOR_PYTHON) - execute_process(COMMAND ${Protobuf_PROTOC_EXECUTABLE} -I "${CMAKE_SOURCE_DIR}/cmake" -I "${Protobuf_INCLUDE_DIR}" "${CMAKE_SOURCE_DIR}/cmake/test-protobuf.proto" --cpp_out ${CMAKE_BINARY_DIR} RESULT_VARIABLE RET OUTPUT_VARIABLE OUT ERROR_VARIABLE ERR) + execute_process(COMMAND ${Protobuf_PROTOC_EXECUTABLE} -I "${CMAKE_CURRENT_LIST_DIR}" -I "${Protobuf_INCLUDE_DIR}" "${CMAKE_CURRENT_LIST_DIR}/test-protobuf.proto" --cpp_out ${CMAKE_BINARY_DIR} RESULT_VARIABLE RET OUTPUT_VARIABLE OUT ERROR_VARIABLE ERR) if(RET) message(STATUS "Protobuf test generation failed: ${OUT} ${ERR}") endif() @@ -100,7 +100,7 @@ if(Protobuf_FOUND AND USE_DEVICE_TREZOR AND TREZOR_PYTHON) "${CMAKE_BINARY_DIR}" SOURCES "${CMAKE_BINARY_DIR}/test-protobuf.pb.cc" - "${CMAKE_SOURCE_DIR}/cmake/test-protobuf.cpp" + "${CMAKE_CURRENT_LIST_DIR}/test-protobuf.cpp" CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${Protobuf_INCLUDE_DIR};${CMAKE_BINARY_DIR}" "-DCMAKE_CXX_STANDARD=11" diff --git a/cmake/Version.cmake b/cmake/Version.cmake index a6c13ab6c..707d72639 100644 --- a/cmake/Version.cmake +++ b/cmake/Version.cmake @@ -28,7 +28,7 @@ function (write_version tag) set(VERSIONTAG "${tag}" CACHE STRING "The tag portion of the Monero software version" FORCE) - configure_file("${CMAKE_SOURCE_DIR}/src/version.cpp.in" "${CMAKE_BINARY_DIR}/version.cpp") + configure_file("${CMAKE_CURRENT_LIST_DIR}/../src/version.cpp.in" "${CMAKE_BINARY_DIR}/version.cpp") endfunction () find_package(Git QUIET) diff --git a/contrib/gitian/gitian-linux.yml b/contrib/gitian/gitian-linux.yml index 4a2f3798a..c682b8f36 100644 --- a/contrib/gitian/gitian-linux.yml +++ b/contrib/gitian/gitian-linux.yml @@ -111,6 +111,11 @@ script: | rm -f $WRAP_DIR/extra_includes/i686-linux-gnu/asm ln -s /usr/include/x86_64-linux-gnu/asm $EXTRA_INCLUDES_BASE/i686-linux-gnu/asm + # glibc 2.23 breaks compatibility with <=2.19 use of lgamma function. + # Hack the math header to restore the old behavior. + mkdir $EXTRA_INCLUDES_BASE/bits + sed -e '/__REDIRFROM .lgamma,/,+3s/_USE_/_DONTUSE_/g' /usr/include/x86_64-linux-gnu/bits/math-finite.h > $EXTRA_INCLUDES_BASE/bits/math-finite.h + # gcc 7+ honors SOURCE_DATE_EPOCH, no faketime needed export SOURCE_DATE_EPOCH=`date -d 2000-01-01T12:00:00 +%s` @@ -127,14 +132,14 @@ script: | # Build dependencies for each host export TAR_OPTIONS=--mtime=2000-01-01T12:00:00 for i in $HOSTS; do - EXTRA_INCLUDES="$EXTRA_INCLUDES_BASE/$i" - if [ -d "$EXTRA_INCLUDES" ]; then - export C_INCLUDE_PATH="$EXTRA_INCLUDES" - export CPLUS_INCLUDE_PATH="$EXTRA_INCLUDES" + ARCH_INCLUDES="$EXTRA_INCLUDES_BASE/$i" + if [ -d "$ARCH_INCLUDES" ]; then + EXTRA_INCLUDES="${EXTRA_INCLUDES_BASE}:${ARCH_INCLUDES}" else - unset C_INCLUDE_PATH - unset CPLUS_INCLUDE_PATH + EXTRA_INCLUDES="${EXTRA_INCLUDES_BASE}" fi + export C_INCLUDE_PATH="$EXTRA_INCLUDES" + export CPLUS_INCLUDE_PATH="$EXTRA_INCLUDES" make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}" V=1 done @@ -151,14 +156,14 @@ script: | for i in ${HOSTS}; do export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH} mkdir build && cd build - EXTRA_INCLUDES="$EXTRA_INCLUDES_BASE/$i" - if [ -d "$EXTRA_INCLUDES" ]; then - export C_INCLUDE_PATH="$EXTRA_INCLUDES" - export CPLUS_INCLUDE_PATH="$EXTRA_INCLUDES" + ARCH_INCLUDES="$EXTRA_INCLUDES_BASE/$i" + if [ -d "$ARCH_INCLUDES" ]; then + EXTRA_INCLUDES="${EXTRA_INCLUDES_BASE}:${ARCH_INCLUDES}" else - unset C_INCLUDE_PATH - unset CPLUS_INCLUDE_PATH + EXTRA_INCLUDES="${EXTRA_INCLUDES_BASE}" fi + export C_INCLUDE_PATH="$EXTRA_INCLUDES" + export CPLUS_INCLUDE_PATH="$EXTRA_INCLUDES" cmake .. -DCMAKE_TOOLCHAIN_FILE=${BASEPREFIX}/${i}/share/toolchain.cmake -DBACKCOMPAT=ON make ${MAKEOPTS} chmod 755 bin/* diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp index 85bcf2246..28721ee36 100644 --- a/src/cryptonote_core/tx_pool.cpp +++ b/src/cryptonote_core/tx_pool.cpp @@ -1391,7 +1391,10 @@ namespace cryptonote txpool_tx_meta_t meta; if (!m_blockchain.get_txpool_tx_meta(sorted_it->second, meta)) { - MERROR(" failed to find tx meta"); + static bool warned = false; + if (!warned) + MERROR(" failed to find tx meta: " << sorted_it->second << " (will only print once)"); + warned = true; continue; } LOG_PRINT_L2("Considering " << sorted_it->second << ", weight " << meta.weight << ", current block weight " << total_weight << "/" << max_total_weight << ", current coinbase " << print_money(best_coinbase) << ", relay method " << (unsigned)meta.get_relay_method()); |