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

Conversation

samuel-rubin
Copy link
Contributor

@samuel-rubin samuel-rubin commented Jan 28, 2019

Removing GCC 4 because it is no longer being used to compile java
Installing GCC-7 where it is not already being installed
Adding libstdc++.so* to ldconfig when using precompiled gcc-7

[skip ci]

Signed-off-by: Samuel Rubin samuel.rubin@ibm.com

@samuel-rubin
Copy link
Contributor Author

@AdamBrousseau for review

@samuel-rubin
Copy link
Contributor Author

jenkins build docker ppc64le centos7

@samuel-rubin
Copy link
Contributor Author

I forgot to link GCC-7 on the centos containers

@samuel-rubin
Copy link
Contributor Author

I recreated the links for GCC in the centos containers

@samuel-rubin
Copy link
Contributor Author

jenkins build docker ppc64le centos7

&& 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.

&& 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

@AdamBrousseau
Copy link
Contributor

jenkins build docker ppc64le ubuntu16

Copy link
Contributor

@AdamBrousseau AdamBrousseau left a comment

Choose a reason for hiding this comment

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

LGTM. @smlambert for final review.

@AdamBrousseau
Copy link
Contributor

Related #4305

Copy link
Contributor

@AdamBrousseau AdamBrousseau left a comment

Choose a reason for hiding this comment

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

systemtest does need gcc

@samuel-rubin
Copy link
Contributor Author

I realized that my tests were flawed and that I did have gcc installed. The build-essentials package installs the default version of gcc on the system. Should I keep it like that or should we specify the version of GCC. I did not see any specification for the version of gcc in the testing repos.

@AdamBrousseau
Copy link
Contributor

Talked to Shelley. I think ideally we should keep the same gcc version as the vm compiles (currently 7.3/7.4). Since we already "know" how to build a container with it.

@samuel-rubin
Copy link
Contributor Author

On Ubuntu18, the default gcc is 7.3. and for Ubuntu16 on ppc64le and x86, can I just use the ubuntu-toolchain and that will currently use gcc-7 (7.4). Are these good enough?

@AdamBrousseau
Copy link
Contributor

I think we need to stick to the same solution as #4568 . We need to freeze the gcc versions. Just because the default version is the one we want today, doesn't mean it will be tomorrow.
(cc @jdekonin since we were discussing gcc yesterday)

@samuel-rubin samuel-rubin force-pushed the remove_gcc branch 3 times, most recently from 67636ac to 89f3d8e Compare February 8, 2019 15:19
@samuel-rubin samuel-rubin changed the title Removing unused GCC versions from Docker containers Remove GCC 4 from containers and reconfigure GCC 7 in test containers Feb 8, 2019
@samuel-rubin
Copy link
Contributor Author

I have updated the docker containers such that the test containers install gcc from Adopt

RUN echo yes | cpan install JSON Text::CSV
# Install GCC-7.3
RUN cd /usr/local \
&& wget -O gcc-7.tar.xz "https://ci.adoptopenjdk.net/userContent/gcc/gcc730+ccache.ppc64le.tar.xz" \
Copy link
Contributor

Choose a reason for hiding this comment

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

Using these pre-compiled you will need to also add libstdc++.so* to either the LD_LIBRARY_PATH or set it up with ldconfig. Same applies to other instance below.

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 added the libstdc++.so* from the precompiled binaries to ldconfig

@samuel-rubin
Copy link
Contributor Author

@AdamBrousseau

Copy link
Contributor

@AdamBrousseau AdamBrousseau left a comment

Choose a reason for hiding this comment

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

Please update and consolidate your commit comment with the PR description. Be sure it indicates why we are making all the changes as there are a few different ones here.

@@ -48,9 +48,6 @@ RUN apt-get update \
cpio \
curl \
file \
g++-4.8 \
gcc-4.8 \
gdb \
Copy link
Contributor

Choose a reason for hiding this comment

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

removing gdb intentionally? Why is it not needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was not intentional. I'll go and test out the container to see if it is actually needed.

Copy link
Member

Choose a reason for hiding this comment

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

This comment is still pending resolution.

Copy link
Contributor

Choose a reason for hiding this comment

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

We tried to test this but were blocked by not having xml parser module in the container. @jdekonin recalls gdb being added by Colton for testing purposes in order to generate cores and we didn't think it was needed anymore. We could leave it in for now until the parser is added and we can test it properly. Thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

If you want to remove it, it can always be quickly added back if a problem is found. Although, according to that explanation we could miss getting a core file for a failure if it is needed. Leaving it in is less likely to break anything.

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 added gdb back in

@samuel-rubin
Copy link
Contributor Author

jenkins build docker s390x ubuntu16

Copy link
Contributor

@AdamBrousseau AdamBrousseau left a comment

Choose a reason for hiding this comment

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

LGTM. @pshipton for merge.
@samuel-rubin don't forget to rebuild all the images once this merges.

Removing GCC 4 because it is no longer being used to compile java
Installing GCC-7 where it is not already being installed
Adding libstdc++.so* to ldconfig when using precompiled gcc-7

[skip ci]

Signed-off-by: Samuel Rubin <samuel.rubin@ibm.com>
@samuel-rubin samuel-rubin changed the title Remove GCC 4 from containers and reconfigure GCC 7 in test containers Removing GCC 4 from containers Feb 22, 2019
@samuel-rubin samuel-rubin changed the title Removing GCC 4 from containers Remove GCC 4 from containers Feb 22, 2019
@pshipton pshipton merged commit 525ba18 into eclipse-openj9:master Feb 22, 2019
@samuel-rubin samuel-rubin deleted the remove_gcc branch February 25, 2019 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants