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 some tools in the builder image #5

Closed
qrkourier opened this issue May 30, 2023 · 15 comments · Fixed by #22
Closed

update some tools in the builder image #5

qrkourier opened this issue May 30, 2023 · 15 comments · Fixed by #22
Assignees

Comments

@qrkourier
Copy link
Member

from: #1 (review)

@qrkourier qrkourier changed the title update some tools in the cmake builder image update some tools in the builder image May 30, 2023
@qrkourier qrkourier self-assigned this Aug 7, 2023
@ekoby
Copy link
Member

ekoby commented Aug 18, 2023

also git
openziti/ziti-tunnel-sdk-c#711

@scareything
Copy link
Member

IMO we should use ubuntu:focal (20) as the base. From the "news" at https://packages.ubuntu.com:

2023-05-01
Reflect lunar release, add mantic, remove bionic.

@qrkourier
Copy link
Member Author

          apt -y update
          apt-get -y install software-properties-common
          add-apt-repository -y ppa:git-core/ppa
          apt -y update
          apt -y install git
          git --version

@qrkourier
Copy link
Member Author

IMO we should use ubuntu:focal (20) as the base. From the "news" at https://packages.ubuntu.com:

Team discussion led us to the realization that we'd break libc compatibility on RedHat 8 and Debian Buster if we switch the binary release builds from Bionic to Focal. This is based on the following list of distros and their libc versions.

oraclelinux:7:                        (GNU     libc)  2.17              
quay.io/centos/centos:7:              (GNU     libc)  2.17              
ubuntu:bionic:                        (Ubuntu  GLIBC  2.27-3ubuntu1.6)  2.27
oraclelinux:8:                        (GNU     libc)  2.28              
registry.access.redhat.com/ubi8/ubi:  (GNU     libc)  2.28              
rockylinux/rockylinux:8:              (GNU     libc)  2.28              
debian:buster:                        (Debian  GLIBC  2.28-10+deb10u2)  2.28
ubuntu:focal:                         (Ubuntu  GLIBC  2.31-0ubuntu9.9)  2.31
debian:bullseye:                      (Debian  GLIBC  2.31-13+deb11u6)  2.31
fedora:34:                            (GNU     libc)  2.33              
fedora:35:                            (GNU     libc)  2.34              
oraclelinux:9:                        (GNU     libc)  2.34              
registry.access.redhat.com/ubi9/ubi:  (GNU     libc)  2.34              
rockylinux/rockylinux:9:              (GNU     libc)  2.34              
fedora:36:                            (GNU     libc)  2.35              
ubuntu:jammy:                         (Ubuntu  GLIBC  2.35-0ubuntu3.1)  2.35
debian:bookworm:                      (Debian  GLIBC  2.36-9+deb12u1)   2.36

@qrkourier
Copy link
Member Author

qrkourier commented Aug 21, 2023

@scareything @ekoby What version of gcc is new enough? I assume 9.4.0 because that's what Focal gets, and Bionic gets 7.5.0. My Jammy box has 11.4.0.

@ekoby
Copy link
Member

ekoby commented Aug 21, 2023

with build tools I prefer to get the latest, since it is not a runtime dependency nothing is holding us back

@qrkourier
Copy link
Member Author

Cool. I'll subscribe this image to gcc major release 13 so we get non-breaking changes automatically.

@qrkourier
Copy link
Member Author

@ekoby The newest gcc I can install conveniently is v11. I'll start with that in this issue's resolving PR. If you really want v13 then we probably have to build it from source in the Dockerfile. In that case, I need to establish the build params, e.g. multilib, etc.

@ekoby
Copy link
Member

ekoby commented Aug 21, 2023

I think 11 is fine

@qrkourier
Copy link
Member Author

gcc, g++ are convenient to copy from the official v11 release container image, that image does not provide arm-linux-gnueabihf-gcc, aarch64-linux-gnu-gcc, or their crossbuild g++ counterparts. Do we need those too, @ekoby?

@qrkourier
Copy link
Member Author

Clarification: do we need the v11 of the crossbuild gcc, g++? I know we need the v7 crossbuild gcc, g++ that we're currently using.

@ekoby
Copy link
Member

ekoby commented Aug 21, 2023

That would be best for consistency unless we switch to clang

@qrkourier
Copy link
Member Author

I was able to get clang-7 installed in the Bionic builder.

@qrkourier
Copy link
Member Author

qrkourier commented Aug 21, 2023

These v11 executables are convenient to make available in the Bionic builder image. The ZET build currently breaks with this branch's experimental image because cc1plus executable is not available (link to failed build).

root@2f3302f87b0a:/# ls -lhgo /usr/local/bin/
total 50M
-rwxr-xr-x 4 1.3M Aug 16 23:24 c++
-rwxr-xr-x 1 1.3M Aug 16 23:24 cpp
-rwxr-xr-x 4 1.3M Aug 16 23:24 g++
-rwxr-xr-x 3 1.3M Aug 16 23:24 gcc
-rwxr-xr-x 2  35K Aug 16 23:24 gcc-ar
-rwxr-xr-x 2  35K Aug 16 23:24 gcc-nm
-rwxr-xr-x 2  35K Aug 16 23:24 gcc-ranlib
-rwxr-xr-x 2 1.3M Aug 16 23:24 gccgo
-rwxr-xr-x 1 772K Aug 16 23:24 gcov
-rwxr-xr-x 1 552K Aug 16 23:24 gcov-dump
-rwxr-xr-x 1 572K Aug 16 23:24 gcov-tool
-rwxr-xr-x 2 1.3M Aug 16 23:24 gfortran
-rwxr-xr-x 1 5.0M Aug 16 23:24 go
-rwxr-xr-x 1 210K Aug 16 23:24 gofmt
-rwxr-xr-x 1  28M Aug 16 23:24 lto-dump
-rwxr-xr-x 4 1.3M Aug 16 23:24 x86_64-linux-gnu-c++
-rwxr-xr-x 4 1.3M Aug 16 23:24 x86_64-linux-gnu-g++
-rwxr-xr-x 3 1.3M Aug 16 23:24 x86_64-linux-gnu-gcc
-rwxr-xr-x 3 1.3M Aug 16 23:24 x86_64-linux-gnu-gcc-11.4.0
-rwxr-xr-x 2  35K Aug 16 23:24 x86_64-linux-gnu-gcc-ar
-rwxr-xr-x 2  35K Aug 16 23:24 x86_64-linux-gnu-gcc-nm
-rwxr-xr-x 2  35K Aug 16 23:24 x86_64-linux-gnu-gcc-ranlib
-rwxr-xr-x 2 1.3M Aug 16 23:24 x86_64-linux-gnu-gccgo
-rwxr-xr-x 2 1.3M Aug 16 23:24 x86_64-linux-gnu-gfortran

@qrkourier
Copy link
Member Author

@ekoby @scareything Summary of this issue: It appears feasible but not convenient to provide a full suite of gcc v11 utilities running on the Bionic builder. If it is important to make this happen before we eventually adopt the Focal builder then I'll split that work into a separate issue due to the apparent magnitude of the undertaking.

I found it was convenient to install the v7 distro gcc to support building v11. My experimental image has the same set of native target tools that I reported above are present in the official release v11 container image, which is compatible with Bionic's glibc.

I didn't yet experiment with building the cross-target suites, but I see the way. Protracted compilation times and container image bloat aside, it looks like it wouldn't be too difficult to configure the default compilers for native targets to use a compiled v11. I didn't yet explore whether that is also true for the cross-target executables.

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 a pull request may close this issue.

3 participants