From acd22cdfc60f1ff0575f6461eb3dd3febd0c1505 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 10 Apr 2019 02:02:38 -0400 Subject: [PATCH 01/86] update build scripts --- scripts/eosio_build.sh | 45 ++++++++++++++++++++--------------- scripts/eosio_build_amazon.sh | 32 +++++++++++++++++++++++++ scripts/eosio_build_centos.sh | 32 +++++++++++++++++++++++++ scripts/eosio_build_darwin.sh | 32 +++++++++++++++++++++++++ scripts/eosio_build_fedora.sh | 34 +++++++++++++++++++++++++- scripts/eosio_build_ubuntu.sh | 32 +++++++++++++++++++++++++ 6 files changed, 187 insertions(+), 20 deletions(-) diff --git a/scripts/eosio_build.sh b/scripts/eosio_build.sh index a97ceaa5058..43b06c13937 100755 --- a/scripts/eosio_build.sh +++ b/scripts/eosio_build.sh @@ -179,6 +179,30 @@ if [ $STALE_SUBMODS -gt 0 ]; then exit 1 fi +BUILD_CLANG8=false +if [ $NONINTERACTIVE -eq 0 ]; then + printf "#include \nint main(){ std::cout << \"Hello, World!\" << std::endl; }" &> $TEMP_DIR/test.cpp + `c++ -c -std=c++17 $TEMP_DIR/test.cpp -o $TEMP_DIR/test.o &> /dev/null` + if [ $? -ne 0 ]; then + `CXX -c -std=c++17 $TEMP_DIR/test.cpp -o $TEMP_DIR/test.o &> /dev/null` + if [ $? -ne 0 ]; then + printf "Error no C++17 support.\\nEnter Y/y or N/n to continue with downloading and building a viable compiler or exit now.\\nIf you already have a C++17 compiler installed or would like to install your own, export CXX to point to the compiler of your choosing." + read -p "Enter Y/y or N/n to continue with downloading and building a viable compiler or exit now." yn + case $yn in + [Yy]* ) BUILD_CLANG8=true; break;; + [Nn]* ) exit 1;; + * ) echo "Improper input"; exit 1;; + esac + fi + else + CXX=c++ + fi +else + BUILD_CLANG8=true +fi + +export BUILD_CLANG8=$BUILD_CLANG8 + printf "\\nBeginning build version: %s\\n" "${VERSION}" printf "%s\\n" "$( date -u )" printf "User: %s\\n" "$( whoami )" @@ -210,39 +234,25 @@ if [ "$ARCH" == "Linux" ]; then case "$OS_NAME" in "Amazon Linux AMI"|"Amazon Linux") FILE="${REPO_ROOT}/scripts/eosio_build_amazon.sh" - CXX_COMPILER=g++ - C_COMPILER=gcc ;; "CentOS Linux") FILE="${REPO_ROOT}/scripts/eosio_build_centos.sh" - CXX_COMPILER=g++ - C_COMPILER=gcc ;; "elementary OS") FILE="${REPO_ROOT}/scripts/eosio_build_ubuntu.sh" - CXX_COMPILER=clang++-4.0 - C_COMPILER=clang-4.0 ;; "Fedora") export CPATH=/usr/include/llvm4.0:$CPATH # llvm4.0 for fedora package path inclusion FILE="${REPO_ROOT}/scripts/eosio_build_fedora.sh" - CXX_COMPILER=g++ - C_COMPILER=gcc ;; "Linux Mint") FILE="${REPO_ROOT}/scripts/eosio_build_ubuntu.sh" - CXX_COMPILER=clang++-4.0 - C_COMPILER=clang-4.0 ;; "Ubuntu") FILE="${REPO_ROOT}/scripts/eosio_build_ubuntu.sh" - CXX_COMPILER=clang++-4.0 - C_COMPILER=clang-4.0 ;; "Debian GNU/Linux") FILE="${REPO_ROOT}/scripts/eosio_build_ubuntu.sh" - CXX_COMPILER=clang++-4.0 - C_COMPILER=clang-4.0 ;; *) printf "\\nUnsupported Linux Distribution. Exiting now.\\n\\n" @@ -258,8 +268,6 @@ if [ "$ARCH" == "Darwin" ]; then # HOME/lib/cmake: mongo_db_plugin.cpp:25:10: fatal error: 'bsoncxx/builder/basic/kvp.hpp' file not found LOCAL_CMAKE_FLAGS="-DCMAKE_PREFIX_PATH=/usr/local/opt/gettext;$HOME/lib/cmake ${LOCAL_CMAKE_FLAGS}" FILE="${REPO_ROOT}/scripts/eosio_build_darwin.sh" - CXX_COMPILER=clang++ - C_COMPILER=clang OPENSSL_ROOT_DIR=/usr/local/opt/openssl fi @@ -279,8 +287,8 @@ printf "## ENABLE_COVERAGE_TESTING=%s\\n" "${ENABLE_COVERAGE_TESTING}" mkdir -p $BUILD_DIR cd $BUILD_DIR -$CMAKE -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_CXX_COMPILER="${CXX_COMPILER}" \ - -DCMAKE_C_COMPILER="${C_COMPILER}" -DCORE_SYMBOL_NAME="${CORE_SYMBOL_NAME}" \ +$CMAKE -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_CXX_COMPILER="${CXX}" \ + -DCORE_SYMBOL_NAME="${CORE_SYMBOL_NAME}" \ -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=true \ -DENABLE_COVERAGE_TESTING="${ENABLE_COVERAGE_TESTING}" -DBUILD_DOXYGEN="${DOXYGEN}" \ -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/eosio $LOCAL_CMAKE_FLAGS "${REPO_ROOT}" @@ -314,4 +322,3 @@ printf "EOSIO Telegram channel @ https://t.me/EOSProject\\n" printf "EOSIO resources: https://eos.io/resources/\\n" printf "EOSIO Stack Exchange: https://eosio.stackexchange.com\\n" printf "EOSIO wiki: https://github.com/EOSIO/eos/wiki\\n\\n\\n" - diff --git a/scripts/eosio_build_amazon.sh b/scripts/eosio_build_amazon.sh index ff655496a7b..3ab12ca9d54 100755 --- a/scripts/eosio_build_amazon.sh +++ b/scripts/eosio_build_amazon.sh @@ -248,6 +248,38 @@ if [ $? -ne 0 ]; then exit -1; fi cd .. printf "\\n" +if [ $BUILD_CLANG8 ]; then + printf "Checking Clang 8 support...\\n" + if [ ! -d $CLANG8_ROOT ]; then + printf "Installing Clang 8...\\n" + cd ${OPT_LOCATION} \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ + && cd tools \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/lld.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/polly.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/clang.git clang && cd clang/tools \ + && mkdir extra && cd extra \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/clang-tools-extra.git \ + && cd ../../../../projects \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libcxx.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libunwind.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/compiler-rt.git \ + && cd ${OPT_LOCATION}/clang8 \ + && mkdir build && cd build \ + && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all .. \ + && make -j"${JOBS}" \ + && make install \ + && cd ../.. \ + || exit 1 + printf " - Clang 8 successfully installed @ ${CLANG8_ROOT}\\n" + else + printf " - Clang 8 found @ ${CLANG8_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + + printf "\\n" +fi + function print_instructions() { return 0 } diff --git a/scripts/eosio_build_centos.sh b/scripts/eosio_build_centos.sh index 621001d0a97..292f5699464 100755 --- a/scripts/eosio_build_centos.sh +++ b/scripts/eosio_build_centos.sh @@ -299,6 +299,38 @@ if [ $? -ne 0 ]; then exit -1; fi cd .. printf "\\n" +if [ $BUILD_CLANG8 ]; then + printf "Checking Clang 8 support...\\n" + if [ ! -d $CLANG8_ROOT ]; then + printf "Installing Clang 8...\\n" + cd ${OPT_LOCATION} \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ + && cd tools \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/lld.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/polly.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/clang.git clang && cd clang/tools \ + && mkdir extra && cd extra \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/clang-tools-extra.git \ + && cd ../../../../projects \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libcxx.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libunwind.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/compiler-rt.git \ + && cd ${OPT_LOCATION}/clang8 \ + && mkdir build && cd build \ + && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all .. \ + && make -j"${JOBS}" \ + && make install \ + && cd ../.. \ + || exit 1 + printf " - Clang 8 successfully installed @ ${CLANG8_ROOT}\\n" + else + printf " - Clang 8 found @ ${CLANG8_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + + printf "\\n" +fi + function print_instructions() { printf "source ${PYTHON3PATH}/enable\\n" printf "source /opt/rh/devtoolset-7/enable\\n" diff --git a/scripts/eosio_build_darwin.sh b/scripts/eosio_build_darwin.sh index 224b0839f1d..4c1f53bf88f 100755 --- a/scripts/eosio_build_darwin.sh +++ b/scripts/eosio_build_darwin.sh @@ -262,6 +262,38 @@ fi cd .. printf "\\n" +if [ $BUILD_CLANG8 ]; then + printf "Checking Clang 8 support...\\n" + if [ ! -d $CLANG8_ROOT ]; then + printf "Installing Clang 8...\\n" + cd ${OPT_LOCATION} \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ + && cd tools \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/lld.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/polly.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/clang.git clang && cd clang/tools \ + && mkdir extra && cd extra \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/clang-tools-extra.git \ + && cd ../../../../projects \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libcxx.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libunwind.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/compiler-rt.git \ + && cd ${OPT_LOCATION}/clang8 \ + && mkdir build && cd build \ + && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DLLVM_CREATE_XCODE_TOOLCHAIN=ON .. \ + && make -j"${JOBS}" \ + && make install \ + && cd ../.. \ + || exit 1 + printf " - Clang 8 successfully installed @ ${CLANG8_ROOT}\\n" + else + printf " - Clang 8 found @ ${CLANG8_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + + printf "\\n" +fi + function print_instructions() { return 0 } diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index c27f47658d3..d3c2880a0a9 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -231,6 +231,38 @@ if [ $? -ne 0 ]; then exit -1; fi cd .. printf "\\n" +if [ $BUILD_CLANG8 ]; then + printf "Checking Clang 8 support...\\n" + if [ ! -d $CLANG8_ROOT ]; then + printf "Installing Clang 8...\\n" + cd ${OPT_LOCATION} \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ + && cd tools \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/lld.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/polly.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/clang.git clang && cd clang/tools \ + && mkdir extra && cd extra \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/clang-tools-extra.git \ + && cd ../../../../projects \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libcxx.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libunwind.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/compiler-rt.git \ + && cd ${OPT_LOCATION}/clang8 \ + && mkdir build && cd build \ + && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all .. \ + && make -j"${JOBS}" \ + && make install \ + && cd ../.. \ + || exit 1 + printf " - Clang 8 successfully installed @ ${CLANG8_ROOT}\\n" + else + printf " - Clang 8 found @ ${CLANG8_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + + printf "\\n" +fi + function print_instructions() { return 0 -} \ No newline at end of file +} diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index 5561b14a450..d174d7b0127 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -254,6 +254,38 @@ if [ $? -ne 0 ]; then exit -1; fi cd .. printf "\\n" +if [ $BUILD_CLANG8 ]; then + printf "Checking Clang 8 support...\\n" + if [ ! -d $CLANG8_ROOT ]; then + printf "Installing Clang 8...\\n" + cd ${OPT_LOCATION} \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ + && cd tools \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/lld.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/polly.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/clang.git clang && cd clang/tools \ + && mkdir extra && cd extra \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/clang-tools-extra.git \ + && cd ../../../../projects \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libcxx.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libunwind.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/compiler-rt.git \ + && cd ${OPT_LOCATION}/clang8 \ + && mkdir build && cd build \ + && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all .. \ + && make -j"${JOBS}" \ + && make install \ + && cd ../.. \ + || exit 1 + printf " - Clang 8 successfully installed @ ${CLANG8_ROOT}\\n" + else + printf " - Clang 8 found @ ${CLANG8_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + + printf "\\n" +fi + function print_instructions() { return 0 } From 29520adc33a8dc31ac867d5287d4ed4d32d24bcc Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 10 Apr 2019 14:28:50 -0400 Subject: [PATCH 02/86] Pull over from feature/cpp17 branch and new stuff for pinning the compiler --- CMakeLists.txt | 4 +- libraries/chainbase | 2 +- libraries/fc | 2 +- libraries/wasm-jit/CMakeLists.txt | 1 + .../include/eosio/wallet_plugin/se_wallet.hpp | 4 +- .../include/eosio/wallet_plugin/wallet.hpp | 2 +- .../eosio/wallet_plugin/wallet_api.hpp | 2 +- .../eosio/wallet_plugin/yubihsm_wallet.hpp | 4 +- plugins/wallet_plugin/se_wallet.cpp | 8 +- plugins/wallet_plugin/wallet.cpp | 10 +- plugins/wallet_plugin/wallet_manager.cpp | 4 +- plugins/wallet_plugin/yubihsm_wallet.cpp | 6 +- programs/cleos/main.cpp | 8 +- scripts/eosio_build.sh | 10 +- scripts/eosio_build_amazon.sh | 2 +- scripts/eosio_build_centos.sh | 2 +- scripts/eosio_build_darwin.sh | 118 +++++++++--------- scripts/eosio_build_fedora.sh | 2 +- scripts/eosio_build_ubuntu.sh | 2 +- 19 files changed, 98 insertions(+), 95 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 17c3df72451..0aea9883ac5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required( VERSION 3.5 ) +cmake_minimum_required( VERSION 3.8 ) project( EOSIO ) include(CTest) # suppresses DartConfiguration.tcl error @@ -25,7 +25,7 @@ include( InstallDirectoryPermissions ) include( MASSigning ) set( BLOCKCHAIN_NAME "EOSIO" ) -set( CMAKE_CXX_STANDARD 14 ) +set( CMAKE_CXX_STANDARD 17 ) set( CMAKE_CXX_EXTENSIONS ON ) set( CXX_STANDARD_REQUIRED ON) diff --git a/libraries/chainbase b/libraries/chainbase index eb2d0c28bc1..d4a6fd350a9 160000 --- a/libraries/chainbase +++ b/libraries/chainbase @@ -1 +1 @@ -Subproject commit eb2d0c28bc1f1328e8a5fc899291336ad487b084 +Subproject commit d4a6fd350a9f4a812a3e33019c864d198bdb2e10 diff --git a/libraries/fc b/libraries/fc index ae6ec564f0d..89a102d0ca7 160000 --- a/libraries/fc +++ b/libraries/fc @@ -1 +1 @@ -Subproject commit ae6ec564f0db6d3378348ef6b475042e332e612a +Subproject commit 89a102d0ca71bb32b009cf94db32a082da9aa403 diff --git a/libraries/wasm-jit/CMakeLists.txt b/libraries/wasm-jit/CMakeLists.txt index c06e45b5252..fcd74c7d4cd 100644 --- a/libraries/wasm-jit/CMakeLists.txt +++ b/libraries/wasm-jit/CMakeLists.txt @@ -36,6 +36,7 @@ include_directories(${WAVM_INCLUDE_DIR}) # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address") # endif() +set(CMAKE_CXX_STANDARD 11) option(WAVM_METRICS_OUTPUT "controls printing the timings of some operations to stdout" OFF) if(WAVM_METRICS_OUTPUT) add_definitions("-DWAVM_METRICS_OUTPUT=1") diff --git a/plugins/wallet_plugin/include/eosio/wallet_plugin/se_wallet.hpp b/plugins/wallet_plugin/include/eosio/wallet_plugin/se_wallet.hpp index e5c70f1a307..9e33b194a37 100644 --- a/plugins/wallet_plugin/include/eosio/wallet_plugin/se_wallet.hpp +++ b/plugins/wallet_plugin/include/eosio/wallet_plugin/se_wallet.hpp @@ -32,10 +32,10 @@ class se_wallet final : public wallet_api { string create_key(string key_type) override; bool remove_key(string key) override; - optional try_sign_digest(const digest_type digest, const public_key_type public_key) override; + fc::optional try_sign_digest(const digest_type digest, const public_key_type public_key) override; private: std::unique_ptr my; }; -}} \ No newline at end of file +}} diff --git a/plugins/wallet_plugin/include/eosio/wallet_plugin/wallet.hpp b/plugins/wallet_plugin/include/eosio/wallet_plugin/wallet.hpp index 480e7a32a44..900577d082c 100644 --- a/plugins/wallet_plugin/include/eosio/wallet_plugin/wallet.hpp +++ b/plugins/wallet_plugin/include/eosio/wallet_plugin/wallet.hpp @@ -181,7 +181,7 @@ class soft_wallet final : public wallet_api /* Attempts to sign a digest via the given public_key */ - optional try_sign_digest( const digest_type digest, const public_key_type public_key ) override; + fc::optional try_sign_digest( const digest_type digest, const public_key_type public_key ) override; std::shared_ptr my; void encrypt_keys(); diff --git a/plugins/wallet_plugin/include/eosio/wallet_plugin/wallet_api.hpp b/plugins/wallet_plugin/include/eosio/wallet_plugin/wallet_api.hpp index 0627eceff33..61929b04733 100644 --- a/plugins/wallet_plugin/include/eosio/wallet_plugin/wallet_api.hpp +++ b/plugins/wallet_plugin/include/eosio/wallet_plugin/wallet_api.hpp @@ -101,7 +101,7 @@ class wallet_api /** Returns a signature given the digest and public_key, if this wallet can sign via that public key */ - virtual optional try_sign_digest( const digest_type digest, const public_key_type public_key ) = 0; + virtual fc::optional try_sign_digest( const digest_type digest, const public_key_type public_key ) = 0; }; }} diff --git a/plugins/wallet_plugin/include/eosio/wallet_plugin/yubihsm_wallet.hpp b/plugins/wallet_plugin/include/eosio/wallet_plugin/yubihsm_wallet.hpp index e1c0da99118..49caa9c184b 100644 --- a/plugins/wallet_plugin/include/eosio/wallet_plugin/yubihsm_wallet.hpp +++ b/plugins/wallet_plugin/include/eosio/wallet_plugin/yubihsm_wallet.hpp @@ -32,10 +32,10 @@ class yubihsm_wallet final : public wallet_api { string create_key(string key_type) override; bool remove_key(string key) override; - optional try_sign_digest(const digest_type digest, const public_key_type public_key) override; + fc::optional try_sign_digest(const digest_type digest, const public_key_type public_key) override; private: std::unique_ptr my; }; -}} \ No newline at end of file +}} diff --git a/plugins/wallet_plugin/se_wallet.cpp b/plugins/wallet_plugin/se_wallet.cpp index 8b43d569881..2f9ccfffc06 100644 --- a/plugins/wallet_plugin/se_wallet.cpp +++ b/plugins/wallet_plugin/se_wallet.cpp @@ -186,10 +186,10 @@ struct se_wallet_impl { return pub; } - optional try_sign_digest(const digest_type d, const public_key_type public_key) { + fc::optional try_sign_digest(const digest_type d, const public_key_type public_key) { auto it = _keys.find(public_key); if(it == _keys.end()) - return optional{}; + return fc::optional{}; fc::ecdsa_sig sig = ECDSA_SIG_new(); CFErrorRef error = nullptr; @@ -370,8 +370,8 @@ bool se_wallet::remove_key(string key) { return my->remove_key(key); } -optional se_wallet::try_sign_digest(const digest_type digest, const public_key_type public_key) { +fc::optional se_wallet::try_sign_digest(const digest_type digest, const public_key_type public_key) { return my->try_sign_digest(digest, public_key); } -}} \ No newline at end of file +}} diff --git a/plugins/wallet_plugin/wallet.cpp b/plugins/wallet_plugin/wallet.cpp index 53d57697ccd..a40027cb0a9 100644 --- a/plugins/wallet_plugin/wallet.cpp +++ b/plugins/wallet_plugin/wallet.cpp @@ -120,18 +120,18 @@ class soft_wallet_impl string get_wallet_filename() const { return _wallet_filename; } - optional try_get_private_key(const public_key_type& id)const + fc::optional try_get_private_key(const public_key_type& id)const { auto it = _keys.find(id); if( it != _keys.end() ) return it->second; - return optional(); + return fc::optional(); } - optional try_sign_digest( const digest_type digest, const public_key_type public_key ) { + fc::optional try_sign_digest( const digest_type digest, const public_key_type public_key ) { auto it = _keys.find(public_key); if( it == _keys.end() ) - return optional{}; + return fc::optional{}; return it->second.sign(digest); } @@ -401,7 +401,7 @@ private_key_type soft_wallet::get_private_key( public_key_type pubkey )const return my->get_private_key( pubkey ); } -optional soft_wallet::try_sign_digest( const digest_type digest, const public_key_type public_key ) { +fc::optional soft_wallet::try_sign_digest( const digest_type digest, const public_key_type public_key ) { return my->try_sign_digest(digest, public_key); } diff --git a/plugins/wallet_plugin/wallet_manager.cpp b/plugins/wallet_plugin/wallet_manager.cpp index b5287173670..43fa37bc61a 100644 --- a/plugins/wallet_plugin/wallet_manager.cpp +++ b/plugins/wallet_plugin/wallet_manager.cpp @@ -237,7 +237,7 @@ wallet_manager::sign_transaction(const chain::signed_transaction& txn, const fla bool found = false; for (const auto& i : wallets) { if (!i.second->is_locked()) { - optional sig = i.second->try_sign_digest(stxn.sig_digest(id, stxn.context_free_data), pk); + fc::optional sig = i.second->try_sign_digest(stxn.sig_digest(id, stxn.context_free_data), pk); if (sig) { stxn.signatures.push_back(*sig); found = true; @@ -260,7 +260,7 @@ wallet_manager::sign_digest(const chain::digest_type& digest, const public_key_t try { for (const auto& i : wallets) { if (!i.second->is_locked()) { - optional sig = i.second->try_sign_digest(digest, key); + fc::optional sig = i.second->try_sign_digest(digest, key); if (sig) return *sig; } diff --git a/plugins/wallet_plugin/yubihsm_wallet.cpp b/plugins/wallet_plugin/yubihsm_wallet.cpp index cda0d208333..0f367457fa0 100644 --- a/plugins/wallet_plugin/yubihsm_wallet.cpp +++ b/plugins/wallet_plugin/yubihsm_wallet.cpp @@ -139,10 +139,10 @@ struct yubihsm_wallet_impl { }); } - optional try_sign_digest(const digest_type d, const public_key_type public_key) { + fc::optional try_sign_digest(const digest_type d, const public_key_type public_key) { auto it = _keys.find(public_key); if(it == _keys.end()) - return optional{}; + return fc::optional{}; size_t der_sig_sz = 128; uint8_t der_sig[der_sig_sz]; @@ -265,7 +265,7 @@ bool yubihsm_wallet::remove_key(string key) { return true; } -optional yubihsm_wallet::try_sign_digest(const digest_type digest, const public_key_type public_key) { +fc::optional yubihsm_wallet::try_sign_digest(const digest_type digest, const public_key_type public_key) { return my->try_sign_digest(digest, public_key); } diff --git a/programs/cleos/main.cpp b/programs/cleos/main.cpp index caa24ae5ccf..743446fa17a 100644 --- a/programs/cleos/main.cpp +++ b/programs/cleos/main.cpp @@ -382,14 +382,14 @@ void print_action( const fc::variant& at ) { } //resolver for ABI serializer to decode actions in proposed transaction in multisig contract -auto abi_serializer_resolver = [](const name& account) -> optional { - static unordered_map > abi_cache; +auto abi_serializer_resolver = [](const name& account) -> fc::optional { + static unordered_map > abi_cache; auto it = abi_cache.find( account ); if ( it == abi_cache.end() ) { auto result = call(get_abi_func, fc::mutable_variant_object("account_name", account)); auto abi_results = result.as(); - optional abis; + fc::optional abis; if( abi_results.abi.valid() ) { abis.emplace( *abi_results.abi, abi_serializer_max_time ); } else { @@ -480,7 +480,7 @@ void print_result( const fc::variant& result ) { try { cerr << " us\n"; if( status == "failed" ) { - auto soft_except = processed["except"].as>(); + auto soft_except = processed["except"].as>(); if( soft_except ) { edump((soft_except->to_detail_string())); } diff --git a/scripts/eosio_build.sh b/scripts/eosio_build.sh index 43b06c13937..f813b4f99eb 100755 --- a/scripts/eosio_build.sh +++ b/scripts/eosio_build.sh @@ -71,6 +71,8 @@ export BOOST_LINK_LOCATION=${OPT_LOCATION}/boost export LLVM_VERSION=release_40 export LLVM_ROOT=${OPT_LOCATION}/llvm export LLVM_DIR=${LLVM_ROOT}/lib/cmake/llvm +export CLANG8_ROOT=${OPT_LOCATION}/clang8 +export PINNED_COMPILER_VERSION=release_80 export DOXYGEN_VERSION=1_8_14 export DOXYGEN_ROOT=${SRC_LOCATION}/doxygen-${DOXYGEN_VERSION} export TINI_VERSION=0.18.0 @@ -199,6 +201,7 @@ if [ $NONINTERACTIVE -eq 0 ]; then fi else BUILD_CLANG8=true + CXX=${OPT_LOCATION}/clang8/bin/clang++ fi export BUILD_CLANG8=$BUILD_CLANG8 @@ -287,11 +290,10 @@ printf "## ENABLE_COVERAGE_TESTING=%s\\n" "${ENABLE_COVERAGE_TESTING}" mkdir -p $BUILD_DIR cd $BUILD_DIR -$CMAKE -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_CXX_COMPILER="${CXX}" \ - -DCORE_SYMBOL_NAME="${CORE_SYMBOL_NAME}" \ - -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=true \ - -DENABLE_COVERAGE_TESTING="${ENABLE_COVERAGE_TESTING}" -DBUILD_DOXYGEN="${DOXYGEN}" \ +$CMAKE -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_CXX_COMPILER="${CXX}" -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=false \ + -DCORE_SYMBOL_NAME="${CORE_SYMBOL_NAME}" -DENABLE_COVERAGE_TESTING="${ENABLE_COVERAGE_TESTING}" -DBUILD_DOXYGEN="${DOXYGEN}" \ -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/eosio $LOCAL_CMAKE_FLAGS "${REPO_ROOT}" + if [ $? -ne 0 ]; then exit -1; fi make -j"${JOBS}" if [ $? -ne 0 ]; then exit -1; fi diff --git a/scripts/eosio_build_amazon.sh b/scripts/eosio_build_amazon.sh index 3ab12ca9d54..4dc2eb6fbaf 100755 --- a/scripts/eosio_build_amazon.sh +++ b/scripts/eosio_build_amazon.sh @@ -266,7 +266,7 @@ if [ $BUILD_CLANG8 ]; then && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/compiler-rt.git \ && cd ${OPT_LOCATION}/clang8 \ && mkdir build && cd build \ - && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all .. \ + && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ && make -j"${JOBS}" \ && make install \ && cd ../.. \ diff --git a/scripts/eosio_build_centos.sh b/scripts/eosio_build_centos.sh index 292f5699464..33cf68da6ff 100755 --- a/scripts/eosio_build_centos.sh +++ b/scripts/eosio_build_centos.sh @@ -317,7 +317,7 @@ if [ $BUILD_CLANG8 ]; then && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/compiler-rt.git \ && cd ${OPT_LOCATION}/clang8 \ && mkdir build && cd build \ - && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all .. \ + && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ && make -j"${JOBS}" \ && make install \ && cd ../.. \ diff --git a/scripts/eosio_build_darwin.sh b/scripts/eosio_build_darwin.sh index 4c1f53bf88f..54d12582972 100755 --- a/scripts/eosio_build_darwin.sh +++ b/scripts/eosio_build_darwin.sh @@ -188,64 +188,64 @@ if [ $? -ne 0 ]; then exit -1; fi printf "\\n" -printf "Checking MongoDB installation...\\n" -if [ ! -d $MONGODB_ROOT ]; then - printf "Installing MongoDB into ${MONGODB_ROOT}...\\n" - curl -OL https://fastdl.mongodb.org/osx/mongodb-osx-ssl-x86_64-$MONGODB_VERSION.tgz \ - && tar -xzf mongodb-osx-ssl-x86_64-$MONGODB_VERSION.tgz \ - && mv $SRC_LOCATION/mongodb-osx-x86_64-$MONGODB_VERSION $MONGODB_ROOT \ - && touch $MONGODB_LOG_LOCATION/mongod.log \ - && rm -f mongodb-osx-ssl-x86_64-$MONGODB_VERSION.tgz \ - && cp -f $REPO_ROOT/scripts/mongod.conf $MONGODB_CONF \ - && mkdir -p $MONGODB_DATA_LOCATION \ - && rm -rf $MONGODB_LINK_LOCATION \ - && rm -rf $BIN_LOCATION/mongod \ - && ln -s $MONGODB_ROOT $MONGODB_LINK_LOCATION \ - && ln -s $MONGODB_LINK_LOCATION/bin/mongod $BIN_LOCATION/mongod \ - || exit 1 - printf " - MongoDB successfully installed @ ${MONGODB_ROOT}\\n" -else - printf " - MongoDB found with correct version @ ${MONGODB_ROOT}.\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi -printf "Checking MongoDB C driver installation...\\n" -if [ ! -d $MONGO_C_DRIVER_ROOT ]; then - printf "Installing MongoDB C driver...\\n" - curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/$MONGO_C_DRIVER_VERSION/mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - && tar -xzf mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - && cd mongo-c-driver-$MONGO_C_DRIVER_VERSION \ - && mkdir -p cmake-build \ - && cd cmake-build \ - && $CMAKE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME -DENABLE_BSON=ON -DENABLE_SSL=DARWIN -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON .. \ - && make -j"${JOBS}" \ - && make install \ - && cd ../.. \ - && rm mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - || exit 1 - printf " - MongoDB C driver successfully installed @ ${MONGO_C_DRIVER_ROOT}.\\n" -else - printf " - MongoDB C driver found with correct version @ ${MONGO_C_DRIVER_ROOT}.\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi -printf "Checking MongoDB C++ driver installation...\\n" -if [ "$(grep "Version:" $HOME/lib/pkgconfig/libmongocxx-static.pc 2>/dev/null | tr -s ' ' | awk '{print $2}')" != $MONGO_CXX_DRIVER_VERSION ]; then - printf "Installing MongoDB C++ driver...\\n" - curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r$MONGO_CXX_DRIVER_VERSION.tar.gz -o mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ - && tar -xzf mongo-cxx-driver-r${MONGO_CXX_DRIVER_VERSION}.tar.gz \ - && cd mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION/build \ - && $CMAKE -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME .. \ - && make -j"${JOBS}" VERBOSE=1 \ - && make install \ - && cd ../.. \ - && rm -f mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ - || exit 1 - printf " - MongoDB C++ driver successfully installed @ ${MONGO_CXX_DRIVER_ROOT}.\\n" -else - printf " - MongoDB C++ driver found with correct version @ ${MONGO_CXX_DRIVER_ROOT}.\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi - -printf "\\n" +#printf "Checking MongoDB installation...\\n" +#if [ ! -d $MONGODB_ROOT ]; then +# printf "Installing MongoDB into ${MONGODB_ROOT}...\\n" +# curl -OL https://fastdl.mongodb.org/osx/mongodb-osx-ssl-x86_64-$MONGODB_VERSION.tgz \ +# && tar -xzf mongodb-osx-ssl-x86_64-$MONGODB_VERSION.tgz \ +# && mv $SRC_LOCATION/mongodb-osx-x86_64-$MONGODB_VERSION $MONGODB_ROOT \ +# && touch $MONGODB_LOG_LOCATION/mongod.log \ +# && rm -f mongodb-osx-ssl-x86_64-$MONGODB_VERSION.tgz \ +# && cp -f $REPO_ROOT/scripts/mongod.conf $MONGODB_CONF \ +# && mkdir -p $MONGODB_DATA_LOCATION \ +# && rm -rf $MONGODB_LINK_LOCATION \ +# && rm -rf $BIN_LOCATION/mongod \ +# && ln -s $MONGODB_ROOT $MONGODB_LINK_LOCATION \ +# && ln -s $MONGODB_LINK_LOCATION/bin/mongod $BIN_LOCATION/mongod \ +# || exit 1 +# printf " - MongoDB successfully installed @ ${MONGODB_ROOT}\\n" +#else +# printf " - MongoDB found with correct version @ ${MONGODB_ROOT}.\\n" +#fi +#if [ $? -ne 0 ]; then exit -1; fi +#printf "Checking MongoDB C driver installation...\\n" +#if [ ! -d $MONGO_C_DRIVER_ROOT ]; then +# printf "Installing MongoDB C driver...\\n" +# curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/$MONGO_C_DRIVER_VERSION/mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ +# && tar -xzf mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ +# && cd mongo-c-driver-$MONGO_C_DRIVER_VERSION \ +# && mkdir -p cmake-build \ +# && cd cmake-build \ +# && $CMAKE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME -DENABLE_BSON=ON -DENABLE_SSL=DARWIN -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON .. \ +# && make -j"${JOBS}" \ +# && make install \ +# && cd ../.. \ +# && rm mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ +# || exit 1 +# printf " - MongoDB C driver successfully installed @ ${MONGO_C_DRIVER_ROOT}.\\n" +#else +# printf " - MongoDB C driver found with correct version @ ${MONGO_C_DRIVER_ROOT}.\\n" +#fi +#if [ $? -ne 0 ]; then exit -1; fi +#printf "Checking MongoDB C++ driver installation...\\n" +#if [ "$(grep "Version:" $HOME/lib/pkgconfig/libmongocxx-static.pc 2>/dev/null | tr -s ' ' | awk '{print $2}')" != $MONGO_CXX_DRIVER_VERSION ]; then +# printf "Installing MongoDB C++ driver...\\n" +# curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r$MONGO_CXX_DRIVER_VERSION.tar.gz -o mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ +# && tar -xzf mongo-cxx-driver-r${MONGO_CXX_DRIVER_VERSION}.tar.gz \ +# && cd mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION/build \ +# && $CMAKE -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME .. \ +# && make -j"${JOBS}" VERBOSE=1 \ +# && make install \ +# && cd ../.. \ +# && rm -f mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ +# || exit 1 +# printf " - MongoDB C++ driver successfully installed @ ${MONGO_CXX_DRIVER_ROOT}.\\n" +#else +# printf " - MongoDB C++ driver found with correct version @ ${MONGO_CXX_DRIVER_ROOT}.\\n" +#fi +#if [ $? -ne 0 ]; then exit -1; fi +# +#printf "\\n" # We install llvm into /usr/local/opt using brew install llvm@4 @@ -280,7 +280,7 @@ if [ $BUILD_CLANG8 ]; then && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/compiler-rt.git \ && cd ${OPT_LOCATION}/clang8 \ && mkdir build && cd build \ - && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DLLVM_CREATE_XCODE_TOOLCHAIN=ON .. \ + && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DLLVM_CREATE_XCODE_TOOLCHAIN=ON -DCMAKE_BUILD_TYPE=Release .. \ && make -j"${JOBS}" \ && make install \ && cd ../.. \ diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index d3c2880a0a9..ca9af6e67fe 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -249,7 +249,7 @@ if [ $BUILD_CLANG8 ]; then && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/compiler-rt.git \ && cd ${OPT_LOCATION}/clang8 \ && mkdir build && cd build \ - && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all .. \ + && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ && make -j"${JOBS}" \ && make install \ && cd ../.. \ diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index d174d7b0127..15c96234173 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -272,7 +272,7 @@ if [ $BUILD_CLANG8 ]; then && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/compiler-rt.git \ && cd ${OPT_LOCATION}/clang8 \ && mkdir build && cd build \ - && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all .. \ + && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ && make -j"${JOBS}" \ && make install \ && cd ../.. \ From b1739bb89d22377ffea62fd39e8443e3f8922bbb Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 10 Apr 2019 15:48:31 -0400 Subject: [PATCH 03/86] use libcxxabi --- scripts/eosio_build_amazon.sh | 1 + scripts/eosio_build_centos.sh | 1 + scripts/eosio_build_darwin.sh | 1 + scripts/eosio_build_fedora.sh | 1 + scripts/eosio_build_ubuntu.sh | 1 + 5 files changed, 5 insertions(+) diff --git a/scripts/eosio_build_amazon.sh b/scripts/eosio_build_amazon.sh index 4dc2eb6fbaf..f0214df603e 100755 --- a/scripts/eosio_build_amazon.sh +++ b/scripts/eosio_build_amazon.sh @@ -262,6 +262,7 @@ if [ $BUILD_CLANG8 ]; then && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/clang-tools-extra.git \ && cd ../../../../projects \ && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libcxx.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libcxxabi.git \ && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libunwind.git \ && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/compiler-rt.git \ && cd ${OPT_LOCATION}/clang8 \ diff --git a/scripts/eosio_build_centos.sh b/scripts/eosio_build_centos.sh index 33cf68da6ff..e2f98fd9214 100755 --- a/scripts/eosio_build_centos.sh +++ b/scripts/eosio_build_centos.sh @@ -313,6 +313,7 @@ if [ $BUILD_CLANG8 ]; then && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/clang-tools-extra.git \ && cd ../../../../projects \ && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libcxx.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libcxxabi.git \ && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libunwind.git \ && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/compiler-rt.git \ && cd ${OPT_LOCATION}/clang8 \ diff --git a/scripts/eosio_build_darwin.sh b/scripts/eosio_build_darwin.sh index 54d12582972..9d5fa74bc10 100755 --- a/scripts/eosio_build_darwin.sh +++ b/scripts/eosio_build_darwin.sh @@ -276,6 +276,7 @@ if [ $BUILD_CLANG8 ]; then && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/clang-tools-extra.git \ && cd ../../../../projects \ && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libcxx.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libcxxabi.git \ && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libunwind.git \ && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/compiler-rt.git \ && cd ${OPT_LOCATION}/clang8 \ diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index ca9af6e67fe..49591fcf105 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -245,6 +245,7 @@ if [ $BUILD_CLANG8 ]; then && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/clang-tools-extra.git \ && cd ../../../../projects \ && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libcxx.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libcxxabi.git \ && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libunwind.git \ && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/compiler-rt.git \ && cd ${OPT_LOCATION}/clang8 \ diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index 15c96234173..dd5136b6446 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -268,6 +268,7 @@ if [ $BUILD_CLANG8 ]; then && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/clang-tools-extra.git \ && cd ../../../../projects \ && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libcxx.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libcxxabi.git \ && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libunwind.git \ && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/compiler-rt.git \ && cd ${OPT_LOCATION}/clang8 \ From 637afd9f6011a470280bcd550c93e3706e68f84d Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 10 Apr 2019 16:36:58 -0400 Subject: [PATCH 04/86] small changes for clang 8 build --- libraries/wabt | 2 +- scripts/eosio_build_darwin.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/wabt b/libraries/wabt index bf353aa719c..a023d5132bd 160000 --- a/libraries/wabt +++ b/libraries/wabt @@ -1 +1 @@ -Subproject commit bf353aa719c88b7152ee09e7f877a507cb7df27b +Subproject commit a023d5132bd4aaa611c88c6d43486eb02c5e7411 diff --git a/scripts/eosio_build_darwin.sh b/scripts/eosio_build_darwin.sh index 9d5fa74bc10..07fa2f53cac 100755 --- a/scripts/eosio_build_darwin.sh +++ b/scripts/eosio_build_darwin.sh @@ -281,7 +281,7 @@ if [ $BUILD_CLANG8 ]; then && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/compiler-rt.git \ && cd ${OPT_LOCATION}/clang8 \ && mkdir build && cd build \ - && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DLLVM_CREATE_XCODE_TOOLCHAIN=ON -DCMAKE_BUILD_TYPE=Release .. \ + && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ && make -j"${JOBS}" \ && make install \ && cd ../.. \ From dd226ab98f6c44baaf6ab8ee5b35588f55a1522d Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Thu, 11 Apr 2019 11:11:57 -0400 Subject: [PATCH 05/86] revert missed commented out mongo stuff and revert chainbase change --- libraries/chainbase | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/chainbase b/libraries/chainbase index d4a6fd350a9..8ade03c693f 160000 --- a/libraries/chainbase +++ b/libraries/chainbase @@ -1 +1 @@ -Subproject commit d4a6fd350a9f4a812a3e33019c864d198bdb2e10 +Subproject commit 8ade03c693ff4ccde3debb6ccfd0fda2b37b0c8a From 62109ed6702bfeb7c449e8639e7a2f32da995cf3 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Thu, 11 Apr 2019 11:44:18 -0400 Subject: [PATCH 06/86] use boost 1.68 --- scripts/eosio_build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/eosio_build.sh b/scripts/eosio_build.sh index f813b4f99eb..2b46049151c 100755 --- a/scripts/eosio_build.sh +++ b/scripts/eosio_build.sh @@ -63,7 +63,7 @@ export MONGO_C_DRIVER_ROOT=${SRC_LOCATION}/mongo-c-driver-${MONGO_C_DRIVER_VERSI export MONGO_CXX_DRIVER_VERSION=3.4.0 export MONGO_CXX_DRIVER_ROOT=${SRC_LOCATION}/mongo-cxx-driver-r${MONGO_CXX_DRIVER_VERSION} export BOOST_VERSION_MAJOR=1 -export BOOST_VERSION_MINOR=67 +export BOOST_VERSION_MINOR=68 export BOOST_VERSION_PATCH=0 export BOOST_VERSION=${BOOST_VERSION_MAJOR}_${BOOST_VERSION_MINOR}_${BOOST_VERSION_PATCH} export BOOST_ROOT=${SRC_LOCATION}/boost_${BOOST_VERSION} @@ -290,7 +290,7 @@ printf "## ENABLE_COVERAGE_TESTING=%s\\n" "${ENABLE_COVERAGE_TESTING}" mkdir -p $BUILD_DIR cd $BUILD_DIR -$CMAKE -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_CXX_COMPILER="${CXX}" -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=false \ +$CMAKE -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_CXX_COMPILER="${CXX}" -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=true \ -DCORE_SYMBOL_NAME="${CORE_SYMBOL_NAME}" -DENABLE_COVERAGE_TESTING="${ENABLE_COVERAGE_TESTING}" -DBUILD_DOXYGEN="${DOXYGEN}" \ -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/eosio $LOCAL_CMAKE_FLAGS "${REPO_ROOT}" From 4e4179a074fbc3d5e322f0bcdcde2ba7b053ded8 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Thu, 11 Apr 2019 13:46:37 -0400 Subject: [PATCH 07/86] revert back to boost 1.67 for now --- scripts/eosio_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/eosio_build.sh b/scripts/eosio_build.sh index 2b46049151c..8f52b41404b 100755 --- a/scripts/eosio_build.sh +++ b/scripts/eosio_build.sh @@ -63,7 +63,7 @@ export MONGO_C_DRIVER_ROOT=${SRC_LOCATION}/mongo-c-driver-${MONGO_C_DRIVER_VERSI export MONGO_CXX_DRIVER_VERSION=3.4.0 export MONGO_CXX_DRIVER_ROOT=${SRC_LOCATION}/mongo-cxx-driver-r${MONGO_CXX_DRIVER_VERSION} export BOOST_VERSION_MAJOR=1 -export BOOST_VERSION_MINOR=68 +export BOOST_VERSION_MINOR=67 export BOOST_VERSION_PATCH=0 export BOOST_VERSION=${BOOST_VERSION_MAJOR}_${BOOST_VERSION_MINOR}_${BOOST_VERSION_PATCH} export BOOST_ROOT=${SRC_LOCATION}/boost_${BOOST_VERSION} From b9e37aaedfd9a378221a4158665c384b49d9de9a Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Thu, 11 Apr 2019 17:31:30 -0400 Subject: [PATCH 08/86] Addressed some change requests --- CMakeLists.txt | 8 ++--- scripts/eosio_build.sh | 62 ++++++++++++++++++++++++++--------- scripts/eosio_build_amazon.sh | 29 ++++++++++------ scripts/eosio_build_centos.sh | 29 ++++++++++------ scripts/eosio_build_darwin.sh | 29 ++++++++++------ scripts/eosio_build_fedora.sh | 29 ++++++++++------ scripts/eosio_build_ubuntu.sh | 29 ++++++++++------ 7 files changed, 146 insertions(+), 69 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0aea9883ac5..0a1d8530b0f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,15 +49,15 @@ set( INSTALLER_APP_ID "68ad7005-8eee-49c9-95ce-9eed97e5b347" ) # http://stackoverflow.com/a/18369825 if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0) - message(FATAL_ERROR "GCC version must be at least 6.0!") + if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0) + message(FATAL_ERROR "GCC version must be at least 7.0!") endif() if ("${CMAKE_GENERATOR}" STREQUAL "Ninja") add_compile_options(-fdiagnostics-color=always) endif() elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") - if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0) - message(FATAL_ERROR "Clang version must be at least 4.0!") + if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) + message(FATAL_ERROR "Clang version must be at least 5.0!") endif() if ("${CMAKE_GENERATOR}" STREQUAL "Ninja") add_compile_options(-fcolor-diagnostics) diff --git a/scripts/eosio_build.sh b/scripts/eosio_build.sh index 8f52b41404b..b4735214824 100755 --- a/scripts/eosio_build.sh +++ b/scripts/eosio_build.sh @@ -72,7 +72,16 @@ export LLVM_VERSION=release_40 export LLVM_ROOT=${OPT_LOCATION}/llvm export LLVM_DIR=${LLVM_ROOT}/lib/cmake/llvm export CLANG8_ROOT=${OPT_LOCATION}/clang8 -export PINNED_COMPILER_VERSION=release_80 +export PINNED_COMPILER_BRANCH=release_80 +export PINNED_COMPILER_LLVM_COMMIT=18e41dc +export PINNED_COMPILER_CLANG_COMMIT=a03da8b +export PINNED_COMPILER_LLD_COMMIT=d60a035 +export PINNED_COMPILER_POLLY_COMMIT=1bc06e5 +export PINNED_COMPILER_CLANG_TOOLS_EXTRA_COMMIT=6b34834 +export PINNED_COMPILER_LIBCXX_COMMIT=1853712 +export PINNED_COMPILER_LIBCXXABI_COMMIT=d7338a4 +export PINNED_COMPILER_LIBUNWIND_COMMIT=57f6739 +export PINNED_COMPILER_COMPILER_RT_COMMIT=5bc7979 export DOXYGEN_VERSION=1_8_14 export DOXYGEN_ROOT=${SRC_LOCATION}/doxygen-${DOXYGEN_VERSION} export TINI_VERSION=0.18.0 @@ -183,22 +192,45 @@ fi BUILD_CLANG8=false if [ $NONINTERACTIVE -eq 0 ]; then - printf "#include \nint main(){ std::cout << \"Hello, World!\" << std::endl; }" &> $TEMP_DIR/test.cpp - `c++ -c -std=c++17 $TEMP_DIR/test.cpp -o $TEMP_DIR/test.o &> /dev/null` - if [ $? -ne 0 ]; then - `CXX -c -std=c++17 $TEMP_DIR/test.cpp -o $TEMP_DIR/test.o &> /dev/null` - if [ $? -ne 0 ]; then - printf "Error no C++17 support.\\nEnter Y/y or N/n to continue with downloading and building a viable compiler or exit now.\\nIf you already have a C++17 compiler installed or would like to install your own, export CXX to point to the compiler of your choosing." - read -p "Enter Y/y or N/n to continue with downloading and building a viable compiler or exit now." yn - case $yn in - [Yy]* ) BUILD_CLANG8=true; break;; - [Nn]* ) exit 1;; - * ) echo "Improper input"; exit 1;; - esac + if [ ! -z $CXX ]; then + CPP_COMP=$CXX + else + CPP_COMP=c++ + fi + + NO_CPP17=false + + WHICH_CPP=`which $CPP_COMP` + COMPILER_TYPE=`readlink $WHICH_CPP` + if [[ $COMPILER_TYPE == "clang++" ]]; then + if [[ `c++ --version | cut -d ' ' -f 1 | head -n 1` == "Apple" ]]; then + ### Apple clang version 10 + if [[ `c++ --version | cut -d ' ' -f 4 | cut -d '.' -f 1 | head -n 1` -lt 10 ]]; then + NO_CPP17=true + fi + else + ### clang version 5 + if [[ `c++ --version | cut -d ' ' -f 4 | cut -d '.' -f 1 | head -n 1` -lt 5 ]]; then + NO_CPP17=true + fi fi else - CXX=c++ + ### gcc version 7 + if [[ `c++ -dumpversion | cut -d '.' -f 1` -lt 7 ]]; then + NO_CPP17=true + fi + fi + + if $NO_CPP17; then + printf "Error no C++17 support.\\nEnter Y/y or N/n to continue with downloading and building a viable compiler or exit now.\\nIf you already have a C++17 compiler installed or would like to install your own, export CXX to point to the compiler of your choosing." + read -p "Enter Y/y or N/n to continue with downloading and building a viable compiler or exit now. " yn + case $yn in + [Yy]* ) BUILD_CLANG8=true; break;; + [Nn]* ) exit 1;; + * ) echo "Improper input"; exit 1;; + esac fi + CXX=$CPP_COMP else BUILD_CLANG8=true CXX=${OPT_LOCATION}/clang8/bin/clang++ @@ -292,7 +324,7 @@ cd $BUILD_DIR $CMAKE -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_CXX_COMPILER="${CXX}" -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=true \ -DCORE_SYMBOL_NAME="${CORE_SYMBOL_NAME}" -DENABLE_COVERAGE_TESTING="${ENABLE_COVERAGE_TESTING}" -DBUILD_DOXYGEN="${DOXYGEN}" \ - -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/eosio $LOCAL_CMAKE_FLAGS "${REPO_ROOT}" + -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/eosio -DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++ -lc++abi" $LOCAL_CMAKE_FLAGS "${REPO_ROOT}" if [ $? -ne 0 ]; then exit -1; fi make -j"${JOBS}" diff --git a/scripts/eosio_build_amazon.sh b/scripts/eosio_build_amazon.sh index f0214df603e..e769917a790 100755 --- a/scripts/eosio_build_amazon.sh +++ b/scripts/eosio_build_amazon.sh @@ -248,23 +248,32 @@ if [ $? -ne 0 ]; then exit -1; fi cd .. printf "\\n" -if [ $BUILD_CLANG8 ]; then +if $BUILD_CLANG8; then printf "Checking Clang 8 support...\\n" if [ ! -d $CLANG8_ROOT ]; then printf "Installing Clang 8...\\n" cd ${OPT_LOCATION} \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ + && git checkout $PINNED_COMPILER_LLVM_COMMIT \ && cd tools \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/lld.git \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/polly.git \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/clang.git clang && cd clang/tools \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/lld.git \ + && cd lld && git checkout $PINNED_COMPILER_LLD_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/polly.git \ + && cd polly && git checkout $PINNED_COMPILER_POLLY_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang.git clang && cd clang/tools \ + && git checkout $PINNED_COMPILER_CLANG_VERSION \ && mkdir extra && cd extra \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/clang-tools-extra.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang-tools-extra.git \ + && cd clang-tools-extra && git checkout $PINNED_COMPILER_CLANG_TOOLS_EXTRA_COMMIT && cd .. \ && cd ../../../../projects \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libcxx.git \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libcxxabi.git \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libunwind.git \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/compiler-rt.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxx.git \ + && cd libcxx && git checkout $PINNED_COMPILER_LIBCXX_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxxabi.git \ + && cd libcxxabi && git checkout $PINNED_COMPILER_LIBCXXABI_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libunwind.git \ + && cd libunwind && git checkout $PINNED_COMPILER_LIBUNWIND_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/compiler-rt.git \ + && cd compiler-rt && git checkout $PINNED_COMPILER_COMPILER_RT_COMMIT && cd ../ \ && cd ${OPT_LOCATION}/clang8 \ && mkdir build && cd build \ && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ diff --git a/scripts/eosio_build_centos.sh b/scripts/eosio_build_centos.sh index e2f98fd9214..7a11c7ee257 100755 --- a/scripts/eosio_build_centos.sh +++ b/scripts/eosio_build_centos.sh @@ -299,23 +299,32 @@ if [ $? -ne 0 ]; then exit -1; fi cd .. printf "\\n" -if [ $BUILD_CLANG8 ]; then +if $BUILD_CLANG8; then printf "Checking Clang 8 support...\\n" if [ ! -d $CLANG8_ROOT ]; then printf "Installing Clang 8...\\n" cd ${OPT_LOCATION} \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ + && git checkout $PINNED_COMPILER_LLVM_COMMIT \ && cd tools \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/lld.git \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/polly.git \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/clang.git clang && cd clang/tools \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/lld.git \ + && cd lld && git checkout $PINNED_COMPILER_LLD_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/polly.git \ + && cd polly && git checkout $PINNED_COMPILER_POLLY_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang.git clang && cd clang/tools \ + && git checkout $PINNED_COMPILER_CLANG_VERSION \ && mkdir extra && cd extra \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/clang-tools-extra.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang-tools-extra.git \ + && cd clang-tools-extra && git checkout $PINNED_COMPILER_CLANG_TOOLS_EXTRA_COMMIT && cd .. \ && cd ../../../../projects \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libcxx.git \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libcxxabi.git \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libunwind.git \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/compiler-rt.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxx.git \ + && cd libcxx && git checkout $PINNED_COMPILER_LIBCXX_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxxabi.git \ + && cd libcxxabi && git checkout $PINNED_COMPILER_LIBCXXABI_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libunwind.git \ + && cd libunwind && git checkout $PINNED_COMPILER_LIBUNWIND_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/compiler-rt.git \ + && cd compiler-rt && git checkout $PINNED_COMPILER_COMPILER_RT_COMMIT && cd ../ \ && cd ${OPT_LOCATION}/clang8 \ && mkdir build && cd build \ && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ diff --git a/scripts/eosio_build_darwin.sh b/scripts/eosio_build_darwin.sh index 07fa2f53cac..1335540d64b 100755 --- a/scripts/eosio_build_darwin.sh +++ b/scripts/eosio_build_darwin.sh @@ -262,23 +262,32 @@ fi cd .. printf "\\n" -if [ $BUILD_CLANG8 ]; then +if $BUILD_CLANG8; then printf "Checking Clang 8 support...\\n" if [ ! -d $CLANG8_ROOT ]; then printf "Installing Clang 8...\\n" cd ${OPT_LOCATION} \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 \ + && cd clang8 && git checkout $PINNED_COMPILER_LLVM_COMMIT \ && cd tools \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/lld.git \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/polly.git \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/clang.git clang && cd clang/tools \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/lld.git \ + && cd lld && git checkout $PINNED_COMPILER_LLD_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/polly.git \ + && cd polly && git checkout $PINNED_COMPILER_POLLY_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang.git clang && cd clang/tools \ + && git checkout $PINNED_COMPILER_CLANG_VERSION \ && mkdir extra && cd extra \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/clang-tools-extra.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang-tools-extra.git \ + && cd clang-tools-extra && git checkout $PINNED_COMPILER_CLANG_TOOLS_EXTRA_COMMIT && cd .. \ && cd ../../../../projects \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libcxx.git \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libcxxabi.git \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libunwind.git \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/compiler-rt.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxx.git \ + && cd libcxx && git checkout $PINNED_COMPILER_LIBCXX_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxxabi.git \ + && cd libcxxabi && git checkout $PINNED_COMPILER_LIBCXXABI_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libunwind.git \ + && cd libunwind && git checkout $PINNED_COMPILER_LIBUNWIND_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/compiler-rt.git \ + && cd compiler-rt && git checkout $PINNED_COMPILER_COMPILER_RT_COMMIT && cd ../ \ && cd ${OPT_LOCATION}/clang8 \ && mkdir build && cd build \ && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index 49591fcf105..8fab815109c 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -231,23 +231,32 @@ if [ $? -ne 0 ]; then exit -1; fi cd .. printf "\\n" -if [ $BUILD_CLANG8 ]; then +if $BUILD_CLANG8; then printf "Checking Clang 8 support...\\n" if [ ! -d $CLANG8_ROOT ]; then printf "Installing Clang 8...\\n" cd ${OPT_LOCATION} \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ + && git checkout $PINNED_COMPILER_LLVM_COMMIT \ && cd tools \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/lld.git \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/polly.git \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/clang.git clang && cd clang/tools \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/lld.git \ + && cd lld && git checkout $PINNED_COMPILER_LLD_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/polly.git \ + && cd polly && git checkout $PINNED_COMPILER_POLLY_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang.git clang && cd clang/tools \ + && git checkout $PINNED_COMPILER_CLANG_VERSION \ && mkdir extra && cd extra \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/clang-tools-extra.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang-tools-extra.git \ + && cd clang-tools-extra && git checkout $PINNED_COMPILER_CLANG_TOOLS_EXTRA_COMMIT && cd .. \ && cd ../../../../projects \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libcxx.git \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libcxxabi.git \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libunwind.git \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/compiler-rt.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxx.git \ + && cd libcxx && git checkout $PINNED_COMPILER_LIBCXX_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxxabi.git \ + && cd libcxxabi && git checkout $PINNED_COMPILER_LIBCXXABI_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libunwind.git \ + && cd libunwind && git checkout $PINNED_COMPILER_LIBUNWIND_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/compiler-rt.git \ + && cd compiler-rt && git checkout $PINNED_COMPILER_COMPILER_RT_COMMIT && cd ../ \ && cd ${OPT_LOCATION}/clang8 \ && mkdir build && cd build \ && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index dd5136b6446..514c5f7a9b6 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -254,23 +254,32 @@ if [ $? -ne 0 ]; then exit -1; fi cd .. printf "\\n" -if [ $BUILD_CLANG8 ]; then +if $BUILD_CLANG8; then printf "Checking Clang 8 support...\\n" if [ ! -d $CLANG8_ROOT ]; then printf "Installing Clang 8...\\n" cd ${OPT_LOCATION} \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ + && git checkout $PINNED_COMPILER_LLVM_COMMIT \ && cd tools \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/lld.git \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/polly.git \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/clang.git clang && cd clang/tools \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/lld.git \ + && cd lld && git checkout $PINNED_COMPILER_LLD_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/polly.git \ + && cd polly && git checkout $PINNED_COMPILER_POLLY_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang.git clang && cd clang/tools \ + && git checkout $PINNED_COMPILER_CLANG_VERSION \ && mkdir extra && cd extra \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/clang-tools-extra.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang-tools-extra.git \ + && cd clang-tools-extra && git checkout $PINNED_COMPILER_CLANG_TOOLS_EXTRA_COMMIT && cd .. \ && cd ../../../../projects \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libcxx.git \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libcxxabi.git \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/libunwind.git \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_VERSION https://git.llvm.org/git/compiler-rt.git \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxx.git \ + && cd libcxx && git checkout $PINNED_COMPILER_LIBCXX_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxxabi.git \ + && cd libcxxabi && git checkout $PINNED_COMPILER_LIBCXXABI_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libunwind.git \ + && cd libunwind && git checkout $PINNED_COMPILER_LIBUNWIND_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/compiler-rt.git \ + && cd compiler-rt && git checkout $PINNED_COMPILER_COMPILER_RT_COMMIT && cd ../ \ && cd ${OPT_LOCATION}/clang8 \ && mkdir build && cd build \ && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ From 4597fed8775ac30809a510f17c80c7364c03bd29 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Thu, 11 Apr 2019 19:20:04 -0400 Subject: [PATCH 09/86] Add new option for pinning --- CMakeLists.txt | 3 ++ scripts/eosio_build.sh | 74 ++++++++++++++++++++++++------------------ 2 files changed, 45 insertions(+), 32 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a1d8530b0f..234965baf48 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,6 +47,9 @@ set( GUI_CLIENT_EXECUTABLE_NAME eosio ) set( CUSTOM_URL_SCHEME "gcs" ) set( INSTALLER_APP_ID "68ad7005-8eee-49c9-95ce-9eed97e5b347" ) +if("$ENV{PIN_COMPILER}") + message("Pinning compiler") +endif() # http://stackoverflow.com/a/18369825 if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0) diff --git a/scripts/eosio_build.sh b/scripts/eosio_build.sh index b4735214824..eb8b2960c8b 100755 --- a/scripts/eosio_build.sh +++ b/scripts/eosio_build.sh @@ -119,7 +119,7 @@ function usage() NONINTERACTIVE=0 if [ $# -ne 0 ]; then - while getopts ":cdo:s:ahy" opt; do + while getopts ":cdo:s:ahpy" opt; do case "${opt}" in o ) options=( "Debug" "Release" "RelWithDebInfo" "MinSizeRel" ) @@ -153,6 +153,9 @@ if [ $# -ne 0 ]; then usage exit 1 ;; + p) + PIN_COMPILER=true + ;; y) NONINTERACTIVE=1 ;; @@ -191,51 +194,56 @@ if [ $STALE_SUBMODS -gt 0 ]; then fi BUILD_CLANG8=false -if [ $NONINTERACTIVE -eq 0 ]; then - if [ ! -z $CXX ]; then - CPP_COMP=$CXX - else - CPP_COMP=c++ - fi +if [ ! -z $CXX ]; then + CPP_COMP=$CXX +else + CPP_COMP=c++ +fi + +NO_CPP17=false - NO_CPP17=false - - WHICH_CPP=`which $CPP_COMP` - COMPILER_TYPE=`readlink $WHICH_CPP` - if [[ $COMPILER_TYPE == "clang++" ]]; then - if [[ `c++ --version | cut -d ' ' -f 1 | head -n 1` == "Apple" ]]; then - ### Apple clang version 10 - if [[ `c++ --version | cut -d ' ' -f 4 | cut -d '.' -f 1 | head -n 1` -lt 10 ]]; then - NO_CPP17=true - fi - else - ### clang version 5 - if [[ `c++ --version | cut -d ' ' -f 4 | cut -d '.' -f 1 | head -n 1` -lt 5 ]]; then - NO_CPP17=true - fi +WHICH_CPP=`which $CPP_COMP` +COMPILER_TYPE=`readlink $WHICH_CPP` +if [[ $COMPILER_TYPE == "clang++" ]]; then + if [[ `c++ --version | cut -d ' ' -f 1 | head -n 1` == "Apple" ]]; then + ### Apple clang version 10 + if [[ `c++ --version | cut -d ' ' -f 4 | cut -d '.' -f 1 | head -n 1` -lt 10 ]]; then + NO_CPP17=true fi else - ### gcc version 7 - if [[ `c++ -dumpversion | cut -d '.' -f 1` -lt 7 ]]; then + ### clang version 5 + if [[ `c++ --version | cut -d ' ' -f 4 | cut -d '.' -f 1 | head -n 1` -lt 5 ]]; then NO_CPP17=true fi fi +else + ### gcc version 7 + if [[ `c++ -dumpversion | cut -d '.' -f 1` -lt 7 ]]; then + NO_CPP17=true + fi +fi - if $NO_CPP17; then +if $PIN_COMPILER; then + BUILD_CLANG8=true + CPP_COMP=${OPT_LOCATION}/clang8/bin/clang++ +elif $NO_CPP17; then + if [ $NONINTERACTIVE -eq 0 ]; then + BUILD_CLANG8=true + CPP_COMP=${OPT_LOCATION}/clang8/bin/clang++ + else + echo "PIN ${PIN_COMPILER}" printf "Error no C++17 support.\\nEnter Y/y or N/n to continue with downloading and building a viable compiler or exit now.\\nIf you already have a C++17 compiler installed or would like to install your own, export CXX to point to the compiler of your choosing." read -p "Enter Y/y or N/n to continue with downloading and building a viable compiler or exit now. " yn case $yn in - [Yy]* ) BUILD_CLANG8=true; break;; + [Yy]* ) BUILD_CLANG8=true; CPP_COMP=${OPT_LOCATION}/clang8/bin/clang++; break;; [Nn]* ) exit 1;; * ) echo "Improper input"; exit 1;; esac fi - CXX=$CPP_COMP -else - BUILD_CLANG8=true - CXX=${OPT_LOCATION}/clang8/bin/clang++ fi +CXX=$CPP_COMP + export BUILD_CLANG8=$BUILD_CLANG8 printf "\\nBeginning build version: %s\\n" "${VERSION}" @@ -322,9 +330,11 @@ printf "## ENABLE_COVERAGE_TESTING=%s\\n" "${ENABLE_COVERAGE_TESTING}" mkdir -p $BUILD_DIR cd $BUILD_DIR +export PIN_COMPILER=$PIN_COMPILER + $CMAKE -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_CXX_COMPILER="${CXX}" -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=true \ - -DCORE_SYMBOL_NAME="${CORE_SYMBOL_NAME}" -DENABLE_COVERAGE_TESTING="${ENABLE_COVERAGE_TESTING}" -DBUILD_DOXYGEN="${DOXYGEN}" \ - -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/eosio -DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++ -lc++abi" $LOCAL_CMAKE_FLAGS "${REPO_ROOT}" + -DCORE_SYMBOL_NAME="${CORE_SYMBOL_NAME}" -DENABLE_COVERAGE_TESTING="${ENABLE_COVERAGE_TESTING}" -DBUILD_DOXYGEN="${DOXYGEN}" \ + -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/eosio $LOCAL_CMAKE_FLAGS "${REPO_ROOT}" if [ $? -ne 0 ]; then exit -1; fi make -j"${JOBS}" From 14dc23476172d6526d93136359681689ed4f4790 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Thu, 11 Apr 2019 19:41:45 -0400 Subject: [PATCH 10/86] undo mongo comment out --- CMakeLists.txt | 4 +- scripts/eosio_build_darwin.sh | 116 +++++++++++++++++----------------- 2 files changed, 61 insertions(+), 59 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 234965baf48..c809edae3c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,7 +48,9 @@ set( CUSTOM_URL_SCHEME "gcs" ) set( INSTALLER_APP_ID "68ad7005-8eee-49c9-95ce-9eed97e5b347" ) if("$ENV{PIN_COMPILER}") - message("Pinning compiler") + message(STATUS "Pinning compiler to Clang 8") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -v") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++abi") endif() # http://stackoverflow.com/a/18369825 if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") diff --git a/scripts/eosio_build_darwin.sh b/scripts/eosio_build_darwin.sh index 1335540d64b..ebda9b2ae8e 100755 --- a/scripts/eosio_build_darwin.sh +++ b/scripts/eosio_build_darwin.sh @@ -188,64 +188,64 @@ if [ $? -ne 0 ]; then exit -1; fi printf "\\n" -#printf "Checking MongoDB installation...\\n" -#if [ ! -d $MONGODB_ROOT ]; then -# printf "Installing MongoDB into ${MONGODB_ROOT}...\\n" -# curl -OL https://fastdl.mongodb.org/osx/mongodb-osx-ssl-x86_64-$MONGODB_VERSION.tgz \ -# && tar -xzf mongodb-osx-ssl-x86_64-$MONGODB_VERSION.tgz \ -# && mv $SRC_LOCATION/mongodb-osx-x86_64-$MONGODB_VERSION $MONGODB_ROOT \ -# && touch $MONGODB_LOG_LOCATION/mongod.log \ -# && rm -f mongodb-osx-ssl-x86_64-$MONGODB_VERSION.tgz \ -# && cp -f $REPO_ROOT/scripts/mongod.conf $MONGODB_CONF \ -# && mkdir -p $MONGODB_DATA_LOCATION \ -# && rm -rf $MONGODB_LINK_LOCATION \ -# && rm -rf $BIN_LOCATION/mongod \ -# && ln -s $MONGODB_ROOT $MONGODB_LINK_LOCATION \ -# && ln -s $MONGODB_LINK_LOCATION/bin/mongod $BIN_LOCATION/mongod \ -# || exit 1 -# printf " - MongoDB successfully installed @ ${MONGODB_ROOT}\\n" -#else -# printf " - MongoDB found with correct version @ ${MONGODB_ROOT}.\\n" -#fi -#if [ $? -ne 0 ]; then exit -1; fi -#printf "Checking MongoDB C driver installation...\\n" -#if [ ! -d $MONGO_C_DRIVER_ROOT ]; then -# printf "Installing MongoDB C driver...\\n" -# curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/$MONGO_C_DRIVER_VERSION/mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ -# && tar -xzf mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ -# && cd mongo-c-driver-$MONGO_C_DRIVER_VERSION \ -# && mkdir -p cmake-build \ -# && cd cmake-build \ -# && $CMAKE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME -DENABLE_BSON=ON -DENABLE_SSL=DARWIN -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON .. \ -# && make -j"${JOBS}" \ -# && make install \ -# && cd ../.. \ -# && rm mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ -# || exit 1 -# printf " - MongoDB C driver successfully installed @ ${MONGO_C_DRIVER_ROOT}.\\n" -#else -# printf " - MongoDB C driver found with correct version @ ${MONGO_C_DRIVER_ROOT}.\\n" -#fi -#if [ $? -ne 0 ]; then exit -1; fi -#printf "Checking MongoDB C++ driver installation...\\n" -#if [ "$(grep "Version:" $HOME/lib/pkgconfig/libmongocxx-static.pc 2>/dev/null | tr -s ' ' | awk '{print $2}')" != $MONGO_CXX_DRIVER_VERSION ]; then -# printf "Installing MongoDB C++ driver...\\n" -# curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r$MONGO_CXX_DRIVER_VERSION.tar.gz -o mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ -# && tar -xzf mongo-cxx-driver-r${MONGO_CXX_DRIVER_VERSION}.tar.gz \ -# && cd mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION/build \ -# && $CMAKE -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME .. \ -# && make -j"${JOBS}" VERBOSE=1 \ -# && make install \ -# && cd ../.. \ -# && rm -f mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ -# || exit 1 -# printf " - MongoDB C++ driver successfully installed @ ${MONGO_CXX_DRIVER_ROOT}.\\n" -#else -# printf " - MongoDB C++ driver found with correct version @ ${MONGO_CXX_DRIVER_ROOT}.\\n" -#fi -#if [ $? -ne 0 ]; then exit -1; fi -# -#printf "\\n" +printf "Checking MongoDB installation...\\n" +if [ ! -d $MONGODB_ROOT ]; then + printf "Installing MongoDB into ${MONGODB_ROOT}...\\n" + curl -OL https://fastdl.mongodb.org/osx/mongodb-osx-ssl-x86_64-$MONGODB_VERSION.tgz \ + && tar -xzf mongodb-osx-ssl-x86_64-$MONGODB_VERSION.tgz \ + && mv $SRC_LOCATION/mongodb-osx-x86_64-$MONGODB_VERSION $MONGODB_ROOT \ + && touch $MONGODB_LOG_LOCATION/mongod.log \ + && rm -f mongodb-osx-ssl-x86_64-$MONGODB_VERSION.tgz \ + && cp -f $REPO_ROOT/scripts/mongod.conf $MONGODB_CONF \ + && mkdir -p $MONGODB_DATA_LOCATION \ + && rm -rf $MONGODB_LINK_LOCATION \ + && rm -rf $BIN_LOCATION/mongod \ + && ln -s $MONGODB_ROOT $MONGODB_LINK_LOCATION \ + && ln -s $MONGODB_LINK_LOCATION/bin/mongod $BIN_LOCATION/mongod \ + || exit 1 + printf " - MongoDB successfully installed @ ${MONGODB_ROOT}\\n" +else + printf " - MongoDB found with correct version @ ${MONGODB_ROOT}.\\n" +fi +if [ $? -ne 0 ]; then exit -1; fi +printf "Checking MongoDB C driver installation...\\n" +if [ ! -d $MONGO_C_DRIVER_ROOT ]; then + printf "Installing MongoDB C driver...\\n" + curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/$MONGO_C_DRIVER_VERSION/mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + && tar -xzf mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + && cd mongo-c-driver-$MONGO_C_DRIVER_VERSION \ + && mkdir -p cmake-build \ + && cd cmake-build \ + && $CMAKE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME -DENABLE_BSON=ON -DENABLE_SSL=DARWIN -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON .. \ + && make -j"${JOBS}" \ + && make install \ + && cd ../.. \ + && rm mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + || exit 1 + printf " - MongoDB C driver successfully installed @ ${MONGO_C_DRIVER_ROOT}.\\n" +else + printf " - MongoDB C driver found with correct version @ ${MONGO_C_DRIVER_ROOT}.\\n" +fi +if [ $? -ne 0 ]; then exit -1; fi +printf "Checking MongoDB C++ driver installation...\\n" +if [ "$(grep "Version:" $HOME/lib/pkgconfig/libmongocxx-static.pc 2>/dev/null | tr -s ' ' | awk '{print $2}')" != $MONGO_CXX_DRIVER_VERSION ]; then + printf "Installing MongoDB C++ driver...\\n" + curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r$MONGO_CXX_DRIVER_VERSION.tar.gz -o mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ + && tar -xzf mongo-cxx-driver-r${MONGO_CXX_DRIVER_VERSION}.tar.gz \ + && cd mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION/build \ + && $CMAKE -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME .. \ + && make -j"${JOBS}" VERBOSE=1 \ + && make install \ + && cd ../.. \ + && rm -f mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ + || exit 1 + printf " - MongoDB C++ driver successfully installed @ ${MONGO_CXX_DRIVER_ROOT}.\\n" +else + printf " - MongoDB C++ driver found with correct version @ ${MONGO_CXX_DRIVER_ROOT}.\\n" +fi +if [ $? -ne 0 ]; then exit -1; fi + +printf "\\n" # We install llvm into /usr/local/opt using brew install llvm@4 From e146709864a917af76d45d8a370070ae0fd9a16c Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Thu, 11 Apr 2019 19:47:10 -0400 Subject: [PATCH 11/86] add cmake variable for compiler pinning --- CMakeLists.txt | 3 ++- scripts/eosio_build.sh | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c809edae3c8..e35c50a286a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,11 +47,12 @@ set( GUI_CLIENT_EXECUTABLE_NAME eosio ) set( CUSTOM_URL_SCHEME "gcs" ) set( INSTALLER_APP_ID "68ad7005-8eee-49c9-95ce-9eed97e5b347" ) -if("$ENV{PIN_COMPILER}") +if(${EOSIO_PIN_COMPILER}) message(STATUS "Pinning compiler to Clang 8") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -v") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++abi") endif() + # http://stackoverflow.com/a/18369825 if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0) diff --git a/scripts/eosio_build.sh b/scripts/eosio_build.sh index eb8b2960c8b..684f4d4c870 100755 --- a/scripts/eosio_build.sh +++ b/scripts/eosio_build.sh @@ -226,12 +226,12 @@ fi if $PIN_COMPILER; then BUILD_CLANG8=true CPP_COMP=${OPT_LOCATION}/clang8/bin/clang++ + PIN_COMPILER_CMAKE="-DEOSIO_PIN_COMPILER=1" elif $NO_CPP17; then if [ $NONINTERACTIVE -eq 0 ]; then BUILD_CLANG8=true CPP_COMP=${OPT_LOCATION}/clang8/bin/clang++ else - echo "PIN ${PIN_COMPILER}" printf "Error no C++17 support.\\nEnter Y/y or N/n to continue with downloading and building a viable compiler or exit now.\\nIf you already have a C++17 compiler installed or would like to install your own, export CXX to point to the compiler of your choosing." read -p "Enter Y/y or N/n to continue with downloading and building a viable compiler or exit now. " yn case $yn in @@ -330,9 +330,7 @@ printf "## ENABLE_COVERAGE_TESTING=%s\\n" "${ENABLE_COVERAGE_TESTING}" mkdir -p $BUILD_DIR cd $BUILD_DIR -export PIN_COMPILER=$PIN_COMPILER - -$CMAKE -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_CXX_COMPILER="${CXX}" -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=true \ +$CMAKE -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_CXX_COMPILER="${CXX}" -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=true $PIN_COMPILER_CMAKE \ -DCORE_SYMBOL_NAME="${CORE_SYMBOL_NAME}" -DENABLE_COVERAGE_TESTING="${ENABLE_COVERAGE_TESTING}" -DBUILD_DOXYGEN="${DOXYGEN}" \ -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/eosio $LOCAL_CMAKE_FLAGS "${REPO_ROOT}" From 4b3de8a38c37e923b99bf1b58921bba557cd67d4 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Fri, 12 Apr 2019 13:52:33 -0400 Subject: [PATCH 12/86] fix bash issue and add -p to pipeline.yml --- .buildkite/pipeline.yml | 10 +++++----- scripts/eosio_build.sh | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 19bbdf114ff..9ab24bbe88d 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,7 +1,7 @@ steps: - command: | # Ubuntu 16.04 Build echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y + ./scripts/eosio_build.sh -y -p echo "--- :compression: Compressing build directory" tar -pczf build.tar.gz build/ label: ":ubuntu: 16.04 Build" @@ -22,7 +22,7 @@ steps: - command: | # Ubuntu 18.04 Build echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y + ./scripts/eosio_build.sh -y -p echo "--- :compression: Compressing build directory" tar -pczf build.tar.gz build/ label: ":ubuntu: 18.04 Build" @@ -43,7 +43,7 @@ steps: - command: | # CentOS 7 Build echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y + ./scripts/eosio_build.sh -y -p echo "--- :compression: Compressing build directory" tar -pczf build.tar.gz build/ label: ":centos: 7 Build" @@ -64,7 +64,7 @@ steps: - command: | # Amazon Linux 2 Build echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y + ./scripts/eosio_build.sh -y -p echo "--- :compression: Compressing build directory" tar -pczf build.tar.gz build/ label: ":aws: 2 Build" @@ -87,7 +87,7 @@ steps: echo "--- Creating symbolic link to job directory :file_folder:" sleep 5 && ln -s "$(pwd)" /data/job && cd /data/job echo "+++ Building :hammer:" - ./scripts/eosio_build.sh -y + ./scripts/eosio_build.sh -y -p echo "--- Compressing build directory :compression:" tar -pczf build.tar.gz build/ label: ":darwin: Mojave Build" diff --git a/scripts/eosio_build.sh b/scripts/eosio_build.sh index 684f4d4c870..7710e363802 100755 --- a/scripts/eosio_build.sh +++ b/scripts/eosio_build.sh @@ -117,6 +117,8 @@ function usage() } NONINTERACTIVE=0 +PIN_COMPILER=false +PIN_COMPILER_CMAKE="" if [ $# -ne 0 ]; then while getopts ":cdo:s:ahpy" opt; do From da1cd0817e728f652d39193b330763607165dc87 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Fri, 12 Apr 2019 13:55:57 -0400 Subject: [PATCH 13/86] update chainbase submodule --- libraries/chainbase | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/chainbase b/libraries/chainbase index 8ade03c693f..8a153c42842 160000 --- a/libraries/chainbase +++ b/libraries/chainbase @@ -1 +1 @@ -Subproject commit 8ade03c693ff4ccde3debb6ccfd0fda2b37b0c8a +Subproject commit 8a153c428429a62ce727814a1ba04d3fcdc2bc83 From 0903cb837426e5f939f9cd993dcba63903dfbd35 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Fri, 12 Apr 2019 17:01:38 -0400 Subject: [PATCH 14/86] Update CMakeLists.txt --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e35c50a286a..46237575c9d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,7 +49,7 @@ set( INSTALLER_APP_ID "68ad7005-8eee-49c9-95ce-9eed97e5b347" ) if(${EOSIO_PIN_COMPILER}) message(STATUS "Pinning compiler to Clang 8") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -v") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++abi") endif() From 407e2f77f52181b84a0c3771da3d16afbee4e511 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Sun, 14 Apr 2019 02:57:04 -0400 Subject: [PATCH 15/86] reverting libc++ changes --- CMakeLists.txt | 12 ++--- scripts/eosio_build.sh | 2 +- scripts/eosio_build_ubuntu.sh | 85 ++++++++++++++++++----------------- 3 files changed, 51 insertions(+), 48 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 46237575c9d..0134a71237c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,11 +47,6 @@ set( GUI_CLIENT_EXECUTABLE_NAME eosio ) set( CUSTOM_URL_SCHEME "gcs" ) set( INSTALLER_APP_ID "68ad7005-8eee-49c9-95ce-9eed97e5b347" ) -if(${EOSIO_PIN_COMPILER}) - message(STATUS "Pinning compiler to Clang 8") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++abi") -endif() # http://stackoverflow.com/a/18369825 if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") @@ -127,6 +122,13 @@ set(THREADS_PREFER_PTHREAD_FLAG 1) find_package(Threads) link_libraries(Threads::Threads) +### uncomment after we get Boost to build with clang 8 and libc++ on Linux +#if(${EOSIO_PIN_COMPILER}) +# message(STATUS "Pinning compiler to Clang 8") +# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -v") +# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lc++abi") +#endif() + if( WIN32 ) message( STATUS "Configuring EOSIO on WIN32") diff --git a/scripts/eosio_build.sh b/scripts/eosio_build.sh index 7710e363802..68ab0848f89 100755 --- a/scripts/eosio_build.sh +++ b/scripts/eosio_build.sh @@ -332,7 +332,7 @@ printf "## ENABLE_COVERAGE_TESTING=%s\\n" "${ENABLE_COVERAGE_TESTING}" mkdir -p $BUILD_DIR cd $BUILD_DIR -$CMAKE -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_CXX_COMPILER="${CXX}" -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=true $PIN_COMPILER_CMAKE \ +$CMAKE -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_CXX_COMPILER="${CXX}" -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=false \# $PIN_COMPILER_CMAKE \ -DCORE_SYMBOL_NAME="${CORE_SYMBOL_NAME}" -DENABLE_COVERAGE_TESTING="${ENABLE_COVERAGE_TESTING}" -DBUILD_DOXYGEN="${DOXYGEN}" \ -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/eosio $LOCAL_CMAKE_FLAGS "${REPO_ROOT}" diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index 514c5f7a9b6..51648f1aaa1 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -154,6 +154,48 @@ if [ $? -ne 0 ]; then exit -1; fi printf "\\n" +echo "BUILD_CLANG $BUILD_CLANG8" +if $BUILD_CLANG8; then + printf "Checking Clang 8 support...\\n" + if [ ! -d $CLANG8_ROOT ]; then + printf "Installing Clang 8...\\n" + cd ${OPT_LOCATION} \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ + && git checkout $PINNED_COMPILER_LLVM_COMMIT \ + && cd tools \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/lld.git \ + && cd lld && git checkout $PINNED_COMPILER_LLD_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/polly.git \ + && cd polly && git checkout $PINNED_COMPILER_POLLY_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang.git clang && cd clang/tools \ + && git checkout $PINNED_COMPILER_CLANG_VERSION \ + && mkdir extra && cd extra \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang-tools-extra.git \ + && cd clang-tools-extra && git checkout $PINNED_COMPILER_CLANG_TOOLS_EXTRA_COMMIT && cd .. \ + && cd ../../../../projects \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxx.git \ + && cd libcxx && git checkout $PINNED_COMPILER_LIBCXX_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxxabi.git \ + && cd libcxxabi && git checkout $PINNED_COMPILER_LIBCXXABI_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libunwind.git \ + && cd libunwind && git checkout $PINNED_COMPILER_LIBUNWIND_COMMIT && cd ../ \ + && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/compiler-rt.git \ + && cd compiler-rt && git checkout $PINNED_COMPILER_COMPILER_RT_COMMIT && cd ../ \ + && cd ${OPT_LOCATION}/clang8 \ + && mkdir build && cd build \ + && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ + && make -j"${JOBS}" \ + && make install \ + && cd ../.. \ + || exit 1 + printf " - Clang 8 successfully installed @ ${CLANG8_ROOT}\\n" + else + printf " - Clang 8 found @ ${CLANG8_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + + printf "\\n" +fi printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" BOOSTVERSION=$( grep "#define BOOST_VERSION" "$HOME/opt/boost/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) @@ -163,7 +205,7 @@ if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST && tar -xjf boost_$BOOST_VERSION.tar.bz2 \ && cd $BOOST_ROOT \ && ./bootstrap.sh --prefix=$BOOST_ROOT \ - && ./b2 -q -j"${JOBS}" install \ + && ./b2 -q -j2 install \ && cd .. \ && rm -f boost_$BOOST_VERSION.tar.bz2 \ && rm -rf $BOOST_LINK_LOCATION \ @@ -254,47 +296,6 @@ if [ $? -ne 0 ]; then exit -1; fi cd .. printf "\\n" -if $BUILD_CLANG8; then - printf "Checking Clang 8 support...\\n" - if [ ! -d $CLANG8_ROOT ]; then - printf "Installing Clang 8...\\n" - cd ${OPT_LOCATION} \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ - && git checkout $PINNED_COMPILER_LLVM_COMMIT \ - && cd tools \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/lld.git \ - && cd lld && git checkout $PINNED_COMPILER_LLD_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/polly.git \ - && cd polly && git checkout $PINNED_COMPILER_POLLY_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang.git clang && cd clang/tools \ - && git checkout $PINNED_COMPILER_CLANG_VERSION \ - && mkdir extra && cd extra \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang-tools-extra.git \ - && cd clang-tools-extra && git checkout $PINNED_COMPILER_CLANG_TOOLS_EXTRA_COMMIT && cd .. \ - && cd ../../../../projects \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxx.git \ - && cd libcxx && git checkout $PINNED_COMPILER_LIBCXX_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxxabi.git \ - && cd libcxxabi && git checkout $PINNED_COMPILER_LIBCXXABI_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libunwind.git \ - && cd libunwind && git checkout $PINNED_COMPILER_LIBUNWIND_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/compiler-rt.git \ - && cd compiler-rt && git checkout $PINNED_COMPILER_COMPILER_RT_COMMIT && cd ../ \ - && cd ${OPT_LOCATION}/clang8 \ - && mkdir build && cd build \ - && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ - && make -j"${JOBS}" \ - && make install \ - && cd ../.. \ - || exit 1 - printf " - Clang 8 successfully installed @ ${CLANG8_ROOT}\\n" - else - printf " - Clang 8 found @ ${CLANG8_ROOT}.\\n" - fi - if [ $? -ne 0 ]; then exit -1; fi - - printf "\\n" -fi function print_instructions() { return 0 From f6ac7f68e67d3badb460a2d3e5fa41279b541108 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Tue, 16 Apr 2019 21:21:11 -0400 Subject: [PATCH 16/86] hopefully close to finished with pinning --- CMakeLists.txt | 13 ++++++----- programs/cleos/CMakeLists.txt | 4 ++++ programs/keosd/CMakeLists.txt | 4 ++++ programs/nodeos/CMakeLists.txt | 4 ++++ scripts/eosio_build_ubuntu.sh | 42 ++++++++++++++++++++++++++++++++-- unittests/CMakeLists.txt | 8 ++++++- 6 files changed, 66 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e35c50a286a..caf9a255606 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,12 +47,6 @@ set( GUI_CLIENT_EXECUTABLE_NAME eosio ) set( CUSTOM_URL_SCHEME "gcs" ) set( INSTALLER_APP_ID "68ad7005-8eee-49c9-95ce-9eed97e5b347" ) -if(${EOSIO_PIN_COMPILER}) - message(STATUS "Pinning compiler to Clang 8") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -v") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++abi") -endif() - # http://stackoverflow.com/a/18369825 if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0) @@ -127,6 +121,13 @@ set(THREADS_PREFER_PTHREAD_FLAG 1) find_package(Threads) link_libraries(Threads::Threads) +if(${EOSIO_PIN_COMPILER}) + if(NOT APPLE AND UNIX) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdinc++ -nostdlib++ -I${LIBSTDCPP_DIR}/include/c++/7.1.0") + set(CMAKE_CXX_STANDARD_LIBRARIES "${LIBSTDCPP_DIR}/lib64/libstdc++.a") + endif() +endif() + if( WIN32 ) message( STATUS "Configuring EOSIO on WIN32") diff --git a/programs/cleos/CMakeLists.txt b/programs/cleos/CMakeLists.txt index 0d98fdcf63d..1083b70ea3a 100644 --- a/programs/cleos/CMakeLists.txt +++ b/programs/cleos/CMakeLists.txt @@ -34,6 +34,10 @@ configure_file(config.hpp.in config.hpp ESCAPE_QUOTES) target_include_directories(${CLI_CLIENT_EXECUTABLE_NAME} PUBLIC ${Intl_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}) +if(EOSIO_PIN_COMPILER) + target_link_libraries(${CLI_CLIENT_EXECUTABLE_NAME} PRIVATE -nostdlib++) +endif() + target_link_libraries( ${CLI_CLIENT_EXECUTABLE_NAME} PRIVATE appbase chain_api_plugin producer_plugin chain_plugin http_plugin eosio_chain fc ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS} ${Intl_LIBRARIES} ) diff --git a/programs/keosd/CMakeLists.txt b/programs/keosd/CMakeLists.txt index 3c806fbed39..cecb1eae5a1 100644 --- a/programs/keosd/CMakeLists.txt +++ b/programs/keosd/CMakeLists.txt @@ -11,6 +11,10 @@ endif() configure_file(config.hpp.in config.hpp ESCAPE_QUOTES) +if(EOSIO_PIN_COMPILER) + target_link_libraries(${KEY_STORE_EXECUTABLE_NAME} PRIVATE -nostdlib++) +endif() + target_link_libraries( ${KEY_STORE_EXECUTABLE_NAME} PRIVATE appbase PRIVATE wallet_api_plugin wallet_plugin diff --git a/programs/nodeos/CMakeLists.txt b/programs/nodeos/CMakeLists.txt index d9fb90ee45d..59ade059b32 100644 --- a/programs/nodeos/CMakeLists.txt +++ b/programs/nodeos/CMakeLists.txt @@ -47,6 +47,10 @@ else() set(build_id_flag "") endif() +if(EOSIO_PIN_COMPILER) + target_link_libraries(${NODE_EXECUTABLE_NAME} PRIVATE -nostdlib++) +endif() + target_link_libraries( ${NODE_EXECUTABLE_NAME} PRIVATE appbase PRIVATE -Wl,${whole_archive_flag} login_plugin -Wl,${no_whole_archive_flag} diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index 514c5f7a9b6..676e7785ac1 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -255,10 +255,48 @@ cd .. printf "\\n" if $BUILD_CLANG8; then + if [ ! -d ${OPT_LOCATION}/gmp ]; then + printf "Installing gmp...\\n" + cd ${TMP_LOCATION} \ + && wget https://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz && tar -xzf gmp-5.0.1.tar.gz \ + && cd gmp-5.0.1 && mkdir build && cd build \ + && ../configure --prefix=${OPT_LOCATION}/gmp \ + && make -j"${JOBS}" && make install \ + && cd ../ && rm -r gmp-5.0.1 \ + || exit 1 + if [ ! -d ${OPT_LOCATION}/mpfr ]; then + printf "Installing mpfr...\\n" + cd ${TMP_LOCATION} \ + && wget https://ftp.gnu.org/gnu/mpfr/mpfr-3.0.0.tar.gz && tar -xzf mpfr-3.0.0.tar.gz \ + && cd mpfr-3.0.0 && mkdir build && cd build \ + && ../configure --prefix=${OPT_LOCATION}/mpfr --with-gmp=${OPT_LOCATION}/gmp \ + && make -j"${JOBS}" && make install \ + && cd ../ && rm -r mpfr-3.0.0 \ + || exit 1 + if [ ! -d ${OPT_LOCATION}/mpc ]; then + printf "Installing mpc...\\n" + cd ${TMP_LOCATION} \ + && wget https://ftp.gnu.org/gnu/mpc/mpc-1.0.1.tar.gz && tar -xzf mpc-1.0.1.tar.gz \ + && cd mpc-1.0.1 && mkdir build && cd build \ + && ../configure --prefix=${OPT_LOCATION}/mpc --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr \ + && make -j"${JOBS}" && make install \ + && cd ../ && rm -r mpc-1.0.1 \ + || exit 1 + if [ ! -d ${OPT_LOCATION}/gcc ]; then + printf "Installing libstdc++\\n" + cd ${TMP_LOCATION} \ + && wget https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ + && cd gcc-7.1.0 && mkdir build && cd build \ + && + && ../configure --disable-libsanitizer --enable-languages=c,c++ --prefix=${OPT_LOCATION}/gcc --enable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --disable-werror --disable-multilib --with-tune=generic --enable-checking=release --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr --with-mpc=${OPT_LOCATION}/mpc + && make -j"${JOBS}" && make install \ + && cd ../ && rm -r gcc-7.1.0 \ + || exit 1 + printf "Checking Clang 8 support...\\n" if [ ! -d $CLANG8_ROOT ]; then printf "Installing Clang 8...\\n" - cd ${OPT_LOCATION} \ + cd ${TMP_LOCATION} \ && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ && git checkout $PINNED_COMPILER_LLVM_COMMIT \ && cd tools \ @@ -280,7 +318,7 @@ if $BUILD_CLANG8; then && cd libunwind && git checkout $PINNED_COMPILER_LIBUNWIND_COMMIT && cd ../ \ && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/compiler-rt.git \ && cd compiler-rt && git checkout $PINNED_COMPILER_COMPILER_RT_COMMIT && cd ../ \ - && cd ${OPT_LOCATION}/clang8 \ + && cd ${TMP_LOCATION}/clang8 \ && mkdir build && cd build \ && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ && make -j"${JOBS}" \ diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index dfb2a029e26..c5cfd31d096 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -42,7 +42,13 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/contracts.hpp.in ${CMAKE_CURRENT_BINA ### BUILD UNIT TEST EXECUTABLE ### file(GLOB UNIT_TESTS "*.cpp") # find all unit test suites add_executable( unit_test ${UNIT_TESTS}) # build unit tests as one executable -target_link_libraries( unit_test eosio_chain chainbase eosio_testing fc appbase ${PLATFORM_SPECIFIC_LIBS} ) + +if(EOSIO_PIN_COMPILER) + target_link_libraries(unit_test PRIVATE -nostdlib++ PUBLIC eosio_chain chainbase eosio_testing fc appbase ${PLATFORM_SPECIFIC_LIBS}) +else() + target_link_libraries( unit_test eosio_chain chainbase eosio_testing fc appbase ${PLATFORM_SPECIFIC_LIBS} ) +endif() + target_compile_options(unit_test PUBLIC -DDISABLE_EOSLIB_SERIALIZE) target_include_directories( unit_test PUBLIC ${CMAKE_SOURCE_DIR}/libraries/testing/include From 9055d81d77d23ca1a71b9ac4d666b11f228b173e Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Tue, 16 Apr 2019 21:26:52 -0400 Subject: [PATCH 17/86] update script --- scripts/eosio_build_ubuntu.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index 676e7785ac1..7368673cfbf 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -287,8 +287,7 @@ if $BUILD_CLANG8; then cd ${TMP_LOCATION} \ && wget https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ && cd gcc-7.1.0 && mkdir build && cd build \ - && - && ../configure --disable-libsanitizer --enable-languages=c,c++ --prefix=${OPT_LOCATION}/gcc --enable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --disable-werror --disable-multilib --with-tune=generic --enable-checking=release --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr --with-mpc=${OPT_LOCATION}/mpc + &&../configure --enable-languages=c,c++ --prefix=${OPT_LOCATION}/gcc --disable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --disable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --disable-werror --disable-multilib --with-tune=generic --enable-checking=release --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr --with-mpc=${OPT_LOCATION}/mpc --disable-libsanitizer --disable-testsuite --disable-libquadmath --disable-libitm --disable-libcc1 && make -j"${JOBS}" && make install \ && cd ../ && rm -r gcc-7.1.0 \ || exit 1 From ba4e17d1621bad4f995b1af4224b7934464ad89f Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 17 Apr 2019 00:23:28 -0400 Subject: [PATCH 18/86] small changes for gcc build --- scripts/eosio_build.sh | 2 +- scripts/eosio_build_ubuntu.sh | 31 ++++++++++++++++++++++++------- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/scripts/eosio_build.sh b/scripts/eosio_build.sh index 68ab0848f89..490a16c3b06 100755 --- a/scripts/eosio_build.sh +++ b/scripts/eosio_build.sh @@ -228,7 +228,7 @@ fi if $PIN_COMPILER; then BUILD_CLANG8=true CPP_COMP=${OPT_LOCATION}/clang8/bin/clang++ - PIN_COMPILER_CMAKE="-DEOSIO_PIN_COMPILER=1" + PIN_COMPILER_CMAKE="-DEOSIO_PIN_COMPILER=1 -DLIBSTDCPP_DIR=${OPT_LOCATION}/gcc" elif $NO_CPP17; then if [ $NONINTERACTIVE -eq 0 ]; then BUILD_CLANG8=true diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index 2b8100300c5..e50cb3f6d7d 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -253,6 +253,15 @@ if [ $? -ne 0 ]; then exit -1; fi cd .. printf "\\n" +# Use current directory's tmp directory if noexec is enabled for /tmp +if (mount | grep "/tmp " | grep --quiet noexec); then + mkdir -p $REPO_ROOT/tmp + TMP_LOCATION="${REPO_ROOT}/tmp" + rm -rf $REPO_ROOT/tmp/* +else # noexec wasn't found + TMP_LOCATION="/tmp" +fi + if $BUILD_CLANG8; then if [ ! -d ${OPT_LOCATION}/gmp ]; then printf "Installing gmp...\\n" @@ -261,8 +270,9 @@ if $BUILD_CLANG8; then && cd gmp-5.0.1 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/gmp \ && make -j"${JOBS}" && make install \ - && cd ../ && rm -r gmp-5.0.1 \ + && cd ../ && rm -r ${TMP_LOCATION}/gmp-5.0.1 ${TMP_LOCATION}/gmp-5.0.1.tar.gz \ || exit 1 + fi if [ ! -d ${OPT_LOCATION}/mpfr ]; then printf "Installing mpfr...\\n" cd ${TMP_LOCATION} \ @@ -270,8 +280,9 @@ if $BUILD_CLANG8; then && cd mpfr-3.0.0 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/mpfr --with-gmp=${OPT_LOCATION}/gmp \ && make -j"${JOBS}" && make install \ - && cd ../ && rm -r mpfr-3.0.0 \ + && cd ../ && rm -r ${TMP_LOCATION}/mpfr-3.0.0 ${TMP_LOCATION}/mpfr-3.0.0.tar.gz \ || exit 1 + fi if [ ! -d ${OPT_LOCATION}/mpc ]; then printf "Installing mpc...\\n" cd ${TMP_LOCATION} \ @@ -279,18 +290,21 @@ if $BUILD_CLANG8; then && cd mpc-1.0.1 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/mpc --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr \ && make -j"${JOBS}" && make install \ - && cd ../ && rm -r mpc-1.0.1 \ + && cd ../ && rm -r ${TMP_LOCATION}/mpc-1.0.1 ${TMP_LOCATION}/mpc-1.0.1 \ || exit 1 + fi if [ ! -d ${OPT_LOCATION}/gcc ]; then printf "Installing libstdc++\\n" cd ${TMP_LOCATION} \ && wget https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ && cd gcc-7.1.0 && mkdir build && cd build \ - &&../configure --enable-languages=c,c++ --prefix=${OPT_LOCATION}/gcc --disable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --disable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --disable-werror --disable-multilib --with-tune=generic --enable-checking=release --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr --with-mpc=${OPT_LOCATION}/mpc --disable-libsanitizer --disable-testsuite --disable-libquadmath --disable-libitm --disable-libcc1 - && make -j"${JOBS}" && make install \ - && cd ../ && rm -r gcc-7.1.0 \ + &&../configure --enable-languages=c,c++ --prefix=${OPT_LOCATION}/gcc --disable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --disable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --disable-werror --disable-multilib --with-tune=generic --enable-checking=release --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr --with-mpc=${OPT_LOCATION}/mpc --disable-libsanitizer --disable-testsuite --disable-libquadmath --disable-libitm --disable-libcc1 \ + && make -j3 && make install \ + && cd ../ && rm -r ${TMP_LOCATION}/gcc-7.1.0 ${TMP_LOCATION}/gcc-7.1.0.tar.gz \ || exit 1 + fi + #&& make -j"${JOBS}" && make install \ printf "Checking Clang 8 support...\\n" if [ ! -d $CLANG8_ROOT ]; then printf "Installing Clang 8...\\n" @@ -319,10 +333,13 @@ if $BUILD_CLANG8; then && cd ${TMP_LOCATION}/clang8 \ && mkdir build && cd build \ && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ - && make -j"${JOBS}" \ + && make -j3 \ && make install \ + && rm -r ${TMP_LOCATION}/clang8 \ && cd ../.. \ || exit 1 + + #&& make -j"${JOBS}" \ printf " - Clang 8 successfully installed @ ${CLANG8_ROOT}\\n" else printf " - Clang 8 found @ ${CLANG8_ROOT}.\\n" From 5a11c0b69af52bad9b6bef121a858e6b2b1d7055 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 17 Apr 2019 00:45:20 -0400 Subject: [PATCH 19/86] update all other build scripts --- scripts/eosio_build_amazon.sh | 56 +++++++++++++++++++++++++++++++++-- scripts/eosio_build_centos.sh | 47 +++++++++++++++++++++++++++-- scripts/eosio_build_fedora.sh | 47 +++++++++++++++++++++++++++-- scripts/eosio_build_ubuntu.sh | 6 ++-- 4 files changed, 146 insertions(+), 10 deletions(-) diff --git a/scripts/eosio_build_amazon.sh b/scripts/eosio_build_amazon.sh index e769917a790..2abc3b60632 100755 --- a/scripts/eosio_build_amazon.sh +++ b/scripts/eosio_build_amazon.sh @@ -248,11 +248,61 @@ if [ $? -ne 0 ]; then exit -1; fi cd .. printf "\\n" +# Use current directory's tmp directory if noexec is enabled for /tmp +if (mount | grep "/tmp " | grep --quiet noexec); then + mkdir -p $REPO_ROOT/tmp + TMP_LOCATION="${REPO_ROOT}/tmp" + rm -rf $REPO_ROOT/tmp/* +else # noexec wasn't found + TMP_LOCATION="/tmp" +fi + if $BUILD_CLANG8; then + if [ ! -d ${OPT_LOCATION}/gmp ]; then + printf "Installing gmp...\\n" + cd ${TMP_LOCATION} \ + && wget https://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz && tar -xzf gmp-5.0.1.tar.gz \ + && cd gmp-5.0.1 && mkdir build && cd build \ + && ../configure --prefix=${OPT_LOCATION}/gmp \ + && make -j"${JOBS}" && make install \ + && cd ../ && rm -r ${TMP_LOCATION}/gmp-5.0.1 ${TMP_LOCATION}/gmp-5.0.1.tar.gz \ + || exit 1 + fi + if [ ! -d ${OPT_LOCATION}/mpfr ]; then + printf "Installing mpfr...\\n" + cd ${TMP_LOCATION} \ + && wget https://ftp.gnu.org/gnu/mpfr/mpfr-3.0.0.tar.gz && tar -xzf mpfr-3.0.0.tar.gz \ + && cd mpfr-3.0.0 && mkdir build && cd build \ + && ../configure --prefix=${OPT_LOCATION}/mpfr --with-gmp=${OPT_LOCATION}/gmp \ + && make -j"${JOBS}" && make install \ + && cd ../ && rm -r ${TMP_LOCATION}/mpfr-3.0.0 ${TMP_LOCATION}/mpfr-3.0.0.tar.gz \ + || exit 1 + fi + if [ ! -d ${OPT_LOCATION}/mpc ]; then + printf "Installing mpc...\\n" + cd ${TMP_LOCATION} \ + && wget https://ftp.gnu.org/gnu/mpc/mpc-1.0.1.tar.gz && tar -xzf mpc-1.0.1.tar.gz \ + && cd mpc-1.0.1 && mkdir build && cd build \ + && ../configure --prefix=${OPT_LOCATION}/mpc --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr \ + && make -j"${JOBS}" && make install \ + && cd ../ && rm -r ${TMP_LOCATION}/mpc-1.0.1 ${TMP_LOCATION}/mpc-1.0.1 \ + || exit 1 + fi + if [ ! -d ${OPT_LOCATION}/gcc ]; then + printf "Installing libstdc++\\n" + cd ${TMP_LOCATION} \ + && wget https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ + && cd gcc-7.1.0 && mkdir build && cd build \ + &&../configure --enable-languages=c,c++ --prefix=${OPT_LOCATION}/gcc --disable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --disable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --disable-werror --disable-multilib --with-tune=generic --enable-checking=release --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr --with-mpc=${OPT_LOCATION}/mpc --disable-libsanitizer --disable-testsuite --disable-libquadmath --disable-libitm --disable-libcc1 \ + && make -j"${JOBS}" && make install \ + && cd ../ && rm -r ${TMP_LOCATION}/gcc-7.1.0 ${TMP_LOCATION}/gcc-7.1.0.tar.gz \ + || exit 1 + fi + printf "Checking Clang 8 support...\\n" if [ ! -d $CLANG8_ROOT ]; then printf "Installing Clang 8...\\n" - cd ${OPT_LOCATION} \ + cd ${TMP_LOCATION} \ && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ && git checkout $PINNED_COMPILER_LLVM_COMMIT \ && cd tools \ @@ -274,13 +324,15 @@ if $BUILD_CLANG8; then && cd libunwind && git checkout $PINNED_COMPILER_LIBUNWIND_COMMIT && cd ../ \ && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/compiler-rt.git \ && cd compiler-rt && git checkout $PINNED_COMPILER_COMPILER_RT_COMMIT && cd ../ \ - && cd ${OPT_LOCATION}/clang8 \ + && cd ${TMP_LOCATION}/clang8 \ && mkdir build && cd build \ && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ && make -j"${JOBS}" \ && make install \ + && rm -r ${TMP_LOCATION}/clang8 \ && cd ../.. \ || exit 1 + printf " - Clang 8 successfully installed @ ${CLANG8_ROOT}\\n" else printf " - Clang 8 found @ ${CLANG8_ROOT}.\\n" diff --git a/scripts/eosio_build_centos.sh b/scripts/eosio_build_centos.sh index 7a11c7ee257..3bd5546d50c 100755 --- a/scripts/eosio_build_centos.sh +++ b/scripts/eosio_build_centos.sh @@ -300,10 +300,51 @@ cd .. printf "\\n" if $BUILD_CLANG8; then + if [ ! -d ${OPT_LOCATION}/gmp ]; then + printf "Installing gmp...\\n" + cd ${TMP_LOCATION} \ + && wget https://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz && tar -xzf gmp-5.0.1.tar.gz \ + && cd gmp-5.0.1 && mkdir build && cd build \ + && ../configure --prefix=${OPT_LOCATION}/gmp \ + && make -j"${JOBS}" && make install \ + && cd ../ && rm -r ${TMP_LOCATION}/gmp-5.0.1 ${TMP_LOCATION}/gmp-5.0.1.tar.gz \ + || exit 1 + fi + if [ ! -d ${OPT_LOCATION}/mpfr ]; then + printf "Installing mpfr...\\n" + cd ${TMP_LOCATION} \ + && wget https://ftp.gnu.org/gnu/mpfr/mpfr-3.0.0.tar.gz && tar -xzf mpfr-3.0.0.tar.gz \ + && cd mpfr-3.0.0 && mkdir build && cd build \ + && ../configure --prefix=${OPT_LOCATION}/mpfr --with-gmp=${OPT_LOCATION}/gmp \ + && make -j"${JOBS}" && make install \ + && cd ../ && rm -r ${TMP_LOCATION}/mpfr-3.0.0 ${TMP_LOCATION}/mpfr-3.0.0.tar.gz \ + || exit 1 + fi + if [ ! -d ${OPT_LOCATION}/mpc ]; then + printf "Installing mpc...\\n" + cd ${TMP_LOCATION} \ + && wget https://ftp.gnu.org/gnu/mpc/mpc-1.0.1.tar.gz && tar -xzf mpc-1.0.1.tar.gz \ + && cd mpc-1.0.1 && mkdir build && cd build \ + && ../configure --prefix=${OPT_LOCATION}/mpc --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr \ + && make -j"${JOBS}" && make install \ + && cd ../ && rm -r ${TMP_LOCATION}/mpc-1.0.1 ${TMP_LOCATION}/mpc-1.0.1 \ + || exit 1 + fi + if [ ! -d ${OPT_LOCATION}/gcc ]; then + printf "Installing libstdc++\\n" + cd ${TMP_LOCATION} \ + && wget https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ + && cd gcc-7.1.0 && mkdir build && cd build \ + &&../configure --enable-languages=c,c++ --prefix=${OPT_LOCATION}/gcc --disable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --disable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --disable-werror --disable-multilib --with-tune=generic --enable-checking=release --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr --with-mpc=${OPT_LOCATION}/mpc --disable-libsanitizer --disable-testsuite --disable-libquadmath --disable-libitm --disable-libcc1 \ + && make -j"${JOBS}" && make install \ + && cd ../ && rm -r ${TMP_LOCATION}/gcc-7.1.0 ${TMP_LOCATION}/gcc-7.1.0.tar.gz \ + || exit 1 + fi + printf "Checking Clang 8 support...\\n" if [ ! -d $CLANG8_ROOT ]; then printf "Installing Clang 8...\\n" - cd ${OPT_LOCATION} \ + cd ${TMP_LOCATION} \ && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ && git checkout $PINNED_COMPILER_LLVM_COMMIT \ && cd tools \ @@ -325,13 +366,15 @@ if $BUILD_CLANG8; then && cd libunwind && git checkout $PINNED_COMPILER_LIBUNWIND_COMMIT && cd ../ \ && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/compiler-rt.git \ && cd compiler-rt && git checkout $PINNED_COMPILER_COMPILER_RT_COMMIT && cd ../ \ - && cd ${OPT_LOCATION}/clang8 \ + && cd ${TMP_LOCATION}/clang8 \ && mkdir build && cd build \ && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ && make -j"${JOBS}" \ && make install \ + && rm -r ${TMP_LOCATION}/clang8 \ && cd ../.. \ || exit 1 + printf " - Clang 8 successfully installed @ ${CLANG8_ROOT}\\n" else printf " - Clang 8 found @ ${CLANG8_ROOT}.\\n" diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index 8fab815109c..8843a9c5b1d 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -232,10 +232,51 @@ cd .. printf "\\n" if $BUILD_CLANG8; then + if [ ! -d ${OPT_LOCATION}/gmp ]; then + printf "Installing gmp...\\n" + cd ${TMP_LOCATION} \ + && wget https://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz && tar -xzf gmp-5.0.1.tar.gz \ + && cd gmp-5.0.1 && mkdir build && cd build \ + && ../configure --prefix=${OPT_LOCATION}/gmp \ + && make -j"${JOBS}" && make install \ + && cd ../ && rm -r ${TMP_LOCATION}/gmp-5.0.1 ${TMP_LOCATION}/gmp-5.0.1.tar.gz \ + || exit 1 + fi + if [ ! -d ${OPT_LOCATION}/mpfr ]; then + printf "Installing mpfr...\\n" + cd ${TMP_LOCATION} \ + && wget https://ftp.gnu.org/gnu/mpfr/mpfr-3.0.0.tar.gz && tar -xzf mpfr-3.0.0.tar.gz \ + && cd mpfr-3.0.0 && mkdir build && cd build \ + && ../configure --prefix=${OPT_LOCATION}/mpfr --with-gmp=${OPT_LOCATION}/gmp \ + && make -j"${JOBS}" && make install \ + && cd ../ && rm -r ${TMP_LOCATION}/mpfr-3.0.0 ${TMP_LOCATION}/mpfr-3.0.0.tar.gz \ + || exit 1 + fi + if [ ! -d ${OPT_LOCATION}/mpc ]; then + printf "Installing mpc...\\n" + cd ${TMP_LOCATION} \ + && wget https://ftp.gnu.org/gnu/mpc/mpc-1.0.1.tar.gz && tar -xzf mpc-1.0.1.tar.gz \ + && cd mpc-1.0.1 && mkdir build && cd build \ + && ../configure --prefix=${OPT_LOCATION}/mpc --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr \ + && make -j"${JOBS}" && make install \ + && cd ../ && rm -r ${TMP_LOCATION}/mpc-1.0.1 ${TMP_LOCATION}/mpc-1.0.1 \ + || exit 1 + fi + if [ ! -d ${OPT_LOCATION}/gcc ]; then + printf "Installing libstdc++\\n" + cd ${TMP_LOCATION} \ + && wget https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ + && cd gcc-7.1.0 && mkdir build && cd build \ + &&../configure --enable-languages=c,c++ --prefix=${OPT_LOCATION}/gcc --disable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --disable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --disable-werror --disable-multilib --with-tune=generic --enable-checking=release --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr --with-mpc=${OPT_LOCATION}/mpc --disable-libsanitizer --disable-testsuite --disable-libquadmath --disable-libitm --disable-libcc1 \ + && make -j"${JOBS}" && make install \ + && cd ../ && rm -r ${TMP_LOCATION}/gcc-7.1.0 ${TMP_LOCATION}/gcc-7.1.0.tar.gz \ + || exit 1 + fi + printf "Checking Clang 8 support...\\n" if [ ! -d $CLANG8_ROOT ]; then printf "Installing Clang 8...\\n" - cd ${OPT_LOCATION} \ + cd ${TMP_LOCATION} \ && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ && git checkout $PINNED_COMPILER_LLVM_COMMIT \ && cd tools \ @@ -257,13 +298,15 @@ if $BUILD_CLANG8; then && cd libunwind && git checkout $PINNED_COMPILER_LIBUNWIND_COMMIT && cd ../ \ && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/compiler-rt.git \ && cd compiler-rt && git checkout $PINNED_COMPILER_COMPILER_RT_COMMIT && cd ../ \ - && cd ${OPT_LOCATION}/clang8 \ + && cd ${TMP_LOCATION}/clang8 \ && mkdir build && cd build \ && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ && make -j"${JOBS}" \ && make install \ + && rm -r ${TMP_LOCATION}/clang8 \ && cd ../.. \ || exit 1 + printf " - Clang 8 successfully installed @ ${CLANG8_ROOT}\\n" else printf " - Clang 8 found @ ${CLANG8_ROOT}.\\n" diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index e50cb3f6d7d..f11ade2272b 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -299,12 +299,11 @@ if $BUILD_CLANG8; then && wget https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ && cd gcc-7.1.0 && mkdir build && cd build \ &&../configure --enable-languages=c,c++ --prefix=${OPT_LOCATION}/gcc --disable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --disable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --disable-werror --disable-multilib --with-tune=generic --enable-checking=release --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr --with-mpc=${OPT_LOCATION}/mpc --disable-libsanitizer --disable-testsuite --disable-libquadmath --disable-libitm --disable-libcc1 \ - && make -j3 && make install \ + && make -j"${JOBS}" && make install \ && cd ../ && rm -r ${TMP_LOCATION}/gcc-7.1.0 ${TMP_LOCATION}/gcc-7.1.0.tar.gz \ || exit 1 fi - #&& make -j"${JOBS}" && make install \ printf "Checking Clang 8 support...\\n" if [ ! -d $CLANG8_ROOT ]; then printf "Installing Clang 8...\\n" @@ -333,13 +332,12 @@ if $BUILD_CLANG8; then && cd ${TMP_LOCATION}/clang8 \ && mkdir build && cd build \ && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ - && make -j3 \ + && make -j"${JOBS}" \ && make install \ && rm -r ${TMP_LOCATION}/clang8 \ && cd ../.. \ || exit 1 - #&& make -j"${JOBS}" \ printf " - Clang 8 successfully installed @ ${CLANG8_ROOT}\\n" else printf " - Clang 8 found @ ${CLANG8_ROOT}.\\n" From b9f058aa9390b7c3a187dd127c0de84057af30df Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 17 Apr 2019 00:51:50 -0400 Subject: [PATCH 20/86] use curl instead of wget --- scripts/eosio_build_amazon.sh | 10 +++++----- scripts/eosio_build_centos.sh | 8 ++++---- scripts/eosio_build_fedora.sh | 10 +++++----- scripts/eosio_build_ubuntu.sh | 8 ++++---- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/scripts/eosio_build_amazon.sh b/scripts/eosio_build_amazon.sh index 2abc3b60632..480d52ee919 100755 --- a/scripts/eosio_build_amazon.sh +++ b/scripts/eosio_build_amazon.sh @@ -12,7 +12,7 @@ if [[ "${OS_NAME}" == "Amazon Linux AMI" ]]; then # Amazonlinux1 DEP_ARRAY=( sudo procps util-linux which gcc72 gcc72-c++ autoconf automake libtool make doxygen graphviz \ bzip2 bzip2-devel openssl-devel gmp gmp-devel libstdc++72 python27 python27-devel python36 python36-devel \ - libedit-devel ncurses-devel swig wget file libcurl-devel libusb1-devel + libedit-devel ncurses-devel swig curl -LO file libcurl-devel libusb1-devel ) else # Amazonlinux2 DEP_ARRAY=( @@ -261,7 +261,7 @@ if $BUILD_CLANG8; then if [ ! -d ${OPT_LOCATION}/gmp ]; then printf "Installing gmp...\\n" cd ${TMP_LOCATION} \ - && wget https://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz && tar -xzf gmp-5.0.1.tar.gz \ + && curl -LO https://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz && tar -xzf gmp-5.0.1.tar.gz \ && cd gmp-5.0.1 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/gmp \ && make -j"${JOBS}" && make install \ @@ -271,7 +271,7 @@ if $BUILD_CLANG8; then if [ ! -d ${OPT_LOCATION}/mpfr ]; then printf "Installing mpfr...\\n" cd ${TMP_LOCATION} \ - && wget https://ftp.gnu.org/gnu/mpfr/mpfr-3.0.0.tar.gz && tar -xzf mpfr-3.0.0.tar.gz \ + && curl -LO https://ftp.gnu.org/gnu/mpfr/mpfr-3.0.0.tar.gz && tar -xzf mpfr-3.0.0.tar.gz \ && cd mpfr-3.0.0 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/mpfr --with-gmp=${OPT_LOCATION}/gmp \ && make -j"${JOBS}" && make install \ @@ -281,7 +281,7 @@ if $BUILD_CLANG8; then if [ ! -d ${OPT_LOCATION}/mpc ]; then printf "Installing mpc...\\n" cd ${TMP_LOCATION} \ - && wget https://ftp.gnu.org/gnu/mpc/mpc-1.0.1.tar.gz && tar -xzf mpc-1.0.1.tar.gz \ + && curl -LO https://ftp.gnu.org/gnu/mpc/mpc-1.0.1.tar.gz && tar -xzf mpc-1.0.1.tar.gz \ && cd mpc-1.0.1 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/mpc --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr \ && make -j"${JOBS}" && make install \ @@ -291,7 +291,7 @@ if $BUILD_CLANG8; then if [ ! -d ${OPT_LOCATION}/gcc ]; then printf "Installing libstdc++\\n" cd ${TMP_LOCATION} \ - && wget https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ + && curl -LO https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ && cd gcc-7.1.0 && mkdir build && cd build \ &&../configure --enable-languages=c,c++ --prefix=${OPT_LOCATION}/gcc --disable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --disable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --disable-werror --disable-multilib --with-tune=generic --enable-checking=release --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr --with-mpc=${OPT_LOCATION}/mpc --disable-libsanitizer --disable-testsuite --disable-libquadmath --disable-libitm --disable-libcc1 \ && make -j"${JOBS}" && make install \ diff --git a/scripts/eosio_build_centos.sh b/scripts/eosio_build_centos.sh index 3bd5546d50c..858fae748bc 100755 --- a/scripts/eosio_build_centos.sh +++ b/scripts/eosio_build_centos.sh @@ -303,7 +303,7 @@ if $BUILD_CLANG8; then if [ ! -d ${OPT_LOCATION}/gmp ]; then printf "Installing gmp...\\n" cd ${TMP_LOCATION} \ - && wget https://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz && tar -xzf gmp-5.0.1.tar.gz \ + && curl -LO https://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz && tar -xzf gmp-5.0.1.tar.gz \ && cd gmp-5.0.1 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/gmp \ && make -j"${JOBS}" && make install \ @@ -313,7 +313,7 @@ if $BUILD_CLANG8; then if [ ! -d ${OPT_LOCATION}/mpfr ]; then printf "Installing mpfr...\\n" cd ${TMP_LOCATION} \ - && wget https://ftp.gnu.org/gnu/mpfr/mpfr-3.0.0.tar.gz && tar -xzf mpfr-3.0.0.tar.gz \ + && curl -LO https://ftp.gnu.org/gnu/mpfr/mpfr-3.0.0.tar.gz && tar -xzf mpfr-3.0.0.tar.gz \ && cd mpfr-3.0.0 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/mpfr --with-gmp=${OPT_LOCATION}/gmp \ && make -j"${JOBS}" && make install \ @@ -323,7 +323,7 @@ if $BUILD_CLANG8; then if [ ! -d ${OPT_LOCATION}/mpc ]; then printf "Installing mpc...\\n" cd ${TMP_LOCATION} \ - && wget https://ftp.gnu.org/gnu/mpc/mpc-1.0.1.tar.gz && tar -xzf mpc-1.0.1.tar.gz \ + && curl -LO https://ftp.gnu.org/gnu/mpc/mpc-1.0.1.tar.gz && tar -xzf mpc-1.0.1.tar.gz \ && cd mpc-1.0.1 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/mpc --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr \ && make -j"${JOBS}" && make install \ @@ -333,7 +333,7 @@ if $BUILD_CLANG8; then if [ ! -d ${OPT_LOCATION}/gcc ]; then printf "Installing libstdc++\\n" cd ${TMP_LOCATION} \ - && wget https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ + && curl -LO https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ && cd gcc-7.1.0 && mkdir build && cd build \ &&../configure --enable-languages=c,c++ --prefix=${OPT_LOCATION}/gcc --disable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --disable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --disable-werror --disable-multilib --with-tune=generic --enable-checking=release --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr --with-mpc=${OPT_LOCATION}/mpc --disable-libsanitizer --disable-testsuite --disable-libquadmath --disable-libitm --disable-libcc1 \ && make -j"${JOBS}" && make install \ diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index 8843a9c5b1d..76fd321d889 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -43,7 +43,7 @@ printf "Disk space available: ${DISK_AVAIL%.*}G\\n" # llvm is symlinked from /usr/lib64/llvm4.0 into user's home DEP_ARRAY=( git sudo procps-ng which gcc gcc-c++ autoconf automake libtool make \ - bzip2-devel wget bzip2 compat-openssl10 graphviz doxygen \ + bzip2-devel curl -LO bzip2 compat-openssl10 graphviz doxygen \ openssl-devel gmp-devel libstdc++-devel python2 python2-devel python3 python3-devel \ libedit ncurses-devel swig llvm4.0 llvm4.0-devel llvm4.0-libs llvm4.0-static libcurl-devel libusb-devel ) @@ -235,7 +235,7 @@ if $BUILD_CLANG8; then if [ ! -d ${OPT_LOCATION}/gmp ]; then printf "Installing gmp...\\n" cd ${TMP_LOCATION} \ - && wget https://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz && tar -xzf gmp-5.0.1.tar.gz \ + && curl -LO https://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz && tar -xzf gmp-5.0.1.tar.gz \ && cd gmp-5.0.1 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/gmp \ && make -j"${JOBS}" && make install \ @@ -245,7 +245,7 @@ if $BUILD_CLANG8; then if [ ! -d ${OPT_LOCATION}/mpfr ]; then printf "Installing mpfr...\\n" cd ${TMP_LOCATION} \ - && wget https://ftp.gnu.org/gnu/mpfr/mpfr-3.0.0.tar.gz && tar -xzf mpfr-3.0.0.tar.gz \ + && curl -LO https://ftp.gnu.org/gnu/mpfr/mpfr-3.0.0.tar.gz && tar -xzf mpfr-3.0.0.tar.gz \ && cd mpfr-3.0.0 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/mpfr --with-gmp=${OPT_LOCATION}/gmp \ && make -j"${JOBS}" && make install \ @@ -255,7 +255,7 @@ if $BUILD_CLANG8; then if [ ! -d ${OPT_LOCATION}/mpc ]; then printf "Installing mpc...\\n" cd ${TMP_LOCATION} \ - && wget https://ftp.gnu.org/gnu/mpc/mpc-1.0.1.tar.gz && tar -xzf mpc-1.0.1.tar.gz \ + && curl -LO https://ftp.gnu.org/gnu/mpc/mpc-1.0.1.tar.gz && tar -xzf mpc-1.0.1.tar.gz \ && cd mpc-1.0.1 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/mpc --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr \ && make -j"${JOBS}" && make install \ @@ -265,7 +265,7 @@ if $BUILD_CLANG8; then if [ ! -d ${OPT_LOCATION}/gcc ]; then printf "Installing libstdc++\\n" cd ${TMP_LOCATION} \ - && wget https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ + && curl -LO https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ && cd gcc-7.1.0 && mkdir build && cd build \ &&../configure --enable-languages=c,c++ --prefix=${OPT_LOCATION}/gcc --disable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --disable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --disable-werror --disable-multilib --with-tune=generic --enable-checking=release --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr --with-mpc=${OPT_LOCATION}/mpc --disable-libsanitizer --disable-testsuite --disable-libquadmath --disable-libitm --disable-libcc1 \ && make -j"${JOBS}" && make install \ diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index f11ade2272b..d616553021f 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -266,7 +266,7 @@ if $BUILD_CLANG8; then if [ ! -d ${OPT_LOCATION}/gmp ]; then printf "Installing gmp...\\n" cd ${TMP_LOCATION} \ - && wget https://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz && tar -xzf gmp-5.0.1.tar.gz \ + && curl -LO https://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz && tar -xzf gmp-5.0.1.tar.gz \ && cd gmp-5.0.1 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/gmp \ && make -j"${JOBS}" && make install \ @@ -276,7 +276,7 @@ if $BUILD_CLANG8; then if [ ! -d ${OPT_LOCATION}/mpfr ]; then printf "Installing mpfr...\\n" cd ${TMP_LOCATION} \ - && wget https://ftp.gnu.org/gnu/mpfr/mpfr-3.0.0.tar.gz && tar -xzf mpfr-3.0.0.tar.gz \ + && curl -LO https://ftp.gnu.org/gnu/mpfr/mpfr-3.0.0.tar.gz && tar -xzf mpfr-3.0.0.tar.gz \ && cd mpfr-3.0.0 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/mpfr --with-gmp=${OPT_LOCATION}/gmp \ && make -j"${JOBS}" && make install \ @@ -286,7 +286,7 @@ if $BUILD_CLANG8; then if [ ! -d ${OPT_LOCATION}/mpc ]; then printf "Installing mpc...\\n" cd ${TMP_LOCATION} \ - && wget https://ftp.gnu.org/gnu/mpc/mpc-1.0.1.tar.gz && tar -xzf mpc-1.0.1.tar.gz \ + && curl -LO https://ftp.gnu.org/gnu/mpc/mpc-1.0.1.tar.gz && tar -xzf mpc-1.0.1.tar.gz \ && cd mpc-1.0.1 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/mpc --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr \ && make -j"${JOBS}" && make install \ @@ -296,7 +296,7 @@ if $BUILD_CLANG8; then if [ ! -d ${OPT_LOCATION}/gcc ]; then printf "Installing libstdc++\\n" cd ${TMP_LOCATION} \ - && wget https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ + && curl -LO https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ && cd gcc-7.1.0 && mkdir build && cd build \ &&../configure --enable-languages=c,c++ --prefix=${OPT_LOCATION}/gcc --disable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --disable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --disable-werror --disable-multilib --with-tune=generic --enable-checking=release --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr --with-mpc=${OPT_LOCATION}/mpc --disable-libsanitizer --disable-testsuite --disable-libquadmath --disable-libitm --disable-libcc1 \ && make -j"${JOBS}" && make install \ From 5937ffd67611f420967cf73e67e1bdd5855e99b7 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 17 Apr 2019 01:28:54 -0400 Subject: [PATCH 21/86] fix rm --- scripts/eosio_build_amazon.sh | 2 +- scripts/eosio_build_centos.sh | 2 +- scripts/eosio_build_fedora.sh | 2 +- scripts/eosio_build_ubuntu.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/eosio_build_amazon.sh b/scripts/eosio_build_amazon.sh index 480d52ee919..441776f9606 100755 --- a/scripts/eosio_build_amazon.sh +++ b/scripts/eosio_build_amazon.sh @@ -285,7 +285,7 @@ if $BUILD_CLANG8; then && cd mpc-1.0.1 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/mpc --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr \ && make -j"${JOBS}" && make install \ - && cd ../ && rm -r ${TMP_LOCATION}/mpc-1.0.1 ${TMP_LOCATION}/mpc-1.0.1 \ + && cd ../ && rm -r ${TMP_LOCATION}/mpc-1.0.1 ${TMP_LOCATION}/mpc-1.0.1.tar.gz \ || exit 1 fi if [ ! -d ${OPT_LOCATION}/gcc ]; then diff --git a/scripts/eosio_build_centos.sh b/scripts/eosio_build_centos.sh index 858fae748bc..c40a3a8e686 100755 --- a/scripts/eosio_build_centos.sh +++ b/scripts/eosio_build_centos.sh @@ -327,7 +327,7 @@ if $BUILD_CLANG8; then && cd mpc-1.0.1 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/mpc --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr \ && make -j"${JOBS}" && make install \ - && cd ../ && rm -r ${TMP_LOCATION}/mpc-1.0.1 ${TMP_LOCATION}/mpc-1.0.1 \ + && cd ../ && rm -r ${TMP_LOCATION}/mpc-1.0.1 ${TMP_LOCATION}/mpc-1.0.1.tar.gz \ || exit 1 fi if [ ! -d ${OPT_LOCATION}/gcc ]; then diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index 76fd321d889..bad7556d044 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -259,7 +259,7 @@ if $BUILD_CLANG8; then && cd mpc-1.0.1 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/mpc --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr \ && make -j"${JOBS}" && make install \ - && cd ../ && rm -r ${TMP_LOCATION}/mpc-1.0.1 ${TMP_LOCATION}/mpc-1.0.1 \ + && cd ../ && rm -r ${TMP_LOCATION}/mpc-1.0.1 ${TMP_LOCATION}/mpc-1.0.1.tar.gz \ || exit 1 fi if [ ! -d ${OPT_LOCATION}/gcc ]; then diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index d616553021f..55bd5d33435 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -290,7 +290,7 @@ if $BUILD_CLANG8; then && cd mpc-1.0.1 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/mpc --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr \ && make -j"${JOBS}" && make install \ - && cd ../ && rm -r ${TMP_LOCATION}/mpc-1.0.1 ${TMP_LOCATION}/mpc-1.0.1 \ + && cd ../ && rm -r ${TMP_LOCATION}/mpc-1.0.1 ${TMP_LOCATION}/mpc-1.0.1.tar.gz \ || exit 1 fi if [ ! -d ${OPT_LOCATION}/gcc ]; then From eeb8b803c35fb66cc16a76af1731169b0da0ea2a Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 17 Apr 2019 01:41:34 -0400 Subject: [PATCH 22/86] export LD_LIBRARY_PATH --- scripts/eosio_build_amazon.sh | 1 + scripts/eosio_build_centos.sh | 1 + scripts/eosio_build_fedora.sh | 1 + scripts/eosio_build_ubuntu.sh | 1 + 4 files changed, 4 insertions(+) diff --git a/scripts/eosio_build_amazon.sh b/scripts/eosio_build_amazon.sh index 441776f9606..e499845d4a4 100755 --- a/scripts/eosio_build_amazon.sh +++ b/scripts/eosio_build_amazon.sh @@ -258,6 +258,7 @@ else # noexec wasn't found fi if $BUILD_CLANG8; then + export LD_LIBRARY_PATH=${OPT_LOCATION}/mpfr:$LD_LIBRARY_PATH if [ ! -d ${OPT_LOCATION}/gmp ]; then printf "Installing gmp...\\n" cd ${TMP_LOCATION} \ diff --git a/scripts/eosio_build_centos.sh b/scripts/eosio_build_centos.sh index c40a3a8e686..3993c544dd9 100755 --- a/scripts/eosio_build_centos.sh +++ b/scripts/eosio_build_centos.sh @@ -300,6 +300,7 @@ cd .. printf "\\n" if $BUILD_CLANG8; then + export LD_LIBRARY_PATH=${OPT_LOCATION}/mpfr:$LD_LIBRARY_PATH if [ ! -d ${OPT_LOCATION}/gmp ]; then printf "Installing gmp...\\n" cd ${TMP_LOCATION} \ diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index bad7556d044..c778ee51fa4 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -232,6 +232,7 @@ cd .. printf "\\n" if $BUILD_CLANG8; then + export LD_LIBRARY_PATH=${OPT_LOCATION}/mpfr:$LD_LIBRARY_PATH if [ ! -d ${OPT_LOCATION}/gmp ]; then printf "Installing gmp...\\n" cd ${TMP_LOCATION} \ diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index 55bd5d33435..4f750475453 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -263,6 +263,7 @@ else # noexec wasn't found fi if $BUILD_CLANG8; then + export LD_LIBRARY_PATH=${OPT_LOCATION}/mpfr:$LD_LIBRARY_PATH if [ ! -d ${OPT_LOCATION}/gmp ]; then printf "Installing gmp...\\n" cd ${TMP_LOCATION} \ From 408f5ebdd4d7ff2559d88dc8b20d2b78a7befc2d Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 17 Apr 2019 01:44:19 -0400 Subject: [PATCH 23/86] fix up darwin --- scripts/eosio_build_darwin.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/eosio_build_darwin.sh b/scripts/eosio_build_darwin.sh index ebda9b2ae8e..fa0acbe26d1 100755 --- a/scripts/eosio_build_darwin.sh +++ b/scripts/eosio_build_darwin.sh @@ -262,11 +262,20 @@ fi cd .. printf "\\n" +# Use current directory's tmp directory if noexec is enabled for /tmp +if (mount | grep "/tmp " | grep --quiet noexec); then + mkdir -p $REPO_ROOT/tmp + TMP_LOCATION="${REPO_ROOT}/tmp" + rm -rf $REPO_ROOT/tmp/* +else # noexec wasn't found + TMP_LOCATION="/tmp" +fi + if $BUILD_CLANG8; then printf "Checking Clang 8 support...\\n" if [ ! -d $CLANG8_ROOT ]; then printf "Installing Clang 8...\\n" - cd ${OPT_LOCATION} \ + cd ${TMP_LOCATION} \ && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 \ && cd clang8 && git checkout $PINNED_COMPILER_LLVM_COMMIT \ && cd tools \ @@ -288,7 +297,7 @@ if $BUILD_CLANG8; then && cd libunwind && git checkout $PINNED_COMPILER_LIBUNWIND_COMMIT && cd ../ \ && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/compiler-rt.git \ && cd compiler-rt && git checkout $PINNED_COMPILER_COMPILER_RT_COMMIT && cd ../ \ - && cd ${OPT_LOCATION}/clang8 \ + && cd ${TMP_LOCATION}/clang8 \ && mkdir build && cd build \ && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ && make -j"${JOBS}" \ From cbc87cb1c4a6319ef7abc9585fb73da872f59c0d Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 17 Apr 2019 10:20:08 -0400 Subject: [PATCH 24/86] export correct lib paths --- scripts/eosio_build_amazon.sh | 3 ++- scripts/eosio_build_centos.sh | 4 +++- scripts/eosio_build_fedora.sh | 4 +++- scripts/eosio_build_ubuntu.sh | 4 +++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/eosio_build_amazon.sh b/scripts/eosio_build_amazon.sh index e499845d4a4..2699f12ef3a 100755 --- a/scripts/eosio_build_amazon.sh +++ b/scripts/eosio_build_amazon.sh @@ -258,7 +258,8 @@ else # noexec wasn't found fi if $BUILD_CLANG8; then - export LD_LIBRARY_PATH=${OPT_LOCATION}/mpfr:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH=${OPT_LOCATION}/mpfr/lib:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH=${OPT_LOCATION}/gcc/lib:$LD_LIBRARY_PATH if [ ! -d ${OPT_LOCATION}/gmp ]; then printf "Installing gmp...\\n" cd ${TMP_LOCATION} \ diff --git a/scripts/eosio_build_centos.sh b/scripts/eosio_build_centos.sh index 3993c544dd9..804c9213e27 100755 --- a/scripts/eosio_build_centos.sh +++ b/scripts/eosio_build_centos.sh @@ -300,7 +300,9 @@ cd .. printf "\\n" if $BUILD_CLANG8; then - export LD_LIBRARY_PATH=${OPT_LOCATION}/mpfr:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH=${OPT_LOCATION}/mpfr/lib:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH=${OPT_LOCATION}/gcc/lib:$LD_LIBRARY_PATH + if [ ! -d ${OPT_LOCATION}/gmp ]; then printf "Installing gmp...\\n" cd ${TMP_LOCATION} \ diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index c778ee51fa4..4f841fef806 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -232,7 +232,9 @@ cd .. printf "\\n" if $BUILD_CLANG8; then - export LD_LIBRARY_PATH=${OPT_LOCATION}/mpfr:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH=${OPT_LOCATION}/mpfr/lib:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH=${OPT_LOCATION}/gcc/lib:$LD_LIBRARY_PATH + if [ ! -d ${OPT_LOCATION}/gmp ]; then printf "Installing gmp...\\n" cd ${TMP_LOCATION} \ diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index 4f750475453..41046051e77 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -263,7 +263,9 @@ else # noexec wasn't found fi if $BUILD_CLANG8; then - export LD_LIBRARY_PATH=${OPT_LOCATION}/mpfr:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH=${OPT_LOCATION}/mpfr/lib:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH=${OPT_LOCATION}/gcc/lib:$LD_LIBRARY_PATH + if [ ! -d ${OPT_LOCATION}/gmp ]; then printf "Installing gmp...\\n" cd ${TMP_LOCATION} \ From 846de6d511dab3ff87aa913579010985f12be65e Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 17 Apr 2019 10:23:00 -0400 Subject: [PATCH 25/86] update submodules --- libraries/chainbase | 2 +- libraries/fc | 2 +- libraries/wabt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/chainbase b/libraries/chainbase index 8a153c42842..118c513436e 160000 --- a/libraries/chainbase +++ b/libraries/chainbase @@ -1 +1 @@ -Subproject commit 8a153c428429a62ce727814a1ba04d3fcdc2bc83 +Subproject commit 118c513436e1310d8e1395303c964430f26b0bb4 diff --git a/libraries/fc b/libraries/fc index 89a102d0ca7..800d6c21b8b 160000 --- a/libraries/fc +++ b/libraries/fc @@ -1 +1 @@ -Subproject commit 89a102d0ca71bb32b009cf94db32a082da9aa403 +Subproject commit 800d6c21b8be9316a651e926a5b2affcc3c52c8e diff --git a/libraries/wabt b/libraries/wabt index a023d5132bd..ae8189a9d45 160000 --- a/libraries/wabt +++ b/libraries/wabt @@ -1 +1 @@ -Subproject commit a023d5132bd4aaa611c88c6d43486eb02c5e7411 +Subproject commit ae8189a9d45e9453bd947c778bf5f3d7255b0627 From dd0a6cda2f87668a5dab3b839a2de40e55f7fb20 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 17 Apr 2019 10:59:31 -0400 Subject: [PATCH 26/86] patch linux-unwind.h --- scripts/eosio_build_amazon.sh | 17 ++++++++++------- scripts/eosio_build_centos.sh | 16 +++++++++------- scripts/eosio_build_fedora.sh | 16 +++++++++------- scripts/eosio_build_ubuntu.sh | 16 +++++++++------- 4 files changed, 37 insertions(+), 28 deletions(-) diff --git a/scripts/eosio_build_amazon.sh b/scripts/eosio_build_amazon.sh index 2699f12ef3a..cc7006d8ac5 100755 --- a/scripts/eosio_build_amazon.sh +++ b/scripts/eosio_build_amazon.sh @@ -259,7 +259,8 @@ fi if $BUILD_CLANG8; then export LD_LIBRARY_PATH=${OPT_LOCATION}/mpfr/lib:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH=${OPT_LOCATION}/gcc/lib:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH=${OPT_LOCATION}/gcc/lib64:$LD_LIBRARY_PATH + if [ ! -d ${OPT_LOCATION}/gmp ]; then printf "Installing gmp...\\n" cd ${TMP_LOCATION} \ @@ -267,7 +268,7 @@ if $BUILD_CLANG8; then && cd gmp-5.0.1 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/gmp \ && make -j"${JOBS}" && make install \ - && cd ../ && rm -r ${TMP_LOCATION}/gmp-5.0.1 ${TMP_LOCATION}/gmp-5.0.1.tar.gz \ + && cd ../ && rm -rf ${TMP_LOCATION}/gmp-5.0.1 ${TMP_LOCATION}/gmp-5.0.1.tar.gz \ || exit 1 fi if [ ! -d ${OPT_LOCATION}/mpfr ]; then @@ -277,7 +278,7 @@ if $BUILD_CLANG8; then && cd mpfr-3.0.0 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/mpfr --with-gmp=${OPT_LOCATION}/gmp \ && make -j"${JOBS}" && make install \ - && cd ../ && rm -r ${TMP_LOCATION}/mpfr-3.0.0 ${TMP_LOCATION}/mpfr-3.0.0.tar.gz \ + && cd ../ && rm -rf ${TMP_LOCATION}/mpfr-3.0.0 ${TMP_LOCATION}/mpfr-3.0.0.tar.gz \ || exit 1 fi if [ ! -d ${OPT_LOCATION}/mpc ]; then @@ -287,17 +288,19 @@ if $BUILD_CLANG8; then && cd mpc-1.0.1 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/mpc --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr \ && make -j"${JOBS}" && make install \ - && cd ../ && rm -r ${TMP_LOCATION}/mpc-1.0.1 ${TMP_LOCATION}/mpc-1.0.1.tar.gz \ + && cd ../ && rm -rf ${TMP_LOCATION}/mpc-1.0.1 ${TMP_LOCATION}/mpc-1.0.1.tar.gz \ || exit 1 fi if [ ! -d ${OPT_LOCATION}/gcc ]; then printf "Installing libstdc++\\n" cd ${TMP_LOCATION} \ && curl -LO https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ - && cd gcc-7.1.0 && mkdir build && cd build \ + && cd gcc-7.1.0 \ + && sed '61 s/ucontext/ucontext_t/' libgcc/config/i386/linux-unwind.h \ + && mkdir build && cd build \ &&../configure --enable-languages=c,c++ --prefix=${OPT_LOCATION}/gcc --disable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --disable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --disable-werror --disable-multilib --with-tune=generic --enable-checking=release --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr --with-mpc=${OPT_LOCATION}/mpc --disable-libsanitizer --disable-testsuite --disable-libquadmath --disable-libitm --disable-libcc1 \ && make -j"${JOBS}" && make install \ - && cd ../ && rm -r ${TMP_LOCATION}/gcc-7.1.0 ${TMP_LOCATION}/gcc-7.1.0.tar.gz \ + && cd ../ && rm -rf ${TMP_LOCATION}/gcc-7.1.0 ${TMP_LOCATION}/gcc-7.1.0.tar.gz \ || exit 1 fi @@ -331,7 +334,7 @@ if $BUILD_CLANG8; then && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ && make -j"${JOBS}" \ && make install \ - && rm -r ${TMP_LOCATION}/clang8 \ + && rm -rf ${TMP_LOCATION}/clang8 \ && cd ../.. \ || exit 1 diff --git a/scripts/eosio_build_centos.sh b/scripts/eosio_build_centos.sh index 804c9213e27..cbe4738c924 100755 --- a/scripts/eosio_build_centos.sh +++ b/scripts/eosio_build_centos.sh @@ -301,7 +301,7 @@ printf "\\n" if $BUILD_CLANG8; then export LD_LIBRARY_PATH=${OPT_LOCATION}/mpfr/lib:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH=${OPT_LOCATION}/gcc/lib:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH=${OPT_LOCATION}/gcc/lib64:$LD_LIBRARY_PATH if [ ! -d ${OPT_LOCATION}/gmp ]; then printf "Installing gmp...\\n" @@ -310,7 +310,7 @@ if $BUILD_CLANG8; then && cd gmp-5.0.1 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/gmp \ && make -j"${JOBS}" && make install \ - && cd ../ && rm -r ${TMP_LOCATION}/gmp-5.0.1 ${TMP_LOCATION}/gmp-5.0.1.tar.gz \ + && cd ../ && rm -rf ${TMP_LOCATION}/gmp-5.0.1 ${TMP_LOCATION}/gmp-5.0.1.tar.gz \ || exit 1 fi if [ ! -d ${OPT_LOCATION}/mpfr ]; then @@ -320,7 +320,7 @@ if $BUILD_CLANG8; then && cd mpfr-3.0.0 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/mpfr --with-gmp=${OPT_LOCATION}/gmp \ && make -j"${JOBS}" && make install \ - && cd ../ && rm -r ${TMP_LOCATION}/mpfr-3.0.0 ${TMP_LOCATION}/mpfr-3.0.0.tar.gz \ + && cd ../ && rm -rf ${TMP_LOCATION}/mpfr-3.0.0 ${TMP_LOCATION}/mpfr-3.0.0.tar.gz \ || exit 1 fi if [ ! -d ${OPT_LOCATION}/mpc ]; then @@ -330,17 +330,19 @@ if $BUILD_CLANG8; then && cd mpc-1.0.1 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/mpc --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr \ && make -j"${JOBS}" && make install \ - && cd ../ && rm -r ${TMP_LOCATION}/mpc-1.0.1 ${TMP_LOCATION}/mpc-1.0.1.tar.gz \ + && cd ../ && rm -rf ${TMP_LOCATION}/mpc-1.0.1 ${TMP_LOCATION}/mpc-1.0.1.tar.gz \ || exit 1 fi if [ ! -d ${OPT_LOCATION}/gcc ]; then printf "Installing libstdc++\\n" cd ${TMP_LOCATION} \ && curl -LO https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ - && cd gcc-7.1.0 && mkdir build && cd build \ + && cd gcc-7.1.0 \ + && sed '61 s/ucontext/ucontext_t/' libgcc/config/i386/linux-unwind.h \ + && mkdir build && cd build \ &&../configure --enable-languages=c,c++ --prefix=${OPT_LOCATION}/gcc --disable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --disable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --disable-werror --disable-multilib --with-tune=generic --enable-checking=release --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr --with-mpc=${OPT_LOCATION}/mpc --disable-libsanitizer --disable-testsuite --disable-libquadmath --disable-libitm --disable-libcc1 \ && make -j"${JOBS}" && make install \ - && cd ../ && rm -r ${TMP_LOCATION}/gcc-7.1.0 ${TMP_LOCATION}/gcc-7.1.0.tar.gz \ + && cd ../ && rm -rf ${TMP_LOCATION}/gcc-7.1.0 ${TMP_LOCATION}/gcc-7.1.0.tar.gz \ || exit 1 fi @@ -374,7 +376,7 @@ if $BUILD_CLANG8; then && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ && make -j"${JOBS}" \ && make install \ - && rm -r ${TMP_LOCATION}/clang8 \ + && rm -rf ${TMP_LOCATION}/clang8 \ && cd ../.. \ || exit 1 diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index 4f841fef806..fc29a5ae8b3 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -233,7 +233,7 @@ printf "\\n" if $BUILD_CLANG8; then export LD_LIBRARY_PATH=${OPT_LOCATION}/mpfr/lib:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH=${OPT_LOCATION}/gcc/lib:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH=${OPT_LOCATION}/gcc/lib64:$LD_LIBRARY_PATH if [ ! -d ${OPT_LOCATION}/gmp ]; then printf "Installing gmp...\\n" @@ -242,7 +242,7 @@ if $BUILD_CLANG8; then && cd gmp-5.0.1 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/gmp \ && make -j"${JOBS}" && make install \ - && cd ../ && rm -r ${TMP_LOCATION}/gmp-5.0.1 ${TMP_LOCATION}/gmp-5.0.1.tar.gz \ + && cd ../ && rm -rf ${TMP_LOCATION}/gmp-5.0.1 ${TMP_LOCATION}/gmp-5.0.1.tar.gz \ || exit 1 fi if [ ! -d ${OPT_LOCATION}/mpfr ]; then @@ -252,7 +252,7 @@ if $BUILD_CLANG8; then && cd mpfr-3.0.0 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/mpfr --with-gmp=${OPT_LOCATION}/gmp \ && make -j"${JOBS}" && make install \ - && cd ../ && rm -r ${TMP_LOCATION}/mpfr-3.0.0 ${TMP_LOCATION}/mpfr-3.0.0.tar.gz \ + && cd ../ && rm -rf ${TMP_LOCATION}/mpfr-3.0.0 ${TMP_LOCATION}/mpfr-3.0.0.tar.gz \ || exit 1 fi if [ ! -d ${OPT_LOCATION}/mpc ]; then @@ -262,17 +262,19 @@ if $BUILD_CLANG8; then && cd mpc-1.0.1 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/mpc --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr \ && make -j"${JOBS}" && make install \ - && cd ../ && rm -r ${TMP_LOCATION}/mpc-1.0.1 ${TMP_LOCATION}/mpc-1.0.1.tar.gz \ + && cd ../ && rm -rf ${TMP_LOCATION}/mpc-1.0.1 ${TMP_LOCATION}/mpc-1.0.1.tar.gz \ || exit 1 fi if [ ! -d ${OPT_LOCATION}/gcc ]; then printf "Installing libstdc++\\n" cd ${TMP_LOCATION} \ && curl -LO https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ - && cd gcc-7.1.0 && mkdir build && cd build \ + && cd gcc-7.1.0 \ + && sed '61 s/ucontext/ucontext_t/' libgcc/config/i386/linux-unwind.h \ + && mkdir build && cd build \ &&../configure --enable-languages=c,c++ --prefix=${OPT_LOCATION}/gcc --disable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --disable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --disable-werror --disable-multilib --with-tune=generic --enable-checking=release --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr --with-mpc=${OPT_LOCATION}/mpc --disable-libsanitizer --disable-testsuite --disable-libquadmath --disable-libitm --disable-libcc1 \ && make -j"${JOBS}" && make install \ - && cd ../ && rm -r ${TMP_LOCATION}/gcc-7.1.0 ${TMP_LOCATION}/gcc-7.1.0.tar.gz \ + && cd ../ && rm -rf ${TMP_LOCATION}/gcc-7.1.0 ${TMP_LOCATION}/gcc-7.1.0.tar.gz \ || exit 1 fi @@ -306,7 +308,7 @@ if $BUILD_CLANG8; then && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ && make -j"${JOBS}" \ && make install \ - && rm -r ${TMP_LOCATION}/clang8 \ + && rm -rf ${TMP_LOCATION}/clang8 \ && cd ../.. \ || exit 1 diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index 41046051e77..9ad232e2221 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -264,7 +264,7 @@ fi if $BUILD_CLANG8; then export LD_LIBRARY_PATH=${OPT_LOCATION}/mpfr/lib:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH=${OPT_LOCATION}/gcc/lib:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH=${OPT_LOCATION}/gcc/lib64:$LD_LIBRARY_PATH if [ ! -d ${OPT_LOCATION}/gmp ]; then printf "Installing gmp...\\n" @@ -273,7 +273,7 @@ if $BUILD_CLANG8; then && cd gmp-5.0.1 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/gmp \ && make -j"${JOBS}" && make install \ - && cd ../ && rm -r ${TMP_LOCATION}/gmp-5.0.1 ${TMP_LOCATION}/gmp-5.0.1.tar.gz \ + && cd ../ && rm -rf ${TMP_LOCATION}/gmp-5.0.1 ${TMP_LOCATION}/gmp-5.0.1.tar.gz \ || exit 1 fi if [ ! -d ${OPT_LOCATION}/mpfr ]; then @@ -283,7 +283,7 @@ if $BUILD_CLANG8; then && cd mpfr-3.0.0 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/mpfr --with-gmp=${OPT_LOCATION}/gmp \ && make -j"${JOBS}" && make install \ - && cd ../ && rm -r ${TMP_LOCATION}/mpfr-3.0.0 ${TMP_LOCATION}/mpfr-3.0.0.tar.gz \ + && cd ../ && rm -rf ${TMP_LOCATION}/mpfr-3.0.0 ${TMP_LOCATION}/mpfr-3.0.0.tar.gz \ || exit 1 fi if [ ! -d ${OPT_LOCATION}/mpc ]; then @@ -293,17 +293,19 @@ if $BUILD_CLANG8; then && cd mpc-1.0.1 && mkdir build && cd build \ && ../configure --prefix=${OPT_LOCATION}/mpc --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr \ && make -j"${JOBS}" && make install \ - && cd ../ && rm -r ${TMP_LOCATION}/mpc-1.0.1 ${TMP_LOCATION}/mpc-1.0.1.tar.gz \ + && cd ../ && rm -rf ${TMP_LOCATION}/mpc-1.0.1 ${TMP_LOCATION}/mpc-1.0.1.tar.gz \ || exit 1 fi if [ ! -d ${OPT_LOCATION}/gcc ]; then printf "Installing libstdc++\\n" cd ${TMP_LOCATION} \ && curl -LO https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ - && cd gcc-7.1.0 && mkdir build && cd build \ + && cd gcc-7.1.0 \ + && sed '61 s/ucontext/ucontext_t/' libgcc/config/i386/linux-unwind.h \ + && mkdir build && cd build \ &&../configure --enable-languages=c,c++ --prefix=${OPT_LOCATION}/gcc --disable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --disable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --disable-werror --disable-multilib --with-tune=generic --enable-checking=release --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr --with-mpc=${OPT_LOCATION}/mpc --disable-libsanitizer --disable-testsuite --disable-libquadmath --disable-libitm --disable-libcc1 \ && make -j"${JOBS}" && make install \ - && cd ../ && rm -r ${TMP_LOCATION}/gcc-7.1.0 ${TMP_LOCATION}/gcc-7.1.0.tar.gz \ + && cd ../ && rm -rf ${TMP_LOCATION}/gcc-7.1.0 ${TMP_LOCATION}/gcc-7.1.0.tar.gz \ || exit 1 fi @@ -337,7 +339,7 @@ if $BUILD_CLANG8; then && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ && make -j"${JOBS}" \ && make install \ - && rm -r ${TMP_LOCATION}/clang8 \ + && rm -rf ${TMP_LOCATION}/clang8 \ && cd ../.. \ || exit 1 From 2609c0cff1f2c7078dfbbb21baa6008b55eb8a76 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 17 Apr 2019 11:20:05 -0400 Subject: [PATCH 27/86] fix patch and bump timeout for build --- .buildkite/pipeline.yml | 10 +++++----- scripts/eosio_build_amazon.sh | 2 +- scripts/eosio_build_centos.sh | 2 +- scripts/eosio_build_fedora.sh | 2 +- scripts/eosio_build_ubuntu.sh | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 9ab24bbe88d..64fe5462694 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -18,7 +18,7 @@ steps: debug: true image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-2" workdir: /data/job - timeout: 60 + timeout: 120 - command: | # Ubuntu 18.04 Build echo "+++ :hammer: Building" @@ -39,7 +39,7 @@ steps: debug: true image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-2" workdir: /data/job - timeout: 60 + timeout: 120 - command: | # CentOS 7 Build echo "+++ :hammer: Building" @@ -60,7 +60,7 @@ steps: debug: true image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-2" workdir: /data/job - timeout: 60 + timeout: 120 - command: | # Amazon Linux 2 Build echo "+++ :hammer: Building" @@ -81,7 +81,7 @@ steps: debug: true image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-2" workdir: /data/job - timeout: 60 + timeout: 120 - command: | # macOS Mojave Build echo "--- Creating symbolic link to job directory :file_folder:" @@ -95,7 +95,7 @@ steps: - "role=builder-v2-1" - "os=mojave" artifact_paths: "build.tar.gz" - timeout: 60 + timeout: 120 - wait diff --git a/scripts/eosio_build_amazon.sh b/scripts/eosio_build_amazon.sh index cc7006d8ac5..5dc9ba5381d 100755 --- a/scripts/eosio_build_amazon.sh +++ b/scripts/eosio_build_amazon.sh @@ -296,7 +296,7 @@ if $BUILD_CLANG8; then cd ${TMP_LOCATION} \ && curl -LO https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ && cd gcc-7.1.0 \ - && sed '61 s/ucontext/ucontext_t/' libgcc/config/i386/linux-unwind.h \ + && sed '61 s/ucontext/ucontext_t/' libgcc/config/i386/linux-unwind.h &> libgcc/config/i386/linux-unwind.h \ && mkdir build && cd build \ &&../configure --enable-languages=c,c++ --prefix=${OPT_LOCATION}/gcc --disable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --disable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --disable-werror --disable-multilib --with-tune=generic --enable-checking=release --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr --with-mpc=${OPT_LOCATION}/mpc --disable-libsanitizer --disable-testsuite --disable-libquadmath --disable-libitm --disable-libcc1 \ && make -j"${JOBS}" && make install \ diff --git a/scripts/eosio_build_centos.sh b/scripts/eosio_build_centos.sh index cbe4738c924..31b02b44bde 100755 --- a/scripts/eosio_build_centos.sh +++ b/scripts/eosio_build_centos.sh @@ -338,7 +338,7 @@ if $BUILD_CLANG8; then cd ${TMP_LOCATION} \ && curl -LO https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ && cd gcc-7.1.0 \ - && sed '61 s/ucontext/ucontext_t/' libgcc/config/i386/linux-unwind.h \ + && sed '61 s/ucontext/ucontext_t/' libgcc/config/i386/linux-unwind.h &> libgcc/config/i386/linux-unwind.h \ && mkdir build && cd build \ &&../configure --enable-languages=c,c++ --prefix=${OPT_LOCATION}/gcc --disable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --disable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --disable-werror --disable-multilib --with-tune=generic --enable-checking=release --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr --with-mpc=${OPT_LOCATION}/mpc --disable-libsanitizer --disable-testsuite --disable-libquadmath --disable-libitm --disable-libcc1 \ && make -j"${JOBS}" && make install \ diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index fc29a5ae8b3..fce3e7d301a 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -270,7 +270,7 @@ if $BUILD_CLANG8; then cd ${TMP_LOCATION} \ && curl -LO https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ && cd gcc-7.1.0 \ - && sed '61 s/ucontext/ucontext_t/' libgcc/config/i386/linux-unwind.h \ + && sed '61 s/ucontext/ucontext_t/' libgcc/config/i386/linux-unwind.h &> libgcc/config/i386/linux-unwind.h \ && mkdir build && cd build \ &&../configure --enable-languages=c,c++ --prefix=${OPT_LOCATION}/gcc --disable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --disable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --disable-werror --disable-multilib --with-tune=generic --enable-checking=release --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr --with-mpc=${OPT_LOCATION}/mpc --disable-libsanitizer --disable-testsuite --disable-libquadmath --disable-libitm --disable-libcc1 \ && make -j"${JOBS}" && make install \ diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index 9ad232e2221..18282795b72 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -301,7 +301,7 @@ if $BUILD_CLANG8; then cd ${TMP_LOCATION} \ && curl -LO https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ && cd gcc-7.1.0 \ - && sed '61 s/ucontext/ucontext_t/' libgcc/config/i386/linux-unwind.h \ + && sed '61 s/ucontext/ucontext_t/' libgcc/config/i386/linux-unwind.h &> libgcc/config/i386/linux-unwind.h \ && mkdir build && cd build \ &&../configure --enable-languages=c,c++ --prefix=${OPT_LOCATION}/gcc --disable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --disable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --disable-werror --disable-multilib --with-tune=generic --enable-checking=release --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr --with-mpc=${OPT_LOCATION}/mpc --disable-libsanitizer --disable-testsuite --disable-libquadmath --disable-libitm --disable-libcc1 \ && make -j"${JOBS}" && make install \ From 397e266ecae796c43b7e7bdc73b0e4a77f2614a9 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 17 Apr 2019 11:52:38 -0400 Subject: [PATCH 28/86] fix missing tmp directory centos --- scripts/eosio_build.sh | 2 +- scripts/eosio_build_centos.sh | 9 +++++++++ scripts/eosio_build_darwin.sh | 1 - scripts/eosio_build_fedora.sh | 9 +++++++++ 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/scripts/eosio_build.sh b/scripts/eosio_build.sh index 490a16c3b06..8bec7210293 100755 --- a/scripts/eosio_build.sh +++ b/scripts/eosio_build.sh @@ -332,7 +332,7 @@ printf "## ENABLE_COVERAGE_TESTING=%s\\n" "${ENABLE_COVERAGE_TESTING}" mkdir -p $BUILD_DIR cd $BUILD_DIR -$CMAKE -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_CXX_COMPILER="${CXX}" -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=false \# $PIN_COMPILER_CMAKE \ +$CMAKE -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_CXX_COMPILER="${CXX}" -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=true \# $PIN_COMPILER_CMAKE \ -DCORE_SYMBOL_NAME="${CORE_SYMBOL_NAME}" -DENABLE_COVERAGE_TESTING="${ENABLE_COVERAGE_TESTING}" -DBUILD_DOXYGEN="${DOXYGEN}" \ -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/eosio $LOCAL_CMAKE_FLAGS "${REPO_ROOT}" diff --git a/scripts/eosio_build_centos.sh b/scripts/eosio_build_centos.sh index 31b02b44bde..6bf5fc2b1ff 100755 --- a/scripts/eosio_build_centos.sh +++ b/scripts/eosio_build_centos.sh @@ -299,6 +299,15 @@ if [ $? -ne 0 ]; then exit -1; fi cd .. printf "\\n" +# Use current directory's tmp directory if noexec is enabled for /tmp +if (mount | grep "/tmp " | grep --quiet noexec); then + mkdir -p $REPO_ROOT/tmp + TMP_LOCATION="${REPO_ROOT}/tmp" + rm -rf $REPO_ROOT/tmp/* +else # noexec wasn't found + TMP_LOCATION="/tmp" +fi + if $BUILD_CLANG8; then export LD_LIBRARY_PATH=${OPT_LOCATION}/mpfr/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=${OPT_LOCATION}/gcc/lib64:$LD_LIBRARY_PATH diff --git a/scripts/eosio_build_darwin.sh b/scripts/eosio_build_darwin.sh index fa0acbe26d1..1f5c56f06f3 100755 --- a/scripts/eosio_build_darwin.sh +++ b/scripts/eosio_build_darwin.sh @@ -187,7 +187,6 @@ if [ $? -ne 0 ]; then exit -1; fi printf "\\n" - printf "Checking MongoDB installation...\\n" if [ ! -d $MONGODB_ROOT ]; then printf "Installing MongoDB into ${MONGODB_ROOT}...\\n" diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index fce3e7d301a..e5e87e6c37f 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -231,6 +231,15 @@ if [ $? -ne 0 ]; then exit -1; fi cd .. printf "\\n" +# Use current directory's tmp directory if noexec is enabled for /tmp +if (mount | grep "/tmp " | grep --quiet noexec); then + mkdir -p $REPO_ROOT/tmp + TMP_LOCATION="${REPO_ROOT}/tmp" + rm -rf $REPO_ROOT/tmp/* +else # noexec wasn't found + TMP_LOCATION="/tmp" +fi + if $BUILD_CLANG8; then export LD_LIBRARY_PATH=${OPT_LOCATION}/mpfr/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=${OPT_LOCATION}/gcc/lib64:$LD_LIBRARY_PATH From 988cebfaa67fdf76cd03ae2b48fb89ac57bfc46b Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 17 Apr 2019 13:41:29 -0400 Subject: [PATCH 29/86] add back fix for auto_ptr to unique_ptr --- libraries/fc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/fc b/libraries/fc index 800d6c21b8b..8d5e6acddfd 160000 --- a/libraries/fc +++ b/libraries/fc @@ -1 +1 @@ -Subproject commit 800d6c21b8be9316a651e926a5b2affcc3c52c8e +Subproject commit 8d5e6acddfdc9c9b30b9d3b8790630799c4fc5c6 From e4bfd468f798217c1bf22d2775a4544c2c28242f Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 17 Apr 2019 14:04:14 -0400 Subject: [PATCH 30/86] update for Apple --- CMakeLists.txt | 2 ++ programs/cleos/CMakeLists.txt | 4 +++- programs/keosd/CMakeLists.txt | 4 +++- programs/nodeos/CMakeLists.txt | 4 +++- unittests/CMakeLists.txt | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index caf9a255606..952e2b8dc7d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,6 +125,8 @@ if(${EOSIO_PIN_COMPILER}) if(NOT APPLE AND UNIX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdinc++ -nostdlib++ -I${LIBSTDCPP_DIR}/include/c++/7.1.0") set(CMAKE_CXX_STANDARD_LIBRARIES "${LIBSTDCPP_DIR}/lib64/libstdc++.a") + else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") endif() endif() diff --git a/programs/cleos/CMakeLists.txt b/programs/cleos/CMakeLists.txt index 1083b70ea3a..3f99a791c87 100644 --- a/programs/cleos/CMakeLists.txt +++ b/programs/cleos/CMakeLists.txt @@ -35,7 +35,9 @@ configure_file(config.hpp.in config.hpp ESCAPE_QUOTES) target_include_directories(${CLI_CLIENT_EXECUTABLE_NAME} PUBLIC ${Intl_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}) if(EOSIO_PIN_COMPILER) - target_link_libraries(${CLI_CLIENT_EXECUTABLE_NAME} PRIVATE -nostdlib++) + if(NOT APPLE) + target_link_libraries(${CLI_CLIENT_EXECUTABLE_NAME} PRIVATE -nostdlib++) + endif() endif() target_link_libraries( ${CLI_CLIENT_EXECUTABLE_NAME} diff --git a/programs/keosd/CMakeLists.txt b/programs/keosd/CMakeLists.txt index cecb1eae5a1..e20393ea504 100644 --- a/programs/keosd/CMakeLists.txt +++ b/programs/keosd/CMakeLists.txt @@ -12,7 +12,9 @@ endif() configure_file(config.hpp.in config.hpp ESCAPE_QUOTES) if(EOSIO_PIN_COMPILER) - target_link_libraries(${KEY_STORE_EXECUTABLE_NAME} PRIVATE -nostdlib++) + if(NOT APPLE) + target_link_libraries(${KEY_STORE_EXECUTABLE_NAME} PRIVATE -nostdlib++) + endif() endif() target_link_libraries( ${KEY_STORE_EXECUTABLE_NAME} diff --git a/programs/nodeos/CMakeLists.txt b/programs/nodeos/CMakeLists.txt index 59ade059b32..357fb07dfd0 100644 --- a/programs/nodeos/CMakeLists.txt +++ b/programs/nodeos/CMakeLists.txt @@ -48,7 +48,9 @@ else() endif() if(EOSIO_PIN_COMPILER) - target_link_libraries(${NODE_EXECUTABLE_NAME} PRIVATE -nostdlib++) + if (NOT APPLE) + target_link_libraries(${NODE_EXECUTABLE_NAME} PRIVATE -nostdlib++) + endif() endif() target_link_libraries( ${NODE_EXECUTABLE_NAME} diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index c5cfd31d096..85a33acddf9 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -43,7 +43,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/contracts.hpp.in ${CMAKE_CURRENT_BINA file(GLOB UNIT_TESTS "*.cpp") # find all unit test suites add_executable( unit_test ${UNIT_TESTS}) # build unit tests as one executable -if(EOSIO_PIN_COMPILER) +if(EOSIO_PIN_COMPILER AND NOT APPLE) target_link_libraries(unit_test PRIVATE -nostdlib++ PUBLIC eosio_chain chainbase eosio_testing fc appbase ${PLATFORM_SPECIFIC_LIBS}) else() target_link_libraries( unit_test eosio_chain chainbase eosio_testing fc appbase ${PLATFORM_SPECIFIC_LIBS} ) From 80ed27b64e0856ea77d0d526c6f7348980a0f042 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 17 Apr 2019 15:33:33 -0400 Subject: [PATCH 31/86] update wabt/no-clobber --- libraries/wabt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/wabt b/libraries/wabt index ae8189a9d45..9c0e1131a45 160000 --- a/libraries/wabt +++ b/libraries/wabt @@ -1 +1 @@ -Subproject commit ae8189a9d45e9453bd947c778bf5f3d7255b0627 +Subproject commit 9c0e1131a457d5a44c6da512ef542efd32647446 From f07d14a2f863766132c2a7fcc224e676de99e976 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Thu, 18 Apr 2019 14:25:56 -0400 Subject: [PATCH 32/86] resolved requested changes --- scripts/eosio_build_amazon.sh | 2 +- scripts/eosio_build_ubuntu.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/eosio_build_amazon.sh b/scripts/eosio_build_amazon.sh index 5dc9ba5381d..3184bb610db 100755 --- a/scripts/eosio_build_amazon.sh +++ b/scripts/eosio_build_amazon.sh @@ -12,7 +12,7 @@ if [[ "${OS_NAME}" == "Amazon Linux AMI" ]]; then # Amazonlinux1 DEP_ARRAY=( sudo procps util-linux which gcc72 gcc72-c++ autoconf automake libtool make doxygen graphviz \ bzip2 bzip2-devel openssl-devel gmp gmp-devel libstdc++72 python27 python27-devel python36 python36-devel \ - libedit-devel ncurses-devel swig curl -LO file libcurl-devel libusb1-devel + libedit-devel ncurses-devel swig curl file libcurl-devel libusb1-devel ) else # Amazonlinux2 DEP_ARRAY=( diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index 18282795b72..576af1178e7 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -162,7 +162,7 @@ if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST && tar -xjf boost_$BOOST_VERSION.tar.bz2 \ && cd $BOOST_ROOT \ && ./bootstrap.sh --prefix=$BOOST_ROOT \ - && ./b2 -q -j2 install \ + && ./b2 -q -j"${JOBS}" install \ && cd .. \ && rm -f boost_$BOOST_VERSION.tar.bz2 \ && rm -rf $BOOST_LINK_LOCATION \ From b0d05538df533a6c83c8fcf13985c2749b5c04d7 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Fri, 19 Apr 2019 14:23:01 -0400 Subject: [PATCH 33/86] don't think we need to add the libstdc++ any more, trying it out --- CMakeLists.txt | 5 +++-- programs/cleos/CMakeLists.txt | 6 ------ programs/keosd/CMakeLists.txt | 6 ------ programs/nodeos/CMakeLists.txt | 6 ------ scripts/eosio_build.sh | 2 +- unittests/CMakeLists.txt | 6 +----- 6 files changed, 5 insertions(+), 26 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 952e2b8dc7d..0de173dd054 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -127,6 +127,7 @@ if(${EOSIO_PIN_COMPILER}) set(CMAKE_CXX_STANDARD_LIBRARIES "${LIBSTDCPP_DIR}/lib64/libstdc++.a") else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") + set(CMAKE_CXX_STANDARD_LIBRARIES "${LIBCPP_DIR}/lib/libc++.a ${LIBCPP_DIR}/lib/libc++abi.a") endif() endif() @@ -168,11 +169,11 @@ else( WIN32 ) # Apple AND Linux if( APPLE ) # Apple Specific Options Here message( STATUS "Configuring EOSIO on OS X" ) - set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-deprecated-declarations" ) + set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS} -Wall -Wno-deprecated-declarations" ) else( APPLE ) # Linux Specific Options Here message( STATUS "Configuring EOSIO on Linux" ) - set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wall" ) + set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS} -Wall" ) if ( FULL_STATIC_BUILD ) set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++ -static-libgcc") endif ( FULL_STATIC_BUILD ) diff --git a/programs/cleos/CMakeLists.txt b/programs/cleos/CMakeLists.txt index 3f99a791c87..0d98fdcf63d 100644 --- a/programs/cleos/CMakeLists.txt +++ b/programs/cleos/CMakeLists.txt @@ -34,12 +34,6 @@ configure_file(config.hpp.in config.hpp ESCAPE_QUOTES) target_include_directories(${CLI_CLIENT_EXECUTABLE_NAME} PUBLIC ${Intl_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}) -if(EOSIO_PIN_COMPILER) - if(NOT APPLE) - target_link_libraries(${CLI_CLIENT_EXECUTABLE_NAME} PRIVATE -nostdlib++) - endif() -endif() - target_link_libraries( ${CLI_CLIENT_EXECUTABLE_NAME} PRIVATE appbase chain_api_plugin producer_plugin chain_plugin http_plugin eosio_chain fc ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS} ${Intl_LIBRARIES} ) diff --git a/programs/keosd/CMakeLists.txt b/programs/keosd/CMakeLists.txt index e20393ea504..3c806fbed39 100644 --- a/programs/keosd/CMakeLists.txt +++ b/programs/keosd/CMakeLists.txt @@ -11,12 +11,6 @@ endif() configure_file(config.hpp.in config.hpp ESCAPE_QUOTES) -if(EOSIO_PIN_COMPILER) - if(NOT APPLE) - target_link_libraries(${KEY_STORE_EXECUTABLE_NAME} PRIVATE -nostdlib++) - endif() -endif() - target_link_libraries( ${KEY_STORE_EXECUTABLE_NAME} PRIVATE appbase PRIVATE wallet_api_plugin wallet_plugin diff --git a/programs/nodeos/CMakeLists.txt b/programs/nodeos/CMakeLists.txt index 357fb07dfd0..d9fb90ee45d 100644 --- a/programs/nodeos/CMakeLists.txt +++ b/programs/nodeos/CMakeLists.txt @@ -47,12 +47,6 @@ else() set(build_id_flag "") endif() -if(EOSIO_PIN_COMPILER) - if (NOT APPLE) - target_link_libraries(${NODE_EXECUTABLE_NAME} PRIVATE -nostdlib++) - endif() -endif() - target_link_libraries( ${NODE_EXECUTABLE_NAME} PRIVATE appbase PRIVATE -Wl,${whole_archive_flag} login_plugin -Wl,${no_whole_archive_flag} diff --git a/scripts/eosio_build.sh b/scripts/eosio_build.sh index 8bec7210293..db4e2156d87 100755 --- a/scripts/eosio_build.sh +++ b/scripts/eosio_build.sh @@ -228,7 +228,7 @@ fi if $PIN_COMPILER; then BUILD_CLANG8=true CPP_COMP=${OPT_LOCATION}/clang8/bin/clang++ - PIN_COMPILER_CMAKE="-DEOSIO_PIN_COMPILER=1 -DLIBSTDCPP_DIR=${OPT_LOCATION}/gcc" + PIN_COMPILER_CMAKE="-DEOSIO_PIN_COMPILER=1 -DLIBSTDCPP_DIR=${OPT_LOCATION}/gcc -DLIBCPP_DIR=${OPT_LOCATION}/clang8/" elif $NO_CPP17; then if [ $NONINTERACTIVE -eq 0 ]; then BUILD_CLANG8=true diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index 85a33acddf9..b0a08280336 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -43,11 +43,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/contracts.hpp.in ${CMAKE_CURRENT_BINA file(GLOB UNIT_TESTS "*.cpp") # find all unit test suites add_executable( unit_test ${UNIT_TESTS}) # build unit tests as one executable -if(EOSIO_PIN_COMPILER AND NOT APPLE) - target_link_libraries(unit_test PRIVATE -nostdlib++ PUBLIC eosio_chain chainbase eosio_testing fc appbase ${PLATFORM_SPECIFIC_LIBS}) -else() - target_link_libraries( unit_test eosio_chain chainbase eosio_testing fc appbase ${PLATFORM_SPECIFIC_LIBS} ) -endif() +target_link_libraries( unit_test eosio_chain chainbase eosio_testing fc appbase ${PLATFORM_SPECIFIC_LIBS} ) target_compile_options(unit_test PUBLIC -DDISABLE_EOSLIB_SERIALIZE) target_include_directories( unit_test PUBLIC From dd2b2e7178d38fc56b97fbf1f810bda67e328f72 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Fri, 19 Apr 2019 14:29:21 -0400 Subject: [PATCH 34/86] updating submodules --- libraries/fc | 2 +- libraries/wabt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/fc b/libraries/fc index 8d5e6acddfd..469bdf3298f 160000 --- a/libraries/fc +++ b/libraries/fc @@ -1 +1 @@ -Subproject commit 8d5e6acddfdc9c9b30b9d3b8790630799c4fc5c6 +Subproject commit 469bdf3298fff96cb138a901ee1231eccb155471 diff --git a/libraries/wabt b/libraries/wabt index 9c0e1131a45..a136149d941 160000 --- a/libraries/wabt +++ b/libraries/wabt @@ -1 +1 @@ -Subproject commit 9c0e1131a457d5a44c6da512ef542efd32647446 +Subproject commit a136149d941df2942a25a4b66d8865fada0a325e From 06a7f310a285b9b51d69cc7564af5583a9c0e8d7 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Fri, 19 Apr 2019 14:44:04 -0400 Subject: [PATCH 35/86] fixing other merging issues --- scripts/eosio_build.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/eosio_build.sh b/scripts/eosio_build.sh index 5cdb07a04d5..575aa12199a 100755 --- a/scripts/eosio_build.sh +++ b/scripts/eosio_build.sh @@ -74,7 +74,7 @@ EOT } if [ $# -ne 0 ]; then - while getopts ":cdo:s:p:b:pc:hy" opt; do + while getopts ":cdo:s:p:b:Phy" opt; do case "${opt}" in o ) options=( "Debug" "Release" "RelWithDebInfo" "MinSizeRel" ) @@ -107,8 +107,9 @@ if [ $# -ne 0 ]; then p) PREFIX=$OPTARG ;; - pc) + P) PIN_COMPILER=true + ;; h) usage exit 1 @@ -200,8 +201,10 @@ fi BUILD_CLANG8=false if [ ! -z $CXX ]; then CPP_COMP=$CXX + CC_COMP=$CC else CPP_COMP=c++ + CC_COMP=cc fi NO_CPP17=false @@ -230,16 +233,18 @@ fi if $PIN_COMPILER; then BUILD_CLANG8=true CPP_COMP=${OPT_LOCATION}/clang8/bin/clang++ + CC_COMP=${OPT_LOCATION}/clang8/bin/clang PIN_COMPILER_CMAKE="-DEOSIO_PIN_COMPILER=1 -DLIBSTDCPP_DIR=${OPT_LOCATION}/gcc -DLIBCPP_DIR=${OPT_LOCATION}/clang8/" elif $NO_CPP17; then if [ $NONINTERACTIVE -eq 0 ]; then BUILD_CLANG8=true CPP_COMP=${OPT_LOCATION}/clang8/bin/clang++ + CC_COMP=${OPT_LOCATION}/clang8/bin/clang else printf "Error no C++17 support.\\nEnter Y/y or N/n to continue with downloading and building a viable compiler or exit now.\\nIf you already have a C++17 compiler installed or would like to install your own, export CXX to point to the compiler of your choosing." read -p "Enter Y/y or N/n to continue with downloading and building a viable compiler or exit now. " yn case $yn in - [Yy]* ) BUILD_CLANG8=true; CPP_COMP=${OPT_LOCATION}/clang8/bin/clang++; break;; + [Yy]* ) BUILD_CLANG8=true; CPP_COMP=${OPT_LOCATION}/clang8/bin/clang++; CC_COMP=${OPT_LOCATION}/clang8/bin/clang; break;; [Nn]* ) exit 1;; * ) echo "Improper input"; exit 1;; esac @@ -247,6 +252,7 @@ elif $NO_CPP17; then fi CXX=$CPP_COMP +CC=$CC_COMP export BUILD_CLANG8=$BUILD_CLANG8 @@ -345,7 +351,7 @@ mkdir -p $BUILD_DIR cd $BUILD_DIR $CMAKE -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_CXX_COMPILER="${CXX}" \ - -DCMAKE_C_COMPILER="${C_COMPILER}" -DCORE_SYMBOL_NAME="${CORE_SYMBOL_NAME}" \ + -DCMAKE_C_COMPILER="${CC}" -DCORE_SYMBOL_NAME="${CORE_SYMBOL_NAME}" \ -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=true \ -DENABLE_COVERAGE_TESTING="${ENABLE_COVERAGE_TESTING}" -DBUILD_DOXYGEN="${DOXYGEN}" \ -DCMAKE_PREFIX_PATH=$PREFIX \ From 0348ca75143507f39bb47ac3c5a3446b4b660823 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Fri, 19 Apr 2019 14:45:31 -0400 Subject: [PATCH 36/86] update pipeline.yml --- .buildkite/pipeline.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index a58077773c2..03c8f636300 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,7 +1,7 @@ steps: - command: | # Ubuntu 16.04 Build echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -p + ./scripts/eosio_build.sh -y -P echo "--- :compression: Compressing build directory" tar -pczf build.tar.gz build/; if [ ! -f build.tar.gz ]; then echo "No TAR Found!" && exit 1; fi label: ":ubuntu: 16.04 Build" @@ -22,7 +22,7 @@ steps: - command: | # Ubuntu 18.04 Build echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -p + ./scripts/eosio_build.sh -y -P echo "--- :compression: Compressing build directory" tar -pczf build.tar.gz build/; if [ ! -f build.tar.gz ]; then echo "No TAR Found!" && exit 1; fi label: ":ubuntu: 18.04 Build" @@ -43,7 +43,7 @@ steps: - command: | # CentOS 7 Build echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -p + ./scripts/eosio_build.sh -y -P echo "--- :compression: Compressing build directory" tar -pczf build.tar.gz build/; if [ ! -f build.tar.gz ]; then echo "No TAR Found!" && exit 1; fi label: ":centos: 7 Build" @@ -64,7 +64,7 @@ steps: - command: | # Amazon Linux 2 Build echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -p + ./scripts/eosio_build.sh -y -P echo "--- :compression: Compressing build directory" tar -pczf build.tar.gz build/; if [ ! -f build.tar.gz ]; then echo "No TAR Found!" && exit 1; fi label: ":aws: 2 Build" @@ -87,7 +87,7 @@ steps: echo "--- Creating symbolic link to job directory :file_folder:" sleep 5 && ln -s "$(pwd)" /data/job && cd /data/job echo "+++ Building :hammer:" - ./scripts/eosio_build.sh -y -p + ./scripts/eosio_build.sh -y -P echo "--- Compressing build directory :compression:" tar -pczf build.tar.gz build/; if [ ! -f build.tar.gz ]; then echo "No TAR Found!" && exit 1; fi label: ":darwin: Mojave Build" From 0d7f14fe49d6feb7c154e5bbd8872a3c83b4e2b0 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Fri, 19 Apr 2019 15:50:39 -0400 Subject: [PATCH 37/86] add missing include dir for linux --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0de173dd054..241281e4b89 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,7 +123,7 @@ link_libraries(Threads::Threads) if(${EOSIO_PIN_COMPILER}) if(NOT APPLE AND UNIX) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdinc++ -nostdlib++ -I${LIBSTDCPP_DIR}/include/c++/7.1.0") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdinc++ -nostdlib++ -I${LIBSTDCPP_DIR}/include/c++/7.1.0 -I${LIBSTDCPP_DIR}/include/c++/7.1.0/x86_64-pc-linux-gnu") set(CMAKE_CXX_STANDARD_LIBRARIES "${LIBSTDCPP_DIR}/lib64/libstdc++.a") else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") From fc977c267f4280c24bd2697a23e5d02e24d1985f Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Fri, 19 Apr 2019 15:56:22 -0400 Subject: [PATCH 38/86] I was wrong still need the special case for libstdc++ --- programs/cleos/CMakeLists.txt | 6 ++++++ programs/keosd/CMakeLists.txt | 6 ++++++ programs/nodeos/CMakeLists.txt | 6 ++++++ unittests/CMakeLists.txt | 6 +++++- 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/programs/cleos/CMakeLists.txt b/programs/cleos/CMakeLists.txt index 0787c5fe937..28c0e07a14c 100644 --- a/programs/cleos/CMakeLists.txt +++ b/programs/cleos/CMakeLists.txt @@ -35,6 +35,12 @@ configure_file(config.hpp.in config.hpp ESCAPE_QUOTES) target_include_directories(${CLI_CLIENT_EXECUTABLE_NAME} PUBLIC ${Intl_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +if(EOSIO_PIN_COMPILER) + if (NOT APPLE) + target_link_libraries(${CLI_CLIENT_EXECUTABLE_NAME} PRIVATE -nostdlib++) + endif() +endif() + target_link_libraries( ${CLI_CLIENT_EXECUTABLE_NAME} PRIVATE appbase chain_api_plugin producer_plugin chain_plugin http_plugin eosio_chain fc ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS} ${Intl_LIBRARIES} ) diff --git a/programs/keosd/CMakeLists.txt b/programs/keosd/CMakeLists.txt index 3c806fbed39..519de5db567 100644 --- a/programs/keosd/CMakeLists.txt +++ b/programs/keosd/CMakeLists.txt @@ -11,6 +11,12 @@ endif() configure_file(config.hpp.in config.hpp ESCAPE_QUOTES) +if(EOSIO_PIN_COMPILER) + if (NOT APPLE) + target_link_libraries(${KEY_STORE_EXECUTABLE_NAME} PRIVATE -nostdlib++) + endif() +endif() + target_link_libraries( ${KEY_STORE_EXECUTABLE_NAME} PRIVATE appbase PRIVATE wallet_api_plugin wallet_plugin diff --git a/programs/nodeos/CMakeLists.txt b/programs/nodeos/CMakeLists.txt index d5fe8273eb5..b499c68784d 100644 --- a/programs/nodeos/CMakeLists.txt +++ b/programs/nodeos/CMakeLists.txt @@ -70,6 +70,12 @@ if(BUILD_MONGO_DB_PLUGIN) target_link_libraries( ${NODE_EXECUTABLE_NAME} PRIVATE -Wl,${whole_archive_flag} mongo_db_plugin -Wl,${no_whole_archive_flag} ) endif() +if(EOSIO_PIN_COMPILER) + if (NOT APPLE) + target_link_libraries(${NODE_EXECUTABLE_NAME} PRIVATE -nostdlib++) + endif() +endif() + include(additionalPlugins) copy_bin( ${NODE_EXECUTABLE_NAME} ) diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index b0a08280336..85a33acddf9 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -43,7 +43,11 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/contracts.hpp.in ${CMAKE_CURRENT_BINA file(GLOB UNIT_TESTS "*.cpp") # find all unit test suites add_executable( unit_test ${UNIT_TESTS}) # build unit tests as one executable -target_link_libraries( unit_test eosio_chain chainbase eosio_testing fc appbase ${PLATFORM_SPECIFIC_LIBS} ) +if(EOSIO_PIN_COMPILER AND NOT APPLE) + target_link_libraries(unit_test PRIVATE -nostdlib++ PUBLIC eosio_chain chainbase eosio_testing fc appbase ${PLATFORM_SPECIFIC_LIBS}) +else() + target_link_libraries( unit_test eosio_chain chainbase eosio_testing fc appbase ${PLATFORM_SPECIFIC_LIBS} ) +endif() target_compile_options(unit_test PUBLIC -DDISABLE_EOSLIB_SERIALIZE) target_include_directories( unit_test PUBLIC From bc532d9628280f8813914d7d3580244bcf642fd4 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Fri, 19 Apr 2019 20:39:59 -0400 Subject: [PATCH 39/86] Still not statically linking after merge --- CMakeLists.txt | 7 ++++++- programs/cleos/CMakeLists.txt | 6 ------ programs/keosd/CMakeLists.txt | 6 ------ programs/nodeos/CMakeLists.txt | 6 ------ unittests/CMakeLists.txt | 6 +----- 5 files changed, 7 insertions(+), 24 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 241281e4b89..8574cf508df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,8 +123,13 @@ link_libraries(Threads::Threads) if(${EOSIO_PIN_COMPILER}) if(NOT APPLE AND UNIX) + execute_process(COMMAND ${CMAKE_CXX_COMPILER} --print-search-dirs OUTPUT_VARIABLE LIB_PATHS) + string(REGEX REPLACE "programs.*libraries: =" "" LIB_PATHS ${LIB_PATHS}) + string(REGEX REPLACE ":" ";" LIB_PATHS ${LIB_PATHS}) + find_library(LIBGCC_LIBRARY NAMES libgcc_s.so HINTS ${LIB_PATHS}) + get_filename_component(LIBGCC_PATH ${LIBGCC_LIBRARY} DIRECTORY) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdinc++ -nostdlib++ -I${LIBSTDCPP_DIR}/include/c++/7.1.0 -I${LIBSTDCPP_DIR}/include/c++/7.1.0/x86_64-pc-linux-gnu") - set(CMAKE_CXX_STANDARD_LIBRARIES "${LIBSTDCPP_DIR}/lib64/libstdc++.a") + set(CMAKE_CXX_STANDARD_LIBRARIES "${LIBSTDCPP_DIR}/lib64/libstdc++.a ${LIBSTDCPP_DIR}/lib64/libsupc++.a -L${LIBGCC_PATH} -Wl,-nostdlib++ -Wl,-Bdynamic,-lgcc_s") else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") set(CMAKE_CXX_STANDARD_LIBRARIES "${LIBCPP_DIR}/lib/libc++.a ${LIBCPP_DIR}/lib/libc++abi.a") diff --git a/programs/cleos/CMakeLists.txt b/programs/cleos/CMakeLists.txt index 28c0e07a14c..0787c5fe937 100644 --- a/programs/cleos/CMakeLists.txt +++ b/programs/cleos/CMakeLists.txt @@ -35,12 +35,6 @@ configure_file(config.hpp.in config.hpp ESCAPE_QUOTES) target_include_directories(${CLI_CLIENT_EXECUTABLE_NAME} PUBLIC ${Intl_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) -if(EOSIO_PIN_COMPILER) - if (NOT APPLE) - target_link_libraries(${CLI_CLIENT_EXECUTABLE_NAME} PRIVATE -nostdlib++) - endif() -endif() - target_link_libraries( ${CLI_CLIENT_EXECUTABLE_NAME} PRIVATE appbase chain_api_plugin producer_plugin chain_plugin http_plugin eosio_chain fc ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS} ${Intl_LIBRARIES} ) diff --git a/programs/keosd/CMakeLists.txt b/programs/keosd/CMakeLists.txt index 519de5db567..3c806fbed39 100644 --- a/programs/keosd/CMakeLists.txt +++ b/programs/keosd/CMakeLists.txt @@ -11,12 +11,6 @@ endif() configure_file(config.hpp.in config.hpp ESCAPE_QUOTES) -if(EOSIO_PIN_COMPILER) - if (NOT APPLE) - target_link_libraries(${KEY_STORE_EXECUTABLE_NAME} PRIVATE -nostdlib++) - endif() -endif() - target_link_libraries( ${KEY_STORE_EXECUTABLE_NAME} PRIVATE appbase PRIVATE wallet_api_plugin wallet_plugin diff --git a/programs/nodeos/CMakeLists.txt b/programs/nodeos/CMakeLists.txt index b499c68784d..d5fe8273eb5 100644 --- a/programs/nodeos/CMakeLists.txt +++ b/programs/nodeos/CMakeLists.txt @@ -70,12 +70,6 @@ if(BUILD_MONGO_DB_PLUGIN) target_link_libraries( ${NODE_EXECUTABLE_NAME} PRIVATE -Wl,${whole_archive_flag} mongo_db_plugin -Wl,${no_whole_archive_flag} ) endif() -if(EOSIO_PIN_COMPILER) - if (NOT APPLE) - target_link_libraries(${NODE_EXECUTABLE_NAME} PRIVATE -nostdlib++) - endif() -endif() - include(additionalPlugins) copy_bin( ${NODE_EXECUTABLE_NAME} ) diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index 85a33acddf9..b0a08280336 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -43,11 +43,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/contracts.hpp.in ${CMAKE_CURRENT_BINA file(GLOB UNIT_TESTS "*.cpp") # find all unit test suites add_executable( unit_test ${UNIT_TESTS}) # build unit tests as one executable -if(EOSIO_PIN_COMPILER AND NOT APPLE) - target_link_libraries(unit_test PRIVATE -nostdlib++ PUBLIC eosio_chain chainbase eosio_testing fc appbase ${PLATFORM_SPECIFIC_LIBS}) -else() - target_link_libraries( unit_test eosio_chain chainbase eosio_testing fc appbase ${PLATFORM_SPECIFIC_LIBS} ) -endif() +target_link_libraries( unit_test eosio_chain chainbase eosio_testing fc appbase ${PLATFORM_SPECIFIC_LIBS} ) target_compile_options(unit_test PUBLIC -DDISABLE_EOSLIB_SERIALIZE) target_include_directories( unit_test PUBLIC From 4ac75707d3f2a562fdf9920fda8ed54c88912054 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Sat, 20 Apr 2019 02:42:34 -0400 Subject: [PATCH 40/86] hopefully finished --- CMakeLists.txt | 15 --------------- programs/nodeos/CMakeLists.txt | 6 ++++++ scripts/eosio_build.sh | 23 +++++++++++++++++------ 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8574cf508df..fe8d020167e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,21 +121,6 @@ set(THREADS_PREFER_PTHREAD_FLAG 1) find_package(Threads) link_libraries(Threads::Threads) -if(${EOSIO_PIN_COMPILER}) - if(NOT APPLE AND UNIX) - execute_process(COMMAND ${CMAKE_CXX_COMPILER} --print-search-dirs OUTPUT_VARIABLE LIB_PATHS) - string(REGEX REPLACE "programs.*libraries: =" "" LIB_PATHS ${LIB_PATHS}) - string(REGEX REPLACE ":" ";" LIB_PATHS ${LIB_PATHS}) - find_library(LIBGCC_LIBRARY NAMES libgcc_s.so HINTS ${LIB_PATHS}) - get_filename_component(LIBGCC_PATH ${LIBGCC_LIBRARY} DIRECTORY) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdinc++ -nostdlib++ -I${LIBSTDCPP_DIR}/include/c++/7.1.0 -I${LIBSTDCPP_DIR}/include/c++/7.1.0/x86_64-pc-linux-gnu") - set(CMAKE_CXX_STANDARD_LIBRARIES "${LIBSTDCPP_DIR}/lib64/libstdc++.a ${LIBSTDCPP_DIR}/lib64/libsupc++.a -L${LIBGCC_PATH} -Wl,-nostdlib++ -Wl,-Bdynamic,-lgcc_s") - else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") - set(CMAKE_CXX_STANDARD_LIBRARIES "${LIBCPP_DIR}/lib/libc++.a ${LIBCPP_DIR}/lib/libc++abi.a") - endif() -endif() - if( WIN32 ) message( STATUS "Configuring EOSIO on WIN32") diff --git a/programs/nodeos/CMakeLists.txt b/programs/nodeos/CMakeLists.txt index d5fe8273eb5..5d7b12d6cad 100644 --- a/programs/nodeos/CMakeLists.txt +++ b/programs/nodeos/CMakeLists.txt @@ -70,6 +70,12 @@ if(BUILD_MONGO_DB_PLUGIN) target_link_libraries( ${NODE_EXECUTABLE_NAME} PRIVATE -Wl,${whole_archive_flag} mongo_db_plugin -Wl,${no_whole_archive_flag} ) endif() +if(EOSIO_PIN_COMPILER) + if(NOT APPLE) + target_link_libraries( ${NODE_EXECUTABLE_NAME} PRIVATE -nostdlib++ ) + endif() +endif() + include(additionalPlugins) copy_bin( ${NODE_EXECUTABLE_NAME} ) diff --git a/scripts/eosio_build.sh b/scripts/eosio_build.sh index 575aa12199a..b222e6453b3 100755 --- a/scripts/eosio_build.sh +++ b/scripts/eosio_build.sh @@ -350,12 +350,23 @@ printf "## ENABLE_COVERAGE_TESTING=%s\\n" "${ENABLE_COVERAGE_TESTING}" mkdir -p $BUILD_DIR cd $BUILD_DIR -$CMAKE -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_CXX_COMPILER="${CXX}" \ - -DCMAKE_C_COMPILER="${CC}" -DCORE_SYMBOL_NAME="${CORE_SYMBOL_NAME}" \ - -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=true \ - -DENABLE_COVERAGE_TESTING="${ENABLE_COVERAGE_TESTING}" -DBUILD_DOXYGEN="${DOXYGEN}" \ - -DCMAKE_PREFIX_PATH=$PREFIX \ - -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/eosio $LOCAL_CMAKE_FLAGS $PIN_COMPILER_CMAKE "${REPO_ROOT}" + +if $PIN_COMPILER; then + sed -e "s~@~$OPT_LOCATION~g" ../scripts/pinned_toolchain.cmake &> $BUILD_DIR/pinned_toolchain.cmake + $CMAKE -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake \ + -DCORE_SYMBOL_NAME="${CORE_SYMBOL_NAME}" \ + -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=true \ + -DENABLE_COVERAGE_TESTING="${ENABLE_COVERAGE_TESTING}" -DBUILD_DOXYGEN="${DOXYGEN}" \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/eosio $LOCAL_CMAKE_FLAGS -DEOSIO_PIN_COMPILER=1 "${REPO_ROOT}" +else + $CMAKE -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_CXX_COMPILER="${CXX}" \ + -DCMAKE_C_COMPILER="${CC}" -DCORE_SYMBOL_NAME="${CORE_SYMBOL_NAME}" \ + -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=true \ + -DENABLE_COVERAGE_TESTING="${ENABLE_COVERAGE_TESTING}" -DBUILD_DOXYGEN="${DOXYGEN}" \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/eosio $LOCAL_CMAKE_FLAGS $PIN_COMPILER_CMAKE "${REPO_ROOT}" +fi if [ $? -ne 0 ]; then exit -1; fi make -j"${JOBS}" From 6bb66a65bb17706e5e049113783ef3add10d4095 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Sat, 20 Apr 2019 02:45:49 -0400 Subject: [PATCH 41/86] Update CMakeLists.txt --- programs/nodeos/CMakeLists.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/programs/nodeos/CMakeLists.txt b/programs/nodeos/CMakeLists.txt index 5d7b12d6cad..d5fe8273eb5 100644 --- a/programs/nodeos/CMakeLists.txt +++ b/programs/nodeos/CMakeLists.txt @@ -70,12 +70,6 @@ if(BUILD_MONGO_DB_PLUGIN) target_link_libraries( ${NODE_EXECUTABLE_NAME} PRIVATE -Wl,${whole_archive_flag} mongo_db_plugin -Wl,${no_whole_archive_flag} ) endif() -if(EOSIO_PIN_COMPILER) - if(NOT APPLE) - target_link_libraries( ${NODE_EXECUTABLE_NAME} PRIVATE -nostdlib++ ) - endif() -endif() - include(additionalPlugins) copy_bin( ${NODE_EXECUTABLE_NAME} ) From f630b3de2f5b7f02e52b2e8428676da226a41c49 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Sat, 20 Apr 2019 02:46:57 -0400 Subject: [PATCH 42/86] Update eosio_build_fedora.sh --- scripts/eosio_build_fedora.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index 64eeb74d14d..264ca3e8df0 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -43,7 +43,7 @@ printf "Disk space available: ${DISK_AVAIL%.*}G\\n" # llvm is symlinked from /usr/lib64/llvm4.0 into user's home DEP_ARRAY=( git sudo procps-ng which gcc gcc-c++ autoconf automake libtool make \ - bzip2-devel curl -LO bzip2 compat-openssl10 graphviz doxygen \ + bzip2-devel curl bzip2 compat-openssl10 graphviz doxygen \ openssl-devel gmp-devel libstdc++-devel python2 python2-devel python3 python3-devel \ libedit ncurses-devel swig llvm4.0 llvm4.0-devel llvm4.0-libs llvm4.0-static libcurl-devel libusb-devel ) From 64020d6a16afbad77b04fd70c79f3889294ee302 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Sat, 20 Apr 2019 04:00:54 -0400 Subject: [PATCH 43/86] use script directory variable --- scripts/eosio_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/eosio_build.sh b/scripts/eosio_build.sh index b222e6453b3..a76f8974248 100755 --- a/scripts/eosio_build.sh +++ b/scripts/eosio_build.sh @@ -352,7 +352,7 @@ cd $BUILD_DIR if $PIN_COMPILER; then - sed -e "s~@~$OPT_LOCATION~g" ../scripts/pinned_toolchain.cmake &> $BUILD_DIR/pinned_toolchain.cmake + sed -e "s~@~$OPT_LOCATION~g" $SCRIPT_DIR/pinned_toolchain.cmake &> $BUILD_DIR/pinned_toolchain.cmake $CMAKE -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake \ -DCORE_SYMBOL_NAME="${CORE_SYMBOL_NAME}" \ -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=true \ From 627d351ccc91df16df309b559e5b7017f5a8ed1e Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Sat, 20 Apr 2019 15:05:41 -0400 Subject: [PATCH 44/86] gitignore missed toolchain file --- scripts/pinned_toolchain.cmake | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 scripts/pinned_toolchain.cmake diff --git a/scripts/pinned_toolchain.cmake b/scripts/pinned_toolchain.cmake new file mode 100644 index 00000000000..7033b20d2ac --- /dev/null +++ b/scripts/pinned_toolchain.cmake @@ -0,0 +1,15 @@ +set(OPT_PATH @) +set(CMAKE_C_COMPILER_WORKS 1) +set(CMAKE_CXX_COMPILER_WORKS 1) +set(CMAKE_C_COMPILER ${OPT_PATH}/clang8/bin/clang) +set(CMAKE_CXX_COMPILER ${OPT_PATH}/clang8/bin/clang++) +set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES ${OPT_PATH}/gcc/include/c++/7.1.0 ${OPT_PATH}/gcc/include/c++/7.1.0/x86_64-pc-linux-gnu) +set(CMAKE_CXX_FLAGS_INIT "-nostdinc++") + +if(NOT APPLE) + set(CMAKE_CXX_STANDARD_LIBRARIES "-Wl,-L${OPT_PATH}/gcc/lib64 -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -Wl,-nostdlib -Wl,--no-whole-archive ${OPT_PATH}/gcc/lib64/libstdc++.a -Wl,--no-whole-archive ${OPT_PATH}/gcc/lib64/libsupc++.a") +else() + set(CMAKE_SHARED_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++ -static-libstdc++ -shared-libgcc") + set(CMAKE_MODULE_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++ -static-libstdc++ -shared-libgcc") + set(CMAKE_CXX_STANDARD_LIBRARIES "${OPT_PATH}/clang8/lib/libc++.a ${OPT_PATH}/clang8/lib/libc++abi.a") +endif() From 128918d2603913dad9bf1874b6cf8887457fbfaf Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Sat, 20 Apr 2019 16:41:56 -0400 Subject: [PATCH 45/86] update toolchain file --- scripts/pinned_toolchain.cmake | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/pinned_toolchain.cmake b/scripts/pinned_toolchain.cmake index 7033b20d2ac..ee1fd65a4e1 100644 --- a/scripts/pinned_toolchain.cmake +++ b/scripts/pinned_toolchain.cmake @@ -3,13 +3,13 @@ set(CMAKE_C_COMPILER_WORKS 1) set(CMAKE_CXX_COMPILER_WORKS 1) set(CMAKE_C_COMPILER ${OPT_PATH}/clang8/bin/clang) set(CMAKE_CXX_COMPILER ${OPT_PATH}/clang8/bin/clang++) -set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES ${OPT_PATH}/gcc/include/c++/7.1.0 ${OPT_PATH}/gcc/include/c++/7.1.0/x86_64-pc-linux-gnu) -set(CMAKE_CXX_FLAGS_INIT "-nostdinc++") - -if(NOT APPLE) - set(CMAKE_CXX_STANDARD_LIBRARIES "-Wl,-L${OPT_PATH}/gcc/lib64 -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -Wl,-nostdlib -Wl,--no-whole-archive ${OPT_PATH}/gcc/lib64/libstdc++.a -Wl,--no-whole-archive ${OPT_PATH}/gcc/lib64/libsupc++.a") -else() - set(CMAKE_SHARED_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++ -static-libstdc++ -shared-libgcc") - set(CMAKE_MODULE_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++ -static-libstdc++ -shared-libgcc") - set(CMAKE_CXX_STANDARD_LIBRARIES "${OPT_PATH}/clang8/lib/libc++.a ${OPT_PATH}/clang8/lib/libc++abi.a") -endif() +#set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES ${OPT_PATH}/gcc/include/c++/7.1.0 ${OPT_PATH}/gcc/include/c++/7.1.0/x86_64-pc-linux-gnu) +#set(CMAKE_CXX_FLAGS_INIT "-nostdinc++") +# +#if(NOT APPLE) +# set(CMAKE_CXX_STANDARD_LIBRARIES "-Wl,-L${OPT_PATH}/gcc/lib64 -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -Wl,-nostdlib -Wl,--no-whole-archive ${OPT_PATH}/gcc/lib64/libstdc++.a -Wl,--no-whole-archive ${OPT_PATH}/gcc/lib64/libsupc++.a") +#else() +# set(CMAKE_SHARED_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++ -static-libstdc++ -shared-libgcc") +# set(CMAKE_MODULE_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++ -static-libstdc++ -shared-libgcc") +# set(CMAKE_CXX_STANDARD_LIBRARIES "${OPT_PATH}/clang8/lib/libc++.a ${OPT_PATH}/clang8/lib/libc++abi.a") +#endif() From 436651d075989c3a7eec413672a8175c42e7d9e8 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Mon, 22 Apr 2019 12:53:04 -0400 Subject: [PATCH 46/86] switch over to libcxx and no mongo-cxx-driver --- CMakeLists.txt | 4 +- scripts/eosio_build.sh | 14 +- scripts/eosio_build_amazon.sh | 317 ++++++++++++++++---------------- scripts/eosio_build_centos.sh | 316 ++++++++++++++++---------------- scripts/eosio_build_darwin.sh | 11 +- scripts/eosio_build_fedora.sh | 301 +++++++++++++++--------------- scripts/eosio_build_ubuntu.sh | 322 +++++++++++++++++---------------- scripts/pinned_toolchain.cmake | 25 ++- 8 files changed, 643 insertions(+), 667 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fe8d020167e..7ff89762398 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,11 +113,13 @@ FIND_PACKAGE(Boost 1.67 REQUIRED COMPONENTS iostreams) # Some new stdlibc++s will #error on ; a problem for boost pre-1.69 +add_definitions(-DBOOST_ASIO_DISABLE_STD_EXPERIMENTAL_STRING_VIEW) if( APPLE AND UNIX ) add_definitions(-DBOOST_ASIO_DISABLE_STD_EXPERIMENTAL_STRING_VIEW) endif() -set(THREADS_PREFER_PTHREAD_FLAG 1) +set(CMAKE_THREAD_PREFER_PTHREAD TRUE) +set(THREADS_PREFER_PTHREAD_FLAG TRUE) find_package(Threads) link_libraries(Threads::Threads) diff --git a/scripts/eosio_build.sh b/scripts/eosio_build.sh index a76f8974248..322f7aa5913 100755 --- a/scripts/eosio_build.sh +++ b/scripts/eosio_build.sh @@ -49,6 +49,8 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" REPO_ROOT="${SCRIPT_DIR}/.." BUILD_DIR="${REPO_ROOT}/build" +export BUILD_DIR=$BUILD_DIR + # Use current directory's tmp directory if noexec is enabled for /tmp if (mount | grep "/tmp " | grep --quiet noexec); then mkdir -p $REPO_ROOT/tmp @@ -58,6 +60,8 @@ else # noexec wasn't found TEMP_DIR="/tmp" fi +export TMP_LOCATION=$TEMP_DIR + function usage() { cat >&2 < $BUILD_DIR/pinned_toolchain.cmake cd $REPO_ROOT STALE_SUBMODS=$(( $(git submodule status --recursive | grep -c "^[+\-]") )) @@ -254,7 +260,7 @@ fi CXX=$CPP_COMP CC=$CC_COMP -export BUILD_CLANG8=$BUILD_CLANG8 +export PIN_COMPILER=$PIN_COMPILER # Setup directories mkdir -p $SRC_LOCATION @@ -347,17 +353,15 @@ printf "======================= Starting EOSIO Build =======================\\n" printf "## CMAKE_BUILD_TYPE=%s\\n" "${CMAKE_BUILD_TYPE}" printf "## ENABLE_COVERAGE_TESTING=%s\\n" "${ENABLE_COVERAGE_TESTING}" -mkdir -p $BUILD_DIR cd $BUILD_DIR if $PIN_COMPILER; then - sed -e "s~@~$OPT_LOCATION~g" $SCRIPT_DIR/pinned_toolchain.cmake &> $BUILD_DIR/pinned_toolchain.cmake $CMAKE -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake \ -DCORE_SYMBOL_NAME="${CORE_SYMBOL_NAME}" \ - -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=true \ + -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=false \ -DENABLE_COVERAGE_TESTING="${ENABLE_COVERAGE_TESTING}" -DBUILD_DOXYGEN="${DOXYGEN}" \ - -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_PREFIX_PATH=$OPT_LOCATION/llvm4\ -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/eosio $LOCAL_CMAKE_FLAGS -DEOSIO_PIN_COMPILER=1 "${REPO_ROOT}" else $CMAKE -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_CXX_COMPILER="${CXX}" \ diff --git a/scripts/eosio_build_amazon.sh b/scripts/eosio_build_amazon.sh index 0c4b5b35f27..af5220a658b 100755 --- a/scripts/eosio_build_amazon.sh +++ b/scripts/eosio_build_amazon.sh @@ -8,6 +8,8 @@ DISK_AVAIL_KB=$( df . | tail -1 | awk '{print $4}' ) DISK_TOTAL=$(( DISK_TOTAL_KB / 1048576 )) DISK_AVAIL=$(( DISK_AVAIL_KB / 1048576 )) +PINNED_TOOLCHAIN=-DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake + if [[ "${OS_NAME}" == "Amazon Linux AMI" ]]; then # Amazonlinux1 DEP_ARRAY=( sudo procps util-linux which gcc72 gcc72-c++ autoconf automake libtool make doxygen graphviz \ @@ -140,170 +142,7 @@ if [ $? -ne 0 ]; then exit -1; fi printf "\\n" - -printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" -BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) -if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ]; then - printf "Installing Boost library...\\n" - curl -LO https://dl.bintray.com/boostorg/release/${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}.${BOOST_VERSION_PATCH}/source/boost_$BOOST_VERSION.tar.bz2 \ - && tar -xjf boost_$BOOST_VERSION.tar.bz2 \ - && cd $BOOST_ROOT \ - && ./bootstrap.sh --prefix=$BOOST_ROOT \ - && ./b2 -q -j"${JOBS}" install \ - && cd .. \ - && rm -f boost_$BOOST_VERSION.tar.bz2 \ - && rm -rf $BOOST_LINK_LOCATION \ - && ln -s $BOOST_ROOT $BOOST_LINK_LOCATION \ - || exit 1 - printf " - Boost library successfully installed @ ${BOOST_ROOT} (Symlinked to ${BOOST_LINK_LOCATION}).\\n" -else - printf " - Boost library found with correct version @ ${BOOST_ROOT} (Symlinked to ${BOOST_LINK_LOCATION}).\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi - - -printf "\\n" - - -printf "Checking MongoDB installation...\\n" -if [ ! -d $MONGODB_ROOT ]; then - printf "Installing MongoDB into ${MONGODB_ROOT}...\\n" - curl -OL https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ - && tar -xzf mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ - && mv $SRC_LOCATION/mongodb-linux-x86_64-amazon-$MONGODB_VERSION $MONGODB_ROOT \ - && touch $MONGODB_LOG_LOCATION/mongod.log \ - && rm -f mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ - && cp -f $REPO_ROOT/scripts/mongod.conf $MONGODB_CONF \ - && mkdir -p $MONGODB_DATA_LOCATION \ - && rm -rf $MONGODB_LINK_LOCATION \ - && rm -rf $BIN_LOCATION/mongod \ - && ln -s $MONGODB_ROOT $MONGODB_LINK_LOCATION \ - && ln -s $MONGODB_LINK_LOCATION/bin/mongod $BIN_LOCATION/mongod \ - || exit 1 - printf " - MongoDB successfully installed @ ${MONGODB_ROOT} (Symlinked to ${MONGODB_LINK_LOCATION}).\\n" -else - printf " - MongoDB found with correct version @ ${MONGODB_ROOT} (Symlinked to ${MONGODB_LINK_LOCATION}).\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi -printf "Checking MongoDB C driver installation...\\n" -if [ ! -d $MONGO_C_DRIVER_ROOT ]; then - printf "Installing MongoDB C driver...\\n" - curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/$MONGO_C_DRIVER_VERSION/mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - && tar -xzf mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - && cd mongo-c-driver-$MONGO_C_DRIVER_VERSION \ - && mkdir -p cmake-build \ - && cd cmake-build \ - && $CMAKE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DENABLE_BSON=ON -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON .. \ - && make -j"${JOBS}" \ - && make install \ - && cd ../.. \ - && rm mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - || exit 1 - printf " - MongoDB C driver successfully installed @ ${MONGO_C_DRIVER_ROOT}.\\n" -else - printf " - MongoDB C driver found with correct version @ ${MONGO_C_DRIVER_ROOT}.\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi -printf "Checking MongoDB C++ driver installation...\\n" -if [ ! -d $MONGO_CXX_DRIVER_ROOT ]; then - printf "Installing MongoDB C++ driver...\\n" - curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r$MONGO_CXX_DRIVER_VERSION.tar.gz -o mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ - && tar -xzf mongo-cxx-driver-r${MONGO_CXX_DRIVER_VERSION}.tar.gz \ - && cd mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION/build \ - && $CMAKE -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX .. \ - && make -j"${JOBS}" VERBOSE=1 \ - && make install \ - && cd ../.. \ - && rm -f mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ - || exit 1 - printf " - MongoDB C++ driver successfully installed @ ${MONGO_CXX_DRIVER_ROOT}.\\n" -else - printf " - MongoDB C++ driver found with correct version @ ${MONGO_CXX_DRIVER_ROOT}.\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi - - -printf "\\n" - - -printf "Checking LLVM 4 support...\\n" -if [ ! -d $LLVM_ROOT ]; then - printf "Installing LLVM 4...\\n" - cd ../opt \ - && git clone --depth 1 --single-branch --branch $LLVM_VERSION https://github.com/llvm-mirror/llvm.git llvm && cd llvm \ - && mkdir build \ - && cd build \ - && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${LLVM_ROOT}" -DLLVM_TARGETS_TO_BUILD="host" -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE="Release" .. \ - && make -j"${JOBS}" \ - && make install \ - && cd ../.. \ - || exit 1 - printf " - LLVM successfully installed @ ${LLVM_ROOT}\\n" -else - printf " - LLVM found @ ${LLVM_ROOT}.\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi - - -cd .. -printf "\\n" - -# Use current directory's tmp directory if noexec is enabled for /tmp -if (mount | grep "/tmp " | grep --quiet noexec); then - mkdir -p $REPO_ROOT/tmp - TMP_LOCATION="${REPO_ROOT}/tmp" - rm -rf $REPO_ROOT/tmp/* -else # noexec wasn't found - TMP_LOCATION="/tmp" -fi - -if $BUILD_CLANG8; then - export LD_LIBRARY_PATH=${OPT_LOCATION}/mpfr/lib:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH=${OPT_LOCATION}/gcc/lib64:$LD_LIBRARY_PATH - - if [ ! -d ${OPT_LOCATION}/gmp ]; then - printf "Installing gmp...\\n" - cd ${TMP_LOCATION} \ - && curl -LO https://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz && tar -xzf gmp-5.0.1.tar.gz \ - && cd gmp-5.0.1 && mkdir build && cd build \ - && ../configure --prefix=${OPT_LOCATION}/gmp \ - && make -j"${JOBS}" && make install \ - && cd ../ && rm -rf ${TMP_LOCATION}/gmp-5.0.1 ${TMP_LOCATION}/gmp-5.0.1.tar.gz \ - || exit 1 - fi - if [ ! -d ${OPT_LOCATION}/mpfr ]; then - printf "Installing mpfr...\\n" - cd ${TMP_LOCATION} \ - && curl -LO https://ftp.gnu.org/gnu/mpfr/mpfr-3.0.0.tar.gz && tar -xzf mpfr-3.0.0.tar.gz \ - && cd mpfr-3.0.0 && mkdir build && cd build \ - && ../configure --prefix=${OPT_LOCATION}/mpfr --with-gmp=${OPT_LOCATION}/gmp \ - && make -j"${JOBS}" && make install \ - && cd ../ && rm -rf ${TMP_LOCATION}/mpfr-3.0.0 ${TMP_LOCATION}/mpfr-3.0.0.tar.gz \ - || exit 1 - fi - if [ ! -d ${OPT_LOCATION}/mpc ]; then - printf "Installing mpc...\\n" - cd ${TMP_LOCATION} \ - && curl -LO https://ftp.gnu.org/gnu/mpc/mpc-1.0.1.tar.gz && tar -xzf mpc-1.0.1.tar.gz \ - && cd mpc-1.0.1 && mkdir build && cd build \ - && ../configure --prefix=${OPT_LOCATION}/mpc --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr \ - && make -j"${JOBS}" && make install \ - && cd ../ && rm -rf ${TMP_LOCATION}/mpc-1.0.1 ${TMP_LOCATION}/mpc-1.0.1.tar.gz \ - || exit 1 - fi - if [ ! -d ${OPT_LOCATION}/gcc ]; then - printf "Installing libstdc++\\n" - cd ${TMP_LOCATION} \ - && curl -LO https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ - && cd gcc-7.1.0 \ - && sed '61 s/ucontext/ucontext_t/' libgcc/config/i386/linux-unwind.h &> libgcc/config/i386/linux-unwind.h \ - && mkdir build && cd build \ - &&../configure --enable-languages=c,c++ --prefix=${OPT_LOCATION}/gcc --disable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --disable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --disable-werror --disable-multilib --with-tune=generic --enable-checking=release --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr --with-mpc=${OPT_LOCATION}/mpc --disable-libsanitizer --disable-testsuite --disable-libquadmath --disable-libitm --disable-libcc1 \ - && make -j"${JOBS}" && make install \ - && cd ../ && rm -rf ${TMP_LOCATION}/gcc-7.1.0 ${TMP_LOCATION}/gcc-7.1.0.tar.gz \ - || exit 1 - fi - +if $PIN_COMPILER; then printf "Checking Clang 8 support...\\n" if [ ! -d $CLANG8_ROOT ]; then printf "Installing Clang 8...\\n" @@ -345,6 +184,156 @@ if $BUILD_CLANG8; then if [ $? -ne 0 ]; then exit -1; fi printf "\\n" + + printf "Checking LLVM 4 installation...\\n" + if [ ! -d $OPT_LOCATION/llvm4 ]; then + printf "Installing LLVM 4...\\n" + curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz && tar -xf llvm-4.0.0.src.tar.xz \ + && cd llvm-4.0.0.src && mkdir -p build && cd build \ + && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ + && make -j"${JOBS}" install \ + || exit -1 + printf "Installed LLVM 4 @ ${OPT_LOCATION}/llvm4" + fi + cd $SRC_LOCATION + printf "Checking zlib library (${BOOST_VERSION}) installation...\\n" + if [ ! -d $OPT_LOCATION/zlib ]; then + printf "Installing zlib...\\n" + curl -LO https://www.zlib.net/zlib-1.2.11.tar.gz && tar -xf zlib-1.2.11.tar.gz \ + && cd zlib-1.2.11 && mkdir build && cd build \ + && ../configure --prefix=$OPT_LOCATION/zlib \ + && make -j"${JOBS}" install \ + || exit -1 + fi + cd $SRC_LOCATION + printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" + BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) + if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ]; then + printf "Installing Boost library...\\n" + curl -LO https://dl.bintray.com/boostorg/release/${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}.${BOOST_VERSION_PATCH}/source/boost_$BOOST_VERSION.tar.bz2 \ + && tar -xjf boost_$BOOST_VERSION.tar.bz2 \ + && cd $BOOST_ROOT \ + && ./bootstrap.sh --prefix=$BOOST_ROOT \ + && ./b2 toolset=clang cxxflags="-stdlib=libc++ -D__STRICT_ANSI__ -nostdinc++ -I${CLANG8_ROOT}/include/c++/v1" linkflags="-stdlib=libc++" link=static threading=multi --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j"${JOBS}" -sZLIB_LIBRARY_PATH="${OPT_LOCATION}/zlib/lib" -sZLIB_INCLUDE="${OPT_LOCATION}/zlib/include" -sZLIB_SOURCE="${SRC_LOCATION}/zlib-1.2.11" install \ + && cd .. \ + && rm -f boost_$BOOST_VERSION.tar.bz2 \ + && rm -rf $BOOST_LINK_LOCATION \ + && ln -s $BOOST_ROOT $BOOST_LINK_LOCATION \ + || exit 1 + printf " - Boost library successfully installed @ ${BOOST_ROOT} (Symlinked to ${BOOST_LINK_LOCATION}).\\n" + else + printf " - Boost library found with correct version @ ${BOOST_ROOT} (Symlinked to ${BOOST_LINK_LOCATION}).\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + + printf "\\n" +else + printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" + BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) + if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ]; then + printf "Installing Boost library...\\n" + curl -LO https://dl.bintray.com/boostorg/release/${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}.${BOOST_VERSION_PATCH}/source/boost_$BOOST_VERSION.tar.bz2 \ + && tar -xjf boost_$BOOST_VERSION.tar.bz2 \ + && cd $BOOST_ROOT \ + && ./bootstrap.sh --prefix=$BOOST_ROOT \ + && ./b2 -q -j"${JOBS}" install \ + && cd .. \ + && rm -f boost_$BOOST_VERSION.tar.bz2 \ + && rm -rf $BOOST_LINK_LOCATION \ + && ln -s $BOOST_ROOT $BOOST_LINK_LOCATION \ + || exit 1 + printf " - Boost library successfully installed @ ${BOOST_ROOT} (Symlinked to ${BOOST_LINK_LOCATION}).\\n" + else + printf " - Boost library found with correct version @ ${BOOST_ROOT} (Symlinked to ${BOOST_LINK_LOCATION}).\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + + + printf "\\n" + + + printf "Checking MongoDB installation...\\n" + if [ ! -d $MONGODB_ROOT ]; then + printf "Installing MongoDB into ${MONGODB_ROOT}...\\n" + curl -OL https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ + && tar -xzf mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ + && mv $SRC_LOCATION/mongodb-linux-x86_64-amazon-$MONGODB_VERSION $MONGODB_ROOT \ + && touch $MONGODB_LOG_LOCATION/mongod.log \ + && rm -f mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ + && cp -f $REPO_ROOT/scripts/mongod.conf $MONGODB_CONF \ + && mkdir -p $MONGODB_DATA_LOCATION \ + && rm -rf $MONGODB_LINK_LOCATION \ + && rm -rf $BIN_LOCATION/mongod \ + && ln -s $MONGODB_ROOT $MONGODB_LINK_LOCATION \ + && ln -s $MONGODB_LINK_LOCATION/bin/mongod $BIN_LOCATION/mongod \ + || exit 1 + printf " - MongoDB successfully installed @ ${MONGODB_ROOT} (Symlinked to ${MONGODB_LINK_LOCATION}).\\n" + else + printf " - MongoDB found with correct version @ ${MONGODB_ROOT} (Symlinked to ${MONGODB_LINK_LOCATION}).\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + printf "Checking MongoDB C driver installation...\\n" + if [ ! -d $MONGO_C_DRIVER_ROOT ]; then + printf "Installing MongoDB C driver...\\n" + curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/$MONGO_C_DRIVER_VERSION/mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + && tar -xzf mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + && cd mongo-c-driver-$MONGO_C_DRIVER_VERSION \ + && mkdir -p cmake-build \ + && cd cmake-build \ + && $CMAKE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DENABLE_BSON=ON -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON .. \ + && make -j"${JOBS}" \ + && make install \ + && cd ../.. \ + && rm mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + || exit 1 + printf " - MongoDB C driver successfully installed @ ${MONGO_C_DRIVER_ROOT}.\\n" + else + printf " - MongoDB C driver found with correct version @ ${MONGO_C_DRIVER_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + printf "Checking MongoDB C++ driver installation...\\n" + if [ ! -d $MONGO_CXX_DRIVER_ROOT ]; then + printf "Installing MongoDB C++ driver...\\n" + curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r$MONGO_CXX_DRIVER_VERSION.tar.gz -o mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ + && tar -xzf mongo-cxx-driver-r${MONGO_CXX_DRIVER_VERSION}.tar.gz \ + && cd mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION/build \ + && $CMAKE -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX .. \ + && make -j"${JOBS}" VERBOSE=1 \ + && make install \ + && cd ../.. \ + && rm -f mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ + || exit 1 + printf " - MongoDB C++ driver successfully installed @ ${MONGO_CXX_DRIVER_ROOT}.\\n" + else + printf " - MongoDB C++ driver found with correct version @ ${MONGO_CXX_DRIVER_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + + + printf "\\n" + + + printf "Checking LLVM 4 support...\\n" + if [ ! -d $LLVM_ROOT ]; then + printf "Installing LLVM 4...\\n" + cd ../opt \ + && git clone --depth 1 --single-branch --branch $LLVM_VERSION https://github.com/llvm-mirror/llvm.git llvm && cd llvm \ + && mkdir build \ + && cd build \ + && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${LLVM_ROOT}" -DLLVM_TARGETS_TO_BUILD="host" -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE="Release" .. \ + && make -j"${JOBS}" \ + && make install \ + && cd ../.. \ + || exit 1 + printf " - LLVM successfully installed @ ${LLVM_ROOT}\\n" + else + printf " - LLVM found @ ${LLVM_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + + + cd .. + printf "\\n" fi function print_instructions() { diff --git a/scripts/eosio_build_centos.sh b/scripts/eosio_build_centos.sh index 2820a93eae8..772c553ea7f 100755 --- a/scripts/eosio_build_centos.sh +++ b/scripts/eosio_build_centos.sh @@ -25,6 +25,8 @@ printf "Disk space total: ${DISK_TOTAL%.*}G\\n" printf "Disk space available: ${DISK_AVAIL%.*}G\\n" printf "Concurrent Jobs (make -j): ${JOBS}\\n" +PINNED_TOOLCHAIN=-DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake + if [ "${MEM_MEG}" -lt 7000 ]; then printf "\\nYour system must have 7 or more Gigabytes of physical memory installed.\\n" printf "Exiting now.\\n\\n" @@ -192,169 +194,7 @@ printf "\\n" export CPATH="${CPATH}:${PYTHON3PATH}/root/usr/include/python3.6m" # m on the end causes problems with boost finding python3 -printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" -BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) -if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ]; then - printf "Installing Boost library...\\n" - curl -LO https://dl.bintray.com/boostorg/release/${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}.${BOOST_VERSION_PATCH}/source/boost_$BOOST_VERSION.tar.bz2 \ - && tar -xjf boost_$BOOST_VERSION.tar.bz2 \ - && cd $BOOST_ROOT \ - && ./bootstrap.sh --prefix=$BOOST_ROOT \ - && ./b2 -q -j"${JOBS}" install \ - && cd .. \ - && rm -f boost_$BOOST_VERSION.tar.bz2 \ - && rm -rf $BOOST_LINK_LOCATION \ - && ln -s $BOOST_ROOT $BOOST_LINK_LOCATION \ - || exit 1 - printf " - Boost library successfully installed @ ${BOOST_ROOT} (Symlinked to ${BOOST_LINK_LOCATION}).\\n" -else - printf " - Boost library found with correct version @ ${BOOST_ROOT} (Symlinked to ${BOOST_LINK_LOCATION}).\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi - - -printf "\\n" - - -printf "Checking MongoDB installation...\\n" -if [ ! -d $MONGODB_ROOT ]; then - printf "Installing MongoDB into ${MONGODB_ROOT}...\\n" - curl -OL https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ - && tar -xzf mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ - && mv $SRC_LOCATION/mongodb-linux-x86_64-amazon-$MONGODB_VERSION $MONGODB_ROOT \ - && touch $MONGODB_LOG_LOCATION/mongod.log \ - && rm -f mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ - && cp -f $REPO_ROOT/scripts/mongod.conf $MONGODB_CONF \ - && mkdir -p $MONGODB_DATA_LOCATION \ - && rm -rf $MONGODB_LINK_LOCATION \ - && rm -rf $BIN_LOCATION/mongod \ - && ln -s $MONGODB_ROOT $MONGODB_LINK_LOCATION \ - && ln -s $MONGODB_LINK_LOCATION/bin/mongod $BIN_LOCATION/mongod \ - || exit 1 - printf " - MongoDB successfully installed @ ${MONGODB_ROOT} (Symlinked to ${MONGODB_LINK_LOCATION}).\\n" -else - printf " - MongoDB found with correct version @ ${MONGODB_ROOT} (Symlinked to ${MONGODB_LINK_LOCATION}).\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi -printf "Checking MongoDB C driver installation...\\n" -if [ ! -d $MONGO_C_DRIVER_ROOT ]; then - printf "Installing MongoDB C driver...\\n" - curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/$MONGO_C_DRIVER_VERSION/mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - && tar -xzf mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - && cd mongo-c-driver-$MONGO_C_DRIVER_VERSION \ - && mkdir -p cmake-build \ - && cd cmake-build \ - && $CMAKE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DENABLE_BSON=ON -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON .. \ - && make -j"${JOBS}" \ - && make install \ - && cd ../.. \ - && rm mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - || exit 1 - printf " - MongoDB C driver successfully installed @ ${MONGO_C_DRIVER_ROOT}.\\n" -else - printf " - MongoDB C driver found with correct version @ ${MONGO_C_DRIVER_ROOT}.\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi -printf "Checking MongoDB C++ driver installation...\\n" -if [ ! -d $MONGO_CXX_DRIVER_ROOT ]; then - printf "Installing MongoDB C++ driver...\\n" - curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r$MONGO_CXX_DRIVER_VERSION.tar.gz -o mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ - && tar -xzf mongo-cxx-driver-r${MONGO_CXX_DRIVER_VERSION}.tar.gz \ - && cd mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION/build \ - && $CMAKE -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX .. \ - && make -j"${JOBS}" VERBOSE=1 \ - && make install \ - && cd ../.. \ - && rm -f mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ - || exit 1 - printf " - MongoDB C++ driver successfully installed @ ${MONGO_CXX_DRIVER_ROOT}.\\n" -else - printf " - MongoDB C++ driver found with correct version @ ${MONGO_CXX_DRIVER_ROOT}.\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi - - -printf "\\n" - - -printf "Checking LLVM 4 support...\\n" -if [ ! -d $LLVM_ROOT ]; then - printf "Installing LLVM 4...\\n" - cd ../opt \ - && git clone --depth 1 --single-branch --branch $LLVM_VERSION https://github.com/llvm-mirror/llvm.git llvm && cd llvm \ - && mkdir build \ - && cd build \ - && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${LLVM_ROOT}" -DLLVM_TARGETS_TO_BUILD="host" -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE="Release" .. \ - && make -j"${JOBS}" \ - && make install \ - && cd ../.. \ - || exit 1 - printf " - LLVM successfully installed @ ${LLVM_ROOT}\\n" -else - printf " - LLVM found @ ${LLVM_ROOT}.\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi - - -cd .. -printf "\\n" - -# Use current directory's tmp directory if noexec is enabled for /tmp -if (mount | grep "/tmp " | grep --quiet noexec); then - mkdir -p $REPO_ROOT/tmp - TMP_LOCATION="${REPO_ROOT}/tmp" - rm -rf $REPO_ROOT/tmp/* -else # noexec wasn't found - TMP_LOCATION="/tmp" -fi - -if $BUILD_CLANG8; then - export LD_LIBRARY_PATH=${OPT_LOCATION}/mpfr/lib:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH=${OPT_LOCATION}/gcc/lib64:$LD_LIBRARY_PATH - - if [ ! -d ${OPT_LOCATION}/gmp ]; then - printf "Installing gmp...\\n" - cd ${TMP_LOCATION} \ - && curl -LO https://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz && tar -xzf gmp-5.0.1.tar.gz \ - && cd gmp-5.0.1 && mkdir build && cd build \ - && ../configure --prefix=${OPT_LOCATION}/gmp \ - && make -j"${JOBS}" && make install \ - && cd ../ && rm -rf ${TMP_LOCATION}/gmp-5.0.1 ${TMP_LOCATION}/gmp-5.0.1.tar.gz \ - || exit 1 - fi - if [ ! -d ${OPT_LOCATION}/mpfr ]; then - printf "Installing mpfr...\\n" - cd ${TMP_LOCATION} \ - && curl -LO https://ftp.gnu.org/gnu/mpfr/mpfr-3.0.0.tar.gz && tar -xzf mpfr-3.0.0.tar.gz \ - && cd mpfr-3.0.0 && mkdir build && cd build \ - && ../configure --prefix=${OPT_LOCATION}/mpfr --with-gmp=${OPT_LOCATION}/gmp \ - && make -j"${JOBS}" && make install \ - && cd ../ && rm -rf ${TMP_LOCATION}/mpfr-3.0.0 ${TMP_LOCATION}/mpfr-3.0.0.tar.gz \ - || exit 1 - fi - if [ ! -d ${OPT_LOCATION}/mpc ]; then - printf "Installing mpc...\\n" - cd ${TMP_LOCATION} \ - && curl -LO https://ftp.gnu.org/gnu/mpc/mpc-1.0.1.tar.gz && tar -xzf mpc-1.0.1.tar.gz \ - && cd mpc-1.0.1 && mkdir build && cd build \ - && ../configure --prefix=${OPT_LOCATION}/mpc --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr \ - && make -j"${JOBS}" && make install \ - && cd ../ && rm -rf ${TMP_LOCATION}/mpc-1.0.1 ${TMP_LOCATION}/mpc-1.0.1.tar.gz \ - || exit 1 - fi - if [ ! -d ${OPT_LOCATION}/gcc ]; then - printf "Installing libstdc++\\n" - cd ${TMP_LOCATION} \ - && curl -LO https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ - && cd gcc-7.1.0 \ - && sed '61 s/ucontext/ucontext_t/' libgcc/config/i386/linux-unwind.h &> libgcc/config/i386/linux-unwind.h \ - && mkdir build && cd build \ - &&../configure --enable-languages=c,c++ --prefix=${OPT_LOCATION}/gcc --disable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --disable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --disable-werror --disable-multilib --with-tune=generic --enable-checking=release --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr --with-mpc=${OPT_LOCATION}/mpc --disable-libsanitizer --disable-testsuite --disable-libquadmath --disable-libitm --disable-libcc1 \ - && make -j"${JOBS}" && make install \ - && cd ../ && rm -rf ${TMP_LOCATION}/gcc-7.1.0 ${TMP_LOCATION}/gcc-7.1.0.tar.gz \ - || exit 1 - fi - +if $PIN_COMPILER; then printf "Checking Clang 8 support...\\n" if [ ! -d $CLANG8_ROOT ]; then printf "Installing Clang 8...\\n" @@ -396,6 +236,156 @@ if $BUILD_CLANG8; then if [ $? -ne 0 ]; then exit -1; fi printf "\\n" + + printf "Checking LLVM 4 installation...\\n" + if [ ! -d $OPT_LOCATION/llvm4 ]; then + printf "Installing LLVM 4...\\n" + curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz && tar -xf llvm-4.0.0.src.tar.xz \ + && cd llvm-4.0.0.src && mkdir -p build && cd build \ + && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ + && make -j"${JOBS}" install \ + || exit -1 + printf "Installed LLVM 4 @ ${OPT_LOCATION}/llvm4" + fi + cd $SRC_LOCATION + printf "Checking zlib library (${BOOST_VERSION}) installation...\\n" + if [ ! -d $OPT_LOCATION/zlib ]; then + printf "Installing zlib...\\n" + curl -LO https://www.zlib.net/zlib-1.2.11.tar.gz && tar -xf zlib-1.2.11.tar.gz \ + && cd zlib-1.2.11 && mkdir build && cd build \ + && ../configure --prefix=$OPT_LOCATION/zlib \ + && make -j"${JOBS}" install \ + || exit -1 + fi + cd $SRC_LOCATION + printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" + BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) + if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ]; then + printf "Installing Boost library...\\n" + curl -LO https://dl.bintray.com/boostorg/release/${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}.${BOOST_VERSION_PATCH}/source/boost_$BOOST_VERSION.tar.bz2 \ + && tar -xjf boost_$BOOST_VERSION.tar.bz2 \ + && cd $BOOST_ROOT \ + && ./bootstrap.sh --prefix=$BOOST_ROOT \ + && ./b2 toolset=clang cxxflags="-stdlib=libc++ -D__STRICT_ANSI__ -nostdinc++ -I${CLANG8_ROOT}/include/c++/v1" linkflags="-stdlib=libc++" link=static threading=multi --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j"${JOBS}" -sZLIB_LIBRARY_PATH="${OPT_LOCATION}/zlib/lib" -sZLIB_INCLUDE="${OPT_LOCATION}/zlib/include" -sZLIB_SOURCE="${SRC_LOCATION}/zlib-1.2.11" install \ + && cd .. \ + && rm -f boost_$BOOST_VERSION.tar.bz2 \ + && rm -rf $BOOST_LINK_LOCATION \ + && ln -s $BOOST_ROOT $BOOST_LINK_LOCATION \ + || exit 1 + printf " - Boost library successfully installed @ ${BOOST_ROOT} (Symlinked to ${BOOST_LINK_LOCATION}).\\n" + else + printf " - Boost library found with correct version @ ${BOOST_ROOT} (Symlinked to ${BOOST_LINK_LOCATION}).\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + + printf "\\n" +else + printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" + BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) + if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ]; then + printf "Installing Boost library...\\n" + curl -LO https://dl.bintray.com/boostorg/release/${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}.${BOOST_VERSION_PATCH}/source/boost_$BOOST_VERSION.tar.bz2 \ + && tar -xjf boost_$BOOST_VERSION.tar.bz2 \ + && cd $BOOST_ROOT \ + && ./bootstrap.sh --prefix=$BOOST_ROOT \ + && ./b2 -q -j"${JOBS}" install \ + && cd .. \ + && rm -f boost_$BOOST_VERSION.tar.bz2 \ + && rm -rf $BOOST_LINK_LOCATION \ + && ln -s $BOOST_ROOT $BOOST_LINK_LOCATION \ + || exit 1 + printf " - Boost library successfully installed @ ${BOOST_ROOT} (Symlinked to ${BOOST_LINK_LOCATION}).\\n" + else + printf " - Boost library found with correct version @ ${BOOST_ROOT} (Symlinked to ${BOOST_LINK_LOCATION}).\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + + + printf "\\n" + + + printf "Checking MongoDB installation...\\n" + if [ ! -d $MONGODB_ROOT ]; then + printf "Installing MongoDB into ${MONGODB_ROOT}...\\n" + curl -OL https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ + && tar -xzf mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ + && mv $SRC_LOCATION/mongodb-linux-x86_64-amazon-$MONGODB_VERSION $MONGODB_ROOT \ + && touch $MONGODB_LOG_LOCATION/mongod.log \ + && rm -f mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ + && cp -f $REPO_ROOT/scripts/mongod.conf $MONGODB_CONF \ + && mkdir -p $MONGODB_DATA_LOCATION \ + && rm -rf $MONGODB_LINK_LOCATION \ + && rm -rf $BIN_LOCATION/mongod \ + && ln -s $MONGODB_ROOT $MONGODB_LINK_LOCATION \ + && ln -s $MONGODB_LINK_LOCATION/bin/mongod $BIN_LOCATION/mongod \ + || exit 1 + printf " - MongoDB successfully installed @ ${MONGODB_ROOT} (Symlinked to ${MONGODB_LINK_LOCATION}).\\n" + else + printf " - MongoDB found with correct version @ ${MONGODB_ROOT} (Symlinked to ${MONGODB_LINK_LOCATION}).\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + printf "Checking MongoDB C driver installation...\\n" + if [ ! -d $MONGO_C_DRIVER_ROOT ]; then + printf "Installing MongoDB C driver...\\n" + curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/$MONGO_C_DRIVER_VERSION/mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + && tar -xzf mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + && cd mongo-c-driver-$MONGO_C_DRIVER_VERSION \ + && mkdir -p cmake-build \ + && cd cmake-build \ + && $CMAKE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DENABLE_BSON=ON -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON .. \ + && make -j"${JOBS}" \ + && make install \ + && cd ../.. \ + && rm mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + || exit 1 + printf " - MongoDB C driver successfully installed @ ${MONGO_C_DRIVER_ROOT}.\\n" + else + printf " - MongoDB C driver found with correct version @ ${MONGO_C_DRIVER_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + printf "Checking MongoDB C++ driver installation...\\n" + if [ ! -d $MONGO_CXX_DRIVER_ROOT ]; then + printf "Installing MongoDB C++ driver...\\n" + curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r$MONGO_CXX_DRIVER_VERSION.tar.gz -o mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ + && tar -xzf mongo-cxx-driver-r${MONGO_CXX_DRIVER_VERSION}.tar.gz \ + && cd mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION/build \ + && $CMAKE -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX .. \ + && make -j"${JOBS}" VERBOSE=1 \ + && make install \ + && cd ../.. \ + && rm -f mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ + || exit 1 + printf " - MongoDB C++ driver successfully installed @ ${MONGO_CXX_DRIVER_ROOT}.\\n" + else + printf " - MongoDB C++ driver found with correct version @ ${MONGO_CXX_DRIVER_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + + + printf "\\n" + + + printf "Checking LLVM 4 support...\\n" + if [ ! -d $LLVM_ROOT ]; then + printf "Installing LLVM 4...\\n" + cd ../opt \ + && git clone --depth 1 --single-branch --branch $LLVM_VERSION https://github.com/llvm-mirror/llvm.git llvm && cd llvm \ + && mkdir build \ + && cd build \ + && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${LLVM_ROOT}" -DLLVM_TARGETS_TO_BUILD="host" -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE="Release" .. \ + && make -j"${JOBS}" \ + && make install \ + && cd ../.. \ + || exit 1 + printf " - LLVM successfully installed @ ${LLVM_ROOT}\\n" + else + printf " - LLVM found @ ${LLVM_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + + + cd .. + printf "\\n" fi function print_instructions() { diff --git a/scripts/eosio_build_darwin.sh b/scripts/eosio_build_darwin.sh index 1bbc97367b0..4150d379f27 100755 --- a/scripts/eosio_build_darwin.sh +++ b/scripts/eosio_build_darwin.sh @@ -261,16 +261,7 @@ fi cd .. printf "\\n" -# Use current directory's tmp directory if noexec is enabled for /tmp -if (mount | grep "/tmp " | grep --quiet noexec); then - mkdir -p $REPO_ROOT/tmp - TMP_LOCATION="${REPO_ROOT}/tmp" - rm -rf $REPO_ROOT/tmp/* -else # noexec wasn't found - TMP_LOCATION="/tmp" -fi - -if $BUILD_CLANG8; then +if $PIN_COMPILER; then printf "Checking Clang 8 support...\\n" if [ ! -d $CLANG8_ROOT ]; then printf "Installing Clang 8...\\n" diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index 264ca3e8df0..e5b41d78390 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -10,6 +10,8 @@ if [ "${OS_VER}" -lt 25 ]; then exit 1; fi +PINNED_TOOLCHAIN=-DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake + # procps-ng includes free command if [[ -z "$( rpm -qi "procps-ng" 2>/dev/null | grep Name )" ]]; then yum install -y procps-ng; fi MEM_MEG=$( free -m | sed -n 2p | tr -s ' ' | cut -d\ -f2 ) @@ -131,162 +133,7 @@ if [ $? -ne 0 ]; then exit -1; fi printf "\\n" - -printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" -BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) -if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ]; then - printf "Installing Boost library...\\n" - curl -LO https://dl.bintray.com/boostorg/release/${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}.${BOOST_VERSION_PATCH}/source/boost_$BOOST_VERSION.tar.bz2 \ - && tar -xjf boost_$BOOST_VERSION.tar.bz2 \ - && cd $BOOST_ROOT \ - && ./bootstrap.sh --prefix=$BOOST_ROOT \ - && ./b2 -q -j"${JOBS}" install \ - && cd .. \ - && rm -f boost_$BOOST_VERSION.tar.bz2 \ - && rm -rf $BOOST_LINK_LOCATION \ - && ln -s $BOOST_ROOT $BOOST_LINK_LOCATION \ - || exit 1 - printf " - Boost library successfully installed @ ${BOOST_ROOT} (Symlinked to ${BOOST_LINK_LOCATION}).\\n" -else - printf " - Boost library found with correct version @ ${BOOST_ROOT} (Symlinked to ${BOOST_LINK_LOCATION}).\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi - - -printf "\\n" - - -printf "Checking MongoDB installation...\\n" -if [ ! -d $MONGODB_ROOT ]; then - printf "Installing MongoDB into ${MONGODB_ROOT}...\\n" - curl -OL https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ - && tar -xzf mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ - && mv $SRC_LOCATION/mongodb-linux-x86_64-amazon-$MONGODB_VERSION $MONGODB_ROOT \ - && touch $MONGODB_LOG_LOCATION/mongod.log \ - && rm -f mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ - && cp -f $REPO_ROOT/scripts/mongod.conf $MONGODB_CONF \ - && mkdir -p $MONGODB_DATA_LOCATION \ - && rm -rf $MONGODB_LINK_LOCATION \ - && rm -rf $BIN_LOCATION/mongod \ - && ln -s $MONGODB_ROOT $MONGODB_LINK_LOCATION \ - && ln -s $MONGODB_LINK_LOCATION/bin/mongod $BIN_LOCATION/mongod \ - || exit 1 - printf " - MongoDB successfully installed @ ${MONGODB_ROOT}\\n" -else - printf " - MongoDB found with correct version @ ${MONGODB_ROOT}.\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi -printf "Checking MongoDB C driver installation...\\n" -if [ ! -d $MONGO_C_DRIVER_ROOT ]; then - printf "Installing MongoDB C driver...\\n" - curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/$MONGO_C_DRIVER_VERSION/mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - && tar -xzf mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - && cd mongo-c-driver-$MONGO_C_DRIVER_VERSION \ - && mkdir -p cmake-build \ - && cd cmake-build \ - && $CMAKE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DENABLE_BSON=ON -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON .. \ - && make -j"${JOBS}" \ - && make install \ - && cd ../.. \ - && rm mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - || exit 1 - printf " - MongoDB C driver successfully installed @ ${MONGO_C_DRIVER_ROOT}.\\n" -else - printf " - MongoDB C driver found with correct version @ ${MONGO_C_DRIVER_ROOT}.\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi -printf "Checking MongoDB C++ driver installation...\\n" -if [ ! -d $MONGO_CXX_DRIVER_ROOT ]; then - printf "Installing MongoDB C++ driver...\\n" - curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r$MONGO_CXX_DRIVER_VERSION.tar.gz -o mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ - && tar -xzf mongo-cxx-driver-r${MONGO_CXX_DRIVER_VERSION}.tar.gz \ - && cd mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION/build \ - && $CMAKE -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX .. \ - && make -j"${JOBS}" VERBOSE=1 \ - && make install \ - && cd ../.. \ - && rm -f mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ - || exit 1 - printf " - MongoDB C++ driver successfully installed @ ${MONGO_CXX_DRIVER_ROOT}.\\n" -else - printf " - MongoDB C++ driver found with correct version @ ${MONGO_CXX_DRIVER_ROOT}.\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi - - -printf "\\n" - - -printf "Checking LLVM 4 support...\\n" -if [ ! -d $LLVM_ROOT ]; then - ln -s /usr/lib64/llvm4.0 $LLVM_ROOT \ - || exit 1 - printf " - LLVM successfully linked from /usr/lib64/llvm4.0 to ${LLVM_ROOT}\\n" -else - printf " - LLVM found @ ${LLVM_ROOT}.\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi - - -cd .. -printf "\\n" - -# Use current directory's tmp directory if noexec is enabled for /tmp -if (mount | grep "/tmp " | grep --quiet noexec); then - mkdir -p $REPO_ROOT/tmp - TMP_LOCATION="${REPO_ROOT}/tmp" - rm -rf $REPO_ROOT/tmp/* -else # noexec wasn't found - TMP_LOCATION="/tmp" -fi - -if $BUILD_CLANG8; then - export LD_LIBRARY_PATH=${OPT_LOCATION}/mpfr/lib:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH=${OPT_LOCATION}/gcc/lib64:$LD_LIBRARY_PATH - - if [ ! -d ${OPT_LOCATION}/gmp ]; then - printf "Installing gmp...\\n" - cd ${TMP_LOCATION} \ - && curl -LO https://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz && tar -xzf gmp-5.0.1.tar.gz \ - && cd gmp-5.0.1 && mkdir build && cd build \ - && ../configure --prefix=${OPT_LOCATION}/gmp \ - && make -j"${JOBS}" && make install \ - && cd ../ && rm -rf ${TMP_LOCATION}/gmp-5.0.1 ${TMP_LOCATION}/gmp-5.0.1.tar.gz \ - || exit 1 - fi - if [ ! -d ${OPT_LOCATION}/mpfr ]; then - printf "Installing mpfr...\\n" - cd ${TMP_LOCATION} \ - && curl -LO https://ftp.gnu.org/gnu/mpfr/mpfr-3.0.0.tar.gz && tar -xzf mpfr-3.0.0.tar.gz \ - && cd mpfr-3.0.0 && mkdir build && cd build \ - && ../configure --prefix=${OPT_LOCATION}/mpfr --with-gmp=${OPT_LOCATION}/gmp \ - && make -j"${JOBS}" && make install \ - && cd ../ && rm -rf ${TMP_LOCATION}/mpfr-3.0.0 ${TMP_LOCATION}/mpfr-3.0.0.tar.gz \ - || exit 1 - fi - if [ ! -d ${OPT_LOCATION}/mpc ]; then - printf "Installing mpc...\\n" - cd ${TMP_LOCATION} \ - && curl -LO https://ftp.gnu.org/gnu/mpc/mpc-1.0.1.tar.gz && tar -xzf mpc-1.0.1.tar.gz \ - && cd mpc-1.0.1 && mkdir build && cd build \ - && ../configure --prefix=${OPT_LOCATION}/mpc --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr \ - && make -j"${JOBS}" && make install \ - && cd ../ && rm -rf ${TMP_LOCATION}/mpc-1.0.1 ${TMP_LOCATION}/mpc-1.0.1.tar.gz \ - || exit 1 - fi - if [ ! -d ${OPT_LOCATION}/gcc ]; then - printf "Installing libstdc++\\n" - cd ${TMP_LOCATION} \ - && curl -LO https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ - && cd gcc-7.1.0 \ - && sed '61 s/ucontext/ucontext_t/' libgcc/config/i386/linux-unwind.h &> libgcc/config/i386/linux-unwind.h \ - && mkdir build && cd build \ - &&../configure --enable-languages=c,c++ --prefix=${OPT_LOCATION}/gcc --disable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --disable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --disable-werror --disable-multilib --with-tune=generic --enable-checking=release --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr --with-mpc=${OPT_LOCATION}/mpc --disable-libsanitizer --disable-testsuite --disable-libquadmath --disable-libitm --disable-libcc1 \ - && make -j"${JOBS}" && make install \ - && cd ../ && rm -rf ${TMP_LOCATION}/gcc-7.1.0 ${TMP_LOCATION}/gcc-7.1.0.tar.gz \ - || exit 1 - fi - +if $PIN_COMPILER; then printf "Checking Clang 8 support...\\n" if [ ! -d $CLANG8_ROOT ]; then printf "Installing Clang 8...\\n" @@ -328,6 +175,148 @@ if $BUILD_CLANG8; then if [ $? -ne 0 ]; then exit -1; fi printf "\\n" + + printf "Checking LLVM 4 installation...\\n" + if [ ! -d $OPT_LOCATION/llvm4 ]; then + printf "Installing LLVM 4...\\n" + curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz && tar -xf llvm-4.0.0.src.tar.xz \ + && cd llvm-4.0.0.src && mkdir -p build && cd build \ + && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ + && make -j"${JOBS}" install \ + || exit -1 + printf "Installed LLVM 4 @ ${OPT_LOCATION}/llvm4" + fi + cd $SRC_LOCATION + printf "Checking zlib library (${BOOST_VERSION}) installation...\\n" + if [ ! -d $OPT_LOCATION/zlib ]; then + printf "Installing zlib...\\n" + curl -LO https://www.zlib.net/zlib-1.2.11.tar.gz && tar -xf zlib-1.2.11.tar.gz \ + && cd zlib-1.2.11 && mkdir build && cd build \ + && ../configure --prefix=$OPT_LOCATION/zlib \ + && make -j"${JOBS}" install \ + || exit -1 + fi + cd $SRC_LOCATION + printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" + BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) + if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ]; then + printf "Installing Boost library...\\n" + curl -LO https://dl.bintray.com/boostorg/release/${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}.${BOOST_VERSION_PATCH}/source/boost_$BOOST_VERSION.tar.bz2 \ + && tar -xjf boost_$BOOST_VERSION.tar.bz2 \ + && cd $BOOST_ROOT \ + && ./bootstrap.sh --prefix=$BOOST_ROOT \ + && ./b2 toolset=clang cxxflags="-stdlib=libc++ -D__STRICT_ANSI__ -nostdinc++ -I${CLANG8_ROOT}/include/c++/v1" linkflags="-stdlib=libc++" link=static threading=multi --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j"${JOBS}" -sZLIB_LIBRARY_PATH="${OPT_LOCATION}/zlib/lib" -sZLIB_INCLUDE="${OPT_LOCATION}/zlib/include" -sZLIB_SOURCE="${SRC_LOCATION}/zlib-1.2.11" install \ + && cd .. \ + && rm -f boost_$BOOST_VERSION.tar.bz2 \ + && rm -rf $BOOST_LINK_LOCATION \ + && ln -s $BOOST_ROOT $BOOST_LINK_LOCATION \ + || exit 1 + printf " - Boost library successfully installed @ ${BOOST_ROOT} (Symlinked to ${BOOST_LINK_LOCATION}).\\n" + else + printf " - Boost library found with correct version @ ${BOOST_ROOT} (Symlinked to ${BOOST_LINK_LOCATION}).\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + + printf "\\n" +else + printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" + BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) + if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ]; then + printf "Installing Boost library...\\n" + curl -LO https://dl.bintray.com/boostorg/release/${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}.${BOOST_VERSION_PATCH}/source/boost_$BOOST_VERSION.tar.bz2 \ + && tar -xjf boost_$BOOST_VERSION.tar.bz2 \ + && cd $BOOST_ROOT \ + && ./bootstrap.sh --prefix=$BOOST_ROOT \ + && ./b2 -q -j"${JOBS}" install \ + && cd .. \ + && rm -f boost_$BOOST_VERSION.tar.bz2 \ + && rm -rf $BOOST_LINK_LOCATION \ + && ln -s $BOOST_ROOT $BOOST_LINK_LOCATION \ + || exit 1 + printf " - Boost library successfully installed @ ${BOOST_ROOT} (Symlinked to ${BOOST_LINK_LOCATION}).\\n" + else + printf " - Boost library found with correct version @ ${BOOST_ROOT} (Symlinked to ${BOOST_LINK_LOCATION}).\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + + + printf "\\n" + + + printf "Checking MongoDB installation...\\n" + if [ ! -d $MONGODB_ROOT ]; then + printf "Installing MongoDB into ${MONGODB_ROOT}...\\n" + curl -OL https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ + && tar -xzf mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ + && mv $SRC_LOCATION/mongodb-linux-x86_64-amazon-$MONGODB_VERSION $MONGODB_ROOT \ + && touch $MONGODB_LOG_LOCATION/mongod.log \ + && rm -f mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ + && cp -f $REPO_ROOT/scripts/mongod.conf $MONGODB_CONF \ + && mkdir -p $MONGODB_DATA_LOCATION \ + && rm -rf $MONGODB_LINK_LOCATION \ + && rm -rf $BIN_LOCATION/mongod \ + && ln -s $MONGODB_ROOT $MONGODB_LINK_LOCATION \ + && ln -s $MONGODB_LINK_LOCATION/bin/mongod $BIN_LOCATION/mongod \ + || exit 1 + printf " - MongoDB successfully installed @ ${MONGODB_ROOT}\\n" + else + printf " - MongoDB found with correct version @ ${MONGODB_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + printf "Checking MongoDB C driver installation...\\n" + if [ ! -d $MONGO_C_DRIVER_ROOT ]; then + printf "Installing MongoDB C driver...\\n" + curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/$MONGO_C_DRIVER_VERSION/mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + && tar -xzf mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + && cd mongo-c-driver-$MONGO_C_DRIVER_VERSION \ + && mkdir -p cmake-build \ + && cd cmake-build \ + && $CMAKE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DENABLE_BSON=ON -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON .. \ + && make -j"${JOBS}" \ + && make install \ + && cd ../.. \ + && rm mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + || exit 1 + printf " - MongoDB C driver successfully installed @ ${MONGO_C_DRIVER_ROOT}.\\n" + else + printf " - MongoDB C driver found with correct version @ ${MONGO_C_DRIVER_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + printf "Checking MongoDB C++ driver installation...\\n" + if [ ! -d $MONGO_CXX_DRIVER_ROOT ]; then + printf "Installing MongoDB C++ driver...\\n" + curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r$MONGO_CXX_DRIVER_VERSION.tar.gz -o mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ + && tar -xzf mongo-cxx-driver-r${MONGO_CXX_DRIVER_VERSION}.tar.gz \ + && cd mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION/build \ + && $CMAKE -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX .. \ + && make -j"${JOBS}" VERBOSE=1 \ + && make install \ + && cd ../.. \ + && rm -f mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ + || exit 1 + printf " - MongoDB C++ driver successfully installed @ ${MONGO_CXX_DRIVER_ROOT}.\\n" + else + printf " - MongoDB C++ driver found with correct version @ ${MONGO_CXX_DRIVER_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + + + printf "\\n" + + + printf "Checking LLVM 4 support...\\n" + if [ ! -d $LLVM_ROOT ]; then + ln -s /usr/lib64/llvm4.0 $LLVM_ROOT \ + || exit 1 + printf " - LLVM successfully linked from /usr/lib64/llvm4.0 to ${LLVM_ROOT}\\n" + else + printf " - LLVM found @ ${LLVM_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + + + cd .. + printf "\\n" fi function print_instructions() { diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index 5ef0d3b73fd..c3525646ec3 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -25,6 +25,8 @@ printf "Disk install: ${DISK_INSTALL}\\n" printf "Disk space total: ${DISK_TOTAL%.*}G\\n" printf "Disk space available: ${DISK_AVAIL%.*}G\\n" +PINNED_TOOLCHAIN=-DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake + if [ "${MEM_MEG}" -lt 7000 ]; then printf "Your system must have 7 or more Gigabytes of physical memory installed.\\n" printf "Exiting now.\\n" @@ -69,12 +71,18 @@ if [ "${DISK_AVAIL%.*}" -lt "${DISK_MIN}" ]; then fi # llvm-4.0 is installed into /usr/lib/llvm-4.0 -# clang is necessary for building on ubuntu +if [ ! PIN_COMPILER ]; then + llvm4_deps=(llvm-4.0 libclang-4.0-dev) +fi + DEP_ARRAY=( - git llvm-4.0 clang-4.0 libclang-4.0-dev make automake libbz2-dev libssl-dev doxygen graphviz \ - libgmp3-dev autotools-dev build-essential libicu-dev python2.7 python2.7-dev python3 python3-dev \ - autoconf libtool curl zlib1g-dev sudo ruby libusb-1.0-0-dev libcurl4-gnutls-dev pkg-config + git make automake libbz2-dev libssl-dev doxygen graphviz \ + libgmp3-dev autotools-dev build-essential libicu-dev python2.7 python2.7-dev python3 python3-dev \ + autoconf libtool curl zlib1g-dev sudo ruby libusb-1.0-0-dev libcurl4-gnutls-dev pkg-config ) + +DEP_ARRAY+=$llvm4_deps + COUNT=1 DISPLAY="" DEP="" @@ -155,161 +163,7 @@ if [ $? -ne 0 ]; then exit -1; fi printf "\\n" -printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" -BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) -if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ]; then - printf "Installing Boost library...\\n" - curl -LO https://dl.bintray.com/boostorg/release/${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}.${BOOST_VERSION_PATCH}/source/boost_$BOOST_VERSION.tar.bz2 \ - && tar -xjf boost_$BOOST_VERSION.tar.bz2 \ - && cd $BOOST_ROOT \ - && ./bootstrap.sh --prefix=$BOOST_ROOT \ - && ./b2 -q -j"${JOBS}" install \ - && cd .. \ - && rm -f boost_$BOOST_VERSION.tar.bz2 \ - && rm -rf $BOOST_LINK_LOCATION \ - && ln -s $BOOST_ROOT $BOOST_LINK_LOCATION \ - || exit 1 - printf " - Boost library successfully installed @ ${BOOST_ROOT} (Symlinked to ${BOOST_LINK_LOCATION}).\\n" -else - printf " - Boost library found with correct version @ ${BOOST_ROOT} (Symlinked to ${BOOST_LINK_LOCATION}).\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi - - -printf "\\n" - - -printf "Checking MongoDB installation...\\n" -if [ ! -d $MONGODB_ROOT ]; then - printf "Installing MongoDB into ${MONGODB_ROOT}...\\n" - curl -OL http://downloads.mongodb.org/linux/mongodb-linux-x86_64-ubuntu$OS_MAJ$OS_MIN-$MONGODB_VERSION.tgz \ - && tar -xzf mongodb-linux-x86_64-ubuntu$OS_MAJ$OS_MIN-$MONGODB_VERSION.tgz \ - && mv $SRC_LOCATION/mongodb-linux-x86_64-ubuntu$OS_MAJ$OS_MIN-$MONGODB_VERSION $MONGODB_ROOT \ - && touch $MONGODB_LOG_LOCATION/mongod.log \ - && rm -f mongodb-linux-x86_64-ubuntu$OS_MAJ$OS_MIN-$MONGODB_VERSION.tgz \ - && cp -f $REPO_ROOT/scripts/mongod.conf $MONGODB_CONF \ - && mkdir -p $MONGODB_DATA_LOCATION \ - && rm -rf $MONGODB_LINK_LOCATION \ - && rm -rf $BIN_LOCATION/mongod \ - && ln -s $MONGODB_ROOT $MONGODB_LINK_LOCATION \ - && ln -s $MONGODB_LINK_LOCATION/bin/mongod $BIN_LOCATION/mongod \ - || exit 1 - printf " - MongoDB successfully installed @ ${MONGODB_ROOT} (Symlinked to ${MONGODB_LINK_LOCATION}).\\n" -else - printf " - MongoDB found with correct version @ ${MONGODB_ROOT} (Symlinked to ${MONGODB_LINK_LOCATION}).\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi -printf "Checking MongoDB C driver installation...\\n" -if [ ! -d $MONGO_C_DRIVER_ROOT ]; then - printf "Installing MongoDB C driver...\\n" - curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/$MONGO_C_DRIVER_VERSION/mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - && tar -xzf mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - && cd mongo-c-driver-$MONGO_C_DRIVER_VERSION \ - && mkdir -p cmake-build \ - && cd cmake-build \ - && $CMAKE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DENABLE_BSON=ON -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON .. \ - && make -j"${JOBS}" \ - && make install \ - && cd ../.. \ - && rm mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - || exit 1 - printf " - MongoDB C driver successfully installed @ ${MONGO_C_DRIVER_ROOT}.\\n" -else - printf " - MongoDB C driver found with correct version @ ${MONGO_C_DRIVER_ROOT}.\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi -printf "Checking MongoDB C++ driver installation...\\n" -if [ ! -d $MONGO_CXX_DRIVER_ROOT ]; then - printf "Installing MongoDB C++ driver...\\n" - curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r$MONGO_CXX_DRIVER_VERSION.tar.gz -o mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ - && tar -xzf mongo-cxx-driver-r${MONGO_CXX_DRIVER_VERSION}.tar.gz \ - && cd mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION/build \ - && $CMAKE -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX .. \ - && make -j"${JOBS}" VERBOSE=1 \ - && make install \ - && cd ../.. \ - && rm -f mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ - || exit 1 - printf " - MongoDB C++ driver successfully installed @ ${MONGO_CXX_DRIVER_ROOT}.\\n" -else - printf " - MongoDB C++ driver found with correct version @ ${MONGO_CXX_DRIVER_ROOT}.\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi - - -printf "\\n" - - -printf "Checking LLVM 4 support...\\n" -if [ ! -d $LLVM_ROOT ]; then - ln -s /usr/lib/llvm-4.0 $LLVM_ROOT \ - || exit 1 - printf " - LLVM successfully linked from /usr/lib/llvm-4.0 to ${LLVM_ROOT}\\n" -else - printf " - LLVM found @ ${LLVM_ROOT}.\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi - - -cd .. -printf "\\n" - -# Use current directory's tmp directory if noexec is enabled for /tmp -if (mount | grep "/tmp " | grep --quiet noexec); then - mkdir -p $REPO_ROOT/tmp - TMP_LOCATION="${REPO_ROOT}/tmp" - rm -rf $REPO_ROOT/tmp/* -else # noexec wasn't found - TMP_LOCATION="/tmp" -fi - -if $BUILD_CLANG8; then - export LD_LIBRARY_PATH=${OPT_LOCATION}/mpfr/lib:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH=${OPT_LOCATION}/gcc/lib64:$LD_LIBRARY_PATH - - if [ ! -d ${OPT_LOCATION}/gmp ]; then - printf "Installing gmp...\\n" - cd ${TMP_LOCATION} \ - && curl -LO https://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz && tar -xzf gmp-5.0.1.tar.gz \ - && cd gmp-5.0.1 && mkdir build && cd build \ - && ../configure --prefix=${OPT_LOCATION}/gmp \ - && make -j"${JOBS}" && make install \ - && cd ../ && rm -rf ${TMP_LOCATION}/gmp-5.0.1 ${TMP_LOCATION}/gmp-5.0.1.tar.gz \ - || exit 1 - fi - if [ ! -d ${OPT_LOCATION}/mpfr ]; then - printf "Installing mpfr...\\n" - cd ${TMP_LOCATION} \ - && curl -LO https://ftp.gnu.org/gnu/mpfr/mpfr-3.0.0.tar.gz && tar -xzf mpfr-3.0.0.tar.gz \ - && cd mpfr-3.0.0 && mkdir build && cd build \ - && ../configure --prefix=${OPT_LOCATION}/mpfr --with-gmp=${OPT_LOCATION}/gmp \ - && make -j"${JOBS}" && make install \ - && cd ../ && rm -rf ${TMP_LOCATION}/mpfr-3.0.0 ${TMP_LOCATION}/mpfr-3.0.0.tar.gz \ - || exit 1 - fi - if [ ! -d ${OPT_LOCATION}/mpc ]; then - printf "Installing mpc...\\n" - cd ${TMP_LOCATION} \ - && curl -LO https://ftp.gnu.org/gnu/mpc/mpc-1.0.1.tar.gz && tar -xzf mpc-1.0.1.tar.gz \ - && cd mpc-1.0.1 && mkdir build && cd build \ - && ../configure --prefix=${OPT_LOCATION}/mpc --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr \ - && make -j"${JOBS}" && make install \ - && cd ../ && rm -rf ${TMP_LOCATION}/mpc-1.0.1 ${TMP_LOCATION}/mpc-1.0.1.tar.gz \ - || exit 1 - fi - if [ ! -d ${OPT_LOCATION}/gcc ]; then - printf "Installing libstdc++\\n" - cd ${TMP_LOCATION} \ - && curl -LO https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz && tar -xzf gcc-7.1.0.tar.gz \ - && cd gcc-7.1.0 \ - && sed '61 s/ucontext/ucontext_t/' libgcc/config/i386/linux-unwind.h &> libgcc/config/i386/linux-unwind.h \ - && mkdir build && cd build \ - &&../configure --enable-languages=c,c++ --prefix=${OPT_LOCATION}/gcc --disable-shared --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --disable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --disable-werror --disable-multilib --with-tune=generic --enable-checking=release --with-gmp=${OPT_LOCATION}/gmp --with-mpfr=${OPT_LOCATION}/mpfr --with-mpc=${OPT_LOCATION}/mpc --disable-libsanitizer --disable-testsuite --disable-libquadmath --disable-libitm --disable-libcc1 \ - && make -j"${JOBS}" && make install \ - && cd ../ && rm -rf ${TMP_LOCATION}/gcc-7.1.0 ${TMP_LOCATION}/gcc-7.1.0.tar.gz \ - || exit 1 - fi - +if $PIN_COMPILER; then printf "Checking Clang 8 support...\\n" if [ ! -d $CLANG8_ROOT ]; then printf "Installing Clang 8...\\n" @@ -351,8 +205,158 @@ if $BUILD_CLANG8; then if [ $? -ne 0 ]; then exit -1; fi printf "\\n" + + printf "Checking LLVM 4 installation...\\n" + if [ ! -d $OPT_LOCATION/llvm4 ]; then + printf "Installing LLVM 4...\\n" + curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz && tar -xf llvm-4.0.0.src.tar.xz \ + && cd llvm-4.0.0.src && mkdir -p build && cd build \ + && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ + && make -j"${JOBS}" install \ + || exit -1 + printf "Installed LLVM 4 @ ${OPT_LOCATION}/llvm4" + fi + + cd $SRC_LOCATION + printf "Checking zlib library (${BOOST_VERSION}) installation...\\n" + if [ ! -d $OPT_LOCATION/zlib ]; then + printf "Installing zlib...\\n" + curl -LO https://www.zlib.net/zlib-1.2.11.tar.gz && tar -xf zlib-1.2.11.tar.gz \ + && cd zlib-1.2.11 && mkdir build && cd build \ + && ../configure --prefix=$OPT_LOCATION/zlib \ + && make -j"${JOBS}" install \ + || exit -1 + fi + + cd $SRC_LOCATION + printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" + BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) + if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ]; then + printf "Installing Boost library...\\n" + curl -LO https://dl.bintray.com/boostorg/release/${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}.${BOOST_VERSION_PATCH}/source/boost_$BOOST_VERSION.tar.bz2 \ + && tar -xjf boost_$BOOST_VERSION.tar.bz2 \ + && cd $BOOST_ROOT \ + && printf "using clang : 8.0 : ${CLANG8_ROOT}/bin/clang++ : \"-D__STRICT_ANSI__ -stdlib=libc++ -std=c++17 -nostdinc++ -I${CLANG8_ROOT}/include/c++/v1\";" &> clang8.jam \ + && ./bootstrap.sh --prefix=$BOOST_ROOT \ + && ./b2 toolset=clang cxxflags="-stdlib=libc++ -D__STRICT_ANSI__ -nostdinc++ -I${CLANG8_ROOT}/include/c++/v1" linkflags="-stdlib=libc++" link=static threading=multi --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j"${JOBS}" -sZLIB_LIBRARY_PATH="${OPT_LOCATION}/zlib/lib" -sZLIB_INCLUDE="${OPT_LOCATION}/zlib/include" -sZLIB_SOURCE="${SRC_LOCATION}/zlib-1.2.11" install \ + && cd .. \ + && rm -f boost_$BOOST_VERSION.tar.bz2 \ + && rm -rf $BOOST_LINK_LOCATION \ + && ln -s $BOOST_ROOT $BOOST_LINK_LOCATION \ + || exit 1 + printf " - Boost library successfully installed @ ${BOOST_ROOT} (Symlinked to ${BOOST_LINK_LOCATION}).\\n" + else + printf " - Boost library found with correct version @ ${BOOST_ROOT} (Symlinked to ${BOOST_LINK_LOCATION}).\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + + printf "\\n" +else + printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" + BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) + if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ]; then + printf "Installing Boost library...\\n" + curl -LO https://dl.bintray.com/boostorg/release/${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}.${BOOST_VERSION_PATCH}/source/boost_$BOOST_VERSION.tar.bz2 \ + && tar -xjf boost_$BOOST_VERSION.tar.bz2 \ + && cd $BOOST_ROOT \ + && ./bootstrap.sh --prefix=$BOOST_ROOT \ + && ./b2 -q -j"${JOBS}" install \ + && cd .. \ + && rm -f boost_$BOOST_VERSION.tar.bz2 \ + && rm -rf $BOOST_LINK_LOCATION \ + && ln -s $BOOST_ROOT $BOOST_LINK_LOCATION \ + || exit 1 + printf " - Boost library successfully installed @ ${BOOST_ROOT} (Symlinked to ${BOOST_LINK_LOCATION}).\\n" + else + printf " - Boost library found with correct version @ ${BOOST_ROOT} (Symlinked to ${BOOST_LINK_LOCATION}).\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + + printf "\\n" + + printf "Checking MongoDB installation...\\n" + if [ ! -d $MONGODB_ROOT ]; then + printf "Installing MongoDB into ${MONGODB_ROOT}...\\n" + curl -OL http://downloads.mongodb.org/linux/mongodb-linux-x86_64-ubuntu$OS_MAJ$OS_MIN-$MONGODB_VERSION.tgz \ + && tar -xzf mongodb-linux-x86_64-ubuntu$OS_MAJ$OS_MIN-$MONGODB_VERSION.tgz \ + && mv $SRC_LOCATION/mongodb-linux-x86_64-ubuntu$OS_MAJ$OS_MIN-$MONGODB_VERSION $MONGODB_ROOT \ + && touch $MONGODB_LOG_LOCATION/mongod.log \ + && rm -f mongodb-linux-x86_64-ubuntu$OS_MAJ$OS_MIN-$MONGODB_VERSION.tgz \ + && cp -f $REPO_ROOT/scripts/mongod.conf $MONGODB_CONF \ + && mkdir -p $MONGODB_DATA_LOCATION \ + && rm -rf $MONGODB_LINK_LOCATION \ + && rm -rf $BIN_LOCATION/mongod \ + && ln -s $MONGODB_ROOT $MONGODB_LINK_LOCATION \ + && ln -s $MONGODB_LINK_LOCATION/bin/mongod $BIN_LOCATION/mongod \ + || exit 1 + printf " - MongoDB successfully installed @ ${MONGODB_ROOT} (Symlinked to ${MONGODB_LINK_LOCATION}).\\n" + else + printf " - MongoDB found with correct version @ ${MONGODB_ROOT} (Symlinked to ${MONGODB_LINK_LOCATION}).\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + printf "Checking MongoDB C driver installation...\\n" + if [ ! -d $MONGO_C_DRIVER_ROOT ]; then + if [ ! $BUILD_CLANG8 ]; then + PINNED_TOOLCHAIN="" + fi + printf "Installing MongoDB C driver...\\n" + curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/$MONGO_C_DRIVER_VERSION/mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + && tar -xzf mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + && cd mongo-c-driver-$MONGO_C_DRIVER_VERSION \ + && mkdir -p cmake-build \ + && cd cmake-build \ + && $CMAKE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DENABLE_BSON=ON -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON $PINNED_TOOLCHAIN .. \ + && make -j"${JOBS}" \ + && make install \ + && cd ../.. \ + && rm mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + || exit 1 + printf " - MongoDB C driver successfully installed @ ${MONGO_C_DRIVER_ROOT}.\\n" + else + printf " - MongoDB C driver found with correct version @ ${MONGO_C_DRIVER_ROOT}.\\n" + fi + + if [ $? -ne 0 ]; then exit -1; fi + printf "Checking MongoDB C++ driver installation...\\n" + if [ ! -d $MONGO_CXX_DRIVER_ROOT ]; then + if [ ! $BUILD_CLANG8 ]; then + PINNED_TOOLCHAIN="" + fi + printf "Installing MongoDB C++ driver...\\n" + curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r$MONGO_CXX_DRIVER_VERSION.tar.gz -o mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ + && tar -xzf mongo-cxx-driver-r${MONGO_CXX_DRIVER_VERSION}.tar.gz \ + && cd mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION \ + && sed '111 s/count/static_cast(count)/' src/mongocxx/options/change_stream.cpp &> src/mongocxx/options/change_stream.cpp \ + && cd build \ + && $CMAKE -DBUILD_SHARED_LIBS=OFF -DCXX_CMAKE_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX $PINNED_TOOLCHAIN .. \ + && make -j"${JOBS}" VERBOSE=1 \ + && make install \ + && cd ../.. \ + && rm -f mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ + || exit 1 + printf " - MongoDB C++ driver successfully installed @ ${MONGO_CXX_DRIVER_ROOT}.\\n" + else + printf " - MongoDB C++ driver found with correct version @ ${MONGO_CXX_DRIVER_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + + + printf "\\n" + + printf "Checking LLVM 4 support...\\n" + if [ ! -d $LLVM_ROOT ]; then + ln -s /usr/lib/llvm-4.0 $LLVM_ROOT \ + || exit 1 + printf " - LLVM successfully linked from /usr/lib/llvm-4.0 to ${LLVM_ROOT}\\n" + else + printf " - LLVM found @ ${LLVM_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi fi +cd .. +printf "\\n" + function print_instructions() { return 0 } diff --git a/scripts/pinned_toolchain.cmake b/scripts/pinned_toolchain.cmake index ee1fd65a4e1..75a906111e8 100644 --- a/scripts/pinned_toolchain.cmake +++ b/scripts/pinned_toolchain.cmake @@ -3,13 +3,20 @@ set(CMAKE_C_COMPILER_WORKS 1) set(CMAKE_CXX_COMPILER_WORKS 1) set(CMAKE_C_COMPILER ${OPT_PATH}/clang8/bin/clang) set(CMAKE_CXX_COMPILER ${OPT_PATH}/clang8/bin/clang++) + #set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES ${OPT_PATH}/gcc/include/c++/7.1.0 ${OPT_PATH}/gcc/include/c++/7.1.0/x86_64-pc-linux-gnu) -#set(CMAKE_CXX_FLAGS_INIT "-nostdinc++") -# -#if(NOT APPLE) -# set(CMAKE_CXX_STANDARD_LIBRARIES "-Wl,-L${OPT_PATH}/gcc/lib64 -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -Wl,-nostdlib -Wl,--no-whole-archive ${OPT_PATH}/gcc/lib64/libstdc++.a -Wl,--no-whole-archive ${OPT_PATH}/gcc/lib64/libsupc++.a") -#else() -# set(CMAKE_SHARED_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++ -static-libstdc++ -shared-libgcc") -# set(CMAKE_MODULE_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++ -static-libstdc++ -shared-libgcc") -# set(CMAKE_CXX_STANDARD_LIBRARIES "${OPT_PATH}/clang8/lib/libc++.a ${OPT_PATH}/clang8/lib/libc++abi.a") -#endif() +set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES ${OPT_PATH}/clang8/include/c++/v1 /usr/local/include /usr/include) +set(CMAKE_CXX_FLAGS_INIT "-nostdinc++") +set(CMAKE_EXE_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++") + +if(NOT APPLE) + set(CMAKE_SHARED_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++") + set(CMAKE_MODULE_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++") + set(CMAKE_CXX_STANDARD_LIBRARIES "-stdlib=libc++ -nostdlib++ ${OPT_PATH}/clang8/lib/libc++.a ${OPT_PATH}/clang8/lib/libc++abi.a") + #set(CMAKE_CXX_STANDARD_LIBRARIES "${OPT_PATH}/gcc/lib64/libstdc++.a ${OPT_PATH}/gcc/lib64/libsupc++.a") + #set(CMAKE_CXX_STANDARD_LIBRARIES "-static -Wl,-L${OPT_PATH}/gcc/lib64 -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -lz -Wl,-Bdynamic, -lpthread -Wl,-Bdynamic -lm -Wl,-Bdynamic -lc -Wl,-Bdynamic -lgcc -Wl,-nostdlib -Wl,--no-whole-archive ${OPT_PATH}/gcc/lib64/libstdc++.a -Wl,--no-whole-archive ${OPT_PATH}/gcc/lib64/libsupc++.a -Wl,-Bdynamic -lpthread") +else() + set(CMAKE_SHARED_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++") + set(CMAKE_MODULE_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++") + set(CMAKE_CXX_STANDARD_LIBRARIES "${OPT_PATH}/clang8/lib/libc++.a ${OPT_PATH}/clang8/lib/libc++abi.a") +endif() From 7209b24dbb5fee0ed49887edead23e9261ed82ad Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Mon, 22 Apr 2019 14:24:13 -0400 Subject: [PATCH 47/86] add cd to tmp dir --- scripts/eosio_build_amazon.sh | 3 ++- scripts/eosio_build_centos.sh | 3 ++- scripts/eosio_build_fedora.sh | 10 ++++++++-- scripts/eosio_build_ubuntu.sh | 12 ++++++------ 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/scripts/eosio_build_amazon.sh b/scripts/eosio_build_amazon.sh index af5220a658b..126e86cfeab 100755 --- a/scripts/eosio_build_amazon.sh +++ b/scripts/eosio_build_amazon.sh @@ -188,7 +188,8 @@ if $PIN_COMPILER; then printf "Checking LLVM 4 installation...\\n" if [ ! -d $OPT_LOCATION/llvm4 ]; then printf "Installing LLVM 4...\\n" - curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz && tar -xf llvm-4.0.0.src.tar.xz \ + cd $TMP_LOCATION \ + && curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz && tar -xf llvm-4.0.0.src.tar.xz \ && cd llvm-4.0.0.src && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ && make -j"${JOBS}" install \ diff --git a/scripts/eosio_build_centos.sh b/scripts/eosio_build_centos.sh index 772c553ea7f..525a6449e51 100755 --- a/scripts/eosio_build_centos.sh +++ b/scripts/eosio_build_centos.sh @@ -240,7 +240,8 @@ if $PIN_COMPILER; then printf "Checking LLVM 4 installation...\\n" if [ ! -d $OPT_LOCATION/llvm4 ]; then printf "Installing LLVM 4...\\n" - curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz && tar -xf llvm-4.0.0.src.tar.xz \ + cd $TMP_LOCATION \ + && curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz && tar -xf llvm-4.0.0.src.tar.xz \ && cd llvm-4.0.0.src && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ && make -j"${JOBS}" install \ diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index e5b41d78390..d96d24fab6f 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -47,8 +47,13 @@ DEP_ARRAY=( git sudo procps-ng which gcc gcc-c++ autoconf automake libtool make \ bzip2-devel curl bzip2 compat-openssl10 graphviz doxygen \ openssl-devel gmp-devel libstdc++-devel python2 python2-devel python3 python3-devel \ - libedit ncurses-devel swig llvm4.0 llvm4.0-devel llvm4.0-libs llvm4.0-static libcurl-devel libusb-devel + libedit ncurses-devel swig libcurl-devel libusb-devel ) + +if [ ! $PIN_COMPILER ]; then + DEP_ARRAY+=(llvm4.0 llvm4.0-devel llvm4.0-libs llvm4.0-static) +fi + COUNT=1 DISPLAY="" DEP="" @@ -179,7 +184,8 @@ if $PIN_COMPILER; then printf "Checking LLVM 4 installation...\\n" if [ ! -d $OPT_LOCATION/llvm4 ]; then printf "Installing LLVM 4...\\n" - curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz && tar -xf llvm-4.0.0.src.tar.xz \ + cd TMP_LOCATION \ + && curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz && tar -xf llvm-4.0.0.src.tar.xz \ && cd llvm-4.0.0.src && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ && make -j"${JOBS}" install \ diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index c3525646ec3..721a902e911 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -70,10 +70,6 @@ if [ "${DISK_AVAIL%.*}" -lt "${DISK_MIN}" ]; then exit 1 fi -# llvm-4.0 is installed into /usr/lib/llvm-4.0 -if [ ! PIN_COMPILER ]; then - llvm4_deps=(llvm-4.0 libclang-4.0-dev) -fi DEP_ARRAY=( git make automake libbz2-dev libssl-dev doxygen graphviz \ @@ -81,7 +77,10 @@ DEP_ARRAY=( autoconf libtool curl zlib1g-dev sudo ruby libusb-1.0-0-dev libcurl4-gnutls-dev pkg-config ) -DEP_ARRAY+=$llvm4_deps +# llvm-4.0 is installed into /usr/lib/llvm-4.0 +if [ ! PIN_COMPILER ]; then + DEP_ARRAY+=(llvm-4.0 libclang-4.0-dev) +fi COUNT=1 DISPLAY="" @@ -209,7 +208,8 @@ if $PIN_COMPILER; then printf "Checking LLVM 4 installation...\\n" if [ ! -d $OPT_LOCATION/llvm4 ]; then printf "Installing LLVM 4...\\n" - curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz && tar -xf llvm-4.0.0.src.tar.xz \ + cd $TMP_LOCATION \ + && curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz && tar -xf llvm-4.0.0.src.tar.xz \ && cd llvm-4.0.0.src && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ && make -j"${JOBS}" install \ From 5f4fafc0b891d8dc5435e59371bfe15dcd72f893 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Mon, 22 Apr 2019 14:28:02 -0400 Subject: [PATCH 48/86] forgot $ for PIN_COMPILER --- scripts/eosio_build_ubuntu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index 721a902e911..73957acff17 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -78,7 +78,7 @@ DEP_ARRAY=( ) # llvm-4.0 is installed into /usr/lib/llvm-4.0 -if [ ! PIN_COMPILER ]; then +if [ ! $PIN_COMPILER ]; then DEP_ARRAY+=(llvm-4.0 libclang-4.0-dev) fi From b793f31b9c50f2548cc04880767d5711bd9d1a1c Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Mon, 22 Apr 2019 15:32:14 -0400 Subject: [PATCH 49/86] remove depth 1 from cloning; missing commits --- scripts/eosio_build_amazon.sh | 18 +++++++++--------- scripts/eosio_build_centos.sh | 18 +++++++++--------- scripts/eosio_build_darwin.sh | 18 +++++++++--------- scripts/eosio_build_fedora.sh | 18 +++++++++--------- scripts/eosio_build_ubuntu.sh | 18 +++++++++--------- 5 files changed, 45 insertions(+), 45 deletions(-) diff --git a/scripts/eosio_build_amazon.sh b/scripts/eosio_build_amazon.sh index 126e86cfeab..2e1da6db1a3 100755 --- a/scripts/eosio_build_amazon.sh +++ b/scripts/eosio_build_amazon.sh @@ -147,26 +147,26 @@ if $PIN_COMPILER; then if [ ! -d $CLANG8_ROOT ]; then printf "Installing Clang 8...\\n" cd ${TMP_LOCATION} \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ && git checkout $PINNED_COMPILER_LLVM_COMMIT \ && cd tools \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/lld.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/lld.git \ && cd lld && git checkout $PINNED_COMPILER_LLD_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/polly.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/polly.git \ && cd polly && git checkout $PINNED_COMPILER_POLLY_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang.git clang && cd clang/tools \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang.git clang && cd clang/tools \ && git checkout $PINNED_COMPILER_CLANG_VERSION \ && mkdir extra && cd extra \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang-tools-extra.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang-tools-extra.git \ && cd clang-tools-extra && git checkout $PINNED_COMPILER_CLANG_TOOLS_EXTRA_COMMIT && cd .. \ && cd ../../../../projects \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxx.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxx.git \ && cd libcxx && git checkout $PINNED_COMPILER_LIBCXX_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxxabi.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxxabi.git \ && cd libcxxabi && git checkout $PINNED_COMPILER_LIBCXXABI_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libunwind.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libunwind.git \ && cd libunwind && git checkout $PINNED_COMPILER_LIBUNWIND_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/compiler-rt.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/compiler-rt.git \ && cd compiler-rt && git checkout $PINNED_COMPILER_COMPILER_RT_COMMIT && cd ../ \ && cd ${TMP_LOCATION}/clang8 \ && mkdir build && cd build \ diff --git a/scripts/eosio_build_centos.sh b/scripts/eosio_build_centos.sh index 525a6449e51..bf0c5c99eb3 100755 --- a/scripts/eosio_build_centos.sh +++ b/scripts/eosio_build_centos.sh @@ -199,26 +199,26 @@ if $PIN_COMPILER; then if [ ! -d $CLANG8_ROOT ]; then printf "Installing Clang 8...\\n" cd ${TMP_LOCATION} \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ && git checkout $PINNED_COMPILER_LLVM_COMMIT \ && cd tools \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/lld.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/lld.git \ && cd lld && git checkout $PINNED_COMPILER_LLD_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/polly.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/polly.git \ && cd polly && git checkout $PINNED_COMPILER_POLLY_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang.git clang && cd clang/tools \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang.git clang && cd clang/tools \ && git checkout $PINNED_COMPILER_CLANG_VERSION \ && mkdir extra && cd extra \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang-tools-extra.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang-tools-extra.git \ && cd clang-tools-extra && git checkout $PINNED_COMPILER_CLANG_TOOLS_EXTRA_COMMIT && cd .. \ && cd ../../../../projects \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxx.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxx.git \ && cd libcxx && git checkout $PINNED_COMPILER_LIBCXX_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxxabi.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxxabi.git \ && cd libcxxabi && git checkout $PINNED_COMPILER_LIBCXXABI_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libunwind.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libunwind.git \ && cd libunwind && git checkout $PINNED_COMPILER_LIBUNWIND_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/compiler-rt.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/compiler-rt.git \ && cd compiler-rt && git checkout $PINNED_COMPILER_COMPILER_RT_COMMIT && cd ../ \ && cd ${TMP_LOCATION}/clang8 \ && mkdir build && cd build \ diff --git a/scripts/eosio_build_darwin.sh b/scripts/eosio_build_darwin.sh index 4150d379f27..66883ed5267 100755 --- a/scripts/eosio_build_darwin.sh +++ b/scripts/eosio_build_darwin.sh @@ -266,26 +266,26 @@ if $PIN_COMPILER; then if [ ! -d $CLANG8_ROOT ]; then printf "Installing Clang 8...\\n" cd ${TMP_LOCATION} \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 \ && cd clang8 && git checkout $PINNED_COMPILER_LLVM_COMMIT \ && cd tools \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/lld.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/lld.git \ && cd lld && git checkout $PINNED_COMPILER_LLD_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/polly.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/polly.git \ && cd polly && git checkout $PINNED_COMPILER_POLLY_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang.git clang && cd clang/tools \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang.git clang && cd clang/tools \ && git checkout $PINNED_COMPILER_CLANG_VERSION \ && mkdir extra && cd extra \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang-tools-extra.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang-tools-extra.git \ && cd clang-tools-extra && git checkout $PINNED_COMPILER_CLANG_TOOLS_EXTRA_COMMIT && cd .. \ && cd ../../../../projects \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxx.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxx.git \ && cd libcxx && git checkout $PINNED_COMPILER_LIBCXX_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxxabi.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxxabi.git \ && cd libcxxabi && git checkout $PINNED_COMPILER_LIBCXXABI_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libunwind.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libunwind.git \ && cd libunwind && git checkout $PINNED_COMPILER_LIBUNWIND_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/compiler-rt.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/compiler-rt.git \ && cd compiler-rt && git checkout $PINNED_COMPILER_COMPILER_RT_COMMIT && cd ../ \ && cd ${TMP_LOCATION}/clang8 \ && mkdir build && cd build \ diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index d96d24fab6f..7187aa2ee22 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -143,26 +143,26 @@ if $PIN_COMPILER; then if [ ! -d $CLANG8_ROOT ]; then printf "Installing Clang 8...\\n" cd ${TMP_LOCATION} \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ && git checkout $PINNED_COMPILER_LLVM_COMMIT \ && cd tools \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/lld.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/lld.git \ && cd lld && git checkout $PINNED_COMPILER_LLD_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/polly.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/polly.git \ && cd polly && git checkout $PINNED_COMPILER_POLLY_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang.git clang && cd clang/tools \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang.git clang && cd clang/tools \ && git checkout $PINNED_COMPILER_CLANG_VERSION \ && mkdir extra && cd extra \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang-tools-extra.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang-tools-extra.git \ && cd clang-tools-extra && git checkout $PINNED_COMPILER_CLANG_TOOLS_EXTRA_COMMIT && cd .. \ && cd ../../../../projects \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxx.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxx.git \ && cd libcxx && git checkout $PINNED_COMPILER_LIBCXX_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxxabi.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxxabi.git \ && cd libcxxabi && git checkout $PINNED_COMPILER_LIBCXXABI_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libunwind.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libunwind.git \ && cd libunwind && git checkout $PINNED_COMPILER_LIBUNWIND_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/compiler-rt.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/compiler-rt.git \ && cd compiler-rt && git checkout $PINNED_COMPILER_COMPILER_RT_COMMIT && cd ../ \ && cd ${TMP_LOCATION}/clang8 \ && mkdir build && cd build \ diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index 73957acff17..e9edc6e8cba 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -167,26 +167,26 @@ if $PIN_COMPILER; then if [ ! -d $CLANG8_ROOT ]; then printf "Installing Clang 8...\\n" cd ${TMP_LOCATION} \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ && git checkout $PINNED_COMPILER_LLVM_COMMIT \ && cd tools \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/lld.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/lld.git \ && cd lld && git checkout $PINNED_COMPILER_LLD_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/polly.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/polly.git \ && cd polly && git checkout $PINNED_COMPILER_POLLY_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang.git clang && cd clang/tools \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang.git clang && cd clang/tools \ && git checkout $PINNED_COMPILER_CLANG_VERSION \ && mkdir extra && cd extra \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang-tools-extra.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/clang-tools-extra.git \ && cd clang-tools-extra && git checkout $PINNED_COMPILER_CLANG_TOOLS_EXTRA_COMMIT && cd .. \ && cd ../../../../projects \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxx.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxx.git \ && cd libcxx && git checkout $PINNED_COMPILER_LIBCXX_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxxabi.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libcxxabi.git \ && cd libcxxabi && git checkout $PINNED_COMPILER_LIBCXXABI_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libunwind.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/libunwind.git \ && cd libunwind && git checkout $PINNED_COMPILER_LIBUNWIND_COMMIT && cd ../ \ - && git clone --depth 1 --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/compiler-rt.git \ + && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/compiler-rt.git \ && cd compiler-rt && git checkout $PINNED_COMPILER_COMPILER_RT_COMMIT && cd ../ \ && cd ${TMP_LOCATION}/clang8 \ && mkdir build && cd build \ From 2734def80525d5e40f480b83f80c5b9f4aa2a1e8 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Mon, 22 Apr 2019 16:41:33 -0400 Subject: [PATCH 50/86] use SRC directory --- scripts/eosio_build_amazon.sh | 2 +- scripts/eosio_build_centos.sh | 2 +- scripts/eosio_build_fedora.sh | 2 +- scripts/eosio_build_ubuntu.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/eosio_build_amazon.sh b/scripts/eosio_build_amazon.sh index 2e1da6db1a3..10cc4577074 100755 --- a/scripts/eosio_build_amazon.sh +++ b/scripts/eosio_build_amazon.sh @@ -188,7 +188,7 @@ if $PIN_COMPILER; then printf "Checking LLVM 4 installation...\\n" if [ ! -d $OPT_LOCATION/llvm4 ]; then printf "Installing LLVM 4...\\n" - cd $TMP_LOCATION \ + cd $SRC_LOCATION \ && curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz && tar -xf llvm-4.0.0.src.tar.xz \ && cd llvm-4.0.0.src && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ diff --git a/scripts/eosio_build_centos.sh b/scripts/eosio_build_centos.sh index bf0c5c99eb3..35f536abd8e 100755 --- a/scripts/eosio_build_centos.sh +++ b/scripts/eosio_build_centos.sh @@ -240,7 +240,7 @@ if $PIN_COMPILER; then printf "Checking LLVM 4 installation...\\n" if [ ! -d $OPT_LOCATION/llvm4 ]; then printf "Installing LLVM 4...\\n" - cd $TMP_LOCATION \ + cd $SRC_LOCATION \ && curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz && tar -xf llvm-4.0.0.src.tar.xz \ && cd llvm-4.0.0.src && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index 7187aa2ee22..53c0c32d863 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -184,7 +184,7 @@ if $PIN_COMPILER; then printf "Checking LLVM 4 installation...\\n" if [ ! -d $OPT_LOCATION/llvm4 ]; then printf "Installing LLVM 4...\\n" - cd TMP_LOCATION \ + cd $SRC_LOCATION \ && curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz && tar -xf llvm-4.0.0.src.tar.xz \ && cd llvm-4.0.0.src && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index e9edc6e8cba..ada49bbc7f8 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -208,7 +208,7 @@ if $PIN_COMPILER; then printf "Checking LLVM 4 installation...\\n" if [ ! -d $OPT_LOCATION/llvm4 ]; then printf "Installing LLVM 4...\\n" - cd $TMP_LOCATION \ + cd $SRC_LOCATION \ && curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz && tar -xf llvm-4.0.0.src.tar.xz \ && cd llvm-4.0.0.src && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ From 00d665defbf705b520341a2c8d45d44e814aa6b8 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Mon, 22 Apr 2019 17:28:11 -0400 Subject: [PATCH 51/86] issues with tar --- scripts/eosio_build_amazon.sh | 3 ++- scripts/eosio_build_centos.sh | 3 ++- scripts/eosio_build_fedora.sh | 3 ++- scripts/eosio_build_ubuntu.sh | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/eosio_build_amazon.sh b/scripts/eosio_build_amazon.sh index 10cc4577074..1e29294ba2b 100755 --- a/scripts/eosio_build_amazon.sh +++ b/scripts/eosio_build_amazon.sh @@ -189,7 +189,8 @@ if $PIN_COMPILER; then if [ ! -d $OPT_LOCATION/llvm4 ]; then printf "Installing LLVM 4...\\n" cd $SRC_LOCATION \ - && curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz && tar -xf llvm-4.0.0.src.tar.xz \ + && curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz \ + && tar -xjf llvm-4.0.0.src.tar.xz \ && cd llvm-4.0.0.src && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ && make -j"${JOBS}" install \ diff --git a/scripts/eosio_build_centos.sh b/scripts/eosio_build_centos.sh index 35f536abd8e..026d56e841f 100755 --- a/scripts/eosio_build_centos.sh +++ b/scripts/eosio_build_centos.sh @@ -241,7 +241,8 @@ if $PIN_COMPILER; then if [ ! -d $OPT_LOCATION/llvm4 ]; then printf "Installing LLVM 4...\\n" cd $SRC_LOCATION \ - && curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz && tar -xf llvm-4.0.0.src.tar.xz \ + && curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz \ + && tar -xjf llvm-4.0.0.src.tar.xz \ && cd llvm-4.0.0.src && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ && make -j"${JOBS}" install \ diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index 53c0c32d863..4deb369cd08 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -185,7 +185,8 @@ if $PIN_COMPILER; then if [ ! -d $OPT_LOCATION/llvm4 ]; then printf "Installing LLVM 4...\\n" cd $SRC_LOCATION \ - && curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz && tar -xf llvm-4.0.0.src.tar.xz \ + && curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz \ + && tar -xjf llvm-4.0.0.src.tar.xz \ && cd llvm-4.0.0.src && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ && make -j"${JOBS}" install \ diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index ada49bbc7f8..4ef9e9105e9 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -209,7 +209,8 @@ if $PIN_COMPILER; then if [ ! -d $OPT_LOCATION/llvm4 ]; then printf "Installing LLVM 4...\\n" cd $SRC_LOCATION \ - && curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz && tar -xf llvm-4.0.0.src.tar.xz \ + && curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz \ + && tar -xjf llvm-4.0.0.src.tar.xz \ && cd llvm-4.0.0.src && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ && make -j"${JOBS}" install \ From 6ebb635b20a7ba4fe9e4d0f3ba445975afe3a834 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Mon, 22 Apr 2019 18:18:00 -0400 Subject: [PATCH 52/86] remove j from tar --- scripts/eosio_build_amazon.sh | 2 +- scripts/eosio_build_centos.sh | 2 +- scripts/eosio_build_fedora.sh | 2 +- scripts/eosio_build_ubuntu.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/eosio_build_amazon.sh b/scripts/eosio_build_amazon.sh index 1e29294ba2b..ab0e2bbd39c 100755 --- a/scripts/eosio_build_amazon.sh +++ b/scripts/eosio_build_amazon.sh @@ -190,7 +190,7 @@ if $PIN_COMPILER; then printf "Installing LLVM 4...\\n" cd $SRC_LOCATION \ && curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz \ - && tar -xjf llvm-4.0.0.src.tar.xz \ + && tar -xf llvm-4.0.0.src.tar.xz \ && cd llvm-4.0.0.src && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ && make -j"${JOBS}" install \ diff --git a/scripts/eosio_build_centos.sh b/scripts/eosio_build_centos.sh index 026d56e841f..87be20870d4 100755 --- a/scripts/eosio_build_centos.sh +++ b/scripts/eosio_build_centos.sh @@ -242,7 +242,7 @@ if $PIN_COMPILER; then printf "Installing LLVM 4...\\n" cd $SRC_LOCATION \ && curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz \ - && tar -xjf llvm-4.0.0.src.tar.xz \ + && tar -xf llvm-4.0.0.src.tar.xz \ && cd llvm-4.0.0.src && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ && make -j"${JOBS}" install \ diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index 4deb369cd08..cacfbdaa9fa 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -186,7 +186,7 @@ if $PIN_COMPILER; then printf "Installing LLVM 4...\\n" cd $SRC_LOCATION \ && curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz \ - && tar -xjf llvm-4.0.0.src.tar.xz \ + && tar -xf llvm-4.0.0.src.tar.xz \ && cd llvm-4.0.0.src && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ && make -j"${JOBS}" install \ diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index 4ef9e9105e9..14ce0240719 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -210,7 +210,7 @@ if $PIN_COMPILER; then printf "Installing LLVM 4...\\n" cd $SRC_LOCATION \ && curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz \ - && tar -xjf llvm-4.0.0.src.tar.xz \ + && tar -xf llvm-4.0.0.src.tar.xz \ && cd llvm-4.0.0.src && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ && make -j"${JOBS}" install \ From 88077b706eb2aae5945602bbe4b32a9987334892 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Mon, 22 Apr 2019 19:34:37 -0400 Subject: [PATCH 53/86] just going to use git for llvm4 --- scripts/eosio_build_amazon.sh | 7 ++++--- scripts/eosio_build_centos.sh | 7 ++++--- scripts/eosio_build_fedora.sh | 7 ++++--- scripts/eosio_build_ubuntu.sh | 6 +++--- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/scripts/eosio_build_amazon.sh b/scripts/eosio_build_amazon.sh index ab0e2bbd39c..97caca0fa19 100755 --- a/scripts/eosio_build_amazon.sh +++ b/scripts/eosio_build_amazon.sh @@ -189,14 +189,15 @@ if $PIN_COMPILER; then if [ ! -d $OPT_LOCATION/llvm4 ]; then printf "Installing LLVM 4...\\n" cd $SRC_LOCATION \ - && curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz \ - && tar -xf llvm-4.0.0.src.tar.xz \ - && cd llvm-4.0.0.src && mkdir -p build && cd build \ + && git clone https://github.com/llvm-mirror/llvm \ + && git checkout --single-branch --branch $LLVM_VERSION \ + && cd llvm && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ && make -j"${JOBS}" install \ || exit -1 printf "Installed LLVM 4 @ ${OPT_LOCATION}/llvm4" fi + cd $SRC_LOCATION printf "Checking zlib library (${BOOST_VERSION}) installation...\\n" if [ ! -d $OPT_LOCATION/zlib ]; then diff --git a/scripts/eosio_build_centos.sh b/scripts/eosio_build_centos.sh index 87be20870d4..918cae3b7d9 100755 --- a/scripts/eosio_build_centos.sh +++ b/scripts/eosio_build_centos.sh @@ -241,14 +241,15 @@ if $PIN_COMPILER; then if [ ! -d $OPT_LOCATION/llvm4 ]; then printf "Installing LLVM 4...\\n" cd $SRC_LOCATION \ - && curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz \ - && tar -xf llvm-4.0.0.src.tar.xz \ - && cd llvm-4.0.0.src && mkdir -p build && cd build \ + && git clone https://github.com/llvm-mirror/llvm \ + && git checkout --single-branch --branch $LLVM_VERSION \ + && cd llvm && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ && make -j"${JOBS}" install \ || exit -1 printf "Installed LLVM 4 @ ${OPT_LOCATION}/llvm4" fi + cd $SRC_LOCATION printf "Checking zlib library (${BOOST_VERSION}) installation...\\n" if [ ! -d $OPT_LOCATION/zlib ]; then diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index cacfbdaa9fa..660a86af445 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -185,14 +185,15 @@ if $PIN_COMPILER; then if [ ! -d $OPT_LOCATION/llvm4 ]; then printf "Installing LLVM 4...\\n" cd $SRC_LOCATION \ - && curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz \ - && tar -xf llvm-4.0.0.src.tar.xz \ - && cd llvm-4.0.0.src && mkdir -p build && cd build \ + && git clone https://github.com/llvm-mirror/llvm \ + && git checkout --single-branch --branch $LLVM_VERSION \ + && cd llvm && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ && make -j"${JOBS}" install \ || exit -1 printf "Installed LLVM 4 @ ${OPT_LOCATION}/llvm4" fi + cd $SRC_LOCATION printf "Checking zlib library (${BOOST_VERSION}) installation...\\n" if [ ! -d $OPT_LOCATION/zlib ]; then diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index 14ce0240719..1e231a1888c 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -209,9 +209,9 @@ if $PIN_COMPILER; then if [ ! -d $OPT_LOCATION/llvm4 ]; then printf "Installing LLVM 4...\\n" cd $SRC_LOCATION \ - && curl -LO http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz \ - && tar -xf llvm-4.0.0.src.tar.xz \ - && cd llvm-4.0.0.src && mkdir -p build && cd build \ + && git clone https://github.com/llvm-mirror/llvm \ + && git checkout --single-branch --branch $LLVM_VERSION \ + && cd llvm && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ && make -j"${JOBS}" install \ || exit -1 From cdb47a59b3a6dd267d639e857ff516596b866dc8 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Mon, 22 Apr 2019 19:36:11 -0400 Subject: [PATCH 54/86] mistake keystrokes --- scripts/eosio_build_ubuntu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index 1e231a1888c..9aed50942a9 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -64,7 +64,7 @@ case "${OS_NAME}" in ;; esac -if [ "${DISK_AVAIL%.*}" -lt "${DISK_MIN}" ]; then +if [ "${DISK_AVAIL}" -lt "${DISK_MIN}" ]; then printf "You must have at least %sGB of available storage to install EOSIO.\\n" "${DISK_MIN}" printf "Exiting now.\\n" exit 1 From b34a6bd743d41973e0cc4baf1d681c09114b94cb Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Mon, 22 Apr 2019 20:19:44 -0400 Subject: [PATCH 55/86] only build host for clang and fix dumb mistake --- scripts/eosio_build_amazon.sh | 6 +++--- scripts/eosio_build_centos.sh | 6 +++--- scripts/eosio_build_fedora.sh | 6 +++--- scripts/eosio_build_ubuntu.sh | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/scripts/eosio_build_amazon.sh b/scripts/eosio_build_amazon.sh index 97caca0fa19..9c2f777543d 100755 --- a/scripts/eosio_build_amazon.sh +++ b/scripts/eosio_build_amazon.sh @@ -170,7 +170,7 @@ if $PIN_COMPILER; then && cd compiler-rt && git checkout $PINNED_COMPILER_COMPILER_RT_COMMIT && cd ../ \ && cd ${TMP_LOCATION}/clang8 \ && mkdir build && cd build \ - && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ + && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release .. \ && make -j"${JOBS}" \ && make install \ && rm -rf ${TMP_LOCATION}/clang8 \ @@ -189,9 +189,9 @@ if $PIN_COMPILER; then if [ ! -d $OPT_LOCATION/llvm4 ]; then printf "Installing LLVM 4...\\n" cd $SRC_LOCATION \ - && git clone https://github.com/llvm-mirror/llvm \ + && git clone https://github.com/llvm-mirror/llvm && cd llvm \ && git checkout --single-branch --branch $LLVM_VERSION \ - && cd llvm && mkdir -p build && cd build \ + && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ && make -j"${JOBS}" install \ || exit -1 diff --git a/scripts/eosio_build_centos.sh b/scripts/eosio_build_centos.sh index 918cae3b7d9..474926b41e5 100755 --- a/scripts/eosio_build_centos.sh +++ b/scripts/eosio_build_centos.sh @@ -222,7 +222,7 @@ if $PIN_COMPILER; then && cd compiler-rt && git checkout $PINNED_COMPILER_COMPILER_RT_COMMIT && cd ../ \ && cd ${TMP_LOCATION}/clang8 \ && mkdir build && cd build \ - && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ + && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release .. \ && make -j"${JOBS}" \ && make install \ && rm -rf ${TMP_LOCATION}/clang8 \ @@ -241,9 +241,9 @@ if $PIN_COMPILER; then if [ ! -d $OPT_LOCATION/llvm4 ]; then printf "Installing LLVM 4...\\n" cd $SRC_LOCATION \ - && git clone https://github.com/llvm-mirror/llvm \ + && git clone https://github.com/llvm-mirror/llvm && cd llvm \ && git checkout --single-branch --branch $LLVM_VERSION \ - && cd llvm && mkdir -p build && cd build \ + && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ && make -j"${JOBS}" install \ || exit -1 diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index 660a86af445..8cc16884f69 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -166,7 +166,7 @@ if $PIN_COMPILER; then && cd compiler-rt && git checkout $PINNED_COMPILER_COMPILER_RT_COMMIT && cd ../ \ && cd ${TMP_LOCATION}/clang8 \ && mkdir build && cd build \ - && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ + && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release .. \ && make -j"${JOBS}" \ && make install \ && rm -rf ${TMP_LOCATION}/clang8 \ @@ -185,9 +185,9 @@ if $PIN_COMPILER; then if [ ! -d $OPT_LOCATION/llvm4 ]; then printf "Installing LLVM 4...\\n" cd $SRC_LOCATION \ - && git clone https://github.com/llvm-mirror/llvm \ + && git clone https://github.com/llvm-mirror/llvm && cd llvm \ && git checkout --single-branch --branch $LLVM_VERSION \ - && cd llvm && mkdir -p build && cd build \ + && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ && make -j"${JOBS}" install \ || exit -1 diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index 9aed50942a9..f932139f084 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -64,7 +64,7 @@ case "${OS_NAME}" in ;; esac -if [ "${DISK_AVAIL}" -lt "${DISK_MIN}" ]; then +if [ "${DISK_AVAIL%.*}" -lt "${DISK_MIN}" ]; then printf "You must have at least %sGB of available storage to install EOSIO.\\n" "${DISK_MIN}" printf "Exiting now.\\n" exit 1 @@ -190,7 +190,7 @@ if $PIN_COMPILER; then && cd compiler-rt && git checkout $PINNED_COMPILER_COMPILER_RT_COMMIT && cd ../ \ && cd ${TMP_LOCATION}/clang8 \ && mkdir build && cd build \ - && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. \ + && $CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="${CLANG8_ROOT}" -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release .. \ && make -j"${JOBS}" \ && make install \ && rm -rf ${TMP_LOCATION}/clang8 \ @@ -209,9 +209,9 @@ if $PIN_COMPILER; then if [ ! -d $OPT_LOCATION/llvm4 ]; then printf "Installing LLVM 4...\\n" cd $SRC_LOCATION \ - && git clone https://github.com/llvm-mirror/llvm \ + && git clone https://github.com/llvm-mirror/llvm && and cd llvm \ && git checkout --single-branch --branch $LLVM_VERSION \ - && cd llvm && mkdir -p build && cd build \ + && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ && make -j"${JOBS}" install \ || exit -1 From 1729f49b6f5a3b58ffd7ff8bd8abf822f7b6d773 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Mon, 22 Apr 2019 20:23:28 -0400 Subject: [PATCH 56/86] long day --- scripts/eosio_build_ubuntu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index f932139f084..233ea18ddc9 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -209,7 +209,7 @@ if $PIN_COMPILER; then if [ ! -d $OPT_LOCATION/llvm4 ]; then printf "Installing LLVM 4...\\n" cd $SRC_LOCATION \ - && git clone https://github.com/llvm-mirror/llvm && and cd llvm \ + && git clone https://github.com/llvm-mirror/llvm && cd llvm \ && git checkout --single-branch --branch $LLVM_VERSION \ && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ From 920d6aa7572a7a09f69175fde4f1357a0fc35cb7 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Mon, 22 Apr 2019 20:26:04 -0400 Subject: [PATCH 57/86] still a long day --- scripts/eosio_build_amazon.sh | 3 +-- scripts/eosio_build_centos.sh | 3 +-- scripts/eosio_build_fedora.sh | 3 +-- scripts/eosio_build_ubuntu.sh | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/scripts/eosio_build_amazon.sh b/scripts/eosio_build_amazon.sh index 9c2f777543d..439da8893d2 100755 --- a/scripts/eosio_build_amazon.sh +++ b/scripts/eosio_build_amazon.sh @@ -189,8 +189,7 @@ if $PIN_COMPILER; then if [ ! -d $OPT_LOCATION/llvm4 ]; then printf "Installing LLVM 4...\\n" cd $SRC_LOCATION \ - && git clone https://github.com/llvm-mirror/llvm && cd llvm \ - && git checkout --single-branch --branch $LLVM_VERSION \ + && git clone https://github.com/llvm-mirror/llvm --single-branch --branch $LLVM_VERSION && cd llvm \ && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ && make -j"${JOBS}" install \ diff --git a/scripts/eosio_build_centos.sh b/scripts/eosio_build_centos.sh index 474926b41e5..fb17fdbfc9b 100755 --- a/scripts/eosio_build_centos.sh +++ b/scripts/eosio_build_centos.sh @@ -241,8 +241,7 @@ if $PIN_COMPILER; then if [ ! -d $OPT_LOCATION/llvm4 ]; then printf "Installing LLVM 4...\\n" cd $SRC_LOCATION \ - && git clone https://github.com/llvm-mirror/llvm && cd llvm \ - && git checkout --single-branch --branch $LLVM_VERSION \ + && git clone https://github.com/llvm-mirror/llvm --single-branch --branch $LLVM_VERSION && cd llvm \ && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ && make -j"${JOBS}" install \ diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index 8cc16884f69..366f56bba01 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -185,8 +185,7 @@ if $PIN_COMPILER; then if [ ! -d $OPT_LOCATION/llvm4 ]; then printf "Installing LLVM 4...\\n" cd $SRC_LOCATION \ - && git clone https://github.com/llvm-mirror/llvm && cd llvm \ - && git checkout --single-branch --branch $LLVM_VERSION \ + && git clone https://github.com/llvm-mirror/llvm --single-branch --branch $LLVM_VERSION && cd llvm \ && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ && make -j"${JOBS}" install \ diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index 233ea18ddc9..f63c39dd408 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -209,8 +209,7 @@ if $PIN_COMPILER; then if [ ! -d $OPT_LOCATION/llvm4 ]; then printf "Installing LLVM 4...\\n" cd $SRC_LOCATION \ - && git clone https://github.com/llvm-mirror/llvm && cd llvm \ - && git checkout --single-branch --branch $LLVM_VERSION \ + && git clone https://github.com/llvm-mirror/llvm --single-branch --branch $LLVM_VERSION && cd llvm \ && mkdir -p build && cd build \ && $CMAKE -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/llvm4 -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake .. \ && make -j"${JOBS}" install \ From 033187c84c4333dc88f725aab53834439c4c4aa0 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Mon, 22 Apr 2019 21:39:29 -0400 Subject: [PATCH 58/86] clean up toolchain file --- scripts/pinned_toolchain.cmake | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/scripts/pinned_toolchain.cmake b/scripts/pinned_toolchain.cmake index 75a906111e8..cdb517c5e1f 100644 --- a/scripts/pinned_toolchain.cmake +++ b/scripts/pinned_toolchain.cmake @@ -4,19 +4,12 @@ set(CMAKE_CXX_COMPILER_WORKS 1) set(CMAKE_C_COMPILER ${OPT_PATH}/clang8/bin/clang) set(CMAKE_CXX_COMPILER ${OPT_PATH}/clang8/bin/clang++) -#set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES ${OPT_PATH}/gcc/include/c++/7.1.0 ${OPT_PATH}/gcc/include/c++/7.1.0/x86_64-pc-linux-gnu) set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES ${OPT_PATH}/clang8/include/c++/v1 /usr/local/include /usr/include) + set(CMAKE_CXX_FLAGS_INIT "-nostdinc++") + set(CMAKE_EXE_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++") +set(CMAKE_SHARED_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++") +set(CMAKE_MODULE_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++") -if(NOT APPLE) - set(CMAKE_SHARED_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++") - set(CMAKE_MODULE_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++") - set(CMAKE_CXX_STANDARD_LIBRARIES "-stdlib=libc++ -nostdlib++ ${OPT_PATH}/clang8/lib/libc++.a ${OPT_PATH}/clang8/lib/libc++abi.a") - #set(CMAKE_CXX_STANDARD_LIBRARIES "${OPT_PATH}/gcc/lib64/libstdc++.a ${OPT_PATH}/gcc/lib64/libsupc++.a") - #set(CMAKE_CXX_STANDARD_LIBRARIES "-static -Wl,-L${OPT_PATH}/gcc/lib64 -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -lz -Wl,-Bdynamic, -lpthread -Wl,-Bdynamic -lm -Wl,-Bdynamic -lc -Wl,-Bdynamic -lgcc -Wl,-nostdlib -Wl,--no-whole-archive ${OPT_PATH}/gcc/lib64/libstdc++.a -Wl,--no-whole-archive ${OPT_PATH}/gcc/lib64/libsupc++.a -Wl,-Bdynamic -lpthread") -else() - set(CMAKE_SHARED_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++") - set(CMAKE_MODULE_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++") - set(CMAKE_CXX_STANDARD_LIBRARIES "${OPT_PATH}/clang8/lib/libc++.a ${OPT_PATH}/clang8/lib/libc++abi.a") -endif() +set(CMAKE_CXX_STANDARD_LIBRARIES "${OPT_PATH}/clang8/lib/libc++.a ${OPT_PATH}/clang8/lib/libc++abi.a") From 1a54110b3874fff10c997e7da4b231fe0d7b23b7 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Tue, 23 Apr 2019 11:28:03 -0400 Subject: [PATCH 59/86] add force build flag and build mongo flag --- scripts/eosio_build.sh | 13 ++- scripts/eosio_build_amazon.sh | 133 ++++++++++++++++--------------- scripts/eosio_build_centos.sh | 134 ++++++++++++++++--------------- scripts/eosio_build_darwin.sh | 120 ++++++++++++++-------------- scripts/eosio_build_fedora.sh | 136 ++++++++++++++++---------------- scripts/eosio_build_ubuntu.sh | 144 +++++++++++++++++----------------- 6 files changed, 344 insertions(+), 336 deletions(-) diff --git a/scripts/eosio_build.sh b/scripts/eosio_build.sh index 322f7aa5913..3cd8ec6a7d5 100755 --- a/scripts/eosio_build.sh +++ b/scripts/eosio_build.sh @@ -73,12 +73,15 @@ Usage: $0 OPTION... -d Generate Doxygen -s NAME Core Symbol Name <1-7 characters> (default: SYS) -y Noninteractive mode (this script) + -P Build with pinned clang 8 and libcxx + -f Force rebuilding of dependencies + -m Build MongoDB dependencies EOT exit 1 } if [ $# -ne 0 ]; then - while getopts ":cdo:s:p:b:Phy" opt; do + while getopts ":cdo:s:p:b:mfPhy" opt; do case "${opt}" in o ) options=( "Debug" "Release" "RelWithDebInfo" "MinSizeRel" ) @@ -121,6 +124,12 @@ if [ $# -ne 0 ]; then y) NONINTERACTIVE=1 ;; + f) + FORCE_BUILD=1 + ;; + m) + BUILD_MONGO=1 + ;; \? ) printf "\\nInvalid Option: %s\\n" "-${OPTARG}" 1>&2 usage @@ -192,6 +201,8 @@ export DOXYGEN_VERSION=1_8_14 export DOXYGEN_ROOT=${SRC_LOCATION}/doxygen-${DOXYGEN_VERSION} export TINI_VERSION=0.18.0 export DISK_MIN=5 +export FORCE_BUILD=$FORCE_BUILD +export BUILD_MONGO=$BUILD_MONGO mkdir -p $BUILD_DIR sed -e "s~@~$OPT_LOCATION~g" $SCRIPT_DIR/pinned_toolchain.cmake &> $BUILD_DIR/pinned_toolchain.cmake diff --git a/scripts/eosio_build_amazon.sh b/scripts/eosio_build_amazon.sh index 439da8893d2..935764a3149 100755 --- a/scripts/eosio_build_amazon.sh +++ b/scripts/eosio_build_amazon.sh @@ -122,7 +122,7 @@ printf "\\n" printf "Checking CMAKE installation...\\n" -if [ ! -e $CMAKE ]; then +if [ ! -e $CMAKE ] || [ $FORCE_BUILD ]; then printf "Installing CMAKE...\\n" curl -LO https://cmake.org/files/v$CMAKE_VERSION_MAJOR.$CMAKE_VERSION_MINOR/cmake-$CMAKE_VERSION.tar.gz \ && tar -xzf cmake-$CMAKE_VERSION.tar.gz \ @@ -144,7 +144,7 @@ printf "\\n" if $PIN_COMPILER; then printf "Checking Clang 8 support...\\n" - if [ ! -d $CLANG8_ROOT ]; then + if [ ! -d $CLANG8_ROOT ] || [ $FORCE_BUILD ]; then printf "Installing Clang 8...\\n" cd ${TMP_LOCATION} \ && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ @@ -186,7 +186,7 @@ if $PIN_COMPILER; then printf "\\n" printf "Checking LLVM 4 installation...\\n" - if [ ! -d $OPT_LOCATION/llvm4 ]; then + if [ ! -d $OPT_LOCATION/llvm4 ] || [ $FORCE_BUILD ]; then printf "Installing LLVM 4...\\n" cd $SRC_LOCATION \ && git clone https://github.com/llvm-mirror/llvm --single-branch --branch $LLVM_VERSION && cd llvm \ @@ -199,7 +199,7 @@ if $PIN_COMPILER; then cd $SRC_LOCATION printf "Checking zlib library (${BOOST_VERSION}) installation...\\n" - if [ ! -d $OPT_LOCATION/zlib ]; then + if [ ! -d $OPT_LOCATION/zlib ] || [ $FORCE_BUILD ]; then printf "Installing zlib...\\n" curl -LO https://www.zlib.net/zlib-1.2.11.tar.gz && tar -xf zlib-1.2.11.tar.gz \ && cd zlib-1.2.11 && mkdir build && cd build \ @@ -210,7 +210,7 @@ if $PIN_COMPILER; then cd $SRC_LOCATION printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) - if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ]; then + if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ] || [ $FORCE_BUILD ]; then printf "Installing Boost library...\\n" curl -LO https://dl.bintray.com/boostorg/release/${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}.${BOOST_VERSION_PATCH}/source/boost_$BOOST_VERSION.tar.bz2 \ && tar -xjf boost_$BOOST_VERSION.tar.bz2 \ @@ -232,7 +232,7 @@ if $PIN_COMPILER; then else printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) - if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ]; then + if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ] || [ $FORCE_BUILD ]; then printf "Installing Boost library...\\n" curl -LO https://dl.bintray.com/boostorg/release/${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}.${BOOST_VERSION_PATCH}/source/boost_$BOOST_VERSION.tar.bz2 \ && tar -xjf boost_$BOOST_VERSION.tar.bz2 \ @@ -253,70 +253,69 @@ else printf "\\n" - - printf "Checking MongoDB installation...\\n" - if [ ! -d $MONGODB_ROOT ]; then - printf "Installing MongoDB into ${MONGODB_ROOT}...\\n" - curl -OL https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ - && tar -xzf mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ - && mv $SRC_LOCATION/mongodb-linux-x86_64-amazon-$MONGODB_VERSION $MONGODB_ROOT \ - && touch $MONGODB_LOG_LOCATION/mongod.log \ - && rm -f mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ - && cp -f $REPO_ROOT/scripts/mongod.conf $MONGODB_CONF \ - && mkdir -p $MONGODB_DATA_LOCATION \ - && rm -rf $MONGODB_LINK_LOCATION \ - && rm -rf $BIN_LOCATION/mongod \ - && ln -s $MONGODB_ROOT $MONGODB_LINK_LOCATION \ - && ln -s $MONGODB_LINK_LOCATION/bin/mongod $BIN_LOCATION/mongod \ - || exit 1 - printf " - MongoDB successfully installed @ ${MONGODB_ROOT} (Symlinked to ${MONGODB_LINK_LOCATION}).\\n" - else - printf " - MongoDB found with correct version @ ${MONGODB_ROOT} (Symlinked to ${MONGODB_LINK_LOCATION}).\\n" + if [ $BUILD_MONGO ]; then + printf "Checking MongoDB installation...\\n" + if [ ! -d $MONGODB_ROOT ] || [ $FORCE_BUILD ]; then + printf "Installing MongoDB into ${MONGODB_ROOT}...\\n" + curl -OL https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ + && tar -xzf mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ + && mv $SRC_LOCATION/mongodb-linux-x86_64-amazon-$MONGODB_VERSION $MONGODB_ROOT \ + && touch $MONGODB_LOG_LOCATION/mongod.log \ + && rm -f mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ + && cp -f $REPO_ROOT/scripts/mongod.conf $MONGODB_CONF \ + && mkdir -p $MONGODB_DATA_LOCATION \ + && rm -rf $MONGODB_LINK_LOCATION \ + && rm -rf $BIN_LOCATION/mongod \ + && ln -s $MONGODB_ROOT $MONGODB_LINK_LOCATION \ + && ln -s $MONGODB_LINK_LOCATION/bin/mongod $BIN_LOCATION/mongod \ + || exit 1 + printf " - MongoDB successfully installed @ ${MONGODB_ROOT} (Symlinked to ${MONGODB_LINK_LOCATION}).\\n" + else + printf " - MongoDB found with correct version @ ${MONGODB_ROOT} (Symlinked to ${MONGODB_LINK_LOCATION}).\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + printf "Checking MongoDB C driver installation...\\n" + if [ ! -d $MONGO_C_DRIVER_ROOT ] || [ $FORCE_BUILD ]; then + printf "Installing MongoDB C driver...\\n" + curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/$MONGO_C_DRIVER_VERSION/mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + && tar -xzf mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + && cd mongo-c-driver-$MONGO_C_DRIVER_VERSION \ + && mkdir -p cmake-build \ + && cd cmake-build \ + && $CMAKE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DENABLE_BSON=ON -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON .. \ + && make -j"${JOBS}" \ + && make install \ + && cd ../.. \ + && rm mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + || exit 1 + printf " - MongoDB C driver successfully installed @ ${MONGO_C_DRIVER_ROOT}.\\n" + else + printf " - MongoDB C driver found with correct version @ ${MONGO_C_DRIVER_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + printf "Checking MongoDB C++ driver installation...\\n" + if [ ! -d $MONGO_CXX_DRIVER_ROOT ] || [ $FORCE_BUILD ]; then + printf "Installing MongoDB C++ driver...\\n" + curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r$MONGO_CXX_DRIVER_VERSION.tar.gz -o mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ + && tar -xzf mongo-cxx-driver-r${MONGO_CXX_DRIVER_VERSION}.tar.gz \ + && cd mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION/build \ + && $CMAKE -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX .. \ + && make -j"${JOBS}" VERBOSE=1 \ + && make install \ + && cd ../.. \ + && rm -f mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ + || exit 1 + printf " - MongoDB C++ driver successfully installed @ ${MONGO_CXX_DRIVER_ROOT}.\\n" + else + printf " - MongoDB C++ driver found with correct version @ ${MONGO_CXX_DRIVER_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + + printf "\\n" fi - if [ $? -ne 0 ]; then exit -1; fi - printf "Checking MongoDB C driver installation...\\n" - if [ ! -d $MONGO_C_DRIVER_ROOT ]; then - printf "Installing MongoDB C driver...\\n" - curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/$MONGO_C_DRIVER_VERSION/mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - && tar -xzf mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - && cd mongo-c-driver-$MONGO_C_DRIVER_VERSION \ - && mkdir -p cmake-build \ - && cd cmake-build \ - && $CMAKE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DENABLE_BSON=ON -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON .. \ - && make -j"${JOBS}" \ - && make install \ - && cd ../.. \ - && rm mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - || exit 1 - printf " - MongoDB C driver successfully installed @ ${MONGO_C_DRIVER_ROOT}.\\n" - else - printf " - MongoDB C driver found with correct version @ ${MONGO_C_DRIVER_ROOT}.\\n" - fi - if [ $? -ne 0 ]; then exit -1; fi - printf "Checking MongoDB C++ driver installation...\\n" - if [ ! -d $MONGO_CXX_DRIVER_ROOT ]; then - printf "Installing MongoDB C++ driver...\\n" - curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r$MONGO_CXX_DRIVER_VERSION.tar.gz -o mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ - && tar -xzf mongo-cxx-driver-r${MONGO_CXX_DRIVER_VERSION}.tar.gz \ - && cd mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION/build \ - && $CMAKE -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX .. \ - && make -j"${JOBS}" VERBOSE=1 \ - && make install \ - && cd ../.. \ - && rm -f mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ - || exit 1 - printf " - MongoDB C++ driver successfully installed @ ${MONGO_CXX_DRIVER_ROOT}.\\n" - else - printf " - MongoDB C++ driver found with correct version @ ${MONGO_CXX_DRIVER_ROOT}.\\n" - fi - if [ $? -ne 0 ]; then exit -1; fi - - - printf "\\n" - printf "Checking LLVM 4 support...\\n" - if [ ! -d $LLVM_ROOT ]; then + if [ ! -d $LLVM_ROOT ] || [ $FORCE_BUILD ]; then printf "Installing LLVM 4...\\n" cd ../opt \ && git clone --depth 1 --single-branch --branch $LLVM_VERSION https://github.com/llvm-mirror/llvm.git llvm && cd llvm \ diff --git a/scripts/eosio_build_centos.sh b/scripts/eosio_build_centos.sh index fb17fdbfc9b..754b6164ad8 100755 --- a/scripts/eosio_build_centos.sh +++ b/scripts/eosio_build_centos.sh @@ -172,7 +172,7 @@ fi printf "\\n" printf "Checking CMAKE installation...\\n" -if [ ! -e $CMAKE ]; then +if [ ! -e $CMAKE ] || [ $FORCE_BUILD ]; then printf "Installing CMAKE...\\n" curl -LO https://cmake.org/files/v$CMAKE_VERSION_MAJOR.$CMAKE_VERSION_MINOR/cmake-$CMAKE_VERSION.tar.gz \ && tar -xzf cmake-$CMAKE_VERSION.tar.gz \ @@ -196,7 +196,7 @@ printf "\\n" export CPATH="${CPATH}:${PYTHON3PATH}/root/usr/include/python3.6m" # m on the end causes problems with boost finding python3 if $PIN_COMPILER; then printf "Checking Clang 8 support...\\n" - if [ ! -d $CLANG8_ROOT ]; then + if [ ! -d $CLANG8_ROOT ] || [ $FORCE_BUILD ]; then printf "Installing Clang 8...\\n" cd ${TMP_LOCATION} \ && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ @@ -238,7 +238,7 @@ if $PIN_COMPILER; then printf "\\n" printf "Checking LLVM 4 installation...\\n" - if [ ! -d $OPT_LOCATION/llvm4 ]; then + if [ ! -d $OPT_LOCATION/llvm4 ] || [ $FORCE_BUILD ]; then printf "Installing LLVM 4...\\n" cd $SRC_LOCATION \ && git clone https://github.com/llvm-mirror/llvm --single-branch --branch $LLVM_VERSION && cd llvm \ @@ -251,7 +251,7 @@ if $PIN_COMPILER; then cd $SRC_LOCATION printf "Checking zlib library (${BOOST_VERSION}) installation...\\n" - if [ ! -d $OPT_LOCATION/zlib ]; then + if [ ! -d $OPT_LOCATION/zlib ] || [ $FORCE_BUILD ]; then printf "Installing zlib...\\n" curl -LO https://www.zlib.net/zlib-1.2.11.tar.gz && tar -xf zlib-1.2.11.tar.gz \ && cd zlib-1.2.11 && mkdir build && cd build \ @@ -262,7 +262,7 @@ if $PIN_COMPILER; then cd $SRC_LOCATION printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) - if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ]; then + if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ] || [ $FORCE_BUILD ]; then printf "Installing Boost library...\\n" curl -LO https://dl.bintray.com/boostorg/release/${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}.${BOOST_VERSION_PATCH}/source/boost_$BOOST_VERSION.tar.bz2 \ && tar -xjf boost_$BOOST_VERSION.tar.bz2 \ @@ -284,7 +284,7 @@ if $PIN_COMPILER; then else printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) - if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ]; then + if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ] || [ $FORCE_BUILD ]; then printf "Installing Boost library...\\n" curl -LO https://dl.bintray.com/boostorg/release/${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}.${BOOST_VERSION_PATCH}/source/boost_$BOOST_VERSION.tar.bz2 \ && tar -xjf boost_$BOOST_VERSION.tar.bz2 \ @@ -305,70 +305,69 @@ else printf "\\n" - - printf "Checking MongoDB installation...\\n" - if [ ! -d $MONGODB_ROOT ]; then - printf "Installing MongoDB into ${MONGODB_ROOT}...\\n" - curl -OL https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ - && tar -xzf mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ - && mv $SRC_LOCATION/mongodb-linux-x86_64-amazon-$MONGODB_VERSION $MONGODB_ROOT \ - && touch $MONGODB_LOG_LOCATION/mongod.log \ - && rm -f mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ - && cp -f $REPO_ROOT/scripts/mongod.conf $MONGODB_CONF \ - && mkdir -p $MONGODB_DATA_LOCATION \ - && rm -rf $MONGODB_LINK_LOCATION \ - && rm -rf $BIN_LOCATION/mongod \ - && ln -s $MONGODB_ROOT $MONGODB_LINK_LOCATION \ - && ln -s $MONGODB_LINK_LOCATION/bin/mongod $BIN_LOCATION/mongod \ - || exit 1 - printf " - MongoDB successfully installed @ ${MONGODB_ROOT} (Symlinked to ${MONGODB_LINK_LOCATION}).\\n" - else - printf " - MongoDB found with correct version @ ${MONGODB_ROOT} (Symlinked to ${MONGODB_LINK_LOCATION}).\\n" - fi - if [ $? -ne 0 ]; then exit -1; fi - printf "Checking MongoDB C driver installation...\\n" - if [ ! -d $MONGO_C_DRIVER_ROOT ]; then - printf "Installing MongoDB C driver...\\n" - curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/$MONGO_C_DRIVER_VERSION/mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - && tar -xzf mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - && cd mongo-c-driver-$MONGO_C_DRIVER_VERSION \ - && mkdir -p cmake-build \ - && cd cmake-build \ - && $CMAKE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DENABLE_BSON=ON -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON .. \ - && make -j"${JOBS}" \ - && make install \ - && cd ../.. \ - && rm mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - || exit 1 - printf " - MongoDB C driver successfully installed @ ${MONGO_C_DRIVER_ROOT}.\\n" - else - printf " - MongoDB C driver found with correct version @ ${MONGO_C_DRIVER_ROOT}.\\n" - fi - if [ $? -ne 0 ]; then exit -1; fi - printf "Checking MongoDB C++ driver installation...\\n" - if [ ! -d $MONGO_CXX_DRIVER_ROOT ]; then - printf "Installing MongoDB C++ driver...\\n" - curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r$MONGO_CXX_DRIVER_VERSION.tar.gz -o mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ - && tar -xzf mongo-cxx-driver-r${MONGO_CXX_DRIVER_VERSION}.tar.gz \ - && cd mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION/build \ - && $CMAKE -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX .. \ - && make -j"${JOBS}" VERBOSE=1 \ - && make install \ - && cd ../.. \ - && rm -f mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ - || exit 1 - printf " - MongoDB C++ driver successfully installed @ ${MONGO_CXX_DRIVER_ROOT}.\\n" - else - printf " - MongoDB C++ driver found with correct version @ ${MONGO_CXX_DRIVER_ROOT}.\\n" + if [ $BUILD_MONGO ]; then + printf "Checking MongoDB installation...\\n" + if [ ! -d $MONGODB_ROOT ] || [ $FORCE_BUILD ]; then + printf "Installing MongoDB into ${MONGODB_ROOT}...\\n" + curl -OL https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ + && tar -xzf mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ + && mv $SRC_LOCATION/mongodb-linux-x86_64-amazon-$MONGODB_VERSION $MONGODB_ROOT \ + && touch $MONGODB_LOG_LOCATION/mongod.log \ + && rm -f mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ + && cp -f $REPO_ROOT/scripts/mongod.conf $MONGODB_CONF \ + && mkdir -p $MONGODB_DATA_LOCATION \ + && rm -rf $MONGODB_LINK_LOCATION \ + && rm -rf $BIN_LOCATION/mongod \ + && ln -s $MONGODB_ROOT $MONGODB_LINK_LOCATION \ + && ln -s $MONGODB_LINK_LOCATION/bin/mongod $BIN_LOCATION/mongod \ + || exit 1 + printf " - MongoDB successfully installed @ ${MONGODB_ROOT} (Symlinked to ${MONGODB_LINK_LOCATION}).\\n" + else + printf " - MongoDB found with correct version @ ${MONGODB_ROOT} (Symlinked to ${MONGODB_LINK_LOCATION}).\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + printf "Checking MongoDB C driver installation...\\n" + if [ ! -d $MONGO_C_DRIVER_ROOT ] || [ $FORCE_BUILD ]; then + printf "Installing MongoDB C driver...\\n" + curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/$MONGO_C_DRIVER_VERSION/mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + && tar -xzf mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + && cd mongo-c-driver-$MONGO_C_DRIVER_VERSION \ + && mkdir -p cmake-build \ + && cd cmake-build \ + && $CMAKE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DENABLE_BSON=ON -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON .. \ + && make -j"${JOBS}" \ + && make install \ + && cd ../.. \ + && rm mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + || exit 1 + printf " - MongoDB C driver successfully installed @ ${MONGO_C_DRIVER_ROOT}.\\n" + else + printf " - MongoDB C driver found with correct version @ ${MONGO_C_DRIVER_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + printf "Checking MongoDB C++ driver installation...\\n" + if [ ! -d $MONGO_CXX_DRIVER_ROOT ] || [ $FORCE_BUILD ]; then + printf "Installing MongoDB C++ driver...\\n" + curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r$MONGO_CXX_DRIVER_VERSION.tar.gz -o mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ + && tar -xzf mongo-cxx-driver-r${MONGO_CXX_DRIVER_VERSION}.tar.gz \ + && cd mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION/build \ + && $CMAKE -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX .. \ + && make -j"${JOBS}" VERBOSE=1 \ + && make install \ + && cd ../.. \ + && rm -f mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ + || exit 1 + printf " - MongoDB C++ driver successfully installed @ ${MONGO_CXX_DRIVER_ROOT}.\\n" + else + printf " - MongoDB C++ driver found with correct version @ ${MONGO_CXX_DRIVER_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + + printf "\\n" fi - if [ $? -ne 0 ]; then exit -1; fi - - - printf "\\n" - printf "Checking LLVM 4 support...\\n" - if [ ! -d $LLVM_ROOT ]; then + if [ ! -d $LLVM_ROOT ] || [ $FORCE_BUILD ]; then printf "Installing LLVM 4...\\n" cd ../opt \ && git clone --depth 1 --single-branch --branch $LLVM_VERSION https://github.com/llvm-mirror/llvm.git llvm && cd llvm \ @@ -385,7 +384,6 @@ else fi if [ $? -ne 0 ]; then exit -1; fi - cd .. printf "\\n" fi diff --git a/scripts/eosio_build_darwin.sh b/scripts/eosio_build_darwin.sh index 66883ed5267..7ea9781197f 100755 --- a/scripts/eosio_build_darwin.sh +++ b/scripts/eosio_build_darwin.sh @@ -165,7 +165,7 @@ printf "\\n" export CPATH="$(python-config --includes | awk '{print $1}' | cut -dI -f2):$CPATH" # Boost has trouble finding pyconfig.h printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) -if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ]; then +if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ] || [ $FORCE_BUILD ]; then printf "Installing Boost library...\\n" curl -LO https://dl.bintray.com/boostorg/release/$BOOST_VERSION_MAJOR.$BOOST_VERSION_MINOR.$BOOST_VERSION_PATCH/source/boost_$BOOST_VERSION.tar.bz2 \ && tar -xjf boost_$BOOST_VERSION.tar.bz2 \ @@ -187,64 +187,66 @@ if [ $? -ne 0 ]; then exit -1; fi printf "\\n" -printf "Checking MongoDB installation...\\n" -if [ ! -d $MONGODB_ROOT ]; then - printf "Installing MongoDB into ${MONGODB_ROOT}...\\n" - curl -OL https://fastdl.mongodb.org/osx/mongodb-osx-ssl-x86_64-$MONGODB_VERSION.tgz \ - && tar -xzf mongodb-osx-ssl-x86_64-$MONGODB_VERSION.tgz \ - && mv $SRC_LOCATION/mongodb-osx-x86_64-$MONGODB_VERSION $MONGODB_ROOT \ - && touch $MONGODB_LOG_LOCATION/mongod.log \ - && rm -f mongodb-osx-ssl-x86_64-$MONGODB_VERSION.tgz \ - && cp -f $REPO_ROOT/scripts/mongod.conf $MONGODB_CONF \ - && mkdir -p $MONGODB_DATA_LOCATION \ - && rm -rf $MONGODB_LINK_LOCATION \ - && rm -rf $BIN_LOCATION/mongod \ - && ln -s $MONGODB_ROOT $MONGODB_LINK_LOCATION \ - && ln -s $MONGODB_LINK_LOCATION/bin/mongod $BIN_LOCATION/mongod \ - || exit 1 - printf " - MongoDB successfully installed @ ${MONGODB_ROOT}\\n" -else - printf " - MongoDB found with correct version @ ${MONGODB_ROOT}.\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi -printf "Checking MongoDB C driver installation...\\n" -if [ ! -d $MONGO_C_DRIVER_ROOT ]; then - printf "Installing MongoDB C driver...\\n" - curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/$MONGO_C_DRIVER_VERSION/mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - && tar -xzf mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - && cd mongo-c-driver-$MONGO_C_DRIVER_VERSION \ - && mkdir -p cmake-build \ - && cd cmake-build \ - && $CMAKE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DENABLE_BSON=ON -DENABLE_SSL=DARWIN -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON .. \ - && make -j"${JOBS}" \ - && make install \ - && cd ../.. \ - && rm mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - || exit 1 - printf " - MongoDB C driver successfully installed @ ${MONGO_C_DRIVER_ROOT}.\\n" -else - printf " - MongoDB C driver found with correct version @ ${MONGO_C_DRIVER_ROOT}.\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi -printf "Checking MongoDB C++ driver installation...\\n" -if [ "$(grep "Version:" $PREFIX/lib/pkgconfig/libmongocxx-static.pc 2>/dev/null | tr -s ' ' | awk '{print $2}')" != $MONGO_CXX_DRIVER_VERSION ]; then - printf "Installing MongoDB C++ driver...\\n" - curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r$MONGO_CXX_DRIVER_VERSION.tar.gz -o mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ - && tar -xzf mongo-cxx-driver-r${MONGO_CXX_DRIVER_VERSION}.tar.gz \ - && cd mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION/build \ - && $CMAKE -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX .. \ - && make -j"${JOBS}" VERBOSE=1 \ - && make install \ - && cd ../.. \ - && rm -f mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ - || exit 1 - printf " - MongoDB C++ driver successfully installed @ ${MONGO_CXX_DRIVER_ROOT}.\\n" -else - printf " - MongoDB C++ driver found with correct version @ ${MONGO_CXX_DRIVER_ROOT}.\\n" -fi -if [ $? -ne 0 ]; then exit -1; fi +if [ $BUILD_MONGO ]; then + printf "Checking MongoDB installation...\\n" + if [ ! -d $MONGODB_ROOT ] || [ $FORCE_BUILD ]; then + printf "Installing MongoDB into ${MONGODB_ROOT}...\\n" + curl -OL https://fastdl.mongodb.org/osx/mongodb-osx-ssl-x86_64-$MONGODB_VERSION.tgz \ + && tar -xzf mongodb-osx-ssl-x86_64-$MONGODB_VERSION.tgz \ + && mv $SRC_LOCATION/mongodb-osx-x86_64-$MONGODB_VERSION $MONGODB_ROOT \ + && touch $MONGODB_LOG_LOCATION/mongod.log \ + && rm -f mongodb-osx-ssl-x86_64-$MONGODB_VERSION.tgz \ + && cp -f $REPO_ROOT/scripts/mongod.conf $MONGODB_CONF \ + && mkdir -p $MONGODB_DATA_LOCATION \ + && rm -rf $MONGODB_LINK_LOCATION \ + && rm -rf $BIN_LOCATION/mongod \ + && ln -s $MONGODB_ROOT $MONGODB_LINK_LOCATION \ + && ln -s $MONGODB_LINK_LOCATION/bin/mongod $BIN_LOCATION/mongod \ + || exit 1 + printf " - MongoDB successfully installed @ ${MONGODB_ROOT}\\n" + else + printf " - MongoDB found with correct version @ ${MONGODB_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + printf "Checking MongoDB C driver installation...\\n" + if [ ! -d $MONGO_C_DRIVER_ROOT ] || [ $FORCE_BUILD ]; then + printf "Installing MongoDB C driver...\\n" + curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/$MONGO_C_DRIVER_VERSION/mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + && tar -xzf mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + && cd mongo-c-driver-$MONGO_C_DRIVER_VERSION \ + && mkdir -p cmake-build \ + && cd cmake-build \ + && $CMAKE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DENABLE_BSON=ON -DENABLE_SSL=DARWIN -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON .. \ + && make -j"${JOBS}" \ + && make install \ + && cd ../.. \ + && rm mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + || exit 1 + printf " - MongoDB C driver successfully installed @ ${MONGO_C_DRIVER_ROOT}.\\n" + else + printf " - MongoDB C driver found with correct version @ ${MONGO_C_DRIVER_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + printf "Checking MongoDB C++ driver installation...\\n" + if [ "$(grep "Version:" $PREFIX/lib/pkgconfig/libmongocxx-static.pc 2>/dev/null | tr -s ' ' | awk '{print $2}')" != $MONGO_CXX_DRIVER_VERSION ] || [ $FORCE_BUILD ]; then + printf "Installing MongoDB C++ driver...\\n" + curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r$MONGO_CXX_DRIVER_VERSION.tar.gz -o mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ + && tar -xzf mongo-cxx-driver-r${MONGO_CXX_DRIVER_VERSION}.tar.gz \ + && cd mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION/build \ + && $CMAKE -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX .. \ + && make -j"${JOBS}" VERBOSE=1 \ + && make install \ + && cd ../.. \ + && rm -f mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ + || exit 1 + printf " - MongoDB C++ driver successfully installed @ ${MONGO_CXX_DRIVER_ROOT}.\\n" + else + printf " - MongoDB C++ driver found with correct version @ ${MONGO_CXX_DRIVER_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi -printf "\\n" + printf "\\n" +fi # We install llvm into /usr/local/opt using brew install llvm@4 @@ -263,7 +265,7 @@ printf "\\n" if $PIN_COMPILER; then printf "Checking Clang 8 support...\\n" - if [ ! -d $CLANG8_ROOT ]; then + if [ ! -d $CLANG8_ROOT ] || [ $FORCE_BUILD ]; then printf "Installing Clang 8...\\n" cd ${TMP_LOCATION} \ && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 \ diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index 366f56bba01..8acc15a9ced 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -118,7 +118,7 @@ printf "\\n" printf "Checking CMAKE installation...\\n" -if [ ! -e $CMAKE ]; then +if [ ! -e $CMAKE ] || [ $FORCE_BUILD ]; then printf "Installing CMAKE...\\n" curl -LO https://cmake.org/files/v$CMAKE_VERSION_MAJOR.$CMAKE_VERSION_MINOR/cmake-$CMAKE_VERSION.tar.gz \ && tar -xzf cmake-$CMAKE_VERSION.tar.gz \ @@ -135,12 +135,11 @@ else fi if [ $? -ne 0 ]; then exit -1; fi - printf "\\n" if $PIN_COMPILER; then printf "Checking Clang 8 support...\\n" - if [ ! -d $CLANG8_ROOT ]; then + if [ ! -d $CLANG8_ROOT ] || [ $FORCE_BUILD ]; then printf "Installing Clang 8...\\n" cd ${TMP_LOCATION} \ && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ @@ -182,7 +181,7 @@ if $PIN_COMPILER; then printf "\\n" printf "Checking LLVM 4 installation...\\n" - if [ ! -d $OPT_LOCATION/llvm4 ]; then + if [ ! -d $OPT_LOCATION/llvm4 ] || [ $FORCE_BUILD ]; then printf "Installing LLVM 4...\\n" cd $SRC_LOCATION \ && git clone https://github.com/llvm-mirror/llvm --single-branch --branch $LLVM_VERSION && cd llvm \ @@ -195,7 +194,7 @@ if $PIN_COMPILER; then cd $SRC_LOCATION printf "Checking zlib library (${BOOST_VERSION}) installation...\\n" - if [ ! -d $OPT_LOCATION/zlib ]; then + if [ ! -d $OPT_LOCATION/zlib ] || [ $FORCE_BUILD ]; then printf "Installing zlib...\\n" curl -LO https://www.zlib.net/zlib-1.2.11.tar.gz && tar -xf zlib-1.2.11.tar.gz \ && cd zlib-1.2.11 && mkdir build && cd build \ @@ -206,7 +205,7 @@ if $PIN_COMPILER; then cd $SRC_LOCATION printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) - if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ]; then + if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ] || [ $FORCE_BUILD ]; then printf "Installing Boost library...\\n" curl -LO https://dl.bintray.com/boostorg/release/${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}.${BOOST_VERSION_PATCH}/source/boost_$BOOST_VERSION.tar.bz2 \ && tar -xjf boost_$BOOST_VERSION.tar.bz2 \ @@ -228,7 +227,7 @@ if $PIN_COMPILER; then else printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) - if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ]; then + if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ] || [ $FORCE_BUILD ]; then printf "Installing Boost library...\\n" curl -LO https://dl.bintray.com/boostorg/release/${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}.${BOOST_VERSION_PATCH}/source/boost_$BOOST_VERSION.tar.bz2 \ && tar -xjf boost_$BOOST_VERSION.tar.bz2 \ @@ -249,70 +248,70 @@ else printf "\\n" - - printf "Checking MongoDB installation...\\n" - if [ ! -d $MONGODB_ROOT ]; then - printf "Installing MongoDB into ${MONGODB_ROOT}...\\n" - curl -OL https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ - && tar -xzf mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ - && mv $SRC_LOCATION/mongodb-linux-x86_64-amazon-$MONGODB_VERSION $MONGODB_ROOT \ - && touch $MONGODB_LOG_LOCATION/mongod.log \ - && rm -f mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ - && cp -f $REPO_ROOT/scripts/mongod.conf $MONGODB_CONF \ - && mkdir -p $MONGODB_DATA_LOCATION \ - && rm -rf $MONGODB_LINK_LOCATION \ - && rm -rf $BIN_LOCATION/mongod \ - && ln -s $MONGODB_ROOT $MONGODB_LINK_LOCATION \ - && ln -s $MONGODB_LINK_LOCATION/bin/mongod $BIN_LOCATION/mongod \ - || exit 1 - printf " - MongoDB successfully installed @ ${MONGODB_ROOT}\\n" - else - printf " - MongoDB found with correct version @ ${MONGODB_ROOT}.\\n" - fi - if [ $? -ne 0 ]; then exit -1; fi - printf "Checking MongoDB C driver installation...\\n" - if [ ! -d $MONGO_C_DRIVER_ROOT ]; then - printf "Installing MongoDB C driver...\\n" - curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/$MONGO_C_DRIVER_VERSION/mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - && tar -xzf mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - && cd mongo-c-driver-$MONGO_C_DRIVER_VERSION \ - && mkdir -p cmake-build \ - && cd cmake-build \ - && $CMAKE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DENABLE_BSON=ON -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON .. \ - && make -j"${JOBS}" \ - && make install \ - && cd ../.. \ - && rm mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - || exit 1 - printf " - MongoDB C driver successfully installed @ ${MONGO_C_DRIVER_ROOT}.\\n" - else - printf " - MongoDB C driver found with correct version @ ${MONGO_C_DRIVER_ROOT}.\\n" + if [ $BUILD_MONGO ]; then + printf "Checking MongoDB installation...\\n" + if [ ! -d $MONGODB_ROOT ] || [ $FORCE_BUILD ]; then + printf "Installing MongoDB into ${MONGODB_ROOT}...\\n" + curl -OL https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ + && tar -xzf mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ + && mv $SRC_LOCATION/mongodb-linux-x86_64-amazon-$MONGODB_VERSION $MONGODB_ROOT \ + && touch $MONGODB_LOG_LOCATION/mongod.log \ + && rm -f mongodb-linux-x86_64-amazon-$MONGODB_VERSION.tgz \ + && cp -f $REPO_ROOT/scripts/mongod.conf $MONGODB_CONF \ + && mkdir -p $MONGODB_DATA_LOCATION \ + && rm -rf $MONGODB_LINK_LOCATION \ + && rm -rf $BIN_LOCATION/mongod \ + && ln -s $MONGODB_ROOT $MONGODB_LINK_LOCATION \ + && ln -s $MONGODB_LINK_LOCATION/bin/mongod $BIN_LOCATION/mongod \ + || exit 1 + printf " - MongoDB successfully installed @ ${MONGODB_ROOT}\\n" + else + printf " - MongoDB found with correct version @ ${MONGODB_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + printf "Checking MongoDB C driver installation...\\n" + if [ ! -d $MONGO_C_DRIVER_ROOT ] || [ $FORCE_BUILD ]; then + printf "Installing MongoDB C driver...\\n" + curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/$MONGO_C_DRIVER_VERSION/mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + && tar -xzf mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + && cd mongo-c-driver-$MONGO_C_DRIVER_VERSION \ + && mkdir -p cmake-build \ + && cd cmake-build \ + && $CMAKE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DENABLE_BSON=ON -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON .. \ + && make -j"${JOBS}" \ + && make install \ + && cd ../.. \ + && rm mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + || exit 1 + printf " - MongoDB C driver successfully installed @ ${MONGO_C_DRIVER_ROOT}.\\n" + else + printf " - MongoDB C driver found with correct version @ ${MONGO_C_DRIVER_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + printf "Checking MongoDB C++ driver installation...\\n" + if [ ! -d $MONGO_CXX_DRIVER_ROOT ] || [ $FORCE_BUILD ]; then + printf "Installing MongoDB C++ driver...\\n" + curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r$MONGO_CXX_DRIVER_VERSION.tar.gz -o mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ + && tar -xzf mongo-cxx-driver-r${MONGO_CXX_DRIVER_VERSION}.tar.gz \ + && cd mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION/build \ + && $CMAKE -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX .. \ + && make -j"${JOBS}" VERBOSE=1 \ + && make install \ + && cd ../.. \ + && rm -f mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ + || exit 1 + printf " - MongoDB C++ driver successfully installed @ ${MONGO_CXX_DRIVER_ROOT}.\\n" + else + printf " - MongoDB C++ driver found with correct version @ ${MONGO_CXX_DRIVER_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi + + + printf "\\n" fi - if [ $? -ne 0 ]; then exit -1; fi - printf "Checking MongoDB C++ driver installation...\\n" - if [ ! -d $MONGO_CXX_DRIVER_ROOT ]; then - printf "Installing MongoDB C++ driver...\\n" - curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r$MONGO_CXX_DRIVER_VERSION.tar.gz -o mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ - && tar -xzf mongo-cxx-driver-r${MONGO_CXX_DRIVER_VERSION}.tar.gz \ - && cd mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION/build \ - && $CMAKE -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX .. \ - && make -j"${JOBS}" VERBOSE=1 \ - && make install \ - && cd ../.. \ - && rm -f mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ - || exit 1 - printf " - MongoDB C++ driver successfully installed @ ${MONGO_CXX_DRIVER_ROOT}.\\n" - else - printf " - MongoDB C++ driver found with correct version @ ${MONGO_CXX_DRIVER_ROOT}.\\n" - fi - if [ $? -ne 0 ]; then exit -1; fi - - - printf "\\n" - printf "Checking LLVM 4 support...\\n" - if [ ! -d $LLVM_ROOT ]; then + if [ ! -d $LLVM_ROOT ] || [ $FORCE_BUILD ]; then ln -s /usr/lib64/llvm4.0 $LLVM_ROOT \ || exit 1 printf " - LLVM successfully linked from /usr/lib64/llvm4.0 to ${LLVM_ROOT}\\n" @@ -321,7 +320,6 @@ else fi if [ $? -ne 0 ]; then exit -1; fi - cd .. printf "\\n" fi diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index f63c39dd408..5091b8c380e 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -142,7 +142,7 @@ printf "\\n" printf "Checking CMAKE installation...\\n" -if [ ! -e $CMAKE ]; then +if [ ! -e $CMAKE ] || [ $FORCE_BUILD ]; then printf "Installing CMAKE...\\n" curl -LO https://cmake.org/files/v$CMAKE_VERSION_MAJOR.$CMAKE_VERSION_MINOR/cmake-$CMAKE_VERSION.tar.gz \ && tar -xzf cmake-$CMAKE_VERSION.tar.gz \ @@ -164,7 +164,7 @@ printf "\\n" if $PIN_COMPILER; then printf "Checking Clang 8 support...\\n" - if [ ! -d $CLANG8_ROOT ]; then + if [ ! -d $CLANG8_ROOT ] || [ $FORCE_BUILD ]; then printf "Installing Clang 8...\\n" cd ${TMP_LOCATION} \ && git clone --single-branch --branch $PINNED_COMPILER_BRANCH https://git.llvm.org/git/llvm.git clang8 && cd clang8 \ @@ -206,7 +206,7 @@ if $PIN_COMPILER; then printf "\\n" printf "Checking LLVM 4 installation...\\n" - if [ ! -d $OPT_LOCATION/llvm4 ]; then + if [ ! -d $OPT_LOCATION/llvm4 ] || [ $FORCE_BUILD ]; then printf "Installing LLVM 4...\\n" cd $SRC_LOCATION \ && git clone https://github.com/llvm-mirror/llvm --single-branch --branch $LLVM_VERSION && cd llvm \ @@ -219,7 +219,7 @@ if $PIN_COMPILER; then cd $SRC_LOCATION printf "Checking zlib library (${BOOST_VERSION}) installation...\\n" - if [ ! -d $OPT_LOCATION/zlib ]; then + if [ ! -d $OPT_LOCATION/zlib || $FORCE_BUILD ]; then printf "Installing zlib...\\n" curl -LO https://www.zlib.net/zlib-1.2.11.tar.gz && tar -xf zlib-1.2.11.tar.gz \ && cd zlib-1.2.11 && mkdir build && cd build \ @@ -231,12 +231,11 @@ if $PIN_COMPILER; then cd $SRC_LOCATION printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) - if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ]; then + if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ] || [ $FORCE_BUILD ]; then printf "Installing Boost library...\\n" curl -LO https://dl.bintray.com/boostorg/release/${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}.${BOOST_VERSION_PATCH}/source/boost_$BOOST_VERSION.tar.bz2 \ && tar -xjf boost_$BOOST_VERSION.tar.bz2 \ && cd $BOOST_ROOT \ - && printf "using clang : 8.0 : ${CLANG8_ROOT}/bin/clang++ : \"-D__STRICT_ANSI__ -stdlib=libc++ -std=c++17 -nostdinc++ -I${CLANG8_ROOT}/include/c++/v1\";" &> clang8.jam \ && ./bootstrap.sh --prefix=$BOOST_ROOT \ && ./b2 toolset=clang cxxflags="-stdlib=libc++ -D__STRICT_ANSI__ -nostdinc++ -I${CLANG8_ROOT}/include/c++/v1" linkflags="-stdlib=libc++" link=static threading=multi --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j"${JOBS}" -sZLIB_LIBRARY_PATH="${OPT_LOCATION}/zlib/lib" -sZLIB_INCLUDE="${OPT_LOCATION}/zlib/include" -sZLIB_SOURCE="${SRC_LOCATION}/zlib-1.2.11" install \ && cd .. \ @@ -254,7 +253,7 @@ if $PIN_COMPILER; then else printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) - if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ]; then + if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ] || [ $FORCE_BUILD ]; then printf "Installing Boost library...\\n" curl -LO https://dl.bintray.com/boostorg/release/${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}.${BOOST_VERSION_PATCH}/source/boost_$BOOST_VERSION.tar.bz2 \ && tar -xjf boost_$BOOST_VERSION.tar.bz2 \ @@ -274,77 +273,78 @@ else printf "\\n" - printf "Checking MongoDB installation...\\n" - if [ ! -d $MONGODB_ROOT ]; then - printf "Installing MongoDB into ${MONGODB_ROOT}...\\n" - curl -OL http://downloads.mongodb.org/linux/mongodb-linux-x86_64-ubuntu$OS_MAJ$OS_MIN-$MONGODB_VERSION.tgz \ - && tar -xzf mongodb-linux-x86_64-ubuntu$OS_MAJ$OS_MIN-$MONGODB_VERSION.tgz \ - && mv $SRC_LOCATION/mongodb-linux-x86_64-ubuntu$OS_MAJ$OS_MIN-$MONGODB_VERSION $MONGODB_ROOT \ - && touch $MONGODB_LOG_LOCATION/mongod.log \ - && rm -f mongodb-linux-x86_64-ubuntu$OS_MAJ$OS_MIN-$MONGODB_VERSION.tgz \ - && cp -f $REPO_ROOT/scripts/mongod.conf $MONGODB_CONF \ - && mkdir -p $MONGODB_DATA_LOCATION \ - && rm -rf $MONGODB_LINK_LOCATION \ - && rm -rf $BIN_LOCATION/mongod \ - && ln -s $MONGODB_ROOT $MONGODB_LINK_LOCATION \ - && ln -s $MONGODB_LINK_LOCATION/bin/mongod $BIN_LOCATION/mongod \ - || exit 1 - printf " - MongoDB successfully installed @ ${MONGODB_ROOT} (Symlinked to ${MONGODB_LINK_LOCATION}).\\n" - else - printf " - MongoDB found with correct version @ ${MONGODB_ROOT} (Symlinked to ${MONGODB_LINK_LOCATION}).\\n" - fi - if [ $? -ne 0 ]; then exit -1; fi - printf "Checking MongoDB C driver installation...\\n" - if [ ! -d $MONGO_C_DRIVER_ROOT ]; then - if [ ! $BUILD_CLANG8 ]; then - PINNED_TOOLCHAIN="" + if [ $BUILD_MONGO ]; then + printf "Checking MongoDB installation...\\n" + if [ ! -d $MONGODB_ROOT ] || [ $FORCE_BUILD ]; then + printf "Installing MongoDB into ${MONGODB_ROOT}...\\n" + curl -OL http://downloads.mongodb.org/linux/mongodb-linux-x86_64-ubuntu$OS_MAJ$OS_MIN-$MONGODB_VERSION.tgz \ + && tar -xzf mongodb-linux-x86_64-ubuntu$OS_MAJ$OS_MIN-$MONGODB_VERSION.tgz \ + && mv $SRC_LOCATION/mongodb-linux-x86_64-ubuntu$OS_MAJ$OS_MIN-$MONGODB_VERSION $MONGODB_ROOT \ + && touch $MONGODB_LOG_LOCATION/mongod.log \ + && rm -f mongodb-linux-x86_64-ubuntu$OS_MAJ$OS_MIN-$MONGODB_VERSION.tgz \ + && cp -f $REPO_ROOT/scripts/mongod.conf $MONGODB_CONF \ + && mkdir -p $MONGODB_DATA_LOCATION \ + && rm -rf $MONGODB_LINK_LOCATION \ + && rm -rf $BIN_LOCATION/mongod \ + && ln -s $MONGODB_ROOT $MONGODB_LINK_LOCATION \ + && ln -s $MONGODB_LINK_LOCATION/bin/mongod $BIN_LOCATION/mongod \ + || exit 1 + printf " - MongoDB successfully installed @ ${MONGODB_ROOT} (Symlinked to ${MONGODB_LINK_LOCATION}).\\n" + else + printf " - MongoDB found with correct version @ ${MONGODB_ROOT} (Symlinked to ${MONGODB_LINK_LOCATION}).\\n" fi - printf "Installing MongoDB C driver...\\n" - curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/$MONGO_C_DRIVER_VERSION/mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - && tar -xzf mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - && cd mongo-c-driver-$MONGO_C_DRIVER_VERSION \ - && mkdir -p cmake-build \ - && cd cmake-build \ - && $CMAKE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DENABLE_BSON=ON -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON $PINNED_TOOLCHAIN .. \ - && make -j"${JOBS}" \ - && make install \ - && cd ../.. \ - && rm mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ - || exit 1 - printf " - MongoDB C driver successfully installed @ ${MONGO_C_DRIVER_ROOT}.\\n" - else - printf " - MongoDB C driver found with correct version @ ${MONGO_C_DRIVER_ROOT}.\\n" - fi - - if [ $? -ne 0 ]; then exit -1; fi - printf "Checking MongoDB C++ driver installation...\\n" - if [ ! -d $MONGO_CXX_DRIVER_ROOT ]; then - if [ ! $BUILD_CLANG8 ]; then - PINNED_TOOLCHAIN="" + if [ $? -ne 0 ]; then exit -1; fi + printf "Checking MongoDB C driver installation...\\n" + if [ ! -d $MONGO_C_DRIVER_ROOT ] || [ $FORCE_BUILD ]; then + if [ ! $BUILD_CLANG8 ]; then + PINNED_TOOLCHAIN="" + fi + printf "Installing MongoDB C driver...\\n" + curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/$MONGO_C_DRIVER_VERSION/mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + && tar -xzf mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + && cd mongo-c-driver-$MONGO_C_DRIVER_VERSION \ + && mkdir -p cmake-build \ + && cd cmake-build \ + && $CMAKE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DENABLE_BSON=ON -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON $PINNED_TOOLCHAIN .. \ + && make -j"${JOBS}" \ + && make install \ + && cd ../.. \ + && rm mongo-c-driver-$MONGO_C_DRIVER_VERSION.tar.gz \ + || exit 1 + printf " - MongoDB C driver successfully installed @ ${MONGO_C_DRIVER_ROOT}.\\n" + else + printf " - MongoDB C driver found with correct version @ ${MONGO_C_DRIVER_ROOT}.\\n" fi - printf "Installing MongoDB C++ driver...\\n" - curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r$MONGO_CXX_DRIVER_VERSION.tar.gz -o mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ - && tar -xzf mongo-cxx-driver-r${MONGO_CXX_DRIVER_VERSION}.tar.gz \ - && cd mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION \ - && sed '111 s/count/static_cast(count)/' src/mongocxx/options/change_stream.cpp &> src/mongocxx/options/change_stream.cpp \ - && cd build \ - && $CMAKE -DBUILD_SHARED_LIBS=OFF -DCXX_CMAKE_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX $PINNED_TOOLCHAIN .. \ - && make -j"${JOBS}" VERBOSE=1 \ - && make install \ - && cd ../.. \ - && rm -f mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ - || exit 1 - printf " - MongoDB C++ driver successfully installed @ ${MONGO_CXX_DRIVER_ROOT}.\\n" - else - printf " - MongoDB C++ driver found with correct version @ ${MONGO_CXX_DRIVER_ROOT}.\\n" - fi - if [ $? -ne 0 ]; then exit -1; fi + if [ $? -ne 0 ]; then exit -1; fi + printf "Checking MongoDB C++ driver installation...\\n" + if [ ! -d $MONGO_CXX_DRIVER_ROOT ] || [ $FORCE_BUILD ]; then + if [ ! $BUILD_CLANG8 ]; then + PINNED_TOOLCHAIN="" + fi + printf "Installing MongoDB C++ driver...\\n" + curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r$MONGO_CXX_DRIVER_VERSION.tar.gz -o mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ + && tar -xzf mongo-cxx-driver-r${MONGO_CXX_DRIVER_VERSION}.tar.gz \ + && cd mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION \ + && sed '111 s/count/static_cast(count)/' src/mongocxx/options/change_stream.cpp &> src/mongocxx/options/change_stream.cpp \ + && cd build \ + && $CMAKE -DBUILD_SHARED_LIBS=OFF -DCXX_CMAKE_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX $PINNED_TOOLCHAIN .. \ + && make -j"${JOBS}" VERBOSE=1 \ + && make install \ + && cd ../.. \ + && rm -f mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION.tar.gz \ + || exit 1 + printf " - MongoDB C++ driver successfully installed @ ${MONGO_CXX_DRIVER_ROOT}.\\n" + else + printf " - MongoDB C++ driver found with correct version @ ${MONGO_CXX_DRIVER_ROOT}.\\n" + fi + if [ $? -ne 0 ]; then exit -1; fi - printf "\\n" + printf "\\n" + fi printf "Checking LLVM 4 support...\\n" - if [ ! -d $LLVM_ROOT ]; then + if [ ! -d $LLVM_ROOT ] || [ $FORCE_BUILD ]; then ln -s /usr/lib/llvm-4.0 $LLVM_ROOT \ || exit 1 printf " - LLVM successfully linked from /usr/lib/llvm-4.0 to ${LLVM_ROOT}\\n" From 9e81631073e3f319f36755b5fe2efa27b4665023 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Tue, 23 Apr 2019 11:29:16 -0400 Subject: [PATCH 60/86] add force flag temporarily --- .buildkite/pipeline.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 41e29d8c19a..57bcdbf6d92 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,7 +1,7 @@ steps: - command: | # Amazon Linux 2 Build echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -P + ./scripts/eosio_build.sh -y -P -f echo "--- :compression: Compressing build directory" tar -pczf build.tar.gz build if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi @@ -24,7 +24,7 @@ steps: - command: | # CentOS 7 Build echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -P + ./scripts/eosio_build.sh -y -P -f echo "--- :compression: Compressing build directory" tar -pczf build.tar.gz build if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi @@ -47,7 +47,7 @@ steps: - command: | # Ubuntu 16.04 Build echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -P + ./scripts/eosio_build.sh -y -P -f echo "--- :compression: Compressing build directory" tar -pczf build.tar.gz build if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi @@ -70,7 +70,7 @@ steps: - command: | # Ubuntu 18.04 Build echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -P + ./scripts/eosio_build.sh -y -P -f echo "--- :compression: Compressing build directory" tar -pczf build.tar.gz build if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi @@ -97,7 +97,7 @@ steps: ln -s "$(pwd)" /data/job cd /data/job echo "+++ Building :hammer:" - ./scripts/eosio_build.sh -y -P + ./scripts/eosio_build.sh -y -P -f echo "--- Compressing build directory :compression:" tar -pczf build.tar.gz build if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi @@ -435,4 +435,4 @@ steps: label: "Git Submodule Regression Check" agents: queue: "automation-large-builder-fleet" - timeout: 5 \ No newline at end of file + timeout: 5 From 77a68c50adfe5f6918c56a462f291b8f275496b9 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Tue, 23 Apr 2019 13:26:02 -0400 Subject: [PATCH 61/86] add clang8 bin to path for boost builds --- scripts/eosio_build_amazon.sh | 3 ++- scripts/eosio_build_centos.sh | 3 ++- scripts/eosio_build_fedora.sh | 3 ++- scripts/eosio_build_ubuntu.sh | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/eosio_build_amazon.sh b/scripts/eosio_build_amazon.sh index 935764a3149..ae1a8a8fd24 100755 --- a/scripts/eosio_build_amazon.sh +++ b/scripts/eosio_build_amazon.sh @@ -198,7 +198,7 @@ if $PIN_COMPILER; then fi cd $SRC_LOCATION - printf "Checking zlib library (${BOOST_VERSION}) installation...\\n" + printf "Checking zlib library installation...\\n" if [ ! -d $OPT_LOCATION/zlib ] || [ $FORCE_BUILD ]; then printf "Installing zlib...\\n" curl -LO https://www.zlib.net/zlib-1.2.11.tar.gz && tar -xf zlib-1.2.11.tar.gz \ @@ -208,6 +208,7 @@ if $PIN_COMPILER; then || exit -1 fi cd $SRC_LOCATION + export PATH=$OPT_LOCATION/clang8/bin:$PATH printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ] || [ $FORCE_BUILD ]; then diff --git a/scripts/eosio_build_centos.sh b/scripts/eosio_build_centos.sh index 754b6164ad8..07964458b57 100755 --- a/scripts/eosio_build_centos.sh +++ b/scripts/eosio_build_centos.sh @@ -250,7 +250,7 @@ if $PIN_COMPILER; then fi cd $SRC_LOCATION - printf "Checking zlib library (${BOOST_VERSION}) installation...\\n" + printf "Checking zlib library installation...\\n" if [ ! -d $OPT_LOCATION/zlib ] || [ $FORCE_BUILD ]; then printf "Installing zlib...\\n" curl -LO https://www.zlib.net/zlib-1.2.11.tar.gz && tar -xf zlib-1.2.11.tar.gz \ @@ -260,6 +260,7 @@ if $PIN_COMPILER; then || exit -1 fi cd $SRC_LOCATION + export PATH=$OPT_LOCATION/clang8/bin:$PATH printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ] || [ $FORCE_BUILD ]; then diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index 8acc15a9ced..2cf077538c7 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -193,7 +193,7 @@ if $PIN_COMPILER; then fi cd $SRC_LOCATION - printf "Checking zlib library (${BOOST_VERSION}) installation...\\n" + printf "Checking zlib library installation...\\n" if [ ! -d $OPT_LOCATION/zlib ] || [ $FORCE_BUILD ]; then printf "Installing zlib...\\n" curl -LO https://www.zlib.net/zlib-1.2.11.tar.gz && tar -xf zlib-1.2.11.tar.gz \ @@ -203,6 +203,7 @@ if $PIN_COMPILER; then || exit -1 fi cd $SRC_LOCATION + export PATH=$OPT_LOCATION/clang8/bin:$PATH printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ] || [ $FORCE_BUILD ]; then diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index 5091b8c380e..93a995d009b 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -218,7 +218,7 @@ if $PIN_COMPILER; then fi cd $SRC_LOCATION - printf "Checking zlib library (${BOOST_VERSION}) installation...\\n" + printf "Checking zlib library installation...\\n" if [ ! -d $OPT_LOCATION/zlib || $FORCE_BUILD ]; then printf "Installing zlib...\\n" curl -LO https://www.zlib.net/zlib-1.2.11.tar.gz && tar -xf zlib-1.2.11.tar.gz \ @@ -229,6 +229,7 @@ if $PIN_COMPILER; then fi cd $SRC_LOCATION + export PATH=$OPT_LOCATION/clang8/bin:$PATH printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 ) if [ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ] || [ $FORCE_BUILD ]; then From 5b342dcb98d15ac021d6a9abf4dd92050a897dc6 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Tue, 23 Apr 2019 15:36:08 -0400 Subject: [PATCH 62/86] modified .pipelinebranch --- .pipelinebranch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelinebranch b/.pipelinebranch index 089fa42ccc2..e763e7d7fdc 100644 --- a/.pipelinebranch +++ b/.pipelinebranch @@ -1 +1 @@ -use-protocol-features-sync-nodes +protocol-features-sync-nodes From f123138e7627d85aa06564a2bf30e3206579bbbd Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Tue, 23 Apr 2019 17:30:08 -0400 Subject: [PATCH 63/86] addressed changes --- CMakeLists.txt | 4 ---- scripts/eosio_build.sh | 8 ++++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ff89762398..4d708ac5d44 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,11 +112,7 @@ FIND_PACKAGE(Boost 1.67 REQUIRED COMPONENTS unit_test_framework iostreams) -# Some new stdlibc++s will #error on ; a problem for boost pre-1.69 add_definitions(-DBOOST_ASIO_DISABLE_STD_EXPERIMENTAL_STRING_VIEW) -if( APPLE AND UNIX ) - add_definitions(-DBOOST_ASIO_DISABLE_STD_EXPERIMENTAL_STRING_VIEW) -endif() set(CMAKE_THREAD_PREFER_PTHREAD TRUE) set(THREADS_PREFER_PTHREAD_FLAG TRUE) diff --git a/scripts/eosio_build.sh b/scripts/eosio_build.sh index 3cd8ec6a7d5..05a3903ce20 100755 --- a/scripts/eosio_build.sh +++ b/scripts/eosio_build.sh @@ -247,7 +247,7 @@ else fi fi -if $PIN_COMPILER; then +if [ $PIN_COMPILER ]; then BUILD_CLANG8=true CPP_COMP=${OPT_LOCATION}/clang8/bin/clang++ CC_COMP=${OPT_LOCATION}/clang8/bin/clang @@ -367,17 +367,17 @@ printf "## ENABLE_COVERAGE_TESTING=%s\\n" "${ENABLE_COVERAGE_TESTING}" cd $BUILD_DIR -if $PIN_COMPILER; then +if [ $PIN_COMPILER ]; then $CMAKE -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_TOOLCHAIN_FILE=$BUILD_DIR/pinned_toolchain.cmake \ -DCORE_SYMBOL_NAME="${CORE_SYMBOL_NAME}" \ - -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=false \ + -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=$ENABLE_MONGO \ -DENABLE_COVERAGE_TESTING="${ENABLE_COVERAGE_TESTING}" -DBUILD_DOXYGEN="${DOXYGEN}" \ -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_PREFIX_PATH=$OPT_LOCATION/llvm4\ -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/eosio $LOCAL_CMAKE_FLAGS -DEOSIO_PIN_COMPILER=1 "${REPO_ROOT}" else $CMAKE -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_CXX_COMPILER="${CXX}" \ -DCMAKE_C_COMPILER="${CC}" -DCORE_SYMBOL_NAME="${CORE_SYMBOL_NAME}" \ - -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=true \ + -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=$ENABLE_MONGO \ -DENABLE_COVERAGE_TESTING="${ENABLE_COVERAGE_TESTING}" -DBUILD_DOXYGEN="${DOXYGEN}" \ -DCMAKE_PREFIX_PATH=$PREFIX \ -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/eosio $LOCAL_CMAKE_FLAGS $PIN_COMPILER_CMAKE "${REPO_ROOT}" From caf409e31166ec40dcec0fbd1cbefce2b5d33909 Mon Sep 17 00:00:00 2001 From: Nathan Pierce Date: Tue, 23 Apr 2019 19:39:10 -0400 Subject: [PATCH 64/86] pipeline changes to use new images --- .buildkite/pipeline.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 57bcdbf6d92..f0404f90182 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -17,7 +17,7 @@ steps: region: "us-west-2" docker#v2.1.0: debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-2" + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" propagate-environment: true workdir: /data/job timeout: 120 @@ -40,7 +40,7 @@ steps: region: "us-west-2" docker#v2.1.0: debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-2" + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" propagate-environment: true workdir: /data/job timeout: 120 @@ -63,7 +63,7 @@ steps: region: "us-west-2" docker#v2.1.0: debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-2" + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" propagate-environment: true workdir: /data/job timeout: 120 @@ -86,7 +86,7 @@ steps: region: "us-west-2" docker#v2.1.0: debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-2" + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" propagate-environment: true workdir: /data/job timeout: 120 @@ -127,7 +127,7 @@ steps: region: "us-west-2" docker#v2.1.0: debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-2" + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" propagate-environment: true workdir: /data/job timeout: 60 @@ -148,7 +148,7 @@ steps: region: "us-west-2" docker#v2.1.0: debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-2" + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" propagate-environment: true workdir: /data/job timeout: 60 @@ -170,7 +170,7 @@ steps: region: "us-west-2" docker#v2.1.0: debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-2" + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" propagate-environment: true workdir: /data/job timeout: 60 @@ -191,7 +191,7 @@ steps: region: "us-west-2" docker#v2.1.0: debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-2" + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" propagate-environment: true workdir: /data/job timeout: 60 @@ -213,7 +213,7 @@ steps: region: "us-west-2" docker#v2.1.0: debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-2" + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" propagate-environment: true workdir: /data/job timeout: 60 @@ -234,7 +234,7 @@ steps: region: "us-west-2" docker#v2.1.0: debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-2" + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" propagate-environment: true workdir: /data/job timeout: 60 @@ -256,7 +256,7 @@ steps: region: "us-west-2" docker#v2.1.0: debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-2" + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" propagate-environment: true workdir: /data/job timeout: 60 @@ -277,7 +277,7 @@ steps: region: "us-west-2" docker#v2.1.0: debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-2" + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" propagate-environment: true workdir: /data/job timeout: 60 @@ -336,7 +336,7 @@ steps: region: "us-west-2" docker#v2.1.0: debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-2" + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" propagate-environment: true workdir: /data/job env: @@ -364,7 +364,7 @@ steps: region: "us-west-2" docker#v2.1.0: debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-2" + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" propagate-environment: true workdir: /data/job env: @@ -392,7 +392,7 @@ steps: region: "us-west-2" docker#v2.1.0: debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-2" + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" propagate-environment: true workdir: /data/job env: From c520f37608da715a826f6c67a3f33276bb7fa39c Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 24 Apr 2019 10:40:17 -0400 Subject: [PATCH 65/86] addressed comments --- scripts/eosio_build.sh | 2 ++ scripts/eosio_build_amazon.sh | 14 +++++++++++++- scripts/eosio_build_centos.sh | 14 +++++++++++++- scripts/eosio_build_darwin.sh | 10 ++++++++++ scripts/eosio_build_fedora.sh | 13 ++++++++++++- scripts/eosio_build_ubuntu.sh | 13 ++++++++++++- 6 files changed, 62 insertions(+), 4 deletions(-) diff --git a/scripts/eosio_build.sh b/scripts/eosio_build.sh index 05a3903ce20..717e723ed03 100755 --- a/scripts/eosio_build.sh +++ b/scripts/eosio_build.sh @@ -48,6 +48,7 @@ txtrst=$(tput sgr0) SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" REPO_ROOT="${SCRIPT_DIR}/.." BUILD_DIR="${REPO_ROOT}/build" +ENABLE_MONGO=false export BUILD_DIR=$BUILD_DIR @@ -129,6 +130,7 @@ if [ $# -ne 0 ]; then ;; m) BUILD_MONGO=1 + ENABLE_MONGO=1 ;; \? ) printf "\\nInvalid Option: %s\\n" "-${OPTARG}" 1>&2 diff --git a/scripts/eosio_build_amazon.sh b/scripts/eosio_build_amazon.sh index ae1a8a8fd24..36aaef767c0 100755 --- a/scripts/eosio_build_amazon.sh +++ b/scripts/eosio_build_amazon.sh @@ -120,6 +120,17 @@ fi printf "\\n" +### clean up force build before starting +if [ $FORCE_BUILD ];then + rm -rf \ + ${SRC_LOCATION}/cmake-$CMAKE_VERSION \ + ${SRC_LOCATION}/llvm ${OPT_LOCATION}/llvm4 \ + ${TMP_LOCATION}/clang8 ${OPT_LOCATION}/clang8 \ + ${SRC_LOCATION}/zlib ${OPT_LOCATION}/zlib \ + ${SRC_LOCATION}/boost \ + ${SRC_LOCATION}/mongodb-linux-x86_64-amazon-$MONGODB_VERSION \ + ${SRC_LOCATION}/mongo-c-driver-$MONGO_C_DRIVER_VERSION \ + ${SRC_LOCATION}/mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION printf "Checking CMAKE installation...\\n" if [ ! -e $CMAKE ] || [ $FORCE_BUILD ]; then @@ -142,7 +153,8 @@ if [ $? -ne 0 ]; then exit -1; fi printf "\\n" -if $PIN_COMPILER; then + +if [ $PIN_COMPILER ]; then printf "Checking Clang 8 support...\\n" if [ ! -d $CLANG8_ROOT ] || [ $FORCE_BUILD ]; then printf "Installing Clang 8...\\n" diff --git a/scripts/eosio_build_centos.sh b/scripts/eosio_build_centos.sh index 07964458b57..f8ae55dc9a3 100755 --- a/scripts/eosio_build_centos.sh +++ b/scripts/eosio_build_centos.sh @@ -171,6 +171,18 @@ fi printf "\\n" +### clean up force build before starting +if [ $FORCE_BUILD ];then + rm -rf \ + ${SRC_LOCATION}/cmake-$CMAKE_VERSION \ + ${SRC_LOCATION}/llvm ${OPT_LOCATION}/llvm4 \ + ${TMP_LOCATION}/clang8 ${OPT_LOCATION}/clang8 \ + ${SRC_LOCATION}/zlib ${OPT_LOCATION}/zlib \ + ${SRC_LOCATION}/boost ${BOOST_ROOT} \ + ${SRC_LOCATION}/mongodb-linux-x86_64-amazon-$MONGODB_VERSION \ + ${SRC_LOCATION}/mongo-c-driver-$MONGO_C_DRIVER_VERSION \ + ${SRC_LOCATION}/mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION + printf "Checking CMAKE installation...\\n" if [ ! -e $CMAKE ] || [ $FORCE_BUILD ]; then printf "Installing CMAKE...\\n" @@ -194,7 +206,7 @@ printf "\\n" export CPATH="${CPATH}:${PYTHON3PATH}/root/usr/include/python3.6m" # m on the end causes problems with boost finding python3 -if $PIN_COMPILER; then +if [ $PIN_COMPILER ]; then printf "Checking Clang 8 support...\\n" if [ ! -d $CLANG8_ROOT ] || [ $FORCE_BUILD ]; then printf "Installing Clang 8...\\n" diff --git a/scripts/eosio_build_darwin.sh b/scripts/eosio_build_darwin.sh index 7ea9781197f..41352f4bcbf 100755 --- a/scripts/eosio_build_darwin.sh +++ b/scripts/eosio_build_darwin.sh @@ -161,6 +161,16 @@ fi printf "\\n" +### clean up force build before starting +if [ $FORCE_BUILD ];then + rm -rf \ + ${SRC_LOCATION}/llvm ${OPT_LOCATION}/llvm4 \ + ${TMP_LOCATION}/clang8 ${OPT_LOCATION}/clang8 \ + ${SRC_LOCATION}/zlib ${OPT_LOCATION}/zlib \ + ${SRC_LOCATION}/boost \ + ${SRC_LOCATION}/mongodb-linux-x86_64-amazon-$MONGODB_VERSION \ + ${SRC_LOCATION}/mongo-c-driver-$MONGO_C_DRIVER_VERSION \ + ${SRC_LOCATION}/mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION export CPATH="$(python-config --includes | awk '{print $1}' | cut -dI -f2):$CPATH" # Boost has trouble finding pyconfig.h printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index 2cf077538c7..44bec05fdb4 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -116,6 +116,17 @@ fi printf "\\n" +### clean up force build before starting +if [ $FORCE_BUILD ];then + rm -rf \ + ${SRC_LOCATION}/cmake-$CMAKE_VERSION \ + ${SRC_LOCATION}/llvm ${OPT_LOCATION}/llvm4 \ + ${TMP_LOCATION}/clang8 ${OPT_LOCATION}/clang8 \ + ${SRC_LOCATION}/zlib ${OPT_LOCATION}/zlib \ + ${SRC_LOCATION}/boost \ + ${SRC_LOCATION}/mongodb-linux-x86_64-amazon-$MONGODB_VERSION \ + ${SRC_LOCATION}/mongo-c-driver-$MONGO_C_DRIVER_VERSION \ + ${SRC_LOCATION}/mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION printf "Checking CMAKE installation...\\n" if [ ! -e $CMAKE ] || [ $FORCE_BUILD ]; then @@ -137,7 +148,7 @@ if [ $? -ne 0 ]; then exit -1; fi printf "\\n" -if $PIN_COMPILER; then +if [ $PIN_COMPILER ]; then printf "Checking Clang 8 support...\\n" if [ ! -d $CLANG8_ROOT ] || [ $FORCE_BUILD ]; then printf "Installing Clang 8...\\n" diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index 93a995d009b..b7cefd88e83 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -140,6 +140,17 @@ fi printf "\\n" +### clean up force build before starting +if [ $FORCE_BUILD ];then + rm -rf \ + ${SRC_LOCATION}/cmake-$CMAKE_VERSION \ + ${SRC_LOCATION}/llvm ${OPT_LOCATION}/llvm4 \ + ${TMP_LOCATION}/clang8 ${OPT_LOCATION}/clang8 \ + ${SRC_LOCATION}/zlib ${OPT_LOCATION}/zlib \ + ${SRC_LOCATION}/boost \ + ${SRC_LOCATION}/mongodb-linux-x86_64-amazon-$MONGODB_VERSION \ + ${SRC_LOCATION}/mongo-c-driver-$MONGO_C_DRIVER_VERSION \ + ${SRC_LOCATION}/mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION \ printf "Checking CMAKE installation...\\n" if [ ! -e $CMAKE ] || [ $FORCE_BUILD ]; then @@ -162,7 +173,7 @@ if [ $? -ne 0 ]; then exit -1; fi printf "\\n" -if $PIN_COMPILER; then +if [ $PIN_COMPILER ]; then printf "Checking Clang 8 support...\\n" if [ ! -d $CLANG8_ROOT ] || [ $FORCE_BUILD ]; then printf "Installing Clang 8...\\n" From 4228e97e3358c5b6b97ec65b42afc48c477b4323 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 24 Apr 2019 10:44:41 -0400 Subject: [PATCH 66/86] forgot fi --- scripts/eosio_build_amazon.sh | 1 + scripts/eosio_build_centos.sh | 1 + scripts/eosio_build_darwin.sh | 1 + scripts/eosio_build_fedora.sh | 1 + scripts/eosio_build_ubuntu.sh | 1 + 5 files changed, 5 insertions(+) diff --git a/scripts/eosio_build_amazon.sh b/scripts/eosio_build_amazon.sh index 36aaef767c0..5d0438ca314 100755 --- a/scripts/eosio_build_amazon.sh +++ b/scripts/eosio_build_amazon.sh @@ -131,6 +131,7 @@ if [ $FORCE_BUILD ];then ${SRC_LOCATION}/mongodb-linux-x86_64-amazon-$MONGODB_VERSION \ ${SRC_LOCATION}/mongo-c-driver-$MONGO_C_DRIVER_VERSION \ ${SRC_LOCATION}/mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION +fi printf "Checking CMAKE installation...\\n" if [ ! -e $CMAKE ] || [ $FORCE_BUILD ]; then diff --git a/scripts/eosio_build_centos.sh b/scripts/eosio_build_centos.sh index f8ae55dc9a3..140705f4d6d 100755 --- a/scripts/eosio_build_centos.sh +++ b/scripts/eosio_build_centos.sh @@ -182,6 +182,7 @@ if [ $FORCE_BUILD ];then ${SRC_LOCATION}/mongodb-linux-x86_64-amazon-$MONGODB_VERSION \ ${SRC_LOCATION}/mongo-c-driver-$MONGO_C_DRIVER_VERSION \ ${SRC_LOCATION}/mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION +fi printf "Checking CMAKE installation...\\n" if [ ! -e $CMAKE ] || [ $FORCE_BUILD ]; then diff --git a/scripts/eosio_build_darwin.sh b/scripts/eosio_build_darwin.sh index 41352f4bcbf..64b6222e34f 100755 --- a/scripts/eosio_build_darwin.sh +++ b/scripts/eosio_build_darwin.sh @@ -171,6 +171,7 @@ if [ $FORCE_BUILD ];then ${SRC_LOCATION}/mongodb-linux-x86_64-amazon-$MONGODB_VERSION \ ${SRC_LOCATION}/mongo-c-driver-$MONGO_C_DRIVER_VERSION \ ${SRC_LOCATION}/mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION +fi export CPATH="$(python-config --includes | awk '{print $1}' | cut -dI -f2):$CPATH" # Boost has trouble finding pyconfig.h printf "Checking Boost library (${BOOST_VERSION}) installation...\\n" diff --git a/scripts/eosio_build_fedora.sh b/scripts/eosio_build_fedora.sh index 44bec05fdb4..46b5c4c041f 100755 --- a/scripts/eosio_build_fedora.sh +++ b/scripts/eosio_build_fedora.sh @@ -127,6 +127,7 @@ if [ $FORCE_BUILD ];then ${SRC_LOCATION}/mongodb-linux-x86_64-amazon-$MONGODB_VERSION \ ${SRC_LOCATION}/mongo-c-driver-$MONGO_C_DRIVER_VERSION \ ${SRC_LOCATION}/mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION +fi printf "Checking CMAKE installation...\\n" if [ ! -e $CMAKE ] || [ $FORCE_BUILD ]; then diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index b7cefd88e83..55b3793a2df 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -151,6 +151,7 @@ if [ $FORCE_BUILD ];then ${SRC_LOCATION}/mongodb-linux-x86_64-amazon-$MONGODB_VERSION \ ${SRC_LOCATION}/mongo-c-driver-$MONGO_C_DRIVER_VERSION \ ${SRC_LOCATION}/mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION \ +fi printf "Checking CMAKE installation...\\n" if [ ! -e $CMAKE ] || [ $FORCE_BUILD ]; then From ccd0be4c4e6b12627a834d02616e08fdd125d283 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 24 Apr 2019 10:55:27 -0400 Subject: [PATCH 67/86] left over / --- scripts/eosio_build_ubuntu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/eosio_build_ubuntu.sh b/scripts/eosio_build_ubuntu.sh index 55b3793a2df..6284d8e5a5a 100755 --- a/scripts/eosio_build_ubuntu.sh +++ b/scripts/eosio_build_ubuntu.sh @@ -150,7 +150,7 @@ if [ $FORCE_BUILD ];then ${SRC_LOCATION}/boost \ ${SRC_LOCATION}/mongodb-linux-x86_64-amazon-$MONGODB_VERSION \ ${SRC_LOCATION}/mongo-c-driver-$MONGO_C_DRIVER_VERSION \ - ${SRC_LOCATION}/mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION \ + ${SRC_LOCATION}/mongo-cxx-driver-r$MONGO_CXX_DRIVER_VERSION fi printf "Checking CMAKE installation...\\n" From bd97221c332ae08f334175e3da048e3c29d06817 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 24 Apr 2019 10:58:40 -0400 Subject: [PATCH 68/86] remove force flag from pipeline.yml --- .buildkite/pipeline.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index f0404f90182..6be9df0a12a 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,7 +1,7 @@ steps: - command: | # Amazon Linux 2 Build echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -P -f + ./scripts/eosio_build.sh -y -P echo "--- :compression: Compressing build directory" tar -pczf build.tar.gz build if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi @@ -24,7 +24,7 @@ steps: - command: | # CentOS 7 Build echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -P -f + ./scripts/eosio_build.sh -y -P echo "--- :compression: Compressing build directory" tar -pczf build.tar.gz build if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi @@ -47,7 +47,7 @@ steps: - command: | # Ubuntu 16.04 Build echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -P -f + ./scripts/eosio_build.sh -y -P echo "--- :compression: Compressing build directory" tar -pczf build.tar.gz build if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi @@ -70,7 +70,7 @@ steps: - command: | # Ubuntu 18.04 Build echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -P -f + ./scripts/eosio_build.sh -y -P echo "--- :compression: Compressing build directory" tar -pczf build.tar.gz build if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi @@ -97,7 +97,7 @@ steps: ln -s "$(pwd)" /data/job cd /data/job echo "+++ Building :hammer:" - ./scripts/eosio_build.sh -y -P -f + ./scripts/eosio_build.sh -y -P echo "--- Compressing build directory :compression:" tar -pczf build.tar.gz build if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi From 745b0bbf518872e11ca35bcc57be81de9885aa44 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 24 Apr 2019 11:09:46 -0400 Subject: [PATCH 69/86] adding back -f until base images are built correctly --- .buildkite/pipeline.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 6be9df0a12a..f0404f90182 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,7 +1,7 @@ steps: - command: | # Amazon Linux 2 Build echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -P + ./scripts/eosio_build.sh -y -P -f echo "--- :compression: Compressing build directory" tar -pczf build.tar.gz build if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi @@ -24,7 +24,7 @@ steps: - command: | # CentOS 7 Build echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -P + ./scripts/eosio_build.sh -y -P -f echo "--- :compression: Compressing build directory" tar -pczf build.tar.gz build if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi @@ -47,7 +47,7 @@ steps: - command: | # Ubuntu 16.04 Build echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -P + ./scripts/eosio_build.sh -y -P -f echo "--- :compression: Compressing build directory" tar -pczf build.tar.gz build if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi @@ -70,7 +70,7 @@ steps: - command: | # Ubuntu 18.04 Build echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -P + ./scripts/eosio_build.sh -y -P -f echo "--- :compression: Compressing build directory" tar -pczf build.tar.gz build if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi @@ -97,7 +97,7 @@ steps: ln -s "$(pwd)" /data/job cd /data/job echo "+++ Building :hammer:" - ./scripts/eosio_build.sh -y -P + ./scripts/eosio_build.sh -y -P -f echo "--- Compressing build directory :compression:" tar -pczf build.tar.gz build if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi From 690966505dc03a97342c446483baa2d0e42dff29 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 24 Apr 2019 14:39:55 -0400 Subject: [PATCH 70/86] disable mongo tests --- scripts/parallel-test.sh | 5 +---- scripts/serial-test.sh | 8 ++++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/scripts/parallel-test.sh b/scripts/parallel-test.sh index fd53ca55198..0153b95c87e 100755 --- a/scripts/parallel-test.sh +++ b/scripts/parallel-test.sh @@ -4,8 +4,6 @@ set -e # exit on failure of any "simple" command (excludes &&, ||, or | chains) PATH=$PATH:~/opt/mongodb/bin echo "Extracting build directory..." tar -zxf build.tar.gz -echo "Starting MongoDB..." -~/bin/mongod --fork --dbpath ~/data/mongodb -f ~/etc/mongod.conf --logpath "$(pwd)"/mongod.log cd /data/job/build # run tests echo "Running tests..." @@ -26,7 +24,6 @@ mv $(pwd)/Testing/$(ls $(pwd)/Testing/ | grep '20' | tail -n 1)/Test.xml $XML_FI buildkite-agent artifact upload config.ini buildkite-agent artifact upload genesis.json cd .. -buildkite-agent artifact upload mongod.log cd build buildkite-agent artifact upload $XML_FILENAME echo "Done uploading artifacts." @@ -35,4 +32,4 @@ if [[ "$EXIT_STATUS" != 0 ]]; then echo "Failing due to non-zero exit status from ctest: $EXIT_STATUS" echo ' ^^^ scroll up for more information ^^^' exit $EXIT_STATUS -fi \ No newline at end of file +fi diff --git a/scripts/serial-test.sh b/scripts/serial-test.sh index 1d36e081712..c1f83ae9bfa 100755 --- a/scripts/serial-test.sh +++ b/scripts/serial-test.sh @@ -4,8 +4,8 @@ set -e # exit on failure of any "simple" command (excludes &&, ||, or | chains) PATH=$PATH:~/opt/mongodb/bin echo "Extracting build directory..." tar -zxf build.tar.gz -echo "Starting MongoDB..." -~/bin/mongod --fork --dbpath ~/data/mongodb -f ~/etc/mongod.conf --logpath "$(pwd)"/mongod.log +#echo "Starting MongoDB..." +#~/bin/mongod --fork --dbpath ~/data/mongodb -f ~/etc/mongod.conf --logpath "$(pwd)"/mongod.log cd /data/job/build # run tests echo "Running tests..." @@ -24,7 +24,7 @@ mv $(pwd)/Testing/$(ls $(pwd)/Testing/ | grep '20' | tail -n 1)/Test.xml $XML_FI buildkite-agent artifact upload config.ini buildkite-agent artifact upload genesis.json cd .. -buildkite-agent artifact upload mongod.log +#buildkite-agent artifact upload mongod.log cd build buildkite-agent artifact upload $XML_FILENAME echo "Done uploading artifacts." @@ -33,4 +33,4 @@ if [[ "$EXIT_STATUS" != 0 ]]; then echo "Failing due to non-zero exit status from ctest: $EXIT_STATUS" echo ' ^^^ scroll up for more information ^^^' exit $EXIT_STATUS -fi \ No newline at end of file +fi From b8fee492303d0a12c48600a6af2fa5fccd29077d Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 24 Apr 2019 19:22:50 -0400 Subject: [PATCH 71/86] remove force flag and use new mac builder --- .buildkite/pipeline.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index f0404f90182..a4eb89b6d64 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,7 +1,7 @@ steps: - command: | # Amazon Linux 2 Build echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -P -f + ./scripts/eosio_build.sh -y -P echo "--- :compression: Compressing build directory" tar -pczf build.tar.gz build if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi @@ -24,7 +24,7 @@ steps: - command: | # CentOS 7 Build echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -P -f + ./scripts/eosio_build.sh -y -P echo "--- :compression: Compressing build directory" tar -pczf build.tar.gz build if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi @@ -47,7 +47,7 @@ steps: - command: | # Ubuntu 16.04 Build echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -P -f + ./scripts/eosio_build.sh -y -P echo "--- :compression: Compressing build directory" tar -pczf build.tar.gz build if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi @@ -70,7 +70,7 @@ steps: - command: | # Ubuntu 18.04 Build echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -P -f + ./scripts/eosio_build.sh -y -P echo "--- :compression: Compressing build directory" tar -pczf build.tar.gz build if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi @@ -97,13 +97,13 @@ steps: ln -s "$(pwd)" /data/job cd /data/job echo "+++ Building :hammer:" - ./scripts/eosio_build.sh -y -P -f + ./scripts/eosio_build.sh -y -P echo "--- Compressing build directory :compression:" tar -pczf build.tar.gz build if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi label: ":darwin: Mojave Build" agents: - - "role=builder-v2-1" + - "role=builder-v2-2" - "os=mojave" artifact_paths: "build.tar.gz" timeout: 120 From 3d7cc2a23ac9d3b5f295ef8a212e81b9b7aa4301 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 24 Apr 2019 19:43:25 -0400 Subject: [PATCH 72/86] point tests to new mac builder and remove remnant flags to cmake --- .buildkite/pipeline.yml | 6 +++--- scripts/eosio_build.sh | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index a4eb89b6d64..408c8f19677 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -291,7 +291,7 @@ steps: ./scripts/parallel-test.sh label: ":darwin: Mojave Tests" agents: - - "role=tester-v2-1" + - "role=tester-v2-2" - "os=mojave" timeout: 60 @@ -303,7 +303,7 @@ steps: ./scripts/serial-test.sh label: ":darwin: Mojave NP Tests" agents: - - "role=tester-v2-1" + - "role=tester-v2-2" - "os=mojave" timeout: 60 @@ -410,7 +410,7 @@ steps: bash generate_package.sh brew label: ":darwin: Mojave Package Builder" agents: - - "role=builder-v2-1" + - "role=builder-v2-2" - "os=mojave" artifact_paths: - "build/packages/*.tar.gz" diff --git a/scripts/eosio_build.sh b/scripts/eosio_build.sh index 717e723ed03..5c09ea6bae1 100755 --- a/scripts/eosio_build.sh +++ b/scripts/eosio_build.sh @@ -253,7 +253,6 @@ if [ $PIN_COMPILER ]; then BUILD_CLANG8=true CPP_COMP=${OPT_LOCATION}/clang8/bin/clang++ CC_COMP=${OPT_LOCATION}/clang8/bin/clang - PIN_COMPILER_CMAKE="-DEOSIO_PIN_COMPILER=1 -DLIBSTDCPP_DIR=${OPT_LOCATION}/gcc -DLIBCPP_DIR=${OPT_LOCATION}/clang8/" elif $NO_CPP17; then if [ $NONINTERACTIVE -eq 0 ]; then BUILD_CLANG8=true @@ -375,14 +374,14 @@ if [ $PIN_COMPILER ]; then -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=$ENABLE_MONGO \ -DENABLE_COVERAGE_TESTING="${ENABLE_COVERAGE_TESTING}" -DBUILD_DOXYGEN="${DOXYGEN}" \ -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_PREFIX_PATH=$OPT_LOCATION/llvm4\ - -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/eosio $LOCAL_CMAKE_FLAGS -DEOSIO_PIN_COMPILER=1 "${REPO_ROOT}" + -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/eosio $LOCAL_CMAKE_FLAGS "${REPO_ROOT}" else $CMAKE -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_CXX_COMPILER="${CXX}" \ -DCMAKE_C_COMPILER="${CC}" -DCORE_SYMBOL_NAME="${CORE_SYMBOL_NAME}" \ -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=$ENABLE_MONGO \ -DENABLE_COVERAGE_TESTING="${ENABLE_COVERAGE_TESTING}" -DBUILD_DOXYGEN="${DOXYGEN}" \ -DCMAKE_PREFIX_PATH=$PREFIX \ - -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/eosio $LOCAL_CMAKE_FLAGS $PIN_COMPILER_CMAKE "${REPO_ROOT}" + -DCMAKE_INSTALL_PREFIX=$OPT_LOCATION/eosio $LOCAL_CMAKE_FLAGS "${REPO_ROOT}" fi if [ $? -ne 0 ]; then exit -1; fi From d3d7416816d194b9112e010e73d79823f06708d7 Mon Sep 17 00:00:00 2001 From: Nathan Pierce Date: Wed, 24 Apr 2019 21:45:12 -0400 Subject: [PATCH 73/86] testing anka --- .buildkite/pipeline.yml | 62 ++++++++++++++++++++++++++++++----------- 1 file changed, 45 insertions(+), 17 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 408c8f19677..41545db9ca6 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,4 +1,49 @@ steps: + +env: + ANKA_WORKDIR: "/data/job" + ANKA_MOJAVE_TEMPLATE: "10.14.4_6C_14G_23G" + ANKA_TEMPLATE_TAG: "clean::cicd::git-ssh::nas::brew" + CHECKSUMABLE: "scripts/eosio_build*" + MAC_TAG: "eosio_2-3" + +steps: + + - trigger: "mac-anka-fleet" + label: ":anka: Ensure Mojave Anka Template Tag Exists" + branches: "mac-anka-fleet" + async: false + build: + branch: "master" + env: + REPO: "${BUILDKITE_REPO}" + REPO_BRANCH: "${BUILDKITE_BRANCH}" + CHECKSUMABLE: "${CHECKSUMABLE}" + TEMPLATE: "${ANKA_MOJAVE_TEMPLATE}" + TEMPLATE_TAG: "${ANKA_TEMPLATE_TAG}" + TAG_COMMANDS: "CLONED_REPO_DIR/scripts/eosio_build.sh -y" # CLONED_REPO_DIR is where the repo is always cloned into + PROJECT_TAG: "${MAC_TAG}" + + - wait + + - command: | # macOS Mojave Build + echo "--- Creating symbolic link to job directory :file_folder:" + sleep 5 + ln -s "$(pwd)" /data/job + cd /data/job + echo "+++ Building :hammer:" + ./scripts/eosio_build.sh -y -P + echo "--- Compressing build directory :compression:" + tar -pczf build.tar.gz build + if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi + label: ":darwin: Mojave Build" + agents: + - "role=builder-v2-2" + - "os=mojave" + artifact_paths: "build.tar.gz" + timeout: 120 + + - command: | # Amazon Linux 2 Build echo "+++ :hammer: Building" ./scripts/eosio_build.sh -y -P @@ -91,23 +136,6 @@ steps: workdir: /data/job timeout: 120 - - command: | # macOS Mojave Build - echo "--- Creating symbolic link to job directory :file_folder:" - sleep 5 - ln -s "$(pwd)" /data/job - cd /data/job - echo "+++ Building :hammer:" - ./scripts/eosio_build.sh -y -P - echo "--- Compressing build directory :compression:" - tar -pczf build.tar.gz build - if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi - label: ":darwin: Mojave Build" - agents: - - "role=builder-v2-2" - - "os=mojave" - artifact_paths: "build.tar.gz" - timeout: 120 - - wait # Amazon Linux 2 Tests From fcdd3470ee6f61fe13043f9a04e4ae4c3482385e Mon Sep 17 00:00:00 2001 From: Nathan Pierce Date: Wed, 24 Apr 2019 21:47:00 -0400 Subject: [PATCH 74/86] testing anka --- .buildkite/pipeline.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 41545db9ca6..4baf2de95bc 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,5 +1,3 @@ -steps: - env: ANKA_WORKDIR: "/data/job" ANKA_MOJAVE_TEMPLATE: "10.14.4_6C_14G_23G" @@ -43,7 +41,7 @@ steps: artifact_paths: "build.tar.gz" timeout: 120 - + - command: | # Amazon Linux 2 Build echo "+++ :hammer: Building" ./scripts/eosio_build.sh -y -P From 04fc1d6039f7c278ddb13c47e340354cedeec68c Mon Sep 17 00:00:00 2001 From: Nathan Pierce Date: Wed, 24 Apr 2019 21:49:35 -0400 Subject: [PATCH 75/86] testing anka --- .buildkite/pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 4baf2de95bc..f6041cf4649 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -12,14 +12,14 @@ steps: branches: "mac-anka-fleet" async: false build: - branch: "master" + branch: "${BUILDKITE_BRANCH}" env: REPO: "${BUILDKITE_REPO}" REPO_BRANCH: "${BUILDKITE_BRANCH}" CHECKSUMABLE: "${CHECKSUMABLE}" TEMPLATE: "${ANKA_MOJAVE_TEMPLATE}" TEMPLATE_TAG: "${ANKA_TEMPLATE_TAG}" - TAG_COMMANDS: "CLONED_REPO_DIR/scripts/eosio_build.sh -y" # CLONED_REPO_DIR is where the repo is always cloned into + TAG_COMMANDS: "CLONED_REPO_DIR/scripts/eosio_build.sh -y -P -f" # CLONED_REPO_DIR is where the repo is always cloned into PROJECT_TAG: "${MAC_TAG}" - wait From 061079fa4e05f53a4b235bc6f595db5556d08725 Mon Sep 17 00:00:00 2001 From: Nathan Pierce Date: Wed, 24 Apr 2019 22:05:22 -0400 Subject: [PATCH 76/86] testing anka --- .buildkite/pipeline.yml | 834 ++++++++++++++++++++-------------------- 1 file changed, 417 insertions(+), 417 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index f6041cf4649..d6a6d0a059d 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,6 +1,6 @@ env: ANKA_WORKDIR: "/data/job" - ANKA_MOJAVE_TEMPLATE: "10.14.4_6C_14G_23G" + ANKA_MOJAVE_TEMPLATE: "10.14.4_6C_14G_40G" ANKA_TEMPLATE_TAG: "clean::cicd::git-ssh::nas::brew" CHECKSUMABLE: "scripts/eosio_build*" MAC_TAG: "eosio_2-3" @@ -19,446 +19,446 @@ steps: CHECKSUMABLE: "${CHECKSUMABLE}" TEMPLATE: "${ANKA_MOJAVE_TEMPLATE}" TEMPLATE_TAG: "${ANKA_TEMPLATE_TAG}" - TAG_COMMANDS: "CLONED_REPO_DIR/scripts/eosio_build.sh -y -P -f" # CLONED_REPO_DIR is where the repo is always cloned into + TAG_COMMANDS: "CLONED_REPO_DIR/scripts/eosio_build.sh -y -P -f" # CLONED_REPO_DIR IS REQUIRED and is where the repo is always cloned into PROJECT_TAG: "${MAC_TAG}" - - wait + # - wait - - command: | # macOS Mojave Build - echo "--- Creating symbolic link to job directory :file_folder:" - sleep 5 - ln -s "$(pwd)" /data/job - cd /data/job - echo "+++ Building :hammer:" - ./scripts/eosio_build.sh -y -P - echo "--- Compressing build directory :compression:" - tar -pczf build.tar.gz build - if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi - label: ":darwin: Mojave Build" - agents: - - "role=builder-v2-2" - - "os=mojave" - artifact_paths: "build.tar.gz" - timeout: 120 + # - command: | # macOS Mojave Build + # echo "--- Creating symbolic link to job directory :file_folder:" + # sleep 5 + # ln -s "$(pwd)" /data/job + # cd /data/job + # echo "+++ Building :hammer:" + # ./scripts/eosio_build.sh -y -P + # echo "--- Compressing build directory :compression:" + # tar -pczf build.tar.gz build + # if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi + # label: ":darwin: Mojave Build" + # agents: + # - "role=builder-v2-2" + # - "os=mojave" + # artifact_paths: "build.tar.gz" + # timeout: 120 - - command: | # Amazon Linux 2 Build - echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -P - echo "--- :compression: Compressing build directory" - tar -pczf build.tar.gz build - if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi - label: ":aws: Amazon Linux 2 Build" - agents: - queue: "automation-large-builder-fleet" - artifact_paths: "build.tar.gz" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" - propagate-environment: true - workdir: /data/job - timeout: 120 + # - command: | # Amazon Linux 2 Build + # echo "+++ :hammer: Building" + # ./scripts/eosio_build.sh -y -P + # echo "--- :compression: Compressing build directory" + # tar -pczf build.tar.gz build + # if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi + # label: ":aws: Amazon Linux 2 Build" + # agents: + # queue: "automation-large-builder-fleet" + # artifact_paths: "build.tar.gz" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" + # propagate-environment: true + # workdir: /data/job + # timeout: 120 - - command: | # CentOS 7 Build - echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -P - echo "--- :compression: Compressing build directory" - tar -pczf build.tar.gz build - if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi - label: ":centos: CentOS 7 Build" - agents: - queue: "automation-large-builder-fleet" - artifact_paths: "build.tar.gz" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" - propagate-environment: true - workdir: /data/job - timeout: 120 + # - command: | # CentOS 7 Build + # echo "+++ :hammer: Building" + # ./scripts/eosio_build.sh -y -P + # echo "--- :compression: Compressing build directory" + # tar -pczf build.tar.gz build + # if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi + # label: ":centos: CentOS 7 Build" + # agents: + # queue: "automation-large-builder-fleet" + # artifact_paths: "build.tar.gz" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" + # propagate-environment: true + # workdir: /data/job + # timeout: 120 - - command: | # Ubuntu 16.04 Build - echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -P - echo "--- :compression: Compressing build directory" - tar -pczf build.tar.gz build - if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi - label: ":ubuntu: Ubuntu 16.04 Build" - agents: - queue: "automation-large-builder-fleet" - artifact_paths: "build.tar.gz" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" - propagate-environment: true - workdir: /data/job - timeout: 120 + # - command: | # Ubuntu 16.04 Build + # echo "+++ :hammer: Building" + # ./scripts/eosio_build.sh -y -P + # echo "--- :compression: Compressing build directory" + # tar -pczf build.tar.gz build + # if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi + # label: ":ubuntu: Ubuntu 16.04 Build" + # agents: + # queue: "automation-large-builder-fleet" + # artifact_paths: "build.tar.gz" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" + # propagate-environment: true + # workdir: /data/job + # timeout: 120 - - command: | # Ubuntu 18.04 Build - echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -P - echo "--- :compression: Compressing build directory" - tar -pczf build.tar.gz build - if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi - label: ":ubuntu: Ubuntu 18.04 Build" - agents: - queue: "automation-large-builder-fleet" - artifact_paths: "build.tar.gz" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" - propagate-environment: true - workdir: /data/job - timeout: 120 + # - command: | # Ubuntu 18.04 Build + # echo "+++ :hammer: Building" + # ./scripts/eosio_build.sh -y -P + # echo "--- :compression: Compressing build directory" + # tar -pczf build.tar.gz build + # if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi + # label: ":ubuntu: Ubuntu 18.04 Build" + # agents: + # queue: "automation-large-builder-fleet" + # artifact_paths: "build.tar.gz" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" + # propagate-environment: true + # workdir: /data/job + # timeout: 120 - - wait + # - wait - # Amazon Linux 2 Tests - - command: | - echo "--- :arrow_down: Downloading Build Directory" - buildkite-agent artifact download "build.tar.gz" . --step ":aws: Amazon Linux 2 Build" - echo "+++ :microscope: Running Tests" - ./scripts/parallel-test.sh - label: ":aws: Amazon Linux 2 Tests" - agents: - queue: "automation-large-builder-fleet" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" - propagate-environment: true - workdir: /data/job - timeout: 60 + # # Amazon Linux 2 Tests + # - command: | + # echo "--- :arrow_down: Downloading Build Directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":aws: Amazon Linux 2 Build" + # echo "+++ :microscope: Running Tests" + # ./scripts/parallel-test.sh + # label: ":aws: Amazon Linux 2 Tests" + # agents: + # queue: "automation-large-builder-fleet" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" + # propagate-environment: true + # workdir: /data/job + # timeout: 60 - - command: | - echo "--- :arrow_down: Downloading Build Directory" - buildkite-agent artifact download "build.tar.gz" . --step ":aws: Amazon Linux 2 Build" - echo "+++ :microscope: Running Tests" - ./scripts/serial-test.sh - label: ":aws: Amazon Linux 2 NP Tests" - agents: - queue: "automation-large-builder-fleet" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" - propagate-environment: true - workdir: /data/job - timeout: 60 + # - command: | + # echo "--- :arrow_down: Downloading Build Directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":aws: Amazon Linux 2 Build" + # echo "+++ :microscope: Running Tests" + # ./scripts/serial-test.sh + # label: ":aws: Amazon Linux 2 NP Tests" + # agents: + # queue: "automation-large-builder-fleet" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" + # propagate-environment: true + # workdir: /data/job + # timeout: 60 - # centOS 7 Tests - - command: | - echo "--- :arrow_down: Downloading Build Directory" - buildkite-agent artifact download "build.tar.gz" . --step ":centos: CentOS 7 Build" - echo "+++ :microscope: Running Tests" - ./scripts/parallel-test.sh - label: ":centos: CentOS 7 Tests" - agents: - queue: "automation-large-builder-fleet" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" - propagate-environment: true - workdir: /data/job - timeout: 60 + # # centOS 7 Tests + # - command: | + # echo "--- :arrow_down: Downloading Build Directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":centos: CentOS 7 Build" + # echo "+++ :microscope: Running Tests" + # ./scripts/parallel-test.sh + # label: ":centos: CentOS 7 Tests" + # agents: + # queue: "automation-large-builder-fleet" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" + # propagate-environment: true + # workdir: /data/job + # timeout: 60 - - command: | - echo "--- :arrow_down: Downloading Build Directory" - buildkite-agent artifact download "build.tar.gz" . --step ":centos: CentOS 7 Build" - echo "+++ :microscope: Running Tests" - ./scripts/serial-test.sh - label: ":centos: CentOS 7 NP Tests" - agents: - queue: "automation-large-builder-fleet" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" - propagate-environment: true - workdir: /data/job - timeout: 60 + # - command: | + # echo "--- :arrow_down: Downloading Build Directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":centos: CentOS 7 Build" + # echo "+++ :microscope: Running Tests" + # ./scripts/serial-test.sh + # label: ":centos: CentOS 7 NP Tests" + # agents: + # queue: "automation-large-builder-fleet" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" + # propagate-environment: true + # workdir: /data/job + # timeout: 60 - # Ubuntu 16.04 Tests - - command: | - echo "--- :arrow_down: Downloading Build Directory" - buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 16.04 Build" - echo "+++ :microscope: Running Tests" - ./scripts/parallel-test.sh - label: ":ubuntu: Ubuntu 16.04 Tests" - agents: - queue: "automation-large-builder-fleet" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" - propagate-environment: true - workdir: /data/job - timeout: 60 + # # Ubuntu 16.04 Tests + # - command: | + # echo "--- :arrow_down: Downloading Build Directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 16.04 Build" + # echo "+++ :microscope: Running Tests" + # ./scripts/parallel-test.sh + # label: ":ubuntu: Ubuntu 16.04 Tests" + # agents: + # queue: "automation-large-builder-fleet" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" + # propagate-environment: true + # workdir: /data/job + # timeout: 60 - - command: | - echo "--- :arrow_down: Downloading Build Directory" - buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 16.04 Build" - echo "+++ :microscope: Running Tests" - ./scripts/serial-test.sh - label: ":ubuntu: Ubuntu 16.04 NP Tests" - agents: - queue: "automation-large-builder-fleet" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" - propagate-environment: true - workdir: /data/job - timeout: 60 + # - command: | + # echo "--- :arrow_down: Downloading Build Directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 16.04 Build" + # echo "+++ :microscope: Running Tests" + # ./scripts/serial-test.sh + # label: ":ubuntu: Ubuntu 16.04 NP Tests" + # agents: + # queue: "automation-large-builder-fleet" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" + # propagate-environment: true + # workdir: /data/job + # timeout: 60 - # Ubuntu 18.04 Tests - - command: | - echo "--- :arrow_down: Downloading Build Directory" - buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 18.04 Build" - echo "+++ :microscope: Running Tests" - ./scripts/parallel-test.sh - label: ":ubuntu: Ubuntu 18.04 Tests" - agents: - queue: "automation-large-builder-fleet" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" - propagate-environment: true - workdir: /data/job - timeout: 60 + # # Ubuntu 18.04 Tests + # - command: | + # echo "--- :arrow_down: Downloading Build Directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 18.04 Build" + # echo "+++ :microscope: Running Tests" + # ./scripts/parallel-test.sh + # label: ":ubuntu: Ubuntu 18.04 Tests" + # agents: + # queue: "automation-large-builder-fleet" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" + # propagate-environment: true + # workdir: /data/job + # timeout: 60 - - command: | - echo "--- :arrow_down: Downloading Build Directory" - buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 18.04 Build" - echo "+++ :microscope: Running Tests" - ./scripts/serial-test.sh - label: ":ubuntu: Ubuntu 18.04 NP Tests" - agents: - queue: "automation-large-builder-fleet" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" - propagate-environment: true - workdir: /data/job - timeout: 60 + # - command: | + # echo "--- :arrow_down: Downloading Build Directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 18.04 Build" + # echo "+++ :microscope: Running Tests" + # ./scripts/serial-test.sh + # label: ":ubuntu: Ubuntu 18.04 NP Tests" + # agents: + # queue: "automation-large-builder-fleet" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" + # propagate-environment: true + # workdir: /data/job + # timeout: 60 - # Mojave Tests - - command: | - echo "--- :arrow_down: Downloading Build Directory" - buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" - echo "+++ :microscope: Running Tests" - ln -s "$(pwd)" /data/job - ./scripts/parallel-test.sh - label: ":darwin: Mojave Tests" - agents: - - "role=tester-v2-2" - - "os=mojave" - timeout: 60 + # # Mojave Tests + # - command: | + # echo "--- :arrow_down: Downloading Build Directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" + # echo "+++ :microscope: Running Tests" + # ln -s "$(pwd)" /data/job + # ./scripts/parallel-test.sh + # label: ":darwin: Mojave Tests" + # agents: + # - "role=tester-v2-2" + # - "os=mojave" + # timeout: 60 - - command: | - echo "--- :arrow_down: Downloading Build Directory" - buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" - echo "+++ :microscope: Running Tests" - ln -s "$(pwd)" /data/job - ./scripts/serial-test.sh - label: ":darwin: Mojave NP Tests" - agents: - - "role=tester-v2-2" - - "os=mojave" - timeout: 60 + # - command: | + # echo "--- :arrow_down: Downloading Build Directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" + # echo "+++ :microscope: Running Tests" + # ln -s "$(pwd)" /data/job + # ./scripts/serial-test.sh + # label: ":darwin: Mojave NP Tests" + # agents: + # - "role=tester-v2-2" + # - "os=mojave" + # timeout: 60 - - wait + # - wait - - command: | # CentOS 7 Package Builder - echo "--- :arrow_down: Downloading build directory" - buildkite-agent artifact download "build.tar.gz" . --step ":centos: CentOS 7 Build" - tar -zxf build.tar.gz - echo "+++ :microscope: Starting package build" - yum install -y rpm-build - mkdir -p /root/rpmbuild/BUILD - mkdir -p /root/rpmbuild/BUILDROOT - mkdir -p /root/rpmbuild/RPMS - mkdir -p /root/rpmbuild/SOURCES - mkdir -p /root/rpmbuild/SPECS - mkdir -p /root/rpmbuild/SRPMS - cd /data/job/build/packages - bash generate_package.sh rpm - label: ":centos: CentOS 7 Package Builder" - agents: - queue: "automation-large-builder-fleet" - artifact_paths: - - "build/packages/*.rpm" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" - propagate-environment: true - workdir: /data/job - env: - OS: "el7" - PKGTYPE: "rpm" - timeout: 60 + # - command: | # CentOS 7 Package Builder + # echo "--- :arrow_down: Downloading build directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":centos: CentOS 7 Build" + # tar -zxf build.tar.gz + # echo "+++ :microscope: Starting package build" + # yum install -y rpm-build + # mkdir -p /root/rpmbuild/BUILD + # mkdir -p /root/rpmbuild/BUILDROOT + # mkdir -p /root/rpmbuild/RPMS + # mkdir -p /root/rpmbuild/SOURCES + # mkdir -p /root/rpmbuild/SPECS + # mkdir -p /root/rpmbuild/SRPMS + # cd /data/job/build/packages + # bash generate_package.sh rpm + # label: ":centos: CentOS 7 Package Builder" + # agents: + # queue: "automation-large-builder-fleet" + # artifact_paths: + # - "build/packages/*.rpm" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" + # propagate-environment: true + # workdir: /data/job + # env: + # OS: "el7" + # PKGTYPE: "rpm" + # timeout: 60 - - command: | # Ubuntu 16.04 Package Builder - echo "--- :arrow_down: Downloading build directory" - buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 16.04 Build" - tar -zxf build.tar.gz - echo "+++ :microscope: Starting package build" - cd /data/job/build/packages - bash generate_package.sh deb - label: ":ubuntu: Ubuntu 16.04 Package Builder" - agents: - queue: "automation-large-builder-fleet" - artifact_paths: - - "build/packages/*.deb" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" - propagate-environment: true - workdir: /data/job - env: - OS: "ubuntu-16.04" - PKGTYPE: "deb" - timeout: 60 + # - command: | # Ubuntu 16.04 Package Builder + # echo "--- :arrow_down: Downloading build directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 16.04 Build" + # tar -zxf build.tar.gz + # echo "+++ :microscope: Starting package build" + # cd /data/job/build/packages + # bash generate_package.sh deb + # label: ":ubuntu: Ubuntu 16.04 Package Builder" + # agents: + # queue: "automation-large-builder-fleet" + # artifact_paths: + # - "build/packages/*.deb" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" + # propagate-environment: true + # workdir: /data/job + # env: + # OS: "ubuntu-16.04" + # PKGTYPE: "deb" + # timeout: 60 - - command: | # Ubuntu 18.04 Package Builder - echo "--- :arrow_down: Downloading build directory" - buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 18.04 Build" - tar -zxf build.tar.gz - echo "+++ :microscope: Starting package build" - cd /data/job/build/packages - bash generate_package.sh deb - label: ":ubuntu: Ubuntu 18.04 Package Builder" - agents: - queue: "automation-large-builder-fleet" - artifact_paths: - - "build/packages/*.deb" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" - propagate-environment: true - workdir: /data/job - env: - OS: "ubuntu-18.04" - PKGTYPE: "deb" - timeout: 60 + # - command: | # Ubuntu 18.04 Package Builder + # echo "--- :arrow_down: Downloading build directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 18.04 Build" + # tar -zxf build.tar.gz + # echo "+++ :microscope: Starting package build" + # cd /data/job/build/packages + # bash generate_package.sh deb + # label: ":ubuntu: Ubuntu 18.04 Package Builder" + # agents: + # queue: "automation-large-builder-fleet" + # artifact_paths: + # - "build/packages/*.deb" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" + # propagate-environment: true + # workdir: /data/job + # env: + # OS: "ubuntu-18.04" + # PKGTYPE: "deb" + # timeout: 60 - - command: | # macOS Mojave Package Builder - echo "--- :arrow_down: Downloading build directory" - buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" - tar -zxf build.tar.gz - echo "+++ :microscope: Starting package build" - ln -s "$(pwd)" /data/job - cd /data/job/build/packages - bash generate_package.sh brew - label: ":darwin: Mojave Package Builder" - agents: - - "role=builder-v2-2" - - "os=mojave" - artifact_paths: - - "build/packages/*.tar.gz" - - "build/packages/*.rb" - timeout: 60 + # - command: | # macOS Mojave Package Builder + # echo "--- :arrow_down: Downloading build directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" + # tar -zxf build.tar.gz + # echo "+++ :microscope: Starting package build" + # ln -s "$(pwd)" /data/job + # cd /data/job/build/packages + # bash generate_package.sh brew + # label: ":darwin: Mojave Package Builder" + # agents: + # - "role=builder-v2-2" + # - "os=mojave" + # artifact_paths: + # - "build/packages/*.tar.gz" + # - "build/packages/*.rb" + # timeout: 60 - - wait + # - wait - - command: | # Brew Updater - echo "--- :arrow_down: Downloading brew files" - buildkite-agent artifact download "build/packages/eosio.rb" . --step ":darwin: Mojave Package Builder" - label: ":darwin: Brew Updater" - agents: - queue: "automation-large-builder-fleet" - artifact_paths: - - "build/packages/eosio.rb" - timeout: 5 + # - command: | # Brew Updater + # echo "--- :arrow_down: Downloading brew files" + # buildkite-agent artifact download "build/packages/eosio.rb" . --step ":darwin: Mojave Package Builder" + # label: ":darwin: Brew Updater" + # agents: + # queue: "automation-large-builder-fleet" + # artifact_paths: + # - "build/packages/eosio.rb" + # timeout: 5 - - command: | # Git Submodule Regression Check - echo "+++ :microscope: Running git submodule regression check" && \ - ./scripts/submodule_check.sh - label: "Git Submodule Regression Check" - agents: - queue: "automation-large-builder-fleet" - timeout: 5 + # - command: | # Git Submodule Regression Check + # echo "+++ :microscope: Running git submodule regression check" && \ + # ./scripts/submodule_check.sh + # label: "Git Submodule Regression Check" + # agents: + # queue: "automation-large-builder-fleet" + # timeout: 5 From a0194afec48333ee583c662e2a2d88b56dd7ae58 Mon Sep 17 00:00:00 2001 From: Nathan Pierce Date: Wed, 24 Apr 2019 22:06:21 -0400 Subject: [PATCH 77/86] testing anka --- .buildkite/pipeline.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index d6a6d0a059d..6ab14ed02a9 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -13,14 +13,6 @@ steps: async: false build: branch: "${BUILDKITE_BRANCH}" - env: - REPO: "${BUILDKITE_REPO}" - REPO_BRANCH: "${BUILDKITE_BRANCH}" - CHECKSUMABLE: "${CHECKSUMABLE}" - TEMPLATE: "${ANKA_MOJAVE_TEMPLATE}" - TEMPLATE_TAG: "${ANKA_TEMPLATE_TAG}" - TAG_COMMANDS: "CLONED_REPO_DIR/scripts/eosio_build.sh -y -P -f" # CLONED_REPO_DIR IS REQUIRED and is where the repo is always cloned into - PROJECT_TAG: "${MAC_TAG}" # - wait From cf150490a1f21de73aaaad8c8ed0539ce4f2cba6 Mon Sep 17 00:00:00 2001 From: Nathan Pierce Date: Wed, 24 Apr 2019 22:18:07 -0400 Subject: [PATCH 78/86] testing anka --- .buildkite/pipeline.yml | 111 +++++++++++++++++++++++++--------------- 1 file changed, 69 insertions(+), 42 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 6ab14ed02a9..45667c37565 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -9,30 +9,36 @@ steps: - trigger: "mac-anka-fleet" label: ":anka: Ensure Mojave Anka Template Tag Exists" - branches: "mac-anka-fleet" + branches: "*" async: false build: branch: "${BUILDKITE_BRANCH}" + env: + REPO: "${BUILDKITE_REPO}" + REPO_BRANCH: "${BUILDKITE_BRANCH}" + CHECKSUMABLE: "${CHECKSUMABLE}" + TEMPLATE: "${ANKA_MOJAVE_TEMPLATE}" + TEMPLATE_TAG: "${ANKA_TEMPLATE_TAG}" + TAG_COMMANDS: "CLONED_REPO_DIR/scripts/eosio_build.sh -y -P -f" # CLONED_REPO_DIR IS REQUIRED and is where the repo is always cloned into + PROJECT_TAG: "${MAC_TAG}" - # - wait - - # - command: | # macOS Mojave Build - # echo "--- Creating symbolic link to job directory :file_folder:" - # sleep 5 - # ln -s "$(pwd)" /data/job - # cd /data/job - # echo "+++ Building :hammer:" - # ./scripts/eosio_build.sh -y -P - # echo "--- Compressing build directory :compression:" - # tar -pczf build.tar.gz build - # if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi - # label: ":darwin: Mojave Build" - # agents: - # - "role=builder-v2-2" - # - "os=mojave" - # artifact_paths: "build.tar.gz" - # timeout: 120 + - wait + - label: ":darwin: [Darwin] Mojave Build" + command: + - "./scripts/eosio_build.sh -y -P" + - "tar -pczf /Network/NAS/MAC_FLEET/BUILDKITE/artifacts/${ANKA_MOJAVE_TEMPLATE}-${BUILDKITE_PIPELINE_SLUG}-${BUILDKITE_BUILD_ID}.tar.gz build" + plugins: + chef/anka#v0.4.3: + vm-name: $ANKA_MOJAVE_TEMPLATE + vm-registry-tag: "${ANKA_TEMPLATE_TAG}::${MAC_TAG}" + workdir: $ANKA_WORKDIR + always-pull: "true" + debug: true + wait-network: true + agents: + - "queue=mac-anka-node-fleet" + timeout: 60 # - command: | # Amazon Linux 2 Build # echo "+++ :hammer: Building" @@ -300,30 +306,51 @@ steps: # workdir: /data/job # timeout: 60 - # # Mojave Tests - # - command: | - # echo "--- :arrow_down: Downloading Build Directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" - # echo "+++ :microscope: Running Tests" - # ln -s "$(pwd)" /data/job - # ./scripts/parallel-test.sh - # label: ":darwin: Mojave Tests" - # agents: - # - "role=tester-v2-2" - # - "os=mojave" - # timeout: 60 + # Mojave - # - command: | - # echo "--- :arrow_down: Downloading Build Directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" - # echo "+++ :microscope: Running Tests" - # ln -s "$(pwd)" /data/job - # ./scripts/serial-test.sh - # label: ":darwin: Mojave NP Tests" - # agents: - # - "role=tester-v2-2" - # - "os=mojave" - # timeout: 60 + - label: ":darwin: [Darwin] Mojave Tests" + command: + - "tar -pxzf /Network/NAS/MAC_FLEET/BUILDKITE/artifacts/${ANKA_MOJAVE_TEMPLATE}-${BUILDKITE_PIPELINE_SLUG}-${BUILDKITE_BUILD_ID}.tar.gz" + - "cd ./build && ./scripts/parallel-test.sh" + artifact_paths: + - "build/mongod.log" + - "build/genesis.json" + - "build/config.ini" + agents: + - "queue=mac-anka-node-fleet" + plugins: + chef/anka#v0.4.3: + vm-name: $ANKA_MOJAVE_TEMPLATE + vm-registry-tag: "${ANKA_TEMPLATE_TAG}::${MAC_TAG}" + workdir: $ANKA_WORKDIR + # Tests don't need the host "working directory" mounted + no-volume: true + always-pull: "true" + debug: true + wait-network: true + timeout: 60 + + - label: ":darwin: [Darwin] Mojave Tests" + command: + - "tar -pxzf /Network/NAS/MAC_FLEET/BUILDKITE/artifacts/${ANKA_MOJAVE_TEMPLATE}-${BUILDKITE_PIPELINE_SLUG}-${BUILDKITE_BUILD_ID}.tar.gz" + - "cd ./build && ./scripts/serial-test.sh" + artifact_paths: + - "build/mongod.log" + - "build/genesis.json" + - "build/config.ini" + agents: + - "queue=mac-anka-node-fleet" + plugins: + chef/anka#v0.4.3: + vm-name: $ANKA_MOJAVE_TEMPLATE + vm-registry-tag: "${ANKA_TEMPLATE_TAG}::${MAC_TAG}" + workdir: $ANKA_WORKDIR + # Tests don't need the host "working directory" mounted + no-volume: true + always-pull: "true" + debug: true + wait-network: true + timeout: 60 # - wait From 9ca743d85ce5c240915d360defd8a4899b72a705 Mon Sep 17 00:00:00 2001 From: Nathan Pierce Date: Wed, 24 Apr 2019 22:21:21 -0400 Subject: [PATCH 79/86] testing anka --- .buildkite/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 45667c37565..2fe99630336 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -12,7 +12,7 @@ steps: branches: "*" async: false build: - branch: "${BUILDKITE_BRANCH}" + branch: "master" env: REPO: "${BUILDKITE_REPO}" REPO_BRANCH: "${BUILDKITE_BRANCH}" From dee9f106f30ab6cc2f6077eb29c969ceaf2aaed8 Mon Sep 17 00:00:00 2001 From: Nathan Pierce Date: Wed, 24 Apr 2019 23:49:40 -0400 Subject: [PATCH 80/86] Anka finalization --- .buildkite/pipeline.yml | 762 ++++++++++++++++++++-------------------- 1 file changed, 380 insertions(+), 382 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 2fe99630336..a042d4134ff 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -33,280 +33,278 @@ steps: vm-name: $ANKA_MOJAVE_TEMPLATE vm-registry-tag: "${ANKA_TEMPLATE_TAG}::${MAC_TAG}" workdir: $ANKA_WORKDIR - always-pull: "true" + always-pull: true debug: true wait-network: true agents: - "queue=mac-anka-node-fleet" timeout: 60 - # - command: | # Amazon Linux 2 Build - # echo "+++ :hammer: Building" - # ./scripts/eosio_build.sh -y -P - # echo "--- :compression: Compressing build directory" - # tar -pczf build.tar.gz build - # if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi - # label: ":aws: Amazon Linux 2 Build" - # agents: - # queue: "automation-large-builder-fleet" - # artifact_paths: "build.tar.gz" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" - # propagate-environment: true - # workdir: /data/job - # timeout: 120 - - # - command: | # CentOS 7 Build - # echo "+++ :hammer: Building" - # ./scripts/eosio_build.sh -y -P - # echo "--- :compression: Compressing build directory" - # tar -pczf build.tar.gz build - # if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi - # label: ":centos: CentOS 7 Build" - # agents: - # queue: "automation-large-builder-fleet" - # artifact_paths: "build.tar.gz" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" - # propagate-environment: true - # workdir: /data/job - # timeout: 120 + - command: | # Amazon Linux 2 Build + echo "+++ :hammer: Building" + ./scripts/eosio_build.sh -y -P + echo "--- :compression: Compressing build directory" + tar -pczf build.tar.gz build + if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi + label: ":aws: Amazon Linux 2 Build" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: "build.tar.gz" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" + propagate-environment: true + workdir: /data/job + timeout: 120 - # - command: | # Ubuntu 16.04 Build - # echo "+++ :hammer: Building" - # ./scripts/eosio_build.sh -y -P - # echo "--- :compression: Compressing build directory" - # tar -pczf build.tar.gz build - # if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi - # label: ":ubuntu: Ubuntu 16.04 Build" - # agents: - # queue: "automation-large-builder-fleet" - # artifact_paths: "build.tar.gz" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" - # propagate-environment: true - # workdir: /data/job - # timeout: 120 + - command: | # CentOS 7 Build + echo "+++ :hammer: Building" + ./scripts/eosio_build.sh -y -P + echo "--- :compression: Compressing build directory" + tar -pczf build.tar.gz build + if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi + label: ":centos: CentOS 7 Build" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: "build.tar.gz" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" + propagate-environment: true + workdir: /data/job + timeout: 120 - # - command: | # Ubuntu 18.04 Build - # echo "+++ :hammer: Building" - # ./scripts/eosio_build.sh -y -P - # echo "--- :compression: Compressing build directory" - # tar -pczf build.tar.gz build - # if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi - # label: ":ubuntu: Ubuntu 18.04 Build" - # agents: - # queue: "automation-large-builder-fleet" - # artifact_paths: "build.tar.gz" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" - # propagate-environment: true - # workdir: /data/job - # timeout: 120 + - command: | # Ubuntu 16.04 Build + echo "+++ :hammer: Building" + ./scripts/eosio_build.sh -y -P + echo "--- :compression: Compressing build directory" + tar -pczf build.tar.gz build + if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi + label: ":ubuntu: Ubuntu 16.04 Build" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: "build.tar.gz" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" + propagate-environment: true + workdir: /data/job + timeout: 120 - # - wait + - command: | # Ubuntu 18.04 Build + echo "+++ :hammer: Building" + ./scripts/eosio_build.sh -y -P + echo "--- :compression: Compressing build directory" + tar -pczf build.tar.gz build + if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi + label: ":ubuntu: Ubuntu 18.04 Build" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: "build.tar.gz" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" + propagate-environment: true + workdir: /data/job + timeout: 120 - # # Amazon Linux 2 Tests - # - command: | - # echo "--- :arrow_down: Downloading Build Directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":aws: Amazon Linux 2 Build" - # echo "+++ :microscope: Running Tests" - # ./scripts/parallel-test.sh - # label: ":aws: Amazon Linux 2 Tests" - # agents: - # queue: "automation-large-builder-fleet" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" - # propagate-environment: true - # workdir: /data/job - # timeout: 60 + - wait - # - command: | - # echo "--- :arrow_down: Downloading Build Directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":aws: Amazon Linux 2 Build" - # echo "+++ :microscope: Running Tests" - # ./scripts/serial-test.sh - # label: ":aws: Amazon Linux 2 NP Tests" - # agents: - # queue: "automation-large-builder-fleet" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" - # propagate-environment: true - # workdir: /data/job - # timeout: 60 + # Amazon Linux 2 Tests + - command: | + echo "--- :arrow_down: Downloading Build Directory" + buildkite-agent artifact download "build.tar.gz" . --step ":aws: Amazon Linux 2 Build" + echo "+++ :microscope: Running Tests" + ./scripts/parallel-test.sh + label: ":aws: Amazon Linux 2 Tests" + agents: + queue: "automation-large-builder-fleet" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" + propagate-environment: true + workdir: /data/job + timeout: 60 - # # centOS 7 Tests - # - command: | - # echo "--- :arrow_down: Downloading Build Directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":centos: CentOS 7 Build" - # echo "+++ :microscope: Running Tests" - # ./scripts/parallel-test.sh - # label: ":centos: CentOS 7 Tests" - # agents: - # queue: "automation-large-builder-fleet" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" - # propagate-environment: true - # workdir: /data/job - # timeout: 60 + - command: | + echo "--- :arrow_down: Downloading Build Directory" + buildkite-agent artifact download "build.tar.gz" . --step ":aws: Amazon Linux 2 Build" + echo "+++ :microscope: Running Tests" + ./scripts/serial-test.sh + label: ":aws: Amazon Linux 2 NP Tests" + agents: + queue: "automation-large-builder-fleet" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" + propagate-environment: true + workdir: /data/job + timeout: 60 - # - command: | - # echo "--- :arrow_down: Downloading Build Directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":centos: CentOS 7 Build" - # echo "+++ :microscope: Running Tests" - # ./scripts/serial-test.sh - # label: ":centos: CentOS 7 NP Tests" - # agents: - # queue: "automation-large-builder-fleet" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" - # propagate-environment: true - # workdir: /data/job - # timeout: 60 + # centOS 7 Tests + - command: | + echo "--- :arrow_down: Downloading Build Directory" + buildkite-agent artifact download "build.tar.gz" . --step ":centos: CentOS 7 Build" + echo "+++ :microscope: Running Tests" + ./scripts/parallel-test.sh + label: ":centos: CentOS 7 Tests" + agents: + queue: "automation-large-builder-fleet" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" + propagate-environment: true + workdir: /data/job + timeout: 60 - # # Ubuntu 16.04 Tests - # - command: | - # echo "--- :arrow_down: Downloading Build Directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 16.04 Build" - # echo "+++ :microscope: Running Tests" - # ./scripts/parallel-test.sh - # label: ":ubuntu: Ubuntu 16.04 Tests" - # agents: - # queue: "automation-large-builder-fleet" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" - # propagate-environment: true - # workdir: /data/job - # timeout: 60 + - command: | + echo "--- :arrow_down: Downloading Build Directory" + buildkite-agent artifact download "build.tar.gz" . --step ":centos: CentOS 7 Build" + echo "+++ :microscope: Running Tests" + ./scripts/serial-test.sh + label: ":centos: CentOS 7 NP Tests" + agents: + queue: "automation-large-builder-fleet" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" + propagate-environment: true + workdir: /data/job + timeout: 60 - # - command: | - # echo "--- :arrow_down: Downloading Build Directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 16.04 Build" - # echo "+++ :microscope: Running Tests" - # ./scripts/serial-test.sh - # label: ":ubuntu: Ubuntu 16.04 NP Tests" - # agents: - # queue: "automation-large-builder-fleet" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" - # propagate-environment: true - # workdir: /data/job - # timeout: 60 + # Ubuntu 16.04 Tests + - command: | + echo "--- :arrow_down: Downloading Build Directory" + buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 16.04 Build" + echo "+++ :microscope: Running Tests" + ./scripts/parallel-test.sh + label: ":ubuntu: Ubuntu 16.04 Tests" + agents: + queue: "automation-large-builder-fleet" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" + propagate-environment: true + workdir: /data/job + timeout: 60 - # # Ubuntu 18.04 Tests - # - command: | - # echo "--- :arrow_down: Downloading Build Directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 18.04 Build" - # echo "+++ :microscope: Running Tests" - # ./scripts/parallel-test.sh - # label: ":ubuntu: Ubuntu 18.04 Tests" - # agents: - # queue: "automation-large-builder-fleet" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" - # propagate-environment: true - # workdir: /data/job - # timeout: 60 + - command: | + echo "--- :arrow_down: Downloading Build Directory" + buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 16.04 Build" + echo "+++ :microscope: Running Tests" + ./scripts/serial-test.sh + label: ":ubuntu: Ubuntu 16.04 NP Tests" + agents: + queue: "automation-large-builder-fleet" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" + propagate-environment: true + workdir: /data/job + timeout: 60 - # - command: | - # echo "--- :arrow_down: Downloading Build Directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 18.04 Build" - # echo "+++ :microscope: Running Tests" - # ./scripts/serial-test.sh - # label: ":ubuntu: Ubuntu 18.04 NP Tests" - # agents: - # queue: "automation-large-builder-fleet" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" - # propagate-environment: true - # workdir: /data/job - # timeout: 60 + # Ubuntu 18.04 Tests + - command: | + echo "--- :arrow_down: Downloading Build Directory" + buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 18.04 Build" + echo "+++ :microscope: Running Tests" + ./scripts/parallel-test.sh + label: ":ubuntu: Ubuntu 18.04 Tests" + agents: + queue: "automation-large-builder-fleet" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" + propagate-environment: true + workdir: /data/job + timeout: 60 - # Mojave + - command: | + echo "--- :arrow_down: Downloading Build Directory" + buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 18.04 Build" + echo "+++ :microscope: Running Tests" + ./scripts/serial-test.sh + label: ":ubuntu: Ubuntu 18.04 NP Tests" + agents: + queue: "automation-large-builder-fleet" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" + propagate-environment: true + workdir: /data/job + timeout: 60 - label: ":darwin: [Darwin] Mojave Tests" command: @@ -323,9 +321,9 @@ steps: vm-name: $ANKA_MOJAVE_TEMPLATE vm-registry-tag: "${ANKA_TEMPLATE_TAG}::${MAC_TAG}" workdir: $ANKA_WORKDIR - # Tests don't need the host "working directory" mounted + # Tests can't have the host "working directory" mounted no-volume: true - always-pull: "true" + always-pull: true debug: true wait-network: true timeout: 60 @@ -345,139 +343,139 @@ steps: vm-name: $ANKA_MOJAVE_TEMPLATE vm-registry-tag: "${ANKA_TEMPLATE_TAG}::${MAC_TAG}" workdir: $ANKA_WORKDIR - # Tests don't need the host "working directory" mounted + # Tests can't have the host "working directory" mounted no-volume: true - always-pull: "true" + always-pull: true debug: true wait-network: true timeout: 60 - # - wait + - wait - # - command: | # CentOS 7 Package Builder - # echo "--- :arrow_down: Downloading build directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":centos: CentOS 7 Build" - # tar -zxf build.tar.gz - # echo "+++ :microscope: Starting package build" - # yum install -y rpm-build - # mkdir -p /root/rpmbuild/BUILD - # mkdir -p /root/rpmbuild/BUILDROOT - # mkdir -p /root/rpmbuild/RPMS - # mkdir -p /root/rpmbuild/SOURCES - # mkdir -p /root/rpmbuild/SPECS - # mkdir -p /root/rpmbuild/SRPMS - # cd /data/job/build/packages - # bash generate_package.sh rpm - # label: ":centos: CentOS 7 Package Builder" - # agents: - # queue: "automation-large-builder-fleet" - # artifact_paths: - # - "build/packages/*.rpm" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" - # propagate-environment: true - # workdir: /data/job - # env: - # OS: "el7" - # PKGTYPE: "rpm" - # timeout: 60 + - command: | # CentOS 7 Package Builder + echo "--- :arrow_down: Downloading build directory" + buildkite-agent artifact download "build.tar.gz" . --step ":centos: CentOS 7 Build" + tar -zxf build.tar.gz + echo "+++ :microscope: Starting package build" + yum install -y rpm-build + mkdir -p /root/rpmbuild/BUILD + mkdir -p /root/rpmbuild/BUILDROOT + mkdir -p /root/rpmbuild/RPMS + mkdir -p /root/rpmbuild/SOURCES + mkdir -p /root/rpmbuild/SPECS + mkdir -p /root/rpmbuild/SRPMS + cd /data/job/build/packages + bash generate_package.sh rpm + label: ":centos: CentOS 7 Package Builder" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: + - "build/packages/*.rpm" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" + propagate-environment: true + workdir: /data/job + env: + OS: "el7" + PKGTYPE: "rpm" + timeout: 60 - # - command: | # Ubuntu 16.04 Package Builder - # echo "--- :arrow_down: Downloading build directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 16.04 Build" - # tar -zxf build.tar.gz - # echo "+++ :microscope: Starting package build" - # cd /data/job/build/packages - # bash generate_package.sh deb - # label: ":ubuntu: Ubuntu 16.04 Package Builder" - # agents: - # queue: "automation-large-builder-fleet" - # artifact_paths: - # - "build/packages/*.deb" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" - # propagate-environment: true - # workdir: /data/job - # env: - # OS: "ubuntu-16.04" - # PKGTYPE: "deb" - # timeout: 60 + - command: | # Ubuntu 16.04 Package Builder + echo "--- :arrow_down: Downloading build directory" + buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 16.04 Build" + tar -zxf build.tar.gz + echo "+++ :microscope: Starting package build" + cd /data/job/build/packages + bash generate_package.sh deb + label: ":ubuntu: Ubuntu 16.04 Package Builder" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: + - "build/packages/*.deb" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" + propagate-environment: true + workdir: /data/job + env: + OS: "ubuntu-16.04" + PKGTYPE: "deb" + timeout: 60 - # - command: | # Ubuntu 18.04 Package Builder - # echo "--- :arrow_down: Downloading build directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 18.04 Build" - # tar -zxf build.tar.gz - # echo "+++ :microscope: Starting package build" - # cd /data/job/build/packages - # bash generate_package.sh deb - # label: ":ubuntu: Ubuntu 18.04 Package Builder" - # agents: - # queue: "automation-large-builder-fleet" - # artifact_paths: - # - "build/packages/*.deb" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" - # propagate-environment: true - # workdir: /data/job - # env: - # OS: "ubuntu-18.04" - # PKGTYPE: "deb" - # timeout: 60 + - command: | # Ubuntu 18.04 Package Builder + echo "--- :arrow_down: Downloading build directory" + buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 18.04 Build" + tar -zxf build.tar.gz + echo "+++ :microscope: Starting package build" + cd /data/job/build/packages + bash generate_package.sh deb + label: ":ubuntu: Ubuntu 18.04 Package Builder" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: + - "build/packages/*.deb" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" + propagate-environment: true + workdir: /data/job + env: + OS: "ubuntu-18.04" + PKGTYPE: "deb" + timeout: 60 - # - command: | # macOS Mojave Package Builder - # echo "--- :arrow_down: Downloading build directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" - # tar -zxf build.tar.gz - # echo "+++ :microscope: Starting package build" - # ln -s "$(pwd)" /data/job - # cd /data/job/build/packages - # bash generate_package.sh brew - # label: ":darwin: Mojave Package Builder" - # agents: - # - "role=builder-v2-2" - # - "os=mojave" - # artifact_paths: - # - "build/packages/*.tar.gz" - # - "build/packages/*.rb" - # timeout: 60 + - command: | # macOS Mojave Package Builder + echo "--- :arrow_down: Downloading build directory" + buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" + tar -zxf build.tar.gz + echo "+++ :microscope: Starting package build" + ln -s "$(pwd)" /data/job + cd /data/job/build/packages + bash generate_package.sh brew + label: ":darwin: Mojave Package Builder" + agents: + - "role=builder-v2-2" + - "os=mojave" + artifact_paths: + - "build/packages/*.tar.gz" + - "build/packages/*.rb" + timeout: 60 - # - wait + - wait - # - command: | # Brew Updater - # echo "--- :arrow_down: Downloading brew files" - # buildkite-agent artifact download "build/packages/eosio.rb" . --step ":darwin: Mojave Package Builder" - # label: ":darwin: Brew Updater" - # agents: - # queue: "automation-large-builder-fleet" - # artifact_paths: - # - "build/packages/eosio.rb" - # timeout: 5 + - command: | # Brew Updater + echo "--- :arrow_down: Downloading brew files" + buildkite-agent artifact download "build/packages/eosio.rb" . --step ":darwin: Mojave Package Builder" + label: ":darwin: Brew Updater" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: + - "build/packages/eosio.rb" + timeout: 5 - # - command: | # Git Submodule Regression Check - # echo "+++ :microscope: Running git submodule regression check" && \ - # ./scripts/submodule_check.sh - # label: "Git Submodule Regression Check" - # agents: - # queue: "automation-large-builder-fleet" - # timeout: 5 + - command: | # Git Submodule Regression Check + echo "+++ :microscope: Running git submodule regression check" && \ + ./scripts/submodule_check.sh + label: "Git Submodule Regression Check" + agents: + queue: "automation-large-builder-fleet" + timeout: 5 From 1f2266d588b397023cbeba842a79df519cc9c6e3 Mon Sep 17 00:00:00 2001 From: Nathan Pierce Date: Wed, 24 Apr 2019 23:58:08 -0400 Subject: [PATCH 81/86] Anka finalization --- .buildkite/pipeline.yml | 791 +++++++++++++++++++++------------------- 1 file changed, 417 insertions(+), 374 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index a042d4134ff..e1eb823c32a 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -40,271 +40,289 @@ steps: - "queue=mac-anka-node-fleet" timeout: 60 - - command: | # Amazon Linux 2 Build - echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -P - echo "--- :compression: Compressing build directory" - tar -pczf build.tar.gz build - if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi - label: ":aws: Amazon Linux 2 Build" - agents: - queue: "automation-large-builder-fleet" - artifact_paths: "build.tar.gz" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" - propagate-environment: true - workdir: /data/job - timeout: 120 - - command: | # CentOS 7 Build - echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -P - echo "--- :compression: Compressing build directory" - tar -pczf build.tar.gz build - if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi - label: ":centos: CentOS 7 Build" - agents: - queue: "automation-large-builder-fleet" - artifact_paths: "build.tar.gz" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" - propagate-environment: true - workdir: /data/job - timeout: 120 + # - command: | # macOS Mojave Build + # echo "--- Creating symbolic link to job directory :file_folder:" + # sleep 5 + # ln -s "$(pwd)" /data/job + # cd /data/job + # echo "+++ Building :hammer:" + # ./scripts/eosio_build.sh -y -P + # echo "--- Compressing build directory :compression:" + # tar -pczf build.tar.gz build + # if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi + # label: ":darwin: Mojave Build" + # agents: + # - "role=builder-v2-2" + # - "os=mojave" + # artifact_paths: "build.tar.gz" + # timeout: 120 - - command: | # Ubuntu 16.04 Build - echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -P - echo "--- :compression: Compressing build directory" - tar -pczf build.tar.gz build - if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi - label: ":ubuntu: Ubuntu 16.04 Build" - agents: - queue: "automation-large-builder-fleet" - artifact_paths: "build.tar.gz" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" - propagate-environment: true - workdir: /data/job - timeout: 120 + # - command: | # Amazon Linux 2 Build + # echo "+++ :hammer: Building" + # ./scripts/eosio_build.sh -y -P + # echo "--- :compression: Compressing build directory" + # tar -pczf build.tar.gz build + # if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi + # label: ":aws: Amazon Linux 2 Build" + # agents: + # queue: "automation-large-builder-fleet" + # artifact_paths: "build.tar.gz" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" + # propagate-environment: true + # workdir: /data/job + # timeout: 120 - - command: | # Ubuntu 18.04 Build - echo "+++ :hammer: Building" - ./scripts/eosio_build.sh -y -P - echo "--- :compression: Compressing build directory" - tar -pczf build.tar.gz build - if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi - label: ":ubuntu: Ubuntu 18.04 Build" - agents: - queue: "automation-large-builder-fleet" - artifact_paths: "build.tar.gz" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" - propagate-environment: true - workdir: /data/job - timeout: 120 + # - command: | # CentOS 7 Build + # echo "+++ :hammer: Building" + # ./scripts/eosio_build.sh -y -P + # echo "--- :compression: Compressing build directory" + # tar -pczf build.tar.gz build + # if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi + # label: ":centos: CentOS 7 Build" + # agents: + # queue: "automation-large-builder-fleet" + # artifact_paths: "build.tar.gz" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" + # propagate-environment: true + # workdir: /data/job + # timeout: 120 + + # - command: | # Ubuntu 16.04 Build + # echo "+++ :hammer: Building" + # ./scripts/eosio_build.sh -y -P + # echo "--- :compression: Compressing build directory" + # tar -pczf build.tar.gz build + # if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi + # label: ":ubuntu: Ubuntu 16.04 Build" + # agents: + # queue: "automation-large-builder-fleet" + # artifact_paths: "build.tar.gz" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" + # propagate-environment: true + # workdir: /data/job + # timeout: 120 + + # - command: | # Ubuntu 18.04 Build + # echo "+++ :hammer: Building" + # ./scripts/eosio_build.sh -y -P + # echo "--- :compression: Compressing build directory" + # tar -pczf build.tar.gz build + # if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi + # label: ":ubuntu: Ubuntu 18.04 Build" + # agents: + # queue: "automation-large-builder-fleet" + # artifact_paths: "build.tar.gz" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" + # propagate-environment: true + # workdir: /data/job + # timeout: 120 - wait - # Amazon Linux 2 Tests - - command: | - echo "--- :arrow_down: Downloading Build Directory" - buildkite-agent artifact download "build.tar.gz" . --step ":aws: Amazon Linux 2 Build" - echo "+++ :microscope: Running Tests" - ./scripts/parallel-test.sh - label: ":aws: Amazon Linux 2 Tests" - agents: - queue: "automation-large-builder-fleet" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" - propagate-environment: true - workdir: /data/job - timeout: 60 + # # Amazon Linux 2 Tests + # - command: | + # echo "--- :arrow_down: Downloading Build Directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":aws: Amazon Linux 2 Build" + # echo "+++ :microscope: Running Tests" + # ./scripts/parallel-test.sh + # label: ":aws: Amazon Linux 2 Tests" + # agents: + # queue: "automation-large-builder-fleet" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" + # propagate-environment: true + # workdir: /data/job + # timeout: 60 - - command: | - echo "--- :arrow_down: Downloading Build Directory" - buildkite-agent artifact download "build.tar.gz" . --step ":aws: Amazon Linux 2 Build" - echo "+++ :microscope: Running Tests" - ./scripts/serial-test.sh - label: ":aws: Amazon Linux 2 NP Tests" - agents: - queue: "automation-large-builder-fleet" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" - propagate-environment: true - workdir: /data/job - timeout: 60 + # - command: | + # echo "--- :arrow_down: Downloading Build Directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":aws: Amazon Linux 2 Build" + # echo "+++ :microscope: Running Tests" + # ./scripts/serial-test.sh + # label: ":aws: Amazon Linux 2 NP Tests" + # agents: + # queue: "automation-large-builder-fleet" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" + # propagate-environment: true + # workdir: /data/job + # timeout: 60 - # centOS 7 Tests - - command: | - echo "--- :arrow_down: Downloading Build Directory" - buildkite-agent artifact download "build.tar.gz" . --step ":centos: CentOS 7 Build" - echo "+++ :microscope: Running Tests" - ./scripts/parallel-test.sh - label: ":centos: CentOS 7 Tests" - agents: - queue: "automation-large-builder-fleet" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" - propagate-environment: true - workdir: /data/job - timeout: 60 + # # centOS 7 Tests + # - command: | + # echo "--- :arrow_down: Downloading Build Directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":centos: CentOS 7 Build" + # echo "+++ :microscope: Running Tests" + # ./scripts/parallel-test.sh + # label: ":centos: CentOS 7 Tests" + # agents: + # queue: "automation-large-builder-fleet" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" + # propagate-environment: true + # workdir: /data/job + # timeout: 60 - - command: | - echo "--- :arrow_down: Downloading Build Directory" - buildkite-agent artifact download "build.tar.gz" . --step ":centos: CentOS 7 Build" - echo "+++ :microscope: Running Tests" - ./scripts/serial-test.sh - label: ":centos: CentOS 7 NP Tests" - agents: - queue: "automation-large-builder-fleet" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" - propagate-environment: true - workdir: /data/job - timeout: 60 + # - command: | + # echo "--- :arrow_down: Downloading Build Directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":centos: CentOS 7 Build" + # echo "+++ :microscope: Running Tests" + # ./scripts/serial-test.sh + # label: ":centos: CentOS 7 NP Tests" + # agents: + # queue: "automation-large-builder-fleet" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" + # propagate-environment: true + # workdir: /data/job + # timeout: 60 - # Ubuntu 16.04 Tests - - command: | - echo "--- :arrow_down: Downloading Build Directory" - buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 16.04 Build" - echo "+++ :microscope: Running Tests" - ./scripts/parallel-test.sh - label: ":ubuntu: Ubuntu 16.04 Tests" - agents: - queue: "automation-large-builder-fleet" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" - propagate-environment: true - workdir: /data/job - timeout: 60 + # # Ubuntu 16.04 Tests + # - command: | + # echo "--- :arrow_down: Downloading Build Directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 16.04 Build" + # echo "+++ :microscope: Running Tests" + # ./scripts/parallel-test.sh + # label: ":ubuntu: Ubuntu 16.04 Tests" + # agents: + # queue: "automation-large-builder-fleet" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" + # propagate-environment: true + # workdir: /data/job + # timeout: 60 - - command: | - echo "--- :arrow_down: Downloading Build Directory" - buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 16.04 Build" - echo "+++ :microscope: Running Tests" - ./scripts/serial-test.sh - label: ":ubuntu: Ubuntu 16.04 NP Tests" - agents: - queue: "automation-large-builder-fleet" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" - propagate-environment: true - workdir: /data/job - timeout: 60 + # - command: | + # echo "--- :arrow_down: Downloading Build Directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 16.04 Build" + # echo "+++ :microscope: Running Tests" + # ./scripts/serial-test.sh + # label: ":ubuntu: Ubuntu 16.04 NP Tests" + # agents: + # queue: "automation-large-builder-fleet" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" + # propagate-environment: true + # workdir: /data/job + # timeout: 60 - # Ubuntu 18.04 Tests - - command: | - echo "--- :arrow_down: Downloading Build Directory" - buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 18.04 Build" - echo "+++ :microscope: Running Tests" - ./scripts/parallel-test.sh - label: ":ubuntu: Ubuntu 18.04 Tests" - agents: - queue: "automation-large-builder-fleet" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" - propagate-environment: true - workdir: /data/job - timeout: 60 + # # Ubuntu 18.04 Tests + # - command: | + # echo "--- :arrow_down: Downloading Build Directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 18.04 Build" + # echo "+++ :microscope: Running Tests" + # ./scripts/parallel-test.sh + # label: ":ubuntu: Ubuntu 18.04 Tests" + # agents: + # queue: "automation-large-builder-fleet" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" + # propagate-environment: true + # workdir: /data/job + # timeout: 60 - - command: | - echo "--- :arrow_down: Downloading Build Directory" - buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 18.04 Build" - echo "+++ :microscope: Running Tests" - ./scripts/serial-test.sh - label: ":ubuntu: Ubuntu 18.04 NP Tests" - agents: - queue: "automation-large-builder-fleet" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" - propagate-environment: true - workdir: /data/job - timeout: 60 + # - command: | + # echo "--- :arrow_down: Downloading Build Directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 18.04 Build" + # echo "+++ :microscope: Running Tests" + # ./scripts/serial-test.sh + # label: ":ubuntu: Ubuntu 18.04 NP Tests" + # agents: + # queue: "automation-large-builder-fleet" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" + # propagate-environment: true + # workdir: /data/job + # timeout: 60 - label: ":darwin: [Darwin] Mojave Tests" command: @@ -350,132 +368,157 @@ steps: wait-network: true timeout: 60 - - wait + # # Mojave Tests + # - command: | + # echo "--- :arrow_down: Downloading Build Directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" + # echo "+++ :microscope: Running Tests" + # ln -s "$(pwd)" /data/job + # ./scripts/parallel-test.sh + # label: ":darwin: Mojave Tests" + # agents: + # - "role=tester-v2-2" + # - "os=mojave" + # timeout: 60 + # - command: | + # echo "--- :arrow_down: Downloading Build Directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" + # echo "+++ :microscope: Running Tests" + # ln -s "$(pwd)" /data/job + # ./scripts/serial-test.sh + # label: ":darwin: Mojave NP Tests" + # agents: + # - "role=tester-v2-2" + # - "os=mojave" + # timeout: 60 - - command: | # CentOS 7 Package Builder - echo "--- :arrow_down: Downloading build directory" - buildkite-agent artifact download "build.tar.gz" . --step ":centos: CentOS 7 Build" - tar -zxf build.tar.gz - echo "+++ :microscope: Starting package build" - yum install -y rpm-build - mkdir -p /root/rpmbuild/BUILD - mkdir -p /root/rpmbuild/BUILDROOT - mkdir -p /root/rpmbuild/RPMS - mkdir -p /root/rpmbuild/SOURCES - mkdir -p /root/rpmbuild/SPECS - mkdir -p /root/rpmbuild/SRPMS - cd /data/job/build/packages - bash generate_package.sh rpm - label: ":centos: CentOS 7 Package Builder" - agents: - queue: "automation-large-builder-fleet" - artifact_paths: - - "build/packages/*.rpm" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" - propagate-environment: true - workdir: /data/job - env: - OS: "el7" - PKGTYPE: "rpm" - timeout: 60 - - command: | # Ubuntu 16.04 Package Builder - echo "--- :arrow_down: Downloading build directory" - buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 16.04 Build" - tar -zxf build.tar.gz - echo "+++ :microscope: Starting package build" - cd /data/job/build/packages - bash generate_package.sh deb - label: ":ubuntu: Ubuntu 16.04 Package Builder" - agents: - queue: "automation-large-builder-fleet" - artifact_paths: - - "build/packages/*.deb" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" - propagate-environment: true - workdir: /data/job - env: - OS: "ubuntu-16.04" - PKGTYPE: "deb" - timeout: 60 + # - wait - - command: | # Ubuntu 18.04 Package Builder - echo "--- :arrow_down: Downloading build directory" - buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 18.04 Build" - tar -zxf build.tar.gz - echo "+++ :microscope: Starting package build" - cd /data/job/build/packages - bash generate_package.sh deb - label: ":ubuntu: Ubuntu 18.04 Package Builder" - agents: - queue: "automation-large-builder-fleet" - artifact_paths: - - "build/packages/*.deb" - plugins: - ecr#v1.1.4: - login: true - account_ids: "436617320021" - no-include-email: true - region: "us-west-2" - docker#v2.1.0: - debug: true - image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" - propagate-environment: true - workdir: /data/job - env: - OS: "ubuntu-18.04" - PKGTYPE: "deb" - timeout: 60 + # - command: | # CentOS 7 Package Builder + # echo "--- :arrow_down: Downloading build directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":centos: CentOS 7 Build" + # tar -zxf build.tar.gz + # echo "+++ :microscope: Starting package build" + # yum install -y rpm-build + # mkdir -p /root/rpmbuild/BUILD + # mkdir -p /root/rpmbuild/BUILDROOT + # mkdir -p /root/rpmbuild/RPMS + # mkdir -p /root/rpmbuild/SOURCES + # mkdir -p /root/rpmbuild/SPECS + # mkdir -p /root/rpmbuild/SRPMS + # cd /data/job/build/packages + # bash generate_package.sh rpm + # label: ":centos: CentOS 7 Package Builder" + # agents: + # queue: "automation-large-builder-fleet" + # artifact_paths: + # - "build/packages/*.rpm" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" + # propagate-environment: true + # workdir: /data/job + # env: + # OS: "el7" + # PKGTYPE: "rpm" + # timeout: 60 - - command: | # macOS Mojave Package Builder - echo "--- :arrow_down: Downloading build directory" - buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" - tar -zxf build.tar.gz - echo "+++ :microscope: Starting package build" - ln -s "$(pwd)" /data/job - cd /data/job/build/packages - bash generate_package.sh brew - label: ":darwin: Mojave Package Builder" - agents: - - "role=builder-v2-2" - - "os=mojave" - artifact_paths: - - "build/packages/*.tar.gz" - - "build/packages/*.rb" - timeout: 60 + # - command: | # Ubuntu 16.04 Package Builder + # echo "--- :arrow_down: Downloading build directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 16.04 Build" + # tar -zxf build.tar.gz + # echo "+++ :microscope: Starting package build" + # cd /data/job/build/packages + # bash generate_package.sh deb + # label: ":ubuntu: Ubuntu 16.04 Package Builder" + # agents: + # queue: "automation-large-builder-fleet" + # artifact_paths: + # - "build/packages/*.deb" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" + # propagate-environment: true + # workdir: /data/job + # env: + # OS: "ubuntu-16.04" + # PKGTYPE: "deb" + # timeout: 60 - - wait + # - command: | # Ubuntu 18.04 Package Builder + # echo "--- :arrow_down: Downloading build directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 18.04 Build" + # tar -zxf build.tar.gz + # echo "+++ :microscope: Starting package build" + # cd /data/job/build/packages + # bash generate_package.sh deb + # label: ":ubuntu: Ubuntu 18.04 Package Builder" + # agents: + # queue: "automation-large-builder-fleet" + # artifact_paths: + # - "build/packages/*.deb" + # plugins: + # ecr#v1.1.4: + # login: true + # account_ids: "436617320021" + # no-include-email: true + # region: "us-west-2" + # docker#v2.1.0: + # debug: true + # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" + # propagate-environment: true + # workdir: /data/job + # env: + # OS: "ubuntu-18.04" + # PKGTYPE: "deb" + # timeout: 60 - - command: | # Brew Updater - echo "--- :arrow_down: Downloading brew files" - buildkite-agent artifact download "build/packages/eosio.rb" . --step ":darwin: Mojave Package Builder" - label: ":darwin: Brew Updater" - agents: - queue: "automation-large-builder-fleet" - artifact_paths: - - "build/packages/eosio.rb" - timeout: 5 + # - command: | # macOS Mojave Package Builder + # echo "--- :arrow_down: Downloading build directory" + # buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" + # tar -zxf build.tar.gz + # echo "+++ :microscope: Starting package build" + # ln -s "$(pwd)" /data/job + # cd /data/job/build/packages + # bash generate_package.sh brew + # label: ":darwin: Mojave Package Builder" + # agents: + # - "role=builder-v2-2" + # - "os=mojave" + # artifact_paths: + # - "build/packages/*.tar.gz" + # - "build/packages/*.rb" + # timeout: 60 - - command: | # Git Submodule Regression Check - echo "+++ :microscope: Running git submodule regression check" && \ - ./scripts/submodule_check.sh - label: "Git Submodule Regression Check" - agents: - queue: "automation-large-builder-fleet" - timeout: 5 + # - wait + + # - command: | # Brew Updater + # echo "--- :arrow_down: Downloading brew files" + # buildkite-agent artifact download "build/packages/eosio.rb" . --step ":darwin: Mojave Package Builder" + # label: ":darwin: Brew Updater" + # agents: + # queue: "automation-large-builder-fleet" + # artifact_paths: + # - "build/packages/eosio.rb" + # timeout: 5 + + # - command: | # Git Submodule Regression Check + # echo "+++ :microscope: Running git submodule regression check" && \ + # ./scripts/submodule_check.sh + # label: "Git Submodule Regression Check" + # agents: + # queue: "automation-large-builder-fleet" + # timeout: 5 From 75f69a049658828964c7391f34130ccd1a851308 Mon Sep 17 00:00:00 2001 From: Nathan Pierce Date: Wed, 24 Apr 2019 23:59:01 -0400 Subject: [PATCH 82/86] Anka finalization --- .buildkite/pipeline.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index e1eb823c32a..4534fb366c6 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -38,7 +38,7 @@ steps: wait-network: true agents: - "queue=mac-anka-node-fleet" - timeout: 60 + timeout: 120 # - command: | # macOS Mojave Build @@ -344,7 +344,7 @@ steps: always-pull: true debug: true wait-network: true - timeout: 60 + timeout: 120 - label: ":darwin: [Darwin] Mojave Tests" command: @@ -366,7 +366,7 @@ steps: always-pull: true debug: true wait-network: true - timeout: 60 + timeout: 120 # # Mojave Tests # - command: | From d32626363678adaf7821ed900ea5d0c536b52b5c Mon Sep 17 00:00:00 2001 From: Nathan Pierce Date: Thu, 25 Apr 2019 00:18:48 -0400 Subject: [PATCH 83/86] Anka finalization --- .buildkite/pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 4534fb366c6..f41402ebd5c 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -327,7 +327,7 @@ steps: - label: ":darwin: [Darwin] Mojave Tests" command: - "tar -pxzf /Network/NAS/MAC_FLEET/BUILDKITE/artifacts/${ANKA_MOJAVE_TEMPLATE}-${BUILDKITE_PIPELINE_SLUG}-${BUILDKITE_BUILD_ID}.tar.gz" - - "cd ./build && ./scripts/parallel-test.sh" + - "./scripts/parallel-test.sh" artifact_paths: - "build/mongod.log" - "build/genesis.json" @@ -349,7 +349,7 @@ steps: - label: ":darwin: [Darwin] Mojave Tests" command: - "tar -pxzf /Network/NAS/MAC_FLEET/BUILDKITE/artifacts/${ANKA_MOJAVE_TEMPLATE}-${BUILDKITE_PIPELINE_SLUG}-${BUILDKITE_BUILD_ID}.tar.gz" - - "cd ./build && ./scripts/serial-test.sh" + - "./scripts/serial-test.sh" artifact_paths: - "build/mongod.log" - "build/genesis.json" From 0cbead98fc06cf1433834cef635cff3845ea955d Mon Sep 17 00:00:00 2001 From: Nathan Pierce Date: Thu, 25 Apr 2019 00:37:38 -0400 Subject: [PATCH 84/86] Anka finalization --- .buildkite/pipeline.yml | 10 ++-------- scripts/parallel-test.sh | 2 +- scripts/serial-test.sh | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index f41402ebd5c..ec9a02e3fca 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -326,8 +326,7 @@ steps: - label: ":darwin: [Darwin] Mojave Tests" command: - - "tar -pxzf /Network/NAS/MAC_FLEET/BUILDKITE/artifacts/${ANKA_MOJAVE_TEMPLATE}-${BUILDKITE_PIPELINE_SLUG}-${BUILDKITE_BUILD_ID}.tar.gz" - - "./scripts/parallel-test.sh" + - "./scripts/parallel-test.sh /Network/NAS/MAC_FLEET/BUILDKITE/artifacts/${ANKA_MOJAVE_TEMPLATE}-${BUILDKITE_PIPELINE_SLUG}-${BUILDKITE_BUILD_ID}.tar.gz" artifact_paths: - "build/mongod.log" - "build/genesis.json" @@ -339,8 +338,6 @@ steps: vm-name: $ANKA_MOJAVE_TEMPLATE vm-registry-tag: "${ANKA_TEMPLATE_TAG}::${MAC_TAG}" workdir: $ANKA_WORKDIR - # Tests can't have the host "working directory" mounted - no-volume: true always-pull: true debug: true wait-network: true @@ -348,8 +345,7 @@ steps: - label: ":darwin: [Darwin] Mojave Tests" command: - - "tar -pxzf /Network/NAS/MAC_FLEET/BUILDKITE/artifacts/${ANKA_MOJAVE_TEMPLATE}-${BUILDKITE_PIPELINE_SLUG}-${BUILDKITE_BUILD_ID}.tar.gz" - - "./scripts/serial-test.sh" + - "./scripts/serial-test.sh /Network/NAS/MAC_FLEET/BUILDKITE/artifacts/${ANKA_MOJAVE_TEMPLATE}-${BUILDKITE_PIPELINE_SLUG}-${BUILDKITE_BUILD_ID}.tar.gz" artifact_paths: - "build/mongod.log" - "build/genesis.json" @@ -361,8 +357,6 @@ steps: vm-name: $ANKA_MOJAVE_TEMPLATE vm-registry-tag: "${ANKA_TEMPLATE_TAG}::${MAC_TAG}" workdir: $ANKA_WORKDIR - # Tests can't have the host "working directory" mounted - no-volume: true always-pull: true debug: true wait-network: true diff --git a/scripts/parallel-test.sh b/scripts/parallel-test.sh index 0153b95c87e..cf555637437 100755 --- a/scripts/parallel-test.sh +++ b/scripts/parallel-test.sh @@ -3,7 +3,7 @@ set -e # exit on failure of any "simple" command (excludes &&, ||, or | chains) # prepare environment PATH=$PATH:~/opt/mongodb/bin echo "Extracting build directory..." -tar -zxf build.tar.gz +[[ -z "${1}" ]] && tar -zxf build.tar.gz || tar -xzf $1 cd /data/job/build # run tests echo "Running tests..." diff --git a/scripts/serial-test.sh b/scripts/serial-test.sh index c1f83ae9bfa..109efb6e9d1 100755 --- a/scripts/serial-test.sh +++ b/scripts/serial-test.sh @@ -3,7 +3,7 @@ set -e # exit on failure of any "simple" command (excludes &&, ||, or | chains) # prepare environment PATH=$PATH:~/opt/mongodb/bin echo "Extracting build directory..." -tar -zxf build.tar.gz +[[ -z "${1}" ]] && tar -zxf build.tar.gz || tar -xzf $1 #echo "Starting MongoDB..." #~/bin/mongod --fork --dbpath ~/data/mongodb -f ~/etc/mongod.conf --logpath "$(pwd)"/mongod.log cd /data/job/build From 45e52eab05675f020cb716776caf818d40f15af0 Mon Sep 17 00:00:00 2001 From: Nathan Pierce Date: Thu, 25 Apr 2019 00:56:32 -0400 Subject: [PATCH 85/86] Anka revert --- .buildkite/pipeline.yml | 210 ++++++++++++++++++++-------------------- 1 file changed, 105 insertions(+), 105 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index ec9a02e3fca..02bc8c91507 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -7,57 +7,57 @@ env: steps: - - trigger: "mac-anka-fleet" - label: ":anka: Ensure Mojave Anka Template Tag Exists" - branches: "*" - async: false - build: - branch: "master" - env: - REPO: "${BUILDKITE_REPO}" - REPO_BRANCH: "${BUILDKITE_BRANCH}" - CHECKSUMABLE: "${CHECKSUMABLE}" - TEMPLATE: "${ANKA_MOJAVE_TEMPLATE}" - TEMPLATE_TAG: "${ANKA_TEMPLATE_TAG}" - TAG_COMMANDS: "CLONED_REPO_DIR/scripts/eosio_build.sh -y -P -f" # CLONED_REPO_DIR IS REQUIRED and is where the repo is always cloned into - PROJECT_TAG: "${MAC_TAG}" - - - wait - - - label: ":darwin: [Darwin] Mojave Build" - command: - - "./scripts/eosio_build.sh -y -P" - - "tar -pczf /Network/NAS/MAC_FLEET/BUILDKITE/artifacts/${ANKA_MOJAVE_TEMPLATE}-${BUILDKITE_PIPELINE_SLUG}-${BUILDKITE_BUILD_ID}.tar.gz build" - plugins: - chef/anka#v0.4.3: - vm-name: $ANKA_MOJAVE_TEMPLATE - vm-registry-tag: "${ANKA_TEMPLATE_TAG}::${MAC_TAG}" - workdir: $ANKA_WORKDIR - always-pull: true - debug: true - wait-network: true - agents: - - "queue=mac-anka-node-fleet" - timeout: 120 + # - trigger: "mac-anka-fleet" + # label: ":anka: Ensure Mojave Anka Template Tag Exists" + # branches: "*" + # async: false + # build: + # branch: "master" + # env: + # REPO: "${BUILDKITE_REPO}" + # REPO_BRANCH: "${BUILDKITE_BRANCH}" + # CHECKSUMABLE: "${CHECKSUMABLE}" + # TEMPLATE: "${ANKA_MOJAVE_TEMPLATE}" + # TEMPLATE_TAG: "${ANKA_TEMPLATE_TAG}" + # TAG_COMMANDS: "CLONED_REPO_DIR/scripts/eosio_build.sh -y -P -f" # CLONED_REPO_DIR IS REQUIRED and is where the repo is always cloned into + # PROJECT_TAG: "${MAC_TAG}" + # - wait - # - command: | # macOS Mojave Build - # echo "--- Creating symbolic link to job directory :file_folder:" - # sleep 5 - # ln -s "$(pwd)" /data/job - # cd /data/job - # echo "+++ Building :hammer:" - # ./scripts/eosio_build.sh -y -P - # echo "--- Compressing build directory :compression:" - # tar -pczf build.tar.gz build - # if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi - # label: ":darwin: Mojave Build" + # - label: ":darwin: [Darwin] Mojave Build" + # command: + # - "./scripts/eosio_build.sh -y -P" + # - "tar -pczf /Network/NAS/MAC_FLEET/BUILDKITE/artifacts/${ANKA_MOJAVE_TEMPLATE}-${BUILDKITE_PIPELINE_SLUG}-${BUILDKITE_BUILD_ID}.tar.gz build" + # plugins: + # chef/anka#v0.4.3: + # vm-name: $ANKA_MOJAVE_TEMPLATE + # vm-registry-tag: "${ANKA_TEMPLATE_TAG}::${MAC_TAG}" + # workdir: $ANKA_WORKDIR + # always-pull: true + # debug: true + # wait-network: true # agents: - # - "role=builder-v2-2" - # - "os=mojave" - # artifact_paths: "build.tar.gz" + # - "queue=mac-anka-node-fleet" # timeout: 120 + + - command: | # macOS Mojave Build + echo "--- Creating symbolic link to job directory :file_folder:" + sleep 5 + ln -s "$(pwd)" /data/job + cd /data/job + echo "+++ Building :hammer:" + ./scripts/eosio_build.sh -y -P + echo "--- Compressing build directory :compression:" + tar -pczf build.tar.gz build + if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi + label: ":darwin: Mojave Build" + agents: + - "role=builder-v2-2" + - "os=mojave" + artifact_paths: "build.tar.gz" + timeout: 120 + # - command: | # Amazon Linux 2 Build # echo "+++ :hammer: Building" # ./scripts/eosio_build.sh -y -P @@ -324,67 +324,67 @@ steps: # workdir: /data/job # timeout: 60 - - label: ":darwin: [Darwin] Mojave Tests" - command: - - "./scripts/parallel-test.sh /Network/NAS/MAC_FLEET/BUILDKITE/artifacts/${ANKA_MOJAVE_TEMPLATE}-${BUILDKITE_PIPELINE_SLUG}-${BUILDKITE_BUILD_ID}.tar.gz" - artifact_paths: - - "build/mongod.log" - - "build/genesis.json" - - "build/config.ini" - agents: - - "queue=mac-anka-node-fleet" - plugins: - chef/anka#v0.4.3: - vm-name: $ANKA_MOJAVE_TEMPLATE - vm-registry-tag: "${ANKA_TEMPLATE_TAG}::${MAC_TAG}" - workdir: $ANKA_WORKDIR - always-pull: true - debug: true - wait-network: true - timeout: 120 - - - label: ":darwin: [Darwin] Mojave Tests" - command: - - "./scripts/serial-test.sh /Network/NAS/MAC_FLEET/BUILDKITE/artifacts/${ANKA_MOJAVE_TEMPLATE}-${BUILDKITE_PIPELINE_SLUG}-${BUILDKITE_BUILD_ID}.tar.gz" - artifact_paths: - - "build/mongod.log" - - "build/genesis.json" - - "build/config.ini" - agents: - - "queue=mac-anka-node-fleet" - plugins: - chef/anka#v0.4.3: - vm-name: $ANKA_MOJAVE_TEMPLATE - vm-registry-tag: "${ANKA_TEMPLATE_TAG}::${MAC_TAG}" - workdir: $ANKA_WORKDIR - always-pull: true - debug: true - wait-network: true - timeout: 120 - - # # Mojave Tests - # - command: | - # echo "--- :arrow_down: Downloading Build Directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" - # echo "+++ :microscope: Running Tests" - # ln -s "$(pwd)" /data/job - # ./scripts/parallel-test.sh - # label: ":darwin: Mojave Tests" + # - label: ":darwin: [Darwin] Mojave Tests" + # command: + # - "./scripts/parallel-test.sh /Network/NAS/MAC_FLEET/BUILDKITE/artifacts/${ANKA_MOJAVE_TEMPLATE}-${BUILDKITE_PIPELINE_SLUG}-${BUILDKITE_BUILD_ID}.tar.gz" + # artifact_paths: + # - "build/mongod.log" + # - "build/genesis.json" + # - "build/config.ini" # agents: - # - "role=tester-v2-2" - # - "os=mojave" - # timeout: 60 - # - command: | - # echo "--- :arrow_down: Downloading Build Directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" - # echo "+++ :microscope: Running Tests" - # ln -s "$(pwd)" /data/job - # ./scripts/serial-test.sh - # label: ":darwin: Mojave NP Tests" + # - "queue=mac-anka-node-fleet" + # plugins: + # chef/anka#v0.4.3: + # vm-name: $ANKA_MOJAVE_TEMPLATE + # vm-registry-tag: "${ANKA_TEMPLATE_TAG}::${MAC_TAG}" + # workdir: $ANKA_WORKDIR + # always-pull: true + # debug: true + # wait-network: true + # timeout: 120 + + # - label: ":darwin: [Darwin] Mojave Tests" + # command: + # - "./scripts/serial-test.sh /Network/NAS/MAC_FLEET/BUILDKITE/artifacts/${ANKA_MOJAVE_TEMPLATE}-${BUILDKITE_PIPELINE_SLUG}-${BUILDKITE_BUILD_ID}.tar.gz" + # artifact_paths: + # - "build/mongod.log" + # - "build/genesis.json" + # - "build/config.ini" # agents: - # - "role=tester-v2-2" - # - "os=mojave" - # timeout: 60 + # - "queue=mac-anka-node-fleet" + # plugins: + # chef/anka#v0.4.3: + # vm-name: $ANKA_MOJAVE_TEMPLATE + # vm-registry-tag: "${ANKA_TEMPLATE_TAG}::${MAC_TAG}" + # workdir: $ANKA_WORKDIR + # always-pull: true + # debug: true + # wait-network: true + # timeout: 120 + + # Mojave Tests + - command: | + echo "--- :arrow_down: Downloading Build Directory" + buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" + echo "+++ :microscope: Running Tests" + ln -s "$(pwd)" /data/job + ./scripts/parallel-test.sh + label: ":darwin: Mojave Tests" + agents: + - "role=tester-v2-2" + - "os=mojave" + timeout: 60 + - command: | + echo "--- :arrow_down: Downloading Build Directory" + buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" + echo "+++ :microscope: Running Tests" + ln -s "$(pwd)" /data/job + ./scripts/serial-test.sh + label: ":darwin: Mojave NP Tests" + agents: + - "role=tester-v2-2" + - "os=mojave" + timeout: 60 # - wait From 22db39698813adf3af069388306a0c75d9e40898 Mon Sep 17 00:00:00 2001 From: Nathan Pierce Date: Thu, 25 Apr 2019 01:36:39 -0400 Subject: [PATCH 86/86] Anka reverted --- .buildkite/pipeline.yml | 760 ++++++++++++++++++++-------------------- 1 file changed, 380 insertions(+), 380 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 02bc8c91507..2a188f66eca 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,9 +1,9 @@ -env: - ANKA_WORKDIR: "/data/job" - ANKA_MOJAVE_TEMPLATE: "10.14.4_6C_14G_40G" - ANKA_TEMPLATE_TAG: "clean::cicd::git-ssh::nas::brew" - CHECKSUMABLE: "scripts/eosio_build*" - MAC_TAG: "eosio_2-3" +# env: +# ANKA_WORKDIR: "/data/job" +# ANKA_MOJAVE_TEMPLATE: "10.14.4_6C_14G_40G" +# ANKA_TEMPLATE_TAG: "clean::cicd::git-ssh::nas::brew" +# CHECKSUMABLE: "scripts/eosio_build*" +# MAC_TAG: "eosio_2-3" steps: @@ -58,271 +58,271 @@ steps: artifact_paths: "build.tar.gz" timeout: 120 - # - command: | # Amazon Linux 2 Build - # echo "+++ :hammer: Building" - # ./scripts/eosio_build.sh -y -P - # echo "--- :compression: Compressing build directory" - # tar -pczf build.tar.gz build - # if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi - # label: ":aws: Amazon Linux 2 Build" - # agents: - # queue: "automation-large-builder-fleet" - # artifact_paths: "build.tar.gz" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" - # propagate-environment: true - # workdir: /data/job - # timeout: 120 + - command: | # Amazon Linux 2 Build + echo "+++ :hammer: Building" + ./scripts/eosio_build.sh -y -P + echo "--- :compression: Compressing build directory" + tar -pczf build.tar.gz build + if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi + label: ":aws: Amazon Linux 2 Build" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: "build.tar.gz" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" + propagate-environment: true + workdir: /data/job + timeout: 120 - # - command: | # CentOS 7 Build - # echo "+++ :hammer: Building" - # ./scripts/eosio_build.sh -y -P - # echo "--- :compression: Compressing build directory" - # tar -pczf build.tar.gz build - # if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi - # label: ":centos: CentOS 7 Build" - # agents: - # queue: "automation-large-builder-fleet" - # artifact_paths: "build.tar.gz" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" - # propagate-environment: true - # workdir: /data/job - # timeout: 120 + - command: | # CentOS 7 Build + echo "+++ :hammer: Building" + ./scripts/eosio_build.sh -y -P + echo "--- :compression: Compressing build directory" + tar -pczf build.tar.gz build + if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi + label: ":centos: CentOS 7 Build" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: "build.tar.gz" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" + propagate-environment: true + workdir: /data/job + timeout: 120 - # - command: | # Ubuntu 16.04 Build - # echo "+++ :hammer: Building" - # ./scripts/eosio_build.sh -y -P - # echo "--- :compression: Compressing build directory" - # tar -pczf build.tar.gz build - # if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi - # label: ":ubuntu: Ubuntu 16.04 Build" - # agents: - # queue: "automation-large-builder-fleet" - # artifact_paths: "build.tar.gz" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" - # propagate-environment: true - # workdir: /data/job - # timeout: 120 + - command: | # Ubuntu 16.04 Build + echo "+++ :hammer: Building" + ./scripts/eosio_build.sh -y -P + echo "--- :compression: Compressing build directory" + tar -pczf build.tar.gz build + if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi + label: ":ubuntu: Ubuntu 16.04 Build" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: "build.tar.gz" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" + propagate-environment: true + workdir: /data/job + timeout: 120 - # - command: | # Ubuntu 18.04 Build - # echo "+++ :hammer: Building" - # ./scripts/eosio_build.sh -y -P - # echo "--- :compression: Compressing build directory" - # tar -pczf build.tar.gz build - # if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi - # label: ":ubuntu: Ubuntu 18.04 Build" - # agents: - # queue: "automation-large-builder-fleet" - # artifact_paths: "build.tar.gz" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" - # propagate-environment: true - # workdir: /data/job - # timeout: 120 + - command: | # Ubuntu 18.04 Build + echo "+++ :hammer: Building" + ./scripts/eosio_build.sh -y -P + echo "--- :compression: Compressing build directory" + tar -pczf build.tar.gz build + if [[ ! -f build.tar.gz ]]; then echo 'ERROR: No build.tar.gz artifact found!' && exit 1; fi + label: ":ubuntu: Ubuntu 18.04 Build" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: "build.tar.gz" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" + propagate-environment: true + workdir: /data/job + timeout: 120 - wait - # # Amazon Linux 2 Tests - # - command: | - # echo "--- :arrow_down: Downloading Build Directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":aws: Amazon Linux 2 Build" - # echo "+++ :microscope: Running Tests" - # ./scripts/parallel-test.sh - # label: ":aws: Amazon Linux 2 Tests" - # agents: - # queue: "automation-large-builder-fleet" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" - # propagate-environment: true - # workdir: /data/job - # timeout: 60 + # Amazon Linux 2 Tests + - command: | + echo "--- :arrow_down: Downloading Build Directory" + buildkite-agent artifact download "build.tar.gz" . --step ":aws: Amazon Linux 2 Build" + echo "+++ :microscope: Running Tests" + ./scripts/parallel-test.sh + label: ":aws: Amazon Linux 2 Tests" + agents: + queue: "automation-large-builder-fleet" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" + propagate-environment: true + workdir: /data/job + timeout: 60 - # - command: | - # echo "--- :arrow_down: Downloading Build Directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":aws: Amazon Linux 2 Build" - # echo "+++ :microscope: Running Tests" - # ./scripts/serial-test.sh - # label: ":aws: Amazon Linux 2 NP Tests" - # agents: - # queue: "automation-large-builder-fleet" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" - # propagate-environment: true - # workdir: /data/job - # timeout: 60 + - command: | + echo "--- :arrow_down: Downloading Build Directory" + buildkite-agent artifact download "build.tar.gz" . --step ":aws: Amazon Linux 2 Build" + echo "+++ :microscope: Running Tests" + ./scripts/serial-test.sh + label: ":aws: Amazon Linux 2 NP Tests" + agents: + queue: "automation-large-builder-fleet" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:amazonlinux2_2-3" + propagate-environment: true + workdir: /data/job + timeout: 60 - # # centOS 7 Tests - # - command: | - # echo "--- :arrow_down: Downloading Build Directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":centos: CentOS 7 Build" - # echo "+++ :microscope: Running Tests" - # ./scripts/parallel-test.sh - # label: ":centos: CentOS 7 Tests" - # agents: - # queue: "automation-large-builder-fleet" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" - # propagate-environment: true - # workdir: /data/job - # timeout: 60 + # centOS 7 Tests + - command: | + echo "--- :arrow_down: Downloading Build Directory" + buildkite-agent artifact download "build.tar.gz" . --step ":centos: CentOS 7 Build" + echo "+++ :microscope: Running Tests" + ./scripts/parallel-test.sh + label: ":centos: CentOS 7 Tests" + agents: + queue: "automation-large-builder-fleet" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" + propagate-environment: true + workdir: /data/job + timeout: 60 - # - command: | - # echo "--- :arrow_down: Downloading Build Directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":centos: CentOS 7 Build" - # echo "+++ :microscope: Running Tests" - # ./scripts/serial-test.sh - # label: ":centos: CentOS 7 NP Tests" - # agents: - # queue: "automation-large-builder-fleet" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" - # propagate-environment: true - # workdir: /data/job - # timeout: 60 + - command: | + echo "--- :arrow_down: Downloading Build Directory" + buildkite-agent artifact download "build.tar.gz" . --step ":centos: CentOS 7 Build" + echo "+++ :microscope: Running Tests" + ./scripts/serial-test.sh + label: ":centos: CentOS 7 NP Tests" + agents: + queue: "automation-large-builder-fleet" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" + propagate-environment: true + workdir: /data/job + timeout: 60 - # # Ubuntu 16.04 Tests - # - command: | - # echo "--- :arrow_down: Downloading Build Directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 16.04 Build" - # echo "+++ :microscope: Running Tests" - # ./scripts/parallel-test.sh - # label: ":ubuntu: Ubuntu 16.04 Tests" - # agents: - # queue: "automation-large-builder-fleet" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" - # propagate-environment: true - # workdir: /data/job - # timeout: 60 + # Ubuntu 16.04 Tests + - command: | + echo "--- :arrow_down: Downloading Build Directory" + buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 16.04 Build" + echo "+++ :microscope: Running Tests" + ./scripts/parallel-test.sh + label: ":ubuntu: Ubuntu 16.04 Tests" + agents: + queue: "automation-large-builder-fleet" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" + propagate-environment: true + workdir: /data/job + timeout: 60 - # - command: | - # echo "--- :arrow_down: Downloading Build Directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 16.04 Build" - # echo "+++ :microscope: Running Tests" - # ./scripts/serial-test.sh - # label: ":ubuntu: Ubuntu 16.04 NP Tests" - # agents: - # queue: "automation-large-builder-fleet" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" - # propagate-environment: true - # workdir: /data/job - # timeout: 60 + - command: | + echo "--- :arrow_down: Downloading Build Directory" + buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 16.04 Build" + echo "+++ :microscope: Running Tests" + ./scripts/serial-test.sh + label: ":ubuntu: Ubuntu 16.04 NP Tests" + agents: + queue: "automation-large-builder-fleet" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" + propagate-environment: true + workdir: /data/job + timeout: 60 - # # Ubuntu 18.04 Tests - # - command: | - # echo "--- :arrow_down: Downloading Build Directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 18.04 Build" - # echo "+++ :microscope: Running Tests" - # ./scripts/parallel-test.sh - # label: ":ubuntu: Ubuntu 18.04 Tests" - # agents: - # queue: "automation-large-builder-fleet" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" - # propagate-environment: true - # workdir: /data/job - # timeout: 60 + # Ubuntu 18.04 Tests + - command: | + echo "--- :arrow_down: Downloading Build Directory" + buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 18.04 Build" + echo "+++ :microscope: Running Tests" + ./scripts/parallel-test.sh + label: ":ubuntu: Ubuntu 18.04 Tests" + agents: + queue: "automation-large-builder-fleet" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" + propagate-environment: true + workdir: /data/job + timeout: 60 - # - command: | - # echo "--- :arrow_down: Downloading Build Directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 18.04 Build" - # echo "+++ :microscope: Running Tests" - # ./scripts/serial-test.sh - # label: ":ubuntu: Ubuntu 18.04 NP Tests" - # agents: - # queue: "automation-large-builder-fleet" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" - # propagate-environment: true - # workdir: /data/job - # timeout: 60 + - command: | + echo "--- :arrow_down: Downloading Build Directory" + buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 18.04 Build" + echo "+++ :microscope: Running Tests" + ./scripts/serial-test.sh + label: ":ubuntu: Ubuntu 18.04 NP Tests" + agents: + queue: "automation-large-builder-fleet" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" + propagate-environment: true + workdir: /data/job + timeout: 60 # - label: ":darwin: [Darwin] Mojave Tests" # command: @@ -387,132 +387,132 @@ steps: timeout: 60 - # - wait + - wait - # - command: | # CentOS 7 Package Builder - # echo "--- :arrow_down: Downloading build directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":centos: CentOS 7 Build" - # tar -zxf build.tar.gz - # echo "+++ :microscope: Starting package build" - # yum install -y rpm-build - # mkdir -p /root/rpmbuild/BUILD - # mkdir -p /root/rpmbuild/BUILDROOT - # mkdir -p /root/rpmbuild/RPMS - # mkdir -p /root/rpmbuild/SOURCES - # mkdir -p /root/rpmbuild/SPECS - # mkdir -p /root/rpmbuild/SRPMS - # cd /data/job/build/packages - # bash generate_package.sh rpm - # label: ":centos: CentOS 7 Package Builder" - # agents: - # queue: "automation-large-builder-fleet" - # artifact_paths: - # - "build/packages/*.rpm" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" - # propagate-environment: true - # workdir: /data/job - # env: - # OS: "el7" - # PKGTYPE: "rpm" - # timeout: 60 + - command: | # CentOS 7 Package Builder + echo "--- :arrow_down: Downloading build directory" + buildkite-agent artifact download "build.tar.gz" . --step ":centos: CentOS 7 Build" + tar -zxf build.tar.gz + echo "+++ :microscope: Starting package build" + yum install -y rpm-build + mkdir -p /root/rpmbuild/BUILD + mkdir -p /root/rpmbuild/BUILDROOT + mkdir -p /root/rpmbuild/RPMS + mkdir -p /root/rpmbuild/SOURCES + mkdir -p /root/rpmbuild/SPECS + mkdir -p /root/rpmbuild/SRPMS + cd /data/job/build/packages + bash generate_package.sh rpm + label: ":centos: CentOS 7 Package Builder" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: + - "build/packages/*.rpm" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:centos7_2-3" + propagate-environment: true + workdir: /data/job + env: + OS: "el7" + PKGTYPE: "rpm" + timeout: 60 - # - command: | # Ubuntu 16.04 Package Builder - # echo "--- :arrow_down: Downloading build directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 16.04 Build" - # tar -zxf build.tar.gz - # echo "+++ :microscope: Starting package build" - # cd /data/job/build/packages - # bash generate_package.sh deb - # label: ":ubuntu: Ubuntu 16.04 Package Builder" - # agents: - # queue: "automation-large-builder-fleet" - # artifact_paths: - # - "build/packages/*.deb" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" - # propagate-environment: true - # workdir: /data/job - # env: - # OS: "ubuntu-16.04" - # PKGTYPE: "deb" - # timeout: 60 + - command: | # Ubuntu 16.04 Package Builder + echo "--- :arrow_down: Downloading build directory" + buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 16.04 Build" + tar -zxf build.tar.gz + echo "+++ :microscope: Starting package build" + cd /data/job/build/packages + bash generate_package.sh deb + label: ":ubuntu: Ubuntu 16.04 Package Builder" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: + - "build/packages/*.deb" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu16_2-3" + propagate-environment: true + workdir: /data/job + env: + OS: "ubuntu-16.04" + PKGTYPE: "deb" + timeout: 60 - # - command: | # Ubuntu 18.04 Package Builder - # echo "--- :arrow_down: Downloading build directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 18.04 Build" - # tar -zxf build.tar.gz - # echo "+++ :microscope: Starting package build" - # cd /data/job/build/packages - # bash generate_package.sh deb - # label: ":ubuntu: Ubuntu 18.04 Package Builder" - # agents: - # queue: "automation-large-builder-fleet" - # artifact_paths: - # - "build/packages/*.deb" - # plugins: - # ecr#v1.1.4: - # login: true - # account_ids: "436617320021" - # no-include-email: true - # region: "us-west-2" - # docker#v2.1.0: - # debug: true - # image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" - # propagate-environment: true - # workdir: /data/job - # env: - # OS: "ubuntu-18.04" - # PKGTYPE: "deb" - # timeout: 60 + - command: | # Ubuntu 18.04 Package Builder + echo "--- :arrow_down: Downloading build directory" + buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Ubuntu 18.04 Build" + tar -zxf build.tar.gz + echo "+++ :microscope: Starting package build" + cd /data/job/build/packages + bash generate_package.sh deb + label: ":ubuntu: Ubuntu 18.04 Package Builder" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: + - "build/packages/*.deb" + plugins: + ecr#v1.1.4: + login: true + account_ids: "436617320021" + no-include-email: true + region: "us-west-2" + docker#v2.1.0: + debug: true + image: "436617320021.dkr.ecr.us-west-2.amazonaws.com/ci:ubuntu18_2-3" + propagate-environment: true + workdir: /data/job + env: + OS: "ubuntu-18.04" + PKGTYPE: "deb" + timeout: 60 - # - command: | # macOS Mojave Package Builder - # echo "--- :arrow_down: Downloading build directory" - # buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" - # tar -zxf build.tar.gz - # echo "+++ :microscope: Starting package build" - # ln -s "$(pwd)" /data/job - # cd /data/job/build/packages - # bash generate_package.sh brew - # label: ":darwin: Mojave Package Builder" - # agents: - # - "role=builder-v2-2" - # - "os=mojave" - # artifact_paths: - # - "build/packages/*.tar.gz" - # - "build/packages/*.rb" - # timeout: 60 + - command: | # macOS Mojave Package Builder + echo "--- :arrow_down: Downloading build directory" + buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" + tar -zxf build.tar.gz + echo "+++ :microscope: Starting package build" + ln -s "$(pwd)" /data/job + cd /data/job/build/packages + bash generate_package.sh brew + label: ":darwin: Mojave Package Builder" + agents: + - "role=builder-v2-2" + - "os=mojave" + artifact_paths: + - "build/packages/*.tar.gz" + - "build/packages/*.rb" + timeout: 60 - # - wait + - wait - # - command: | # Brew Updater - # echo "--- :arrow_down: Downloading brew files" - # buildkite-agent artifact download "build/packages/eosio.rb" . --step ":darwin: Mojave Package Builder" - # label: ":darwin: Brew Updater" - # agents: - # queue: "automation-large-builder-fleet" - # artifact_paths: - # - "build/packages/eosio.rb" - # timeout: 5 + - command: | # Brew Updater + echo "--- :arrow_down: Downloading brew files" + buildkite-agent artifact download "build/packages/eosio.rb" . --step ":darwin: Mojave Package Builder" + label: ":darwin: Brew Updater" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: + - "build/packages/eosio.rb" + timeout: 5 - # - command: | # Git Submodule Regression Check - # echo "+++ :microscope: Running git submodule regression check" && \ - # ./scripts/submodule_check.sh - # label: "Git Submodule Regression Check" - # agents: - # queue: "automation-large-builder-fleet" - # timeout: 5 + - command: | # Git Submodule Regression Check + echo "+++ :microscope: Running git submodule regression check" && \ + ./scripts/submodule_check.sh + label: "Git Submodule Regression Check" + agents: + queue: "automation-large-builder-fleet" + timeout: 5