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

Update ubuntu xenial gcc version to 8.2.0 #110

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

foxzi
Copy link
Contributor

@foxzi foxzi commented Dec 7, 2023

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.

Comment on lines 43 to 48
# 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
Copy link
Member

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.

Copy link
Contributor Author

@foxzi foxzi Dec 12, 2023

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.

Copy link
Contributor Author

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.
@foxzi foxzi force-pushed the foxzi/install_gcc8_xenial branch from ec5c11b to 0562417 Compare December 11, 2023 16:17
@@ -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 && \
Copy link
Member

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.

@ylobankov ylobankov marked this pull request as draft February 15, 2024 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants