Changed to use devtoolset for building on CentOS 7

This commit is contained in:
Takeshi Nakatani 2023-11-25 17:17:13 +00:00
parent 2b57e74330
commit 29cf161d03
2 changed files with 22 additions and 0 deletions

View File

@ -96,6 +96,9 @@ jobs:
- name: Build
run: |
if [ -f /opt/rh/devtoolset-11/enable ]; then
source /opt/rh/devtoolset-11/enable
fi
./autogen.sh
/bin/sh -c "./configure ${CONFIGURE_OPTIONS}"
make --jobs=$(nproc)

View File

@ -79,6 +79,7 @@ PACKAGE_ENABLE_REPO_OPTIONS=""
PACKAGE_INSTALL_ADDITIONAL_OPTIONS=""
SHELLCHECK_DIRECT_INSTALL=0
AWSCLI_DIRECT_INSTALL=1
SCL_INSTALL=0
if [ "${CONTAINER_FULLNAME}" = "ubuntu:23.10" ]; then
PACKAGE_MANAGER_BIN="apt-get"
@ -183,6 +184,15 @@ elif [ "${CONTAINER_FULLNAME}" = "centos:centos7" ]; then
INSTALL_CHECKER_PKGS="cppcheck jq"
INSTALL_CHECKER_PKG_OPTIONS="--enablerepo=epel"
# [NOTE]
# To use C++11 std::get_time/put_time, you need GCC5 or higher.
# For building, we need to use devtoolset on CentOS 7.
# (devtoolset is not required in the s3fs execution.)
#
SCL_INSTALL=1
INSTALL_SCL_PACKAGES="centos-release-scl"
INSTALL_DEVTOOLSET_PACKAGES="devtoolset-11"
elif [ "${CONTAINER_FULLNAME}" = "fedora:39" ]; then
PACKAGE_MANAGER_BIN="dnf"
PACKAGE_UPDATE_OPTIONS="update -y -qq"
@ -235,6 +245,15 @@ fi
echo "${PRGNAME} [INFO] Updates."
/bin/sh -c "${PACKAGE_MANAGER_BIN} ${PACKAGE_UPDATE_OPTIONS}"
#
# Install SCL and devtoolset for CentOS 7
#
if [ "${SCL_INSTALL}" -eq 1 ]; then
echo "${PRGNAME} [INFO] SCL and devtoolset for CentOS 7."
/bin/sh -c "${PACKAGE_MANAGER_BIN} ${PACKAGE_INSTALL_OPTIONS} ${INSTALL_SCL_PACKAGES}"
/bin/sh -c "${PACKAGE_MANAGER_BIN} ${PACKAGE_INSTALL_OPTIONS} ${INSTALL_DEVTOOLSET_PACKAGES}"
fi
#
# Install packages ( with cppcheck )
#