From bee847b9d4749a0acb60d827557e8743e7a0f862 Mon Sep 17 00:00:00 2001 From: Patrick Raphael Date: Thu, 23 Dec 2021 15:22:09 -0500 Subject: [PATCH 1/2] update .cicd/platforms apply Boost fix --- .../platforms/pinned/amazon_linux-2-pinned.dockerfile | 4 +++- .cicd/platforms/pinned/centos-7.7-pinned.dockerfile | 4 +++- .cicd/platforms/pinned/macos-10.14-pinned.sh | 2 ++ .cicd/platforms/pinned/macos-10.15-pinned.sh | 2 ++ .cicd/platforms/pinned/ubuntu-18.04-pinned.dockerfile | 4 +++- .cicd/platforms/pinned/ubuntu-20.04-pinned.dockerfile | 4 +++- .../unpinned/amazon_linux-2-unpinned.dockerfile | 11 +++++++---- .../platforms/unpinned/centos-7.7-unpinned.dockerfile | 10 ++++++---- .../unpinned/ubuntu-18.04-unpinned.dockerfile | 10 ++++++---- .../unpinned/ubuntu-20.04-unpinned.dockerfile | 10 ++++++---- 10 files changed, 41 insertions(+), 20 deletions(-) diff --git a/.cicd/platforms/pinned/amazon_linux-2-pinned.dockerfile b/.cicd/platforms/pinned/amazon_linux-2-pinned.dockerfile index dec8d11a7dd..5ed17b367dc 100644 --- a/.cicd/platforms/pinned/amazon_linux-2-pinned.dockerfile +++ b/.cicd/platforms/pinned/amazon_linux-2-pinned.dockerfile @@ -35,9 +35,11 @@ RUN git clone --depth 1 --single-branch --branch llvmorg-10.0.0 https://github.c cd / && \ rm -rf /llvm # build boost -RUN curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2 && \ +ENV BEAST_FIX_URL https://raw.githubusercontent.com/boostorg/beast/3fd090af3b7e69ed7871c64a4b4b86fae45e98da/include/boost/beast/zlib/detail/inflate_stream.ipp +RUN curl -fsSLO https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2 && \ tar -xjf boost_1_72_0.tar.bz2 && \ cd boost_1_72_0 && \ + curl -fsSLo boost/beast/zlib/detail/inflate_stream.ipp "${BEAST_FIX_URL}" && \ ./bootstrap.sh --with-toolset=clang --prefix=/usr/local && \ ./b2 toolset=clang cxxflags='-stdlib=libc++ -D__STRICT_ANSI__ -nostdinc++ -I/usr/local/include/c++/v1 -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fpie' linkflags='-stdlib=libc++ -pie' link=static threading=multi --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j$(nproc) install && \ cd / && \ diff --git a/.cicd/platforms/pinned/centos-7.7-pinned.dockerfile b/.cicd/platforms/pinned/centos-7.7-pinned.dockerfile index 5e5323efb91..eec09895bdb 100644 --- a/.cicd/platforms/pinned/centos-7.7-pinned.dockerfile +++ b/.cicd/platforms/pinned/centos-7.7-pinned.dockerfile @@ -41,9 +41,11 @@ RUN git clone --depth 1 --single-branch --branch llvmorg-10.0.0 https://github.c cd / && \ rm -rf /llvm # build boost -RUN curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2 && \ +ENV BEAST_FIX_URL https://raw.githubusercontent.com/boostorg/beast/3fd090af3b7e69ed7871c64a4b4b86fae45e98da/include/boost/beast/zlib/detail/inflate_stream.ipp +RUN curl -fsSLO https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2 && \ tar -xjf boost_1_72_0.tar.bz2 && \ cd boost_1_72_0 && \ + curl -fsSLo boost/beast/zlib/detail/inflate_stream.ipp "${BEAST_FIX_URL}" && \ ./bootstrap.sh --with-toolset=clang --prefix=/usr/local && \ ./b2 toolset=clang cxxflags='-stdlib=libc++ -D__STRICT_ANSI__ -nostdinc++ -I/usr/local/include/c++/v1 -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fpie' linkflags='-stdlib=libc++ -pie' link=static threading=multi --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j$(nproc) install && \ cd / && \ diff --git a/.cicd/platforms/pinned/macos-10.14-pinned.sh b/.cicd/platforms/pinned/macos-10.14-pinned.sh index e630193536d..72f87035215 100755 --- a/.cicd/platforms/pinned/macos-10.14-pinned.sh +++ b/.cicd/platforms/pinned/macos-10.14-pinned.sh @@ -18,6 +18,8 @@ export SDKROOT="$(xcrun --sdk macosx --show-sdk-path)" curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2 tar -xjf boost_1_72_0.tar.bz2 cd boost_1_72_0 +BEAST_FIX_URL=https://raw.githubusercontent.com/boostorg/beast/3fd090af3b7e69ed7871c64a4b4b86fae45e98da/include/boost/beast/zlib/detail/inflate_stream.ipp +curl -fsSLo boost/beast/zlib/detail/inflate_stream.ipp "${BEAST_FIX_URL}" ./bootstrap.sh --prefix=/usr/local sudo SDKROOT="$SDKROOT" ./b2 --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j$(getconf _NPROCESSORS_ONLN) install cd .. diff --git a/.cicd/platforms/pinned/macos-10.15-pinned.sh b/.cicd/platforms/pinned/macos-10.15-pinned.sh index 307ae015077..bdbb11d6367 100755 --- a/.cicd/platforms/pinned/macos-10.15-pinned.sh +++ b/.cicd/platforms/pinned/macos-10.15-pinned.sh @@ -17,6 +17,8 @@ rm -rf clang10 curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2 tar -xjf boost_1_72_0.tar.bz2 cd boost_1_72_0 +BEAST_FIX_URL=https://raw.githubusercontent.com/boostorg/beast/3fd090af3b7e69ed7871c64a4b4b86fae45e98da/include/boost/beast/zlib/detail/inflate_stream.ipp +curl -fsSLo boost/beast/zlib/detail/inflate_stream.ipp "${BEAST_FIX_URL}" ./bootstrap.sh --prefix=/usr/local sudo -E ./b2 --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j$(getconf _NPROCESSORS_ONLN) install cd .. diff --git a/.cicd/platforms/pinned/ubuntu-18.04-pinned.dockerfile b/.cicd/platforms/pinned/ubuntu-18.04-pinned.dockerfile index 166ecfbee65..c01ff7934d2 100644 --- a/.cicd/platforms/pinned/ubuntu-18.04-pinned.dockerfile +++ b/.cicd/platforms/pinned/ubuntu-18.04-pinned.dockerfile @@ -40,9 +40,11 @@ RUN git clone --depth 1 --single-branch --branch llvmorg-10.0.0 https://github.c cd / && \ rm -rf /llvm # build boost -RUN curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2 && \ +ENV BEAST_FIX_URL https://raw.githubusercontent.com/boostorg/beast/3fd090af3b7e69ed7871c64a4b4b86fae45e98da/include/boost/beast/zlib/detail/inflate_stream.ipp +RUN curl -fsSLO https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2 && \ tar -xjf boost_1_72_0.tar.bz2 && \ cd boost_1_72_0 && \ + curl -fsSLo boost/beast/zlib/detail/inflate_stream.ipp "${BEAST_FIX_URL}" && \ ./bootstrap.sh --with-toolset=clang --prefix=/usr/local && \ ./b2 toolset=clang cxxflags='-stdlib=libc++ -D__STRICT_ANSI__ -nostdinc++ -I/usr/local/include/c++/v1 -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fpie' linkflags='-stdlib=libc++ -pie' link=static threading=multi --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j$(nproc) install && \ cd / && \ diff --git a/.cicd/platforms/pinned/ubuntu-20.04-pinned.dockerfile b/.cicd/platforms/pinned/ubuntu-20.04-pinned.dockerfile index 3bb8d732969..bc65c92b3ec 100644 --- a/.cicd/platforms/pinned/ubuntu-20.04-pinned.dockerfile +++ b/.cicd/platforms/pinned/ubuntu-20.04-pinned.dockerfile @@ -40,9 +40,11 @@ RUN git clone --depth 1 --single-branch --branch llvmorg-10.0.0 https://github.c cd / && \ rm -rf /llvm # build boost -RUN curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2 && \ +ENV BEAST_FIX_URL https://raw.githubusercontent.com/boostorg/beast/3fd090af3b7e69ed7871c64a4b4b86fae45e98da/include/boost/beast/zlib/detail/inflate_stream.ipp +RUN curl -fsSLO https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2 && \ tar -xjf boost_1_72_0.tar.bz2 && \ cd boost_1_72_0 && \ + curl -fsSLo boost/beast/zlib/detail/inflate_stream.ipp "${BEAST_FIX_URL}" && \ ./bootstrap.sh --with-toolset=clang --prefix=/usr/local && \ ./b2 toolset=clang cxxflags='-stdlib=libc++ -D__STRICT_ANSI__ -nostdinc++ -I/usr/local/include/c++/v1 -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fpie' linkflags='-stdlib=libc++ -pie' link=static threading=multi --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j$(nproc) install && \ cd / && \ diff --git a/.cicd/platforms/unpinned/amazon_linux-2-unpinned.dockerfile b/.cicd/platforms/unpinned/amazon_linux-2-unpinned.dockerfile index 30fa8c3ea3d..98b3d82d699 100644 --- a/.cicd/platforms/unpinned/amazon_linux-2-unpinned.dockerfile +++ b/.cicd/platforms/unpinned/amazon_linux-2-unpinned.dockerfile @@ -15,13 +15,16 @@ RUN curl -LO https://github.com/Kitware/CMake/releases/download/v3.16.2/cmake-3. make install && \ rm -rf cmake-3.16.2.tar.gz cmake-3.16.2 # build boost -RUN curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.bz2 && \ - tar -xjf boost_1_71_0.tar.bz2 && \ - cd boost_1_71_0 && \ +ENV BOOST_VERSION 1_78_0 +ENV BOOST_VERSION_DOT 1.78.0 +RUN curl -fsSLO "https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION_DOT}/source/boost_${BOOST_VERSION}.tar.bz2" && \ + tar -xjf "boost_${BOOST_VERSION}.tar.bz2" && \ + cd "boost_${BOOST_VERSION}" && \ ./bootstrap.sh --prefix=/usr/local && \ ./b2 --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j$(nproc) install && \ cd / && \ - rm -rf boost_1_71_0.tar.bz2 /boost_1_71_0 + rm -rf "boost_${BOOST_VERSION}.tar.bz2" "/boost_${BOOST_VERSION}" + # install nvm RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash # load nvm in non-interactive shells diff --git a/.cicd/platforms/unpinned/centos-7.7-unpinned.dockerfile b/.cicd/platforms/unpinned/centos-7.7-unpinned.dockerfile index 40fbcd25476..d450efccb3c 100644 --- a/.cicd/platforms/unpinned/centos-7.7-unpinned.dockerfile +++ b/.cicd/platforms/unpinned/centos-7.7-unpinned.dockerfile @@ -21,15 +21,17 @@ RUN curl -LO https://github.com/Kitware/CMake/releases/download/v3.16.2/cmake-3. make install && \ rm -rf cmake-3.16.2.tar.gz cmake-3.16.2 # build boost -RUN curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.bz2 && \ +ENV BOOST_VERSION 1_78_0 +ENV BOOST_VERSION_DOT 1.78.0 +RUN curl -fsSLO "https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION_DOT}/source/boost_${BOOST_VERSION}.tar.bz2" && \ source /opt/rh/devtoolset-8/enable && \ source /opt/rh/rh-python36/enable && \ - tar -xjf boost_1_71_0.tar.bz2 && \ - cd boost_1_71_0 && \ + tar -xjf "boost_${BOOST_VERSION}.tar.bz2" && \ + cd "boost_${BOOST_VERSION}" && \ ./bootstrap.sh --prefix=/usr/local && \ ./b2 --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j$(nproc) install && \ cd / && \ - rm -rf boost_1_71_0.tar.bz2 /boost_1_71_0 + rm -rf "boost_${BOOST_VERSION}.tar.bz2" "/boost_${BOOST_VERSION}" # install nvm RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash # load nvm in non-interactive shells diff --git a/.cicd/platforms/unpinned/ubuntu-18.04-unpinned.dockerfile b/.cicd/platforms/unpinned/ubuntu-18.04-unpinned.dockerfile index 4c100780d29..77ca3483eaf 100644 --- a/.cicd/platforms/unpinned/ubuntu-18.04-unpinned.dockerfile +++ b/.cicd/platforms/unpinned/ubuntu-18.04-unpinned.dockerfile @@ -19,13 +19,15 @@ RUN curl -LO https://github.com/Kitware/CMake/releases/download/v3.16.2/cmake-3. make install && \ rm -rf cmake-3.16.2.tar.gz cmake-3.16.2 # build boost -RUN curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.bz2 && \ - tar -xjf boost_1_71_0.tar.bz2 && \ - cd boost_1_71_0 && \ +ENV BOOST_VERSION 1_78_0 +ENV BOOST_VERSION_DOT 1.78.0 +RUN curl -fsSLO "https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION_DOT}/source/boost_${BOOST_VERSION}.tar.bz2" && \ + tar -xjf "boost_${BOOST_VERSION}.tar.bz2" && \ + cd "boost_${BOOST_VERSION}" && \ ./bootstrap.sh --prefix=/usr/local && \ ./b2 --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -j$(nproc) install && \ cd / && \ - rm -rf boost_1_71_0.tar.bz2 /boost_1_71_0 + rm -rf "boost_${BOOST_VERSION}.tar.bz2" "/boost_${BOOST_VERSION}" # install nvm RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash # load nvm in non-interactive shells diff --git a/.cicd/platforms/unpinned/ubuntu-20.04-unpinned.dockerfile b/.cicd/platforms/unpinned/ubuntu-20.04-unpinned.dockerfile index 72f4b6e8429..92c8248e5e8 100644 --- a/.cicd/platforms/unpinned/ubuntu-20.04-unpinned.dockerfile +++ b/.cicd/platforms/unpinned/ubuntu-20.04-unpinned.dockerfile @@ -20,13 +20,15 @@ RUN curl -LO https://github.com/Kitware/CMake/releases/download/v3.16.2/cmake-3. make install && \ rm -rf cmake-3.16.2.tar.gz cmake-3.16.2 # build boost -RUN curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.bz2 && \ - tar -xjf boost_1_71_0.tar.bz2 && \ - cd boost_1_71_0 && \ +ENV BOOST_VERSION 1_78_0 +ENV BOOST_VERSION_DOT 1.78.0 +RUN curl -fsSLO "https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION_DOT}/source/boost_${BOOST_VERSION}.tar.bz2" && \ + tar -xjf "boost_${BOOST_VERSION}.tar.bz2" && \ + cd "boost_${BOOST_VERSION}" && \ ./bootstrap.sh --prefix=/usr/local && \ ./b2 --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -j$(nproc) install && \ cd / && \ - rm -rf boost_1_71_0.tar.bz2 /boost_1_71_0 + rm -rf "boost_${BOOST_VERSION}.tar.bz2" "/boost_${BOOST_VERSION}" # install node 12 RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \ . /etc/lsb-release && \ From 81583685a8faddcf4cdbdaecf73bc5795ef0a6e2 Mon Sep 17 00:00:00 2001 From: Patrick Raphael Date: Thu, 23 Dec 2021 14:15:35 -0500 Subject: [PATCH 2/2] apply Boost fix to build scripts --- scripts/.build_vars | 9 +++++++-- scripts/helpers/eosio.sh | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/.build_vars b/scripts/.build_vars index d2444fec0a0..e64b26b5ea7 100644 --- a/scripts/.build_vars +++ b/scripts/.build_vars @@ -14,8 +14,13 @@ export CMAKE_VERSION_PATCH=2 export CMAKE_VERSION=${CMAKE_VERSION_MAJOR}.${CMAKE_VERSION_MINOR}.${CMAKE_VERSION_PATCH} # BOOST -export BOOST_VERSION_MAJOR=1 -export BOOST_VERSION_MINOR=72 +if $PIN_COMPILER; then + export BOOST_VERSION_MAJOR=1 + export BOOST_VERSION_MINOR=72 +else + export BOOST_VERSION_MAJOR=1 + export BOOST_VERSION_MINOR=78 +fi export BOOST_VERSION_PATCH=0 export BOOST_VERSION=${BOOST_VERSION_MAJOR}_${BOOST_VERSION_MINOR}_${BOOST_VERSION_PATCH} export BOOST_ROOT=${BOOST_LOCATION:-${SRC_DIR}/boost_${BOOST_VERSION}} diff --git a/scripts/helpers/eosio.sh b/scripts/helpers/eosio.sh index 35bd4ea919e..eeaf1d091ab 100755 --- a/scripts/helpers/eosio.sh +++ b/scripts/helpers/eosio.sh @@ -223,6 +223,7 @@ function ensure-boost() { [[ $ARCH == "Darwin" ]] && export CPATH="$(python-config --includes | awk '{print $1}' | cut -dI -f2):$CPATH" # Boost has trouble finding pyconfig.h echo "${COLOR_CYAN}[Ensuring Boost $( echo $BOOST_VERSION | sed 's/_/./g' ) library installation]${COLOR_NC}" BOOSTVERSION=$( grep "#define BOOST_VERSION" "$BOOST_ROOT/include/boost/version.hpp" 2>/dev/null | tail -1 | tr -s ' ' | cut -d\ -f3 || true ) + BEAST_FIX_URL="https://raw.githubusercontent.com/boostorg/beast/3fd090af3b7e69ed7871c64a4b4b86fae45e98da/include/boost/beast/zlib/detail/inflate_stream.ipp" if [[ "${BOOSTVERSION}" != "${BOOST_VERSION_MAJOR}0${BOOST_VERSION_MINOR}0${BOOST_VERSION_PATCH}" ]]; then B2_FLAGS="-q -j${JOBS} --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test install" BOOTSTRAP_FLAGS="" @@ -236,6 +237,7 @@ function ensure-boost() { curl -LO https://boostorg.jfrog.io/artifactory/main/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 \ + && if "$PIN_COMPILER"; then curl -fsSLo boost/beast/zlib/detail/inflate_stream.ipp "${BEAST_FIX_URL}"; fi \ && SDKROOT="$SDKROOT" ./bootstrap.sh ${BOOTSTRAP_FLAGS} --prefix=$BOOST_ROOT \ && SDKROOT="$SDKROOT" ./b2 ${B2_FLAGS} \ && cd .. \