-
Notifications
You must be signed in to change notification settings - Fork 20
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
Update ubuntu xenial gcc version to 8.2.0 #110
base: master
Are you sure you want to change the base?
Conversation
ubuntu/xenial/Dockerfile
Outdated
# Install gcc-8 | ||
RUN apt-get update -y && \ | ||
apt-get upgrade -y && \ | ||
apt-get dist-upgrade -y && \ | ||
apt-get install build-essential software-properties-common zlib1g-dev -y && \ | ||
add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ | ||
apt-get update -y && \ | ||
apt-get install gcc-8 g++-8 -y && \ | ||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-8 && \ | ||
update-alternatives --config gcc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a couple of questions.
The repository contains gcc-9 for xenial (but not 10 or 11). What is the reason behind choosing gcc-8?
Some packages are already installed beforehand: at least build-essential
and software-properties-common
. Is it necessary to repeat the installation command or it is by a mistake?
Why zlib
is needed?
Why we need a second apt-get update
?
Why we need upgrade
and dist-upgrade
after update
?
Shouldn't we copy gcc's package to our backports repository and enable it instead of a testing repository from Ubuntu folks? I guess that they have no commitment to keep all the packages forever.
More on it: are there packages in the added repository that replaces the standard ones? IOW, if I do apt-get update
inside the container, only gcc-8
and g++-8
come from this repository?
update-alternatives --config
is an interactive command (according to the man page). Is it non-interactive in presence of DEBIAN_FRONTEND=noninteractive
? if so, what exactly it is doing?
I hope that the resulting patch will answer all the questions on its own: in the comments in the file or in the commit message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some packages are already installed beforehand: at least build-essential and software-properties-common. Is it necessary to repeat the installation command or it is by a mistake?
Why zlib is needed?
Why we need a second apt-get update?
Why we need upgrade and dist-upgrade after update?
I removed all redundant updates, upgrades etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update-alternatives --config is an interactive command (according to the man page). Is it non-interactive in presence of DEBIAN_FRONTEND=noninteractive? if so, what exactly it is doing?
This command works interactive only without parameters. In our case, all parameters set correct.
Install GCC version 8.2. This is necessary in order to compile on an old system with glibc 2.23 using a more modern compiler.
ec5c11b
to
0562417
Compare
@@ -40,5 +40,12 @@ RUN apt-get update && apt-get install -y --force-yes \ | |||
alien \ | |||
dh-systemd | |||
|
|||
# Install gcc-8 | |||
RUN add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is too Tarantool-specific. If you want to do these changes at this repository, you should update all Ubuntu images where GCC version < 8 for consistency. Otherwise, it looks very strange to update Ubuntu Xenial only.
I suggest creating own Docker image on the base of PackPack Ubuntu Xenial image and put it in the tarantool/testing repo on Docker Hub. In this case, you will be able to adjust the image as you need.
Install GCC version 8.2. This is necessary in order to compile on an old system with glibc 2.23 using a more modern compiler.