From: "Richard Purdie" <richard.purdie@linuxfoundation.org>
To: Tim Orling <timothy.t.orling@linux.intel.com>,
openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH 4/4] sanity.bbclass: add test for gcc < 5.0
Date: Mon, 30 Mar 2020 20:52:42 +0100 [thread overview]
Message-ID: <1c499374846e55d377d60b4faf28c50bb7b675f6.camel@linuxfoundation.org> (raw)
In-Reply-To: <20200330194302.30032-4-timothy.t.orling@linux.intel.com>
On Mon, 2020-03-30 at 12:43 -0700, Tim Orling wrote:
> +# The gcc version in CentOS-7 (4.8.5) is known to be a problem.
> +# Require at least gcc version 5.0.
> +#
> +# This can be fixed on CentOS-7 with devtoolset-6+
> +# https://www.softwarecollections.org/en/scls/rhscl/devtoolset-6/
> +#
> +# A less invasive fix is with scripts/install-buildtools (or with user
> +# built buildtools-extended-tarball)
> +#
> +def check_gcc_version(sanity_data):
> + from distutils.version import LooseVersion
> + import subprocess
> + build_cc = sanity_data.getVar('BUILD_CC').strip()
> + if build_cc == "gcc":
> + try:
> + result = subprocess.check_output(["gcc", "--version"], stderr=subprocess.DEVNULL).decode('utf-8')
> + except subprocess.CalledProcessError as e:
> + return "Unable to execute gcc --version, exit code %d\n%s\n" % (e.returncode, e.output)
> + version = result.split()[2]
> + if LooseVersion(version) < LooseVersion("5.0"):
> + return "Your version of gcc is older than 5.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"
> + return None
I had forgotten we had this but a recent patch reminded me, would we
want to tweak this function:
http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/lib/oe/utils.py?h=master-next#n376
?
Cheers,
Richard
next prev parent reply other threads:[~2020-03-30 19:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-30 19:42 [PATCH 1/4] scripts/install-buildtools: improvements Tim Orling
2020-03-30 19:43 ` [PATCH 2/4] oe-buildenv-internal: python 3.5 as min version Tim Orling
2020-03-30 19:43 ` [PATCH 3/4] sanity.bbclass: recommend using install-buildtools Tim Orling
2020-03-30 19:52 ` [OE-core] " Andre McCurdy
2020-03-30 19:43 ` [PATCH 4/4] sanity.bbclass: add test for gcc < 5.0 Tim Orling
2020-03-30 19:52 ` Richard Purdie [this message]
2020-04-01 20:09 ` [OE-core] [PATCH 1/4] scripts/install-buildtools: improvements Andre McCurdy
2020-04-01 21:31 ` Tim Orling
[not found] ` <1601CF873C42565A.6346@lists.openembedded.org>
2020-04-01 22:02 ` Tim Orling
2020-04-01 22:09 ` Andre McCurdy
2020-04-01 22:16 ` Richard Purdie
2020-04-03 23:22 ` Tim Orling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1c499374846e55d377d60b4faf28c50bb7b675f6.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=openembedded-core@lists.openembedded.org \
--cc=timothy.t.orling@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox