diff options
| author | Etienne Cordonnier <ecordonnier@snap.com> | 2025-03-07 16:51:46 +0100 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2025-03-08 15:04:57 -0800 |
| commit | 1d43511321f2bd08a4b3f0aa1422cf406ae0b3f6 (patch) | |
| tree | e8d687aede2c6b90bb9f222569643ed838348058 | |
| parent | 8aa895e877e1be3597b90936e50926f811d54477 (diff) | |
| download | meta-openembedded-1d43511321f2bd08a4b3f0aa1422cf406ae0b3f6.tar.gz | |
uutils-coreutils: disable stdbuf compilation
There is a bug in uutils-coreutils causing stdbuf to include the HOST version of libstdbuf.so, even when cross-compiled.
As a side-effect, the uutils-coreutils binary was containing the buildpath, because RPATH was set on libstdbuf.so.
Thus the buildpath error can be re-enabled.
This is tracked upstream by https://github.com/uutils/coreutils/issues/6591
Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
Co-authored-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-core/uutils-coreutils/uutils-coreutils/0001-do-not-compile-stdbuf.patch | 39 | ||||
| -rw-r--r-- | meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.29.bb | 6 |
2 files changed, 41 insertions, 4 deletions
diff --git a/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils/0001-do-not-compile-stdbuf.patch b/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils/0001-do-not-compile-stdbuf.patch new file mode 100644 index 0000000000..e4f5627f12 --- /dev/null +++ b/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils/0001-do-not-compile-stdbuf.patch | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | From 5c08d92aae49f83e3b52ae58e566ef48c749f3c7 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Etienne Cordonnier <ecordonnier@snap.com> | ||
| 3 | Date: Fri, 7 Mar 2025 16:39:33 +0100 | ||
| 4 | Subject: [PATCH] do not compile stdbuf | ||
| 5 | |||
| 6 | Due to including the host version of libstdbuf.so, stdbuf does not work when cross-compiled. See https://github.com/uutils/coreutils/issues/6591#issuecomment-2706575853 for details | ||
| 7 | |||
| 8 | Upstream-Status: Inappropriate [OE-Specific] | ||
| 9 | |||
| 10 | Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> | ||
| 11 | --- | ||
| 12 | Cargo.toml | 4 ++-- | ||
| 13 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/Cargo.toml b/Cargo.toml | ||
| 16 | index ea87ccea79..e218719363 100644 | ||
| 17 | --- a/Cargo.toml | ||
| 18 | +++ b/Cargo.toml | ||
| 19 | @@ -154,7 +154,7 @@ feat_os_macos = [ | ||
| 20 | feat_os_unix = [ | ||
| 21 | "feat_Tier1", | ||
| 22 | # | ||
| 23 | - "feat_require_crate_cpp", | ||
| 24 | + # don't compile feature_require_crate_cpp per default (which contains only stdbuf). "feat_require_crate_cpp", | ||
| 25 | "feat_require_unix", | ||
| 26 | "feat_require_unix_utmpx", | ||
| 27 | "feat_require_unix_hostid", | ||
| 28 | @@ -189,7 +189,7 @@ feat_os_unix_android = [ | ||
| 29 | # ** NOTE: these `feat_require_...` sets should be minimized as much as possible to encourage cross-platform availability of utilities | ||
| 30 | # | ||
| 31 | # "feat_require_crate_cpp" == set of utilities requiring the `cpp` crate (which fail to compile on several platforms; as of 2020-04-23) | ||
| 32 | -feat_require_crate_cpp = ["stdbuf"] | ||
| 33 | +feat_require_crate_cpp = [] | ||
| 34 | # "feat_require_unix" == set of utilities requiring support which is only available on unix platforms (as of 2020-04-23) | ||
| 35 | feat_require_unix = [ | ||
| 36 | "chgrp", | ||
| 37 | -- | ||
| 38 | 2.43.0 | ||
| 39 | |||
diff --git a/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.29.bb b/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.29.bb index 09f6071e71..9d4b04db8c 100644 --- a/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.29.bb +++ b/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.29.bb | |||
| @@ -7,7 +7,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=e74349878141b240070458d414ab3b64" | |||
| 7 | 7 | ||
| 8 | inherit cargo cargo-update-recipe-crates | 8 | inherit cargo cargo-update-recipe-crates |
| 9 | 9 | ||
| 10 | SRC_URI += "git://github.com/uutils/coreutils.git;protocol=https;branch=main" | 10 | SRC_URI += "git://github.com/uutils/coreutils.git;protocol=https;branch=main \ |
| 11 | file://0001-do-not-compile-stdbuf.patch" | ||
| 11 | 12 | ||
| 12 | # musl not supported because the libc crate does not support functions like "endutxent" at the moment, | 13 | # musl not supported because the libc crate does not support functions like "endutxent" at the moment, |
| 13 | # so src/uucore/src/lib/features.rs disables utmpx when targetting musl. | 14 | # so src/uucore/src/lib/features.rs disables utmpx when targetting musl. |
| @@ -67,6 +68,3 @@ python __anonymous() { | |||
| 67 | for prog in d.getVar('sbindir_progs').split(): | 68 | for prog in d.getVar('sbindir_progs').split(): |
| 68 | d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir'), prog)) | 69 | d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir'), prog)) |
| 69 | } | 70 | } |
| 70 | |||
| 71 | ERROR_QA:remove = "buildpaths" | ||
| 72 | WARN_QA:append = " buildpaths" | ||
