sanity: Update minimum gcc version to 10.1
PATCH 1/1 sanity: Update minimum gcc version to 10.1
Since commit 19004950ad56 ("sanity: Check if the C++ toolchain supports --std=gnu++20") host GCC must support "--std=gnu++20", which became available in 10.1. This is already reflected in the documentation [1] but not here.
Update the sanity check on GCC and raise the minimum version to 10.1. Remove the dead link to www.softwarecollections.org.
[1]: https://git.yoctoproject.org/yocto-docs/commit/?id=0e538c102bfcb7184c76c2401e8cb878168c4434
--- meta/classes-global/sanity.bbclass | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
meta/classes-global/sanity.bbclass +3 -6
@@ -505,18 +505,15 @@ def check_userns(): "See https://discourse.ubuntu.com/t/ubuntu-24-04-lts-noble-numbat-release-notes/39890#unprivileged-user-namespace-restrictions for more information.") -# Require at least gcc version 8.0 -# -# This can be fixed on CentOS-7 with devtoolset-6+ -# https://www.softwarecollections.org/en/scls/rhscl/devtoolset-6/ +# Require at least gcc version 10.1 # # A less invasive fix is with scripts/install-buildtools (or with user # built buildtools-extended-tarball) # def check_gcc_version(sanity_data): version = oe.utils.get_host_gcc_version(sanity_data) - if bb.utils.vercmp_string_op(version, "8.0", "<"): - return "Your version of gcc is older than 8.0 and will break builds. Please install a newer version of gcc (you could use the project's buildtools-extended-tarball or use scripts/install-buildtools).\n" + if bb.utils.vercmp_string_op(version, "10.1", "<"): + return "Your version of gcc is older than 10.1 and will break builds. Please install a newer version of gcc (you could use the project's buildtools-extended-tarball or use scripts/install-buildtools).\n" return None # Tar version 1.24 and onwards handle overwriting symlinks correctly
---
base-commit: 07747aa7390e98bf2853154e5fd473e4984a1d3d
change-id: 20250929-min-gcc-version-5b52e05000f7
Best regards,
Signature · 1 line
Antonin Godard <[email protected]>
Patchtest results for [PATCH] sanity: Update minimum gcc version to 10.1
Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information:
---
Testing patch /home/patchtest/share/mboxes/sanity-Update-minimum-gcc-version-to-10.1.patch
FAIL: test max line length: Patch line too long (current length 211, maximum is 200) (test_metadata.TestMetadata.test_max_line_length)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence)
PASS: test commit message user tags (test_mbox.TestMbox.test_commit_message_user_tags)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list)
SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: pretest src uri left files: No modified recipes, skipping pretest (test_metadata.TestMetadata.pretest_src_uri_left_files)
SKIP: test CVE check ignore: No modified recipes or older target branch, skipping test (test_metadata.TestMetadata.test_cve_check_ignore)
SKIP: test CVE tag format: No new CVE patches introduced (test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced (test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced (test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum modified not mentioned: No modified recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test src uri left files: No modified recipes, skipping pretest (test_metadata.TestMetadata.test_src_uri_left_files)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)
---
Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!
Quoted 45 lines · Antonin Godard
Since commit
19004950ad56("sanity: Check if the C++ toolchain supports --std=gnu++20") host GCC must support "--std=gnu++20", which became available in 10.1. This is already reflected in the documentation [1] but not here.Update the sanity check on GCC and raise the minimum version to 10.1. Remove the dead link to www.softwarecollections.org.
[1]:
https://git.yoctoproject.org/yocto-docs/commit/?id=0e538c102bfcb7184c76c2401e8cb878168c4434Cc Yoann Congal <[email protected]>Signed-off-by Antonin Godard <[email protected]>--- meta/classes-global/sanity.bbclass | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)meta/classes-global/sanity.bbclass +0
-0@@ -505,18 +505,15 @@ def check_userns(): "Seehttps://discourse.ubuntu.com/t/ubuntu-24-04-lts-noble-numbat-release-notes/39890#unprivileged-user-namespace-restrictions
for more information.")meta/classes-global/sanity.bbclass +1
-6-# Require at least gcc version 8.0 -# -# This can be fixed on CentOS-7 with devtoolset-6+ -# https://www.softwarecollections.org/en/scls/rhscl/devtoolset-6/ +# Require at least gcc version 10.1 # # A less invasive fix is with scripts/install-buildtools (or with user # built buildtools-extended-tarball) # def check_gcc_version(sanity_data): version = oe.utils.get_host_gcc_version(sanity_data) - if bb.utils.vercmp_string_op(version, "8.0", "<"): - return "Your version of gcc is older than 8.0 and will breakbuilds. Please install a newer version of gcc (you could use the project's buildtools-extended-tarball or use scripts/install-buildtools).\n"
meta/classes-global/sanity.bbclass +2
-0+ if bb.utils.vercmp_string_op(version, "10.1", "<"): + return "Your version of gcc is older than 10.1 and will break
Quoted 3 lines
builds. Please install a newer version of gcc (you could use the project's buildtools-extended-tarball or use scripts/install-buildtools).\n"
While you are modifying this line could you make the version a single variable instead of repeating it twice? (I know I would forget to update the one in the message -_-')
I shall try to remember to change here next time I play with the minimum gcc version.
Thanks!
Quoted 13 lines
return None
# Tar version 1.24 and onwards handle overwriting symlinks correctly
---
base-commit:07747aa7390e98bf2853154e5fd473e4984a1d3d
change-id: 20250929-min-gcc-version-5b52e05000f7Best regards,
--
Antonin Godard <[email protected]>
Signature · 2 lines
Yoann Congal Smile ECS
On Mon Sep 29, 2025 at 10:25 AM CEST, Yoann Congal via lists.openembedded.org wrote:
[...]
Quoted 16 lines
Quoted 16 lines
meta/classes-global/sanity.bbclass +1
-6-# Require at least gcc version 8.0 -# -# This can be fixed on CentOS-7 with devtoolset-6+ -# https://www.softwarecollections.org/en/scls/rhscl/devtoolset-6/ +# Require at least gcc version 10.1 # # A less invasive fix is with scripts/install-buildtools (or with user # built buildtools-extended-tarball) # def check_gcc_version(sanity_data): version = oe.utils.get_host_gcc_version(sanity_data) - if bb.utils.vercmp_string_op(version, "8.0", "<"): - return "Your version of gcc is older than 8.0 and will breakbuilds. Please install a newer version of gcc (you could use the project's buildtools-extended-tarball or use scripts/install-buildtools).\n"
+ ifbb.utils.vercmp_string_op(version, "10.1", "<"):
Quoted 8 lines
Quoted 4 lines
+ return "Your version of gcc is older than 10.1 and will break
builds. Please install a newer version of gcc (you could use the project's buildtools-extended-tarball or use scripts/install-buildtools).\n"While you are modifying this line could you make the version a single variable instead of repeating it twice? (I know I would forget to update the one in the message -_-')
Hi Yoann,
This is not limited to this test, I think most of the check_*_version tests could benefit from that improvement. Maybe it's more relevant to have a separate patch for this improvement, instead of just here?
Thanks,
Antonin
Signature · 3 lines
Antonin Godard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 30 lines · Antonin Godard
On Mon Sep 29, 2025 at 10:25 AM CEST, Yoann Congal via lists.openembedded.org wrote:
[...]Quoted 6 lines
Quoted 6 lines
meta/classes-global/sanity.bbclass +1
-4-# Require at least gcc version 8.0 -# -# This can be fixed on CentOS-7 with devtoolset-6+ -# https://www.softwarecollections.org/en/scls/rhscl/devtoolset-6/ +# Require at least gcc version 10.1 #Quoted 8 lines
Quoted 8 lines
# A less invasive fix is with
scripts/install-buildtools(or with user# built buildtools-extended-tarball) # def check_gcc_version(sanity_data): version = oe.utils.get_host_gcc_version(sanity_data)(quoted diff) +0
-2- if bb.utils.vercmp_string_op(version, "8.0", "<"): - return "Your version of gcc is older than 8.0 and will breakbuilds. Please install a newer version of gcc (you could use the
project's
Quoted 4 lines
Quoted 4 lines
buildtools-extended-tarball or use scripts/install-buildtools).\n"
(quoted diff) +2
-0+ if bb.utils.vercmp_string_op(version, "10.1", "<"): + return "Your version of gcc is older than 10.1 and will breakbuilds. Please install a newer version of gcc (you could use the
project's
Quoted 6 lines
Quoted 2 lines
buildtools-extended-tarball or use scripts/install-buildtools).\n"
While you are modifying this line could you make the version a single variable instead of repeating it twice? (I know I would forget to update the one in the message -_-')
Quoted 7 lines
Hi Yoann,
This is not limited to this test, I think most of the check_*_version tests could benefit from that improvement. Maybe it's more relevant to have a separate
patch for this improvement, instead of just here?
Yes, agreed, do you want me to send it?
Quoted 10 lines
Thanks,
Antonin--
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Signature · 2 lines
Yoann Congal Smile ECS
Quoted 35 lines · Yoann Congal
Quoted 32 lines · Antonin Godard
On Mon Sep 29, 2025 at 10:25 AM CEST, Yoann Congal via lists.openembedded.org wrote:
[...]Quoted 6 lines
Quoted 6 lines
meta/classes-global/sanity.bbclass +1
-4-# Require at least gcc version 8.0 -# -# This can be fixed on CentOS-7 with devtoolset-6+ -# https://www.softwarecollections.org/en/scls/rhscl/devtoolset-6/ +# Require at least gcc version 10.1 #Quoted 8 lines
Quoted 8 lines
# A less invasive fix is with
scripts/install-buildtools(or with user# built buildtools-extended-tarball) # def check_gcc_version(sanity_data): version = oe.utils.get_host_gcc_version(sanity_data)(quoted diff) +0
-2- if bb.utils.vercmp_string_op(version, "8.0", "<"): - return "Your version of gcc is older than 8.0 and will breakbuilds. Please install a newer version of gcc (you could use the
project's
Quoted 4 lines
Quoted 4 lines
buildtools-extended-tarball or use scripts/install-buildtools).\n"
(quoted diff) +2
-0+ if bb.utils.vercmp_string_op(version, "10.1", "<"): + return "Your version of gcc is older than 10.1 and will breakbuilds. Please install a newer version of gcc (you could use the
project's
Quoted 6 lines
Quoted 2 lines
buildtools-extended-tarball or use scripts/install-buildtools).\n"
While you are modifying this line could you make the version a single variable instead of repeating it twice? (I know I would forget to update the one in the message -_-')
Hi Yoann,
Quoted 7 lines
Quoted 5 lines
This is not limited to this test, I think most of the check_*_version tests could benefit from that improvement. Maybe it's more relevant to have a separate
patch for this improvement, instead of just here?Yes, agreed, do you want me to send it?
Sure, it's your idea, please take the credit. :)
Antonin
Signature · 3 lines
Antonin Godard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com