This is an archive of the discontinued LLVM Phabricator instance.

[Dockerfile] Upgrade debian base image to version 10
ClosedPublic

Authored by XiaodongLoong on Mar 2 2022, 8:47 AM.

Details

Summary

Debian 8 is too old to build LLVM project, the version
of GCC, CMake and python are lower than the requirements:
https://llvm.org/docs/GettingStarted.html#software

Debian 10 is the earliest release that have software
packages that compiling LLVM requires.

Diff Detail

Event Timeline

XiaodongLoong created this revision.Mar 2 2022, 8:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 2 2022, 8:47 AM
XiaodongLoong requested review of this revision.Mar 2 2022, 8:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 2 2022, 8:47 AM
MaskRay edited reviewers, added: sammccall; removed: MaskRay.Mar 2 2022, 10:33 AM

I have no problem with this - but I am not sure if these images are used by anyone for something specific. I would hope that anyone using these images in production have their own copy of them instead.

I wonder if the more pragmatic course of action would be to keep the debian8 dockerfile and just add a warning somewhere that notes that it's not really going to work and people should migrate to the debian11 one instead.

Thanks!

I know there were google-internal users of this, I'm trying to find out if moving from 8 to 11 is okay for them.

There might be a reason to keep the minimal version that works (e.g. 9 or 10 as opposed to the "current" debian stable version). An older build environment generally produces more portable binaries.
I think we shouldn't keep multiple versions around if the docker8 version isn't useful/used, it just creates maintenance burden.

Do you happen to know which tools specifically are too old in debian8, and/or if 11 is the earliest release that satisfies them?

Do you happen to know which tools specifically are too old in debian8, and/or if 11 is the earliest release that satisfies them?

Sorry, I wasn't reading carefully enough.

Requirements are currently CMake 3.13.4, GCC 5.1.0
debian8 provides CMake 3.6.2 (backports), GCC 4.9.2
debian9 provides CMake 3.16.3 (backports), GCC 6.3.0

So I think switching to debian9 should work and may be preferable to 11 for producing portable binaries.
Do you have a reason to prefer the newer version? (I'm still going to find out if 11 is acceptable)

@sammccall @thieta
The python version of debian9 is 3.5, which can not meet the current (>=3.6) requirements.

Originally I chose debain11, because I thought it might meet the requirements of compiling LLVM for a long time.

The earliest release that satisfies the requirements is debian10. I can upgrade the base image to debian10, too.

Thanks!

@sammccall @thieta
The python version of debian9 is 3.5, which can not meet the current (>=3.6) requirements.

3.16 for debian9 is available in stretch-backports, will that work for this purpose?
If not debian10 does sound like the best we can do.

Originally I chose debain11, because I thought it might meet the requirements of compiling LLVM for a long time.

I think it's worthwhile to upgrade to the minimum required version, at the cost of upgrading in more frequent smaller steps.

3.16 for debian9 is available in stretch-backports, will that work for this purpose?
If not debian10 does sound like the best we can do.

I add the following item in sources.list.

deb http://deb.debian.org/debian stretch-backports main

Then I run the command blow and get the python version.

$ apt-get update && apt list python3
...
python3/oldoldstable 3.5.3-1 amd64

So I think python 3.6 for debian9 is not available in stretch-backports.

In the view of this, debian10 is the best version we can do. Then I will update the patch.

XiaodongLoong retitled this revision from [Dockerfile] Upgrade debian base image to version 11 to [Dockerfile] Upgrade debian base image to version 10.
XiaodongLoong edited the summary of this revision. (Show Details)

Update patch that upgrade debian to version 10.

sammccall accepted this revision.Mar 23 2022, 7:13 AM

Thank you!

3.16 for debian9 is available in stretch-backports, will that work for this purpose?
If not debian10 does sound like the best we can do.

I add the following item in sources.list.

deb http://deb.debian.org/debian stretch-backports main

Then I run the command blow and get the python version.

$ apt-get update && apt list python3
...
python3/oldoldstable 3.5.3-1 amd64

So I think python 3.6 for debian9 is not available in stretch-backports.

You're absolutely right, I'm sorry. I was confusing python and cmake.
Debian 10 sounds great, thank you.

llvm/docs/Docker.rst
135

nit: Debian10

This revision is now accepted and ready to land.Mar 23 2022, 7:13 AM
benshi001 added inline comments.Mar 23 2022, 8:09 AM
llvm/docs/Docker.rst
135

I will help him commit, and correct it to Debian10.

This revision was landed with ongoing or failed builds.Mar 23 2022, 8:32 AM
This revision was automatically updated to reflect the committed changes.