Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove GCC 4 from containers #4474

Merged
merged 1 commit into from
Feb 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions buildenv/jenkins/docker-slaves/ppc64le/centos7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ RUN yum -y update \
fontconfig \
fontconfig-devel \
freetype-devel \
gcc-4.8.5 \
gcc-c++-4.8.5 \
gettext \
glibc \
glibc-common \
Expand Down Expand Up @@ -106,16 +104,14 @@ RUN wget -O - http://cpanmin.us | perl - --self-upgrade \
&& cpanm Text::CSV \
&& cpanm JSON

# Setup links to GCC-4.8.5
RUN rm /usr/bin/c++ /usr/bin/cc \
&& ln -s g++ /usr/bin/c++ \
&& ln -s gcc /usr/bin/cc

# Install GCC-7.3.1
RUN cd /usr/local \
&& wget -O gcc-7.tar.xz "https://ci.adoptopenjdk.net/userContent/gcc/gcc730+ccache.ppc64le.tar.xz" \
&& tar -xJf gcc-7.tar.xz --strip-components=1 \
&& rm -rf gcc-7.tar.xz
&& rm -rf gcc-7.tar.xz \
&& ln -s /usr/local/bin/gcc-7.3 /usr/bin/cc \
&& ln -s /usr/local/bin/gcc-7.3 /usr/bin/gcc \
&& ln -s /usr/local/bin/g++-7.3 /usr/bin/g++
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to symlink default gcc? I.e. does something need a default gcc?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to a link to cc to install git, but I don't need the rest of the symlinks

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might as well link them all then

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could just use a cc=/usr/local/bin/gcc-7.3 before the git compilation, but I guess this works too


# Edit ldconfig to connect this library
RUN echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local.conf \
Expand Down
4 changes: 2 additions & 2 deletions buildenv/jenkins/docker-slaves/ppc64le/ubuntu16/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ RUN apt-get update \
autoconf \
build-essential \
curl \
g++-4.8 \
gcc-4.8 \
g++-7 \
gcc-7 \
gdb \
git \
make \
Expand Down
9 changes: 0 additions & 9 deletions buildenv/jenkins/docker-slaves/ppc64le/ubuntu18/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ RUN apt-get update \
autoconf \
build-essential \
curl \
g++-4.8 \
g++-7 \
gcc-4.8 \
gcc-7 \
gdb \
git \
Expand All @@ -61,13 +59,6 @@ RUN apt-get update \
# Install Docker module to run test framework
RUN echo yes | cpan install JSON Text::CSV

# Create links for c++,g++,cc,gcc
RUN rm /usr/bin/c++ /usr/bin/g++ /usr/bin/cc /usr/bin/gcc \
&& ln -s g++ /usr/bin/c++ \
&& ln -s g++-4.8 /usr/bin/g++ \
&& ln -s gcc /usr/bin/cc \
&& ln -s gcc-4.8 /usr/bin/gcc

