diff options
| author | Ross Burton <ross.burton@arm.com> | 2025-10-29 13:03:10 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-11-03 17:40:41 +0000 |
| commit | d5d5af8c4a15bd2114d76a7a29d8571410923694 (patch) | |
| tree | a3d9c384a34921d35b1f84a68d26c3ded5ee2046 | |
| parent | ec985f3373c83da516314803e0663789a9fee9b7 (diff) | |
| download | poky-d5d5af8c4a15bd2114d76a7a29d8571410923694.tar.gz | |
classes/base: prefer gnu-prefixed HOSTTOOLS
Ubuntu 25.10 has changed the default coreutils implementation from GNU
coreutils to uutils/coreutils. Unfortunately this causes build problems:
couldn't allocate absolute path for 'null'.
tail: cannot open 'standard input' for reading: No such file or directory
install: failed to chown '...': Invalid argument (os error 22)
Clear build failures happen in 'install' and 'tail', but there may be
further breakage.
Luckily, Ubuntu also installs GNU coreutils with a binary prefix of
'gnu', so whilst these issues are root-caused and fixed in either pseudo
or uutils we can prefer the gnu-prefixed binaries where they are present.
[ YOCTO #16028 ]
(From OE-Core rev: 16f2684ebeffa72b5d90525cf9102751b68c298e)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/classes-global/base.bbclass | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass index 6de17d1bb5..cf303c237a 100644 --- a/meta/classes-global/base.bbclass +++ b/meta/classes-global/base.bbclass | |||
| @@ -127,7 +127,11 @@ def setup_hosttools_dir(dest, toolsvar, d, fatal=True): | |||
| 127 | # clean up dead symlink | 127 | # clean up dead symlink |
| 128 | if os.path.islink(desttool): | 128 | if os.path.islink(desttool): |
| 129 | os.unlink(desttool) | 129 | os.unlink(desttool) |
| 130 | srctool = bb.utils.which(path, tool, executable=True) | 130 | |
| 131 | # Prefer gnu-prefixed binaries, if available | ||
| 132 | srctool = (bb.utils.which(path, "gnu" + tool, executable=True) or | ||
| 133 | bb.utils.which(path, tool, executable=True)) | ||
| 134 | |||
| 131 | # gcc/g++ may link to ccache on some hosts, e.g., | 135 | # gcc/g++ may link to ccache on some hosts, e.g., |
| 132 | # /usr/local/bin/ccache/gcc -> /usr/bin/ccache, then which(gcc) | 136 | # /usr/local/bin/ccache/gcc -> /usr/bin/ccache, then which(gcc) |
| 133 | # would return /usr/local/bin/ccache/gcc, but what we need is | 137 | # would return /usr/local/bin/ccache/gcc, but what we need is |
