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 binutils for GCC11 #370

Merged
merged 15 commits into from
Feb 9, 2022
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
| Service | OS | Status |
|---------|----|----------|
| Azure | Windows | [![Azure Status](https://dev.azure.com/conanio/conan-docker-tools/_apis/build/status/conan-io.conan-docker-tools?branchName=master)](https://dev.azure.com/conanio/conan-docker-tools/_build/latest?definitionId=1&branchName=master) |
| Jenkins | Linux | [![Jenkin Status](https://ci.conan.io/buildStatus/icon?job=ConanDockerTools/Xenial/master)](https://ci.conan.io/buildStatus/icon?job=ConanDockerTools/Xenial/master) |
| Jenkins | Linux | [[![Build Status](https://ci.conan.io/buildStatus/icon?job=ConanDockerTools%2FXenial%2Fmaster)](https://ci.conan.io/job/ConanDockerTools/job/Xenial/job/master/) |

> :warning: **Warning:**
Current images will be superseeded by the ones in [`modern`](./modern) folder,
Expand Down
11 changes: 8 additions & 3 deletions modern/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ FROM ubuntu:${DISTRO_VERSION}
LABEL maintainer="Conan.io <info@conan.io>"

ENV PYENV_ROOT=/opt/pyenv \
PATH=/opt/pyenv/shims:${PATH}
PATH=/opt/pyenv/shims:/opt/conan/binutils/bin:${PATH} \
CONAN_USER_HOME=/home/conan

ARG CMAKE_VERSION
ARG CMAKE_VERSION_FULL
Expand All @@ -14,6 +15,8 @@ ARG CONAN_VERSION

WORKDIR /root

COPY conan.lock conanfile.txt /opt/conan/

RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends software-properties-common \
&& add-apt-repository ppa:git-core/ppa -y \
Expand Down Expand Up @@ -93,11 +96,13 @@ RUN apt-get -qq update \
&& rm -rf /tmp/* \
&& runuser -u conan -- printf 'eval "$(pyenv init -)"\n' >> /home/conan/.bashrc \
&& runuser -u conan -- printf 'eval "$(pyenv virtualenv-init -)"\n' >> ~/.bashrc \
&& chown -R conan:1001 /opt/pyenv
&& chown -R conan:1001 /opt/pyenv \
&& chown -R conan:1001 /opt/conan

USER conan
WORKDIR /home/conan
ENV CONAN_USER_HOME=/home/conan

RUN pip install conan==${CONAN_VERSION} \
&& CONAN_REVISIONS_ENABLED=1 CONAN_USER_HOME=/tmp/conan conan install -r conancenter -g deploy -if /opt/conan -l /opt/conan/conan.lock /opt/conan/conanfile.txt \
&& rm -rf /tmp/conan \
&& conan config set general.revisions_enabled=1
52 changes: 52 additions & 0 deletions modern/base/conan.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"graph_lock": {
"nodes": {
"0": {
"options": "readline:fPIC=True\nreadline:shared=False\nreadline:with_library=termcap\ntermcap:fPIC=True\ntermcap:shared=False\nzlib:fPIC=True\nzlib:shared=False",
"requires": [
"1"
],
"path": "conanfile.txt",
"context": "host"
},
"1": {
"ref": "binutils/2.37#7e1081ddda1762c3f97d47399c4b1691",
"options": "readline:fPIC=True\nreadline:shared=False\nreadline:with_library=termcap\ntermcap:fPIC=True\ntermcap:shared=False\nzlib:fPIC=True\nzlib:shared=False",
"package_id": "8e7714e05da644d1474247995163817b009f35ad",
"prev": "92231e81212010b1f015f78125760d49",
"requires": [
"2",
"3"
],
"context": "host"
},
"2": {
"ref": "zlib/1.2.11#b46bf663179824c23085bb71666ba8e6",
"options": "fPIC=True\nshared=False",
"package_id": "dfbe50feef7f3c6223a476cd5aeadb687084a646",
"prev": "f064738ed9ea565f75cd7ebc20c2be62",
"context": "host"
},
"3": {
"ref": "readline/8.0#1d21941e543bef7a06551f5a56c8a87e",
"options": "fPIC=True\nshared=False\nwith_library=termcap\ntermcap:fPIC=True\ntermcap:shared=False",
"package_id": "0dd0336dbd4a73b0c2d71bd9b9bd75a1d84cd661",
"prev": "9101266931c5fc86fe4eb41f375e4e1e",
"requires": [
"4"
],
"context": "host"
},
"4": {
"ref": "termcap/1.3.1#a75d9f61bf0d1899b64967958dfa6538",
"options": "fPIC=True\nshared=False",
"package_id": "dfbe50feef7f3c6223a476cd5aeadb687084a646",
"prev": "383d0c76a636c07aa78d0065f1e0a6f8",
"context": "host"
}
},
"revisions_enabled": true
},
"version": "0.4",
"profile_host": "[settings]\narch=x86_64\narch_build=x86_64\nbuild_type=Release\ncompiler=gcc\ncompiler.libcxx=libstdc++11\ncompiler.version=11\nos=Linux\nos_build=Linux\n[options]\n[build_requires]\n[env]\n"
Copy link
Contributor

@jgsogo jgsogo Feb 10, 2022

Choose a reason for hiding this comment

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

I see we are using GCC11 with libstdc++11. IIRC, the version of the stdc++ library is different depending on the version of the compiler, right? So here we are installing these tools for one of the latest versions (GCC 11) but they will also be used in the images for GCC 5.

Is this right? Shouldn't we use gcc5 here?

Maybe these tools are just C apps, not using the c++ library, but just in case in the future we install some c++ app

}
2 changes: 2 additions & 0 deletions modern/base/conanfile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[requires]
binutils/2.37
3 changes: 3 additions & 0 deletions modern/tests/test_installed/test_installed.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"svn": {"16.04": "1.9.3"},
"xz": {"16.04": "5.1.0"},
"nasm": {"16.04": "2.11.08"},
"ar": {"16.04": "2.37"},
"objdump": {"16.04": "2.37"},
"readelf": {"16.04": "2.37"},
}


Expand Down