# Add user home/USER and copy authorized_keys and known_hosts
RUN useradd -ms /bin/bash ${USER} \
&& mkdir /home/${USER}/.ssh/
Expand Down
19 changes: 9 additions & 10 deletions buildenv/jenkins/docker-slaves/s390x/ubuntu16/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ RUN apt-get update \
cpio \
curl \
file \
g++-4.8 \
gcc-4.8 \
gdb \
git \
git-core \
Expand Down Expand Up @@ -81,8 +79,10 @@ RUN apt-get update \
zip \
&& rm -rf /var/lib/apt/lists/*

# Install Docker module to run test framework
RUN echo yes | cpan install JSON Text::CSV
# Dependency required by test framework
RUN wget -O - http://cpanmin.us | perl - --self-upgrade \
&& cpanm Text::CSV \
&& cpanm JSON

# Install GCC-7.4
RUN cd /usr/local \
Expand All @@ -92,16 +92,15 @@ RUN cd /usr/local \

# Create links for c++,g++,cc,gcc and for GCC to access the C library
# There is a true at the end of the library link because it throws an error and it allows the container to be built
RUN rm /usr/bin/c++ /usr/bin/g++ /usr/bin/cc /usr/bin/gcc \
&& ln -s g++ /usr/bin/c++ \
&& ln -s g++-4.8 /usr/bin/g++ \
&& ln -s gcc /usr/bin/cc \
&& ln -s gcc-4.8 /usr/bin/gcc \
&& ln -s /usr/lib/s390x-linux-gnu /usr/lib64 \
RUN ln -s /usr/lib/s390x-linux-gnu /usr/lib64 \
&& ln -s /usr/include/s390x-linux-gnu/* /usr/local/include | true \
&& ln -s /usr/local/bin/g++-7.4 /usr/bin/g++-7 \
&& ln -s /usr/local/bin/gcc-7.4 /usr/bin/gcc-7

# Edit ldconfig to connect the new libstdc++.so* library
RUN echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local.conf \
&& ldconfig

# Add user home/USER and copy authorized_keys and known_hosts
RUN useradd -ms /bin/bash ${USER} \
&& mkdir /home/${USER}/.ssh/
Expand Down
9 changes: 0 additions & 9 deletions buildenv/jenkins/docker-slaves/s390x/ubuntu18/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ RUN apt-get update \
autoconf \
build-essential \
curl \
g++-4.8 \
g++-7 \
gcc-4.8 \
gcc-7 \
gdb \
git \
Expand All @@ -61,13 +59,6 @@ RUN apt-get update \
# Install Docker module to run test framework
RUN echo yes | cpan install JSON Text::CSV

# Create links for c++,g++,cc,gcc
RUN rm /usr/bin/c++ /usr/bin/g++ /usr/bin/cc /usr/bin/gcc \
&& ln -s g++ /usr/bin/c++ \
&& ln -s g++-4.8 /usr/bin/g++ \
&& ln -s gcc /usr/bin/cc \
&& ln -s gcc-4.8 /usr/bin/gcc

# Add user home/USER and copy authorized_keys and known_hosts
RUN useradd -ms /bin/bash ${USER} \
&& mkdir /home/${USER}/.ssh/
Expand Down
21 changes: 6 additions & 15 deletions buildenv/jenkins/docker-slaves/x86/centos6.9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -111,24 +111,15 @@ RUN wget -O - http://cpanmin.us | perl - --self-upgrade \
&& cpanm Text::CSV \
&& cpanm JSON

# install GCC-4.8 and GCC-7.3
RUN cd /etc/yum.repos.d \
&& wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo \
&& yum -y update \
&& yum -y install devtoolset-2-gcc devtoolset-2-binutils \
&& yum -y install devtoolset-2-gcc-c++ devtoolset-2-gcc-gfortran \
&& yum clean all \
&& scl enable devtoolset-2 bash \
&& mv /opt/rh/devtoolset-2/root/usr/bin/gcc /opt/rh/devtoolset-2/root/usr/bin/gcc-4.8 \
&& mv /opt/rh/devtoolset-2/root/usr/bin/g++ /opt/rh/devtoolset-2/root/usr/bin/g++-4.8 \
&& ln -s /opt/rh/devtoolset-2/root/usr/bin/gcc-4.8 /usr/bin/gcc \
&& ln -s /opt/rh/devtoolset-2/root/usr/bin/g++-4.8 /usr/bin/g++ \
&& ln -s /opt/rh/devtoolset-2/root/usr/bin/gcc-4.8 /usr/bin/cc \
&& yum -y update \
# Install GCC-7.3
RUN yum -y update \
&& yum -y install centos-release-scl \
&& yum -y install devtoolset-7-gcc-7.3* devtoolset-7-binutils \
&& yum -y install devtoolset-7-gcc-c++-7.3* devtoolset-2-gcc-gfortran-7.3* \
&& yum clean all
&& yum clean all \
&& ln -s /opt/rh/devtoolset-7/root/usr/bin/gcc /usr/bin/cc \
&& ln -s /opt/rh/devtoolset-7/root/usr/bin/gcc /usr/bin/gcc \
&& ln -s /opt/rh/devtoolset-7/root/usr/bin/g++ /usr/bin/g++
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to symlink default gcc? I.e. does something need a default gcc?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git requires cc and Protobuf requires gcc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok good enough. I doubt compiler versions matter too much for those dependencies. Unless they fail outright.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not surprised this didn't cause a problem. Running gcc out of the devtoolset requires running a script to setup the environment and libpaths for newer libraries. If this generates a docker container that compiles openj9, I guess we leave it be though.


#Building and setting up git version 2.5.3
RUN yum -y update \
Expand Down
9 changes: 0 additions & 9 deletions buildenv/jenkins/docker-slaves/x86/ubuntu16/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ RUN apt-get update \
cpio \
curl \
file \
g++-4.8 \
g++-7 \
gcc-4.8 \
gcc-7 \
gdb \
git \
Expand Down Expand Up @@ -86,13 +84,6 @@ RUN apt-get update \
# Install Docker module to run test framework
RUN echo yes | cpan install JSON Text::CSV

# Create links for c++,g++,cc,gcc
RUN rm /usr/bin/c++ /usr/bin/g++ /usr/bin/cc /usr/bin/gcc \
&& ln -s g++ /usr/bin/c++ \
&& ln -s g++-4.8 /usr/bin/g++ \
&& ln -s gcc /usr/bin/cc \
&& ln -s gcc-4.8 /usr/bin/gcc

# Add user home/USER and copy authorized_keys and known_hosts
RUN useradd -ms /bin/bash ${USER} \
&& mkdir /home/${USER}/.ssh/
Expand Down
9 changes: 0 additions & 9 deletions buildenv/jenkins/docker-slaves/x86/ubuntu18/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ RUN apt-get update \
autoconf \
build-essential \
curl \
g++-4.8 \
g++-7 \
gcc-4.8 \
gcc-7 \
gdb \
git \
Expand All @@ -61,13 +59,6 @@ RUN apt-get update \
# Install Docker module to run test framework
RUN echo yes | cpan install JSON Text::CSV

# Create links for c++,g++,cc,gcc
RUN rm /usr/bin/c++ /usr/bin/g++ /usr/bin/cc /usr/bin/gcc \
&& ln -s g++ /usr/bin/c++ \
&& ln -s g++-4.8 /usr/bin/g++ \
&& ln -s gcc /usr/bin/cc \
&& ln -s gcc-4.8 /usr/bin/gcc

# Add user home/USER and copy authorized_keys and known_hosts
RUN useradd -ms /bin/bash ${USER} \
&& mkdir /home/${USER}/.ssh/
Expand Down