From 011e1e2b6707b35821da6a938b3593cae0eb576e Mon Sep 17 00:00:00 2001 From: Phillip Mienk Date: Thu, 25 Oct 2018 21:10:23 -0700 Subject: [PATCH 1/2] Regenerate artifacts. --- .travis.yml | 6 ++-- Makefile.am | 12 ++++---- builds/cmake/CMakeLists.txt | 56 ++++++++----------------------------- configure.ac | 27 ------------------ install.sh | 15 ---------- libbitcoin-server.pc.in | 4 +-- 6 files changed, 22 insertions(+), 98 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3ea16b10..4db640bb 100755 --- a/.travis.yml +++ b/.travis.yml @@ -85,9 +85,9 @@ script: # Download and build libbitcoin-server and all dependencies. - if [[ $OSX && $CLANG && $STATIC ]]; then CC=$CC CXX=$CXX ./install.sh --enable-isystem --without-consensus --disable-shared --build-boost --build-zmq --prefix=$TRAVIS_BUILD_DIR/my-prefix; fi - if [[ $LINUX && $CLANG && $STATIC ]]; then CC=$CC CXX=$CXX ./install.sh --enable-isystem --disable-shared --build-boost --build-zmq --prefix=$TRAVIS_BUILD_DIR/my-prefix CFLAGS='-Os' CXXFLAGS='-Os'; fi - - if [[ $LINUX && $GCC && $STATIC ]]; then CC=$CC CXX=$CXX ./install.sh --enable-isystem --build-boost --build-zmq --build-mbedtls --disable-shared --build-dir=my-build --prefix=$TRAVIS_BUILD_DIR/my-prefix --with-bash-completiondir=$TRAVIS_BUILD_DIR/my-prefix/share/bash-completion/completions CFLAGS='-Og -g --coverage' CXXFLAGS='-Og -g --coverage'; fi - - if [[ $OSX && $CLANG && $DYNAMIC ]]; then CC=$CC CXX=$CXX ./install.sh --enable-isystem --build-zmq --build-mbedtls --disable-static --with-bash-completiondir; fi - - if [[ $LINUX && $CLANG && $DYNAMIC ]]; then CC=$CC CXX=$CXX ./install.sh --enable-isystem --build-boost --build-zmq --build-mbedtls --disable-ndebug --disable-static --prefix=$TRAVIS_BUILD_DIR/my-prefix CFLAGS='-Os' CXXFLAGS='-Os'; fi + - if [[ $LINUX && $GCC && $STATIC ]]; then CC=$CC CXX=$CXX ./install.sh --enable-isystem --build-boost --build-zmq --disable-shared --build-dir=my-build --prefix=$TRAVIS_BUILD_DIR/my-prefix --with-bash-completiondir=$TRAVIS_BUILD_DIR/my-prefix/share/bash-completion/completions CFLAGS='-Og -g --coverage' CXXFLAGS='-Og -g --coverage'; fi + - if [[ $OSX && $CLANG && $DYNAMIC ]]; then CC=$CC CXX=$CXX ./install.sh --enable-isystem --build-zmq --disable-static --with-bash-completiondir; fi + - if [[ $LINUX && $CLANG && $DYNAMIC ]]; then CC=$CC CXX=$CXX ./install.sh --enable-isystem --build-boost --build-zmq --disable-ndebug --disable-static --prefix=$TRAVIS_BUILD_DIR/my-prefix CFLAGS='-Os' CXXFLAGS='-Os'; fi - if [[ $LINUX && $GCC && $DYNAMIC ]]; then CC=$CC CXX=$CXX ./install.sh --enable-isystem --without-consensus --disable-static --build-boost --build-zmq --with-bash-completiondir=$TRAVIS_BUILD_DIR/my-prefix/share/bash-completion/completions --prefix=$TRAVIS_BUILD_DIR/my-prefix CFLAGS='-Os -s' CXXFLAGS='-Os -s'; fi after_success: diff --git a/Makefile.am b/Makefile.am index 24db3573..fdeb0dac 100644 --- a/Makefile.am +++ b/Makefile.am @@ -32,8 +32,8 @@ doc_DATA = \ # src/libbitcoin-server.la => ${libdir} #------------------------------------------------------------------------------ lib_LTLIBRARIES = src/libbitcoin-server.la -src_libbitcoin_server_la_CPPFLAGS = -I${srcdir}/include -DSYSCONFDIR=\"${sysconfdir}\" ${mbedtls} ${bitcoin_protocol_BUILD_CPPFLAGS} ${bitcoin_node_BUILD_CPPFLAGS} ${mbedtls_BUILD_CPPFLAGS} -src_libbitcoin_server_la_LIBADD = ${bitcoin_protocol_LIBS} ${bitcoin_node_LIBS} ${mbedtls_LIBS} +src_libbitcoin_server_la_CPPFLAGS = -I${srcdir}/include -DSYSCONFDIR=\"${sysconfdir}\" ${bitcoin_protocol_BUILD_CPPFLAGS} ${bitcoin_node_BUILD_CPPFLAGS} +src_libbitcoin_server_la_LIBADD = ${bitcoin_protocol_LIBS} ${bitcoin_node_LIBS} src_libbitcoin_server_la_SOURCES = \ src/configuration.cpp \ src/parser.cpp \ @@ -61,8 +61,8 @@ if WITH_TESTS TESTS = libbitcoin-server-test_runner.sh check_PROGRAMS = test/libbitcoin-server-test -test_libbitcoin_server_test_CPPFLAGS = -I${srcdir}/include ${mbedtls} ${bitcoin_protocol_BUILD_CPPFLAGS} ${bitcoin_node_BUILD_CPPFLAGS} ${mbedtls_BUILD_CPPFLAGS} -test_libbitcoin_server_test_LDADD = src/libbitcoin-server.la ${boost_unit_test_framework_LIBS} ${bitcoin_protocol_LIBS} ${bitcoin_node_LIBS} ${mbedtls_LIBS} +test_libbitcoin_server_test_CPPFLAGS = -I${srcdir}/include ${bitcoin_protocol_BUILD_CPPFLAGS} ${bitcoin_node_BUILD_CPPFLAGS} +test_libbitcoin_server_test_LDADD = src/libbitcoin-server.la ${boost_unit_test_framework_LIBS} ${bitcoin_protocol_LIBS} ${bitcoin_node_LIBS} test_libbitcoin_server_test_SOURCES = \ test/main.cpp \ test/server.cpp \ @@ -75,8 +75,8 @@ endif WITH_TESTS if WITH_CONSOLE bin_PROGRAMS = console/bs -console_bs_CPPFLAGS = -I${srcdir}/include ${mbedtls} ${bitcoin_protocol_BUILD_CPPFLAGS} ${bitcoin_node_BUILD_CPPFLAGS} ${mbedtls_BUILD_CPPFLAGS} -console_bs_LDADD = src/libbitcoin-server.la ${bitcoin_protocol_LIBS} ${bitcoin_node_LIBS} ${mbedtls_LIBS} +console_bs_CPPFLAGS = -I${srcdir}/include ${bitcoin_protocol_BUILD_CPPFLAGS} ${bitcoin_node_BUILD_CPPFLAGS} +console_bs_LDADD = src/libbitcoin-server.la ${bitcoin_protocol_LIBS} ${bitcoin_node_LIBS} console_bs_SOURCES = \ console/executor.cpp \ console/executor.hpp \ diff --git a/builds/cmake/CMakeLists.txt b/builds/cmake/CMakeLists.txt index d1a89556..85d38ab5 100644 --- a/builds/cmake/CMakeLists.txt +++ b/builds/cmake/CMakeLists.txt @@ -42,21 +42,12 @@ set( CMAKE_CXX_STANDARD_REQUIRED ON ) # Warn on all stuff. add_compile_options( "-Wall" ) -# Warn on all stuff. -add_compile_options( "-Wall" ) - -# Warn on extra stuff. -add_compile_options( "-Wextra" ) - # Warn on extra stuff. add_compile_options( "-Wextra" ) # Be really annoying. add_compile_options( "-Wpedantic" ) -# Be really annoying. -add_compile_options( "-Wpedantic" ) - # Disallow warning on style order of declarations. add_compile_options( "-Wno-reorder" ) @@ -90,14 +81,6 @@ set( with-tests "yes" CACHE BOOL "Compile with unit tests." ) #------------------------------------------------------------------------------ set( with-console "yes" CACHE BOOL "Compile console application." ) -# Implement -Dwith-mbedtls and output ${mbedtls}. -#------------------------------------------------------------------------------ -set( with-mbedtls "no" CACHE BOOL "Compile with MbedTLS." ) - -if (with-mbedtls) - set( mbedtls "-DWITH_MBEDTLS" ) -endif() - # Implement -Denable-ndebug and define NDEBUG. #------------------------------------------------------------------------------ set( enable-ndebug "yes" CACHE BOOL "Compile without debug assertions." ) @@ -142,24 +125,16 @@ find_package( Bitcoin-Node 4.0.0 REQUIRED ) #------------------------------------------------------------------------------ find_package( Bitcoin-Protocol 4.0.0 REQUIRED ) -# Find mbedtls -#------------------------------------------------------------------------------ -if (with-mbedtls) - find_package( Mbedtls REQUIRED ) -endif() - # Define project common includes directories #------------------------------------------------------------------------------ if (BUILD_SHARED_LIBS) include_directories( SYSTEM ${bitcoin_protocol_INCLUDE_DIRS} - ${bitcoin_node_INCLUDE_DIRS} - ${mbedtls_INCLUDE_DIRS} ) + ${bitcoin_node_INCLUDE_DIRS} ) else() include_directories( SYSTEM ${bitcoin_protocol_STATIC_INCLUDE_DIRS} - ${bitcoin_node_STATIC_INCLUDE_DIRS} - ${mbedtls_STATIC_INCLUDE_DIRS} ) + ${bitcoin_node_STATIC_INCLUDE_DIRS} ) endif() # Define project common library directories @@ -167,13 +142,11 @@ endif() if (BUILD_SHARED_LIBS) link_directories( ${bitcoin_protocol_LIBRARY_DIRS} - ${bitcoin_node_LIBRARY_DIRS} - ${mbedtls_LIBRARY_DIRS} ) + ${bitcoin_node_LIBRARY_DIRS} ) else() link_directories( ${bitcoin_protocol_STATIC_LIBRARY_DIRS} - ${bitcoin_node_STATIC_LIBRARY_DIRS} - ${mbedtls_STATIC_LIBRARY_DIRS} ) + ${bitcoin_node_STATIC_LIBRARY_DIRS} ) endif() # Define project common libraries/linker flags. @@ -183,20 +156,17 @@ if (BUILD_SHARED_LIBS) "-fstack-protector" "-fstack-protector-all" ${bitcoin_protocol_LIBRARIES} - ${bitcoin_node_LIBRARIES} - ${mbedtls_LIBRARIES} ) + ${bitcoin_node_LIBRARIES} ) else() link_libraries( "-fstack-protector" "-fstack-protector-all" ${bitcoin_protocol_STATIC_LIBRARIES} - ${bitcoin_node_STATIC_LIBRARIES} - ${mbedtls_STATIC_LIBRARIES} ) + ${bitcoin_node_STATIC_LIBRARIES} ) endif() add_definitions( - -DSYSCONFDIR=\"${sysconfdir}\" - ${mbedtls} ) + -DSYSCONFDIR=\"${sysconfdir}\" ) # Define ${CANONICAL_LIB_NAME} project. #------------------------------------------------------------------------------ @@ -226,14 +196,12 @@ if (BUILD_SHARED_LIBS) target_include_directories( ${CANONICAL_LIB_NAME} PRIVATE "../../include" ${bitcoin_protocol_INCLUDE_DIRS} - ${bitcoin_node_INCLUDE_DIRS} - ${mbedtls_INCLUDE_DIRS} ) + ${bitcoin_node_INCLUDE_DIRS} ) else() target_include_directories( ${CANONICAL_LIB_NAME} PRIVATE "../../include" ${bitcoin_protocol_STATIC_INCLUDE_DIRS} - ${bitcoin_node_STATIC_INCLUDE_DIRS} - ${mbedtls_STATIC_INCLUDE_DIRS} ) + ${bitcoin_node_STATIC_INCLUDE_DIRS} ) endif() target_include_directories( ${CANONICAL_LIB_NAME} PUBLIC @@ -244,13 +212,11 @@ target_include_directories( ${CANONICAL_LIB_NAME} PUBLIC if (BUILD_SHARED_LIBS) target_link_libraries( ${CANONICAL_LIB_NAME} ${bitcoin_protocol_LIBRARIES} - ${bitcoin_node_LIBRARIES} - ${mbedtls_LIBRARIES} ) + ${bitcoin_node_LIBRARIES} ) else() target_link_libraries( ${CANONICAL_LIB_NAME} ${bitcoin_protocol_STATIC_LIBRARIES} - ${bitcoin_node_STATIC_LIBRARIES} - ${mbedtls_STATIC_LIBRARIES} ) + ${bitcoin_node_STATIC_LIBRARIES} ) endif() # Define libbitcoin-server-test project. diff --git a/configure.ac b/configure.ac index 8d655fa4..ebab997a 100644 --- a/configure.ac +++ b/configure.ac @@ -121,17 +121,6 @@ AC_ARG_WITH([console], AC_MSG_RESULT([$with_console]) AM_CONDITIONAL([WITH_CONSOLE], [test x$with_console != xno]) -# Implement --with-mbedtls and output ${mbedtls}. -#------------------------------------------------------------------------------ -AC_MSG_CHECKING([--with-mbedtls option]) -AC_ARG_WITH([mbedtls], - AS_HELP_STRING([--with-mbedtls], - [Compile with MbedTLS. @<:@default=no@:>@]), - [with_mbedtls=$withval], - [with_mbedtls=no]) -AC_MSG_RESULT([$with_mbedtls]) -AS_CASE([${with_mbedtls}], [yes], AC_SUBST([mbedtls], [-DWITH_MBEDTLS])) - # Implement --enable-ndebug and define NDEBUG. #------------------------------------------------------------------------------ AC_MSG_CHECKING([--enable-ndebug option]) @@ -260,22 +249,6 @@ AS_CASE([${enable_isystem}],[yes], AC_MSG_NOTICE([bitcoin_protocol_BUILD_CPPFLAGS : ${bitcoin_protocol_BUILD_CPPFLAGS}]) -# Require mbedtls of at least version 2.12.0 and output ${mbedtls_CPPFLAGS/LIBS/PKG}. -#------------------------------------------------------------------------------ -AS_CASE([${with_mbedtls}], [yes], - [AC_SUBST([mbedtls_INCLUDEDIR], []) - AC_SUBST([mbedtls_OTHER_CPPFLAGS], []) - AC_SUBST([mbedtls_CPPFLAGS], []) - AC_SUBST([mbedtls_ISYS_CPPFLAGS], []) - AC_SUBST([mbedtls_LIBS], ["-lmbedtls -lmbedcrypto -lmbedx509"]) - AC_MSG_NOTICE([mbedtls presumed, not detected - absence of -lmbedtls -lmbedcrypto -lmbedx509 may result in link error.])], []) - -AS_CASE([${enable_isystem}],[yes], - [AC_SUBST([mbedtls_BUILD_CPPFLAGS], [${mbedtls_ISYS_CPPFLAGS}])], - [AC_SUBST([mbedtls_BUILD_CPPFLAGS], [${mbedtls_CPPFLAGS}])]) - -AC_MSG_NOTICE([mbedtls_BUILD_CPPFLAGS : ${mbedtls_BUILD_CPPFLAGS}]) - # Set flags. #============================================================================== diff --git a/install.sh b/install.sh index c8fc51e6..3e9492f1 100755 --- a/install.sh +++ b/install.sh @@ -8,11 +8,8 @@ # Script to build and install libbitcoin-server. # # Script options: -# --with-mbedtls Compile with MbedTLS Support -# Provides a websockets implementation for query. # --build-boost Builds Boost libraries. # --build-zmq Builds ZeroMQ libraries. -# --build-mbedtls Builds MbedTLS libraries. # --build-dir= Location of downloaded and intermediate files. # --prefix= Library install location (defaults to /usr/local). # --disable-shared Disables shared library builds. @@ -40,11 +37,6 @@ BUILD_DIR="build-libbitcoin-server" ZMQ_URL="https://github.com/zeromq/libzmq/releases/download/v4.2.5/zeromq-4.2.5.tar.gz" ZMQ_ARCHIVE="zeromq-4.2.5.tar.gz" -# MBEDTLS archive. -#------------------------------------------------------------------------------ -MBEDTLS_URL="https://tls.mbed.org/download/mbedtls-2.12.0-apache.tgz" -MBEDTLS_ARCHIVE="mbedtls-2.12.0-apache.tgz" - # Boost archive. #------------------------------------------------------------------------------ BOOST_URL="http://downloads.sourceforge.net/project/boost/boost/1.62.0/boost_1_62_0.tar.bz2" @@ -177,11 +169,8 @@ display_help() display_message "Usage: ./install.sh [OPTION]..." display_message "Manage the installation of libbitcoin-server." display_message "Script options:" - display_message " --with-mbedtls Compile with MbedTLS Support" - display_message " Provides a websockets implementation for query." display_message " --build-boost Builds Boost libraries." display_message " --build-zmq Build ZeroMQ libraries." - display_message " --build-mbedtls Builds MbedTLS libraries." display_message " --build-dir= Location of downloaded and intermediate files." display_message " --prefix= Library install location (defaults to /usr/local)." display_message " --disable-shared Disables shared library builds." @@ -214,7 +203,6 @@ for OPTION in "$@"; do # Custom build options (in the form of --build-