> -----Original Message-----
> From: [email protected] <openembedded-
> [email protected]> On Behalf Of Charles-Antoine Couret
> Sent: den 26 mars 2020 19:37
> To: [email protected]
> Cc: Charles-Antoine Couret <[email protected]>
> Subject: [OE-core] [PATCH] utils: fix gcc 10 version detection
>
> Utils can not detect GCC 10 correctly due to wrong regex.
> It generates this error "ERROR: Can't get compiler version from gcc --
> version output"
>
> The major version should be 1 or more digits instead of 1 only.
>
> Signed-off-by: Charles-Antoine Couret <[email protected]>
> ---
> meta/lib/oe/utils.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
> index aee4336482..a4cdce6ff0 100644
> --- a/meta/lib/oe/utils.py
> +++ b/meta/lib/oe/utils.py
> @@ -391,7 +391,7 @@ def host_gcc_version(d, taskcontextonly=False):
> except subprocess.CalledProcessError as e:
> bb.fatal("Error running %s --version: %s" % (compiler,
> e.output.decode("utf-8")))
>
> - match = re.match(r".* (\d\.\d)\.\d.*", output.split('\n')[0])
> + match = re.match(r".* (\d+\.\d)\.\d.*", output.split('\n')[0])
Might as well correct that to:
match = re.match(r".* (\d+\.\d+)\.\d+.*", output.split('\n')[0])
so any of the components may contain more than one digit.
> if not match:
> bb.fatal("Can't get compiler version from %s --version output" %
> compiler)
>
> --
> 2.26.0
//Peter
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#136773):
https://lists.openembedded.org/g/openembedded-core/message/136773
Mute This Topic: https://lists.openembedded.org/mt/72570953/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-