This is an automated email from the ASF dual-hosted git repository.

gangwu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/orc.git


The following commit(s) were added to refs/heads/main by this push:
     new c3d47c8aa ORC-1322: Upgrade centos7 docker image to use gcc 9
c3d47c8aa is described below

commit c3d47c8aa2696f2e78bbd839e49ebf6fbcaa2395
Author: Gang Wu <[email protected]>
AuthorDate: Fri Dec 2 09:52:52 2022 +0800

    ORC-1322: Upgrade centos7 docker image to use gcc 9
    
    This closes #1325
---
 cmake_modules/ThirdpartyToolchain.cmake | 1 +
 docker/centos7/Dockerfile               | 8 ++++++--
 docker/run-one.sh                       | 2 +-
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/cmake_modules/ThirdpartyToolchain.cmake 
b/cmake_modules/ThirdpartyToolchain.cmake
index f10069928..1a773e28a 100644
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/ThirdpartyToolchain.cmake
@@ -326,6 +326,7 @@ if (BUILD_CPP_TESTS)
 
     set(GTEST_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
                          -DCMAKE_INSTALL_PREFIX=${GTEST_PREFIX}
+                         -DCMAKE_INSTALL_LIBDIR=lib
                          -Dgtest_force_shared_crt=ON
                          -DCMAKE_CXX_FLAGS=${GTEST_CMAKE_CXX_FLAGS})
 
diff --git a/docker/centos7/Dockerfile b/docker/centos7/Dockerfile
index 278a97fe5..eb6067f5e 100644
--- a/docker/centos7/Dockerfile
+++ b/docker/centos7/Dockerfile
@@ -28,8 +28,6 @@ RUN yum install -y \
   curl-devel \
   cyrus-sasl-devel \
   expat-devel \
-  gcc \
-  gcc-c++ \
   gettext-devel \
   git \
   libtool \
@@ -56,6 +54,12 @@ RUN yum install -y \
 # Our scripts assume that cmake is called 'cmake'
 RUN ln -s /usr/bin/cmake3 /usr/bin/cmake
 
+# Install gcc-9
+RUN yum install -y centos-release-scl
+RUN yum install -y devtoolset-9
+RUN echo "source /opt/rh/devtoolset-9/enable" >> /etc/bashrc
+SHELL ["/bin/bash", "--login", "-c"]
+
 ENV TZ=America/Los_Angeles
 WORKDIR /root
 VOLUME /root/.m2/repository
diff --git a/docker/run-one.sh b/docker/run-one.sh
index bef0d85a4..e084fadb8 100755
--- a/docker/run-one.sh
+++ b/docker/run-one.sh
@@ -37,7 +37,7 @@ else
 
   echo "Started $GITHUB_USER/$BRANCH on $BUILD at $(date)"
 
-  docker run $VOLUME "$TAG" /bin/bash -c \
+  docker run $VOLUME "$TAG" /bin/bash --login -c \
      "$CLONE && $MAKEDIR && cmake $OPTS .. && make package test-out" \
        || failure
 fi

Reply via email to