From e25f67aea9ca003636e341873a28bcafe866bd23 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Fri, 6 Aug 2021 20:50:46 +0200 Subject: [PATCH 1/3] Fix manylinux and update to devtoolset-10 Fix manylinux and update to devtoolset-10 Signed-off-by: Bensuperpc --- common/common-manylinux.crosstool | 4 ++-- common/common.manylinux | 1 + manylinux2014-x64/Dockerfile.in | 2 +- manylinux2014-x64/Toolchain.cmake | 6 +++--- manylinux2014-x86/Dockerfile.in | 2 +- manylinux2014-x86/Toolchain.cmake | 6 +++--- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/common/common-manylinux.crosstool b/common/common-manylinux.crosstool index 34bb485..535e144 100644 --- a/common/common-manylinux.crosstool +++ b/common/common-manylinux.crosstool @@ -18,7 +18,7 @@ ENV MANYLINUX_DEPS="glibc-devel glibc-devel.i686 libstdc++-devel glib2-devel lib ENV PYTHON_COMPILE_DEPS="python-devel zlib-devel bzip2-devel expat-devel ncurses-devel readline-devel tk-devel gdbm-devel libdb-devel libpcap-devel xz-devel openssl-devel keyutils-libs-devel krb5-devel libcom_err-devel libidn-devel curl-devel perl-devel" -ENV TOOLCHAIN_DEPS="devtoolset-9-binutils devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-gcc-gfortran" +ENV TOOLCHAIN_DEPS="devtoolset-10-binutils devtoolset-10-gcc devtoolset-10-gcc-c++ devtoolset-10-gcc-gfortran" # Install dependent packages required for `ct-ng`. RUN \ @@ -62,7 +62,7 @@ RUN \ rm -rf /dockcross/crosstool /dockcross/install-crosstool-ng-toolchain.sh && \ # Remove sudo provided by devtoolset since it doesn't work with # our sudo wrapper calling gosu. - rm -f /opt/rh/devtoolset-9/root/usr/bin/sudo + rm -f /opt/rh/devtoolset-10/root/usr/bin/sudo # Restore our default workdir (from "dockcross/base"). WORKDIR /work diff --git a/common/common.manylinux b/common/common.manylinux index e703860..9b2eaa9 100644 --- a/common/common.manylinux +++ b/common/common.manylinux @@ -23,6 +23,7 @@ RUN \ rm -f /opt/rh/devtoolset-7/root/usr/bin/sudo && \ rm -f /opt/rh/devtoolset-8/root/usr/bin/sudo && \ rm -f /opt/rh/devtoolset-9/root/usr/bin/sudo && \ + rm -f /opt/rh/devtoolset-10/root/usr/bin/sudo && \ /buildscripts/install-python-packages.sh && \ rm -rf /buildscripts diff --git a/manylinux2014-x64/Dockerfile.in b/manylinux2014-x64/Dockerfile.in index 2dac6c1..8bb9633 100644 --- a/manylinux2014-x64/Dockerfile.in +++ b/manylinux2014-x64/Dockerfile.in @@ -16,7 +16,7 @@ RUN echo $'#!/bin/bash\n\ LD_PRELOAD=/usr/lib64/libcurl.so.4 /usr/bin/yum "$@"' > /usr/local/bin/yum && chmod a+x /usr/local/bin/yum ENV CROSS_TRIPLE x86_64-linux-gnu -ENV CROSS_ROOT /opt/rh/devtoolset-9/root/usr/bin +ENV CROSS_ROOT /opt/rh/devtoolset-10/root/usr/bin ENV AS=${CROSS_ROOT}/as \ AR=${CROSS_ROOT}/ar \ CC=${CROSS_ROOT}/gcc \ diff --git a/manylinux2014-x64/Toolchain.cmake b/manylinux2014-x64/Toolchain.cmake index 4b2d037..4d34d56 100644 --- a/manylinux2014-x64/Toolchain.cmake +++ b/manylinux2014-x64/Toolchain.cmake @@ -5,7 +5,7 @@ set(CMAKE_SYSTEM_PROCESSOR x86_64) set(MANYLINUX2014 TRUE) -set(CMAKE_C_COMPILER /opt/rh/devtoolset-9/root/usr/bin/gcc) -set(CMAKE_CXX_COMPILER /opt/rh/devtoolset-9/root/usr/bin/g++) +set(CMAKE_C_COMPILER /opt/rh/devtoolset-10/root/usr/bin/gcc) +set(CMAKE_CXX_COMPILER /opt/rh/devtoolset-10/root/usr/bin/g++) set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER}) -set(CMAKE_Fortran_COMPILER /opt/rh/devtoolset-9/root/usr/bin/gfortran) +set(CMAKE_Fortran_COMPILER /opt/rh/devtoolset-10/root/usr/bin/gfortran) diff --git a/manylinux2014-x86/Dockerfile.in b/manylinux2014-x86/Dockerfile.in index 0c0c4c1..6888b20 100644 --- a/manylinux2014-x86/Dockerfile.in +++ b/manylinux2014-x86/Dockerfile.in @@ -16,7 +16,7 @@ RUN echo $'#!/bin/bash\n\ LD_PRELOAD=/usr/lib/libcurl.so.4 /usr/bin/yum "$@"' > /usr/local/bin/yum && chmod a+x /usr/local/bin/yum ENV CROSS_TRIPLE i686-linux-gnu -ENV CROSS_ROOT /opt/rh/devtoolset-9/root/usr/bin +ENV CROSS_ROOT /opt/rh/devtoolset-10/root/usr/bin ENV AS=${CROSS_ROOT}/as \ AR=${CROSS_ROOT}/ar \ CC=${CROSS_ROOT}/gcc \ diff --git a/manylinux2014-x86/Toolchain.cmake b/manylinux2014-x86/Toolchain.cmake index e544d3d..2a6ca8b 100644 --- a/manylinux2014-x86/Toolchain.cmake +++ b/manylinux2014-x86/Toolchain.cmake @@ -5,7 +5,7 @@ set(CMAKE_SYSTEM_PROCESSOR i686) set(MANYLINUX2014 TRUE) -set(CMAKE_C_COMPILER /opt/rh/devtoolset-9/root/usr/bin/gcc) -set(CMAKE_CXX_COMPILER /opt/rh/devtoolset-9/root/usr/bin/g++) +set(CMAKE_C_COMPILER /opt/rh/devtoolset-10/root/usr/bin/gcc) +set(CMAKE_CXX_COMPILER /opt/rh/devtoolset-10/root/usr/bin/g++) set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER}) -set(CMAKE_Fortran_COMPILER /opt/rh/devtoolset-9/root/usr/bin/gfortran) +set(CMAKE_Fortran_COMPILER /opt/rh/devtoolset-10/root/usr/bin/gfortran) From cc949d6a857d069ac2aa2e68f826d5d07e542668 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Fri, 6 Aug 2021 21:53:09 +0200 Subject: [PATCH 2/3] Add mirror for CMake Add mirror: https://github.com/Kitware/CMake Signed-off-by: Bensuperpc --- imagefiles/build-and-install-cmake.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/imagefiles/build-and-install-cmake.sh b/imagefiles/build-and-install-cmake.sh index adb4e7a..ed4d736 100755 --- a/imagefiles/build-and-install-cmake.sh +++ b/imagefiles/build-and-install-cmake.sh @@ -4,6 +4,9 @@ set -ex WRAPPER="" +CMAKE_URL = "https://gitlab.kitware.com/cmake/cmake.git" +CMAKE_MIRROR_URL = "https://github.com/Kitware/CMake.git" + while [ $# -gt 0 ]; do case "$1" in -32) @@ -29,7 +32,9 @@ fi cd /usr/src -git clone https://gitlab.kitware.com/cmake/cmake.git CMake -b v$CMAKE_VERSION --depth 1 +# If the first link doesn't work, it will use the mirror on github +git clone "$CMAKE_URL" CMake -b v$CMAKE_VERSION --depth 1 \ + || git clone "$CMAKE_MIRROR_URL" CMake -b v$CMAKE_VERSION --depth 1 mkdir /usr/src/CMake-build cd /usr/src/CMake-build From 76d1ec682f48b3ad2a60834ecff78bc7f161ab5b Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Fri, 6 Aug 2021 21:54:37 +0200 Subject: [PATCH 3/3] Fix shellcheck Fix shellcheck Signed-off-by: Bensuperpc --- imagefiles/build-and-install-cmake.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imagefiles/build-and-install-cmake.sh b/imagefiles/build-and-install-cmake.sh index ed4d736..aaee83f 100755 --- a/imagefiles/build-and-install-cmake.sh +++ b/imagefiles/build-and-install-cmake.sh @@ -4,8 +4,8 @@ set -ex WRAPPER="" -CMAKE_URL = "https://gitlab.kitware.com/cmake/cmake.git" -CMAKE_MIRROR_URL = "https://github.com/Kitware/CMake.git" +CMAKE_URL="https://gitlab.kitware.com/cmake/cmake.git" +CMAKE_MIRROR_URL="https://github.com/Kitware/CMake.git" while [ $# -gt 0 ]; do case "$1" in