Skip to contentSkip to conversation

icu: set ac_cv_path_install to install under hosttools

PATCH In review [email protected] 3 participants 7 messages Apr 22, 2025 – Apr 25, 2025

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 icu: set ac_cv_path_install to install under hosttools

From: Changqing Li <[email protected]>

icu will check program install path during do_configure, eg:
checking for a BSD-compatible install... /path/to/install -c

And this path will be writen into pkgdata.inc:
INSTALL_CMD=$(INSTALL-L)

Decided by if install is installed into recipe-sysroot-native during do_configure stage, the INSTALL_CMD could be /build/tmp/work/corei7-64-wrs-linux/icu/76-1/recipe-sysroot-native/usr/bin/install or /build/tmp/hosttools/install.

set ac_cv_path_install to install under hosttools to make a determined result of INSTALL_CMD, avoid vary caused by the execute sequence of another task which DEPENDS on coreutils-native and independent with do_configure

---
 meta/recipes-support/icu/icu_76-1.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-support/icu/icu_76-1.bb +3 -3
index f0890fc890..a33f48cf8e 100644
@@ -20,9 +20,9 @@ inherit autotools pkgconfig github-releases
 # ICU needs the native build directory as an argument to its --with-cross-build option when
 # cross-compiling. Taken the situation that different builds may share a common sstate-cache
 # into consideration, the native build directory needs to be staged.
-EXTRA_OECONF = "--with-cross-build=${STAGING_ICU_DIR_NATIVE} --disable-icu-config"
-EXTRA_OECONF:class-native = "--disable-icu-config"
-EXTRA_OECONF:class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE} --disable-icu-config"
+EXTRA_OECONF = "--with-cross-build=${STAGING_ICU_DIR_NATIVE} --disable-icu-config ac_cv_path_install='${HOSTTOOLS_DIR}/install -c'"
+EXTRA_OECONF:class-native = "--disable-icu-config ac_cv_path_install='${HOSTTOOLS_DIR}/install -c'"
+EXTRA_OECONF:class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE} --disable-icu-config ac_cv_path_install='${HOSTTOOLS_DIR}/install -c'"
 
 EXTRA_OECONF:append:class-target = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', ' --with-data-packaging=archive', '', d)}"
 TARGET_CXXFLAGS:append = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', ' -DICU_DATA_DIR=\\""${datadir}/${BPN}/${@icu_install_folder(d)}\\""', '', d)}"
Signature · 1 line
2.34.1
#1 lore raw
Quoted 13 lines · Changqing Li via lists.openembedded.org

From: Changqing Li <[email protected]>

icu will check program install path during do_configure, eg:
checking for a BSD-compatible install... /path/to/install -c

And this path will be writen into pkgdata.inc:
INSTALL_CMD=$(INSTALL-L)

Decided by if install is installed into recipe-sysroot-native during do_configure stage, the INSTALL_CMD could be /build/tmp/work/corei7-64-wrs-linux/icu/76-1/recipe-sysroot-native/usr/bin/install or /build/tmp/hosttools/install.

Quoted 7 lines

set ac_cv_path_install to install under hosttools to make a determined result of INSTALL_CMD, avoid vary caused by the execute sequence of another task which DEPENDS on coreutils-native and independent with do_configure

---

Hi,

Thanks for your patch.

It looks like we have some issue with is, as can be seen on the autobuilder:

ERROR: icu-76-1-r0 do_package_qa: QA Issue: File /usr/lib/icu/76.1/pkgdata.inc in package icu-dev contains reference to TMPDIR [buildpaths]
ERROR: icu-76-1-r0 do_package_qa: Fatal QA errors were found, failing task.

https://autobuilder.yoctoproject.org/valkyrie/#/builders/2/builds/1435/steps/12/logs/stdio

Can you have a look at this failure please?

Signature · 3 lines
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw
Quoted 31 lines · Mathieu Dubois-Briand

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.

Quoted 13 lines · Changqing Li via lists.openembedded.org

From: Changqing Li<[email protected]>

icu will check program install path during do_configure, eg:
checking for a BSD-compatible install... /path/to/install -c

And this path will be writen into pkgdata.inc:
INSTALL_CMD=$(INSTALL-L)

Decided by if install is installed into recipe-sysroot-native during do_configure stage, the INSTALL_CMD could be /build/tmp/work/corei7-64-wrs-linux/icu/76-1/recipe-sysroot-native/usr/bin/install or /build/tmp/hosttools/install.

Quoted 7 lines

set ac_cv_path_install to install under hosttools to make a determined result of INSTALL_CMD, avoid vary caused by the execute sequence of another task which DEPENDS on coreutils-native and independent with do_configure

---

Hi,

Thanks for your patch.

It looks like we have some issue with is, as can be seen on the autobuilder:

Quoted 6 lines

ERROR: icu-76-1-r0 do_package_qa: QA Issue: File /usr/lib/icu/76.1/pkgdata.inc in package icu-dev contains reference to TMPDIR [buildpaths]
ERROR: icu-76-1-r0 do_package_qa: Fatal QA errors were found, failing task.

https://autobuilder.yoctoproject.org/valkyrie/#/builders/2/builds/1435/steps/12/logs/stdio

Can you have a look at this failure please?

Hi,

I cannot reproduce this locally,  in my local env,  buildpaths is removed by function remove_build_host_references.

Could you help to check the content of /usr/lib/icu/76.1/pkgdata.inc, what is this buildpaths reference?

Besides, I see that poky-contrib mathieu/master-next has the V2 patch, but I also cannot reproduce with V2 patch.

Thanks

Changqing

Quoted 6 lines

--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

#3 lore raw
Quoted 6 lines · Changqing Li

Hi,

I cannot reproduce this locally,  in my local env,  buildpaths is removed by function remove_build_host_references.

It can be reproduced using
https://web.git.yoctoproject.org/poky-ci-archive/tag/?h=autobuilder.yoctoproject.org/valkyrie/a-full-1436,
using default config and trying to build icu.

But the issue is actually on my side: as the patch name changed, I did not make the link with the v2, so this branch contains both v2 and v3. If I drop v2, it works correctly with the simple reproduce process described above.

I will try to integrate the v3 correctly in one of my next builds, to confirm everything is fine.

Signature · 3 lines
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw
In reply to [email protected]
Quoted 37 lines · Changqing Li via lists.openembedded.org

From: Changqing Li <[email protected]>

icu will check program install path during do_configure, eg:
checking for a BSD-compatible install... /path/to/install -c

And this path will be writen into pkgdata.inc:
INSTALL_CMD=$(INSTALL-L)

Decided by if install is installed into recipe-sysroot-native during do_configure stage, the INSTALL_CMD could be /build/tmp/work/corei7-64-wrs-linux/icu/76-1/recipe-sysroot-native/usr/bin/install or /build/tmp/hosttools/install.

set ac_cv_path_install to install under hosttools to make a determined result of INSTALL_CMD, avoid vary caused by the execute sequence of another task which DEPENDS on coreutils-native and independent with do_configure

---
 meta/recipes-support/icu/icu_76-1.bb | 6 +++---

 1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-support/icu/icu_76-1.bb +3 -3
index f0890fc890..a33f48cf8e 100644
@@ -20,9 +20,9 @@ inherit autotools pkgconfig github-releases
  # ICU needs the native build directory as an argument to its --with-cross-build option when
  # cross-compiling. Taken the situation that different builds may share a common sstate-cache
  # into consideration, the native build directory needs to be staged.
-EXTRA_OECONF = "--with-cross-build=${STAGING_ICU_DIR_NATIVE} --disable-icu-config"
-EXTRA_OECONF:class-native = "--disable-icu-config"
-EXTRA_OECONF:class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE} --disable-icu-config"
+EXTRA_OECONF = "--with-cross-build=${STAGING_ICU_DIR_NATIVE} --disable-icu-config ac_cv_path_install='${HOSTTOOLS_DIR}/install -c'"
+EXTRA_OECONF:class-native = "--disable-icu-config ac_cv_path_install='${HOSTTOOLS_DIR}/install -c'"
+EXTRA_OECONF:class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE} --disable-icu-config ac_cv_path_install='${HOSTTOOLS_DIR}/install -c'"
Quoted 3 lines


 EXTRA_OECONF:append:class-target = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', ' --with-data-packaging=archive', '', d)}" TARGET_CXXFLAGS:append = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', ' -DICU_DATA_DIR=\\""${datadir}/${BPN}/${@icu_install_folder(d)}\\""', '', d)}"

Does this work if you just use:

ac_cv_path_install='install -c'

?

Cheers,

Richard

#5 lore raw
Quoted 48 lines · Richard Purdie

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.

Quoted 32 lines · Changqing Li via lists.openembedded.org

From: Changqing Li<[email protected]>

icu will check program install path during do_configure, eg:
checking for a BSD-compatible install... /path/to/install -c

And this path will be writen into pkgdata.inc:
INSTALL_CMD=$(INSTALL-L)

Decided by if install is installed into recipe-sysroot-native during do_configure stage, the INSTALL_CMD could be /build/tmp/work/corei7-64-wrs-linux/icu/76-1/recipe-sysroot-native/usr/bin/install or /build/tmp/hosttools/install.

set ac_cv_path_install to install under hosttools to make a determined result of INSTALL_CMD, avoid vary caused by the execute sequence of another task which DEPENDS on coreutils-native and independent with do_configure

---
  meta/recipes-support/icu/icu_76-1.bb | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-support/icu/icu_76-1.bb +0 -1
index f0890fc890..a33f48cf8e 100644
@@ -20,9 +20,9 @@ inherit autotools pkgconfig github-releases
  # ICU needs the native build directory as an argument to its --with-cross-build option when
  # cross-compiling. Taken the situation that different builds may share a common sstate-cache
  # into consideration, the native build directory needs to be staged.
-EXTRA_OECONF = "--with-cross-build=${STAGING_ICU_DIR_NATIVE} --disable-icu-config"

meta/recipes-support/icu/icu_76-1.bb inherit autotools pkgconfig github-releases

Quoted 10 lines
meta/recipes-support/icu/icu_76-1.bb +3 -4
-EXTRA_OECONF:class-native = "--disable-icu-config"
-EXTRA_OECONF:class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE} --disable-icu-config"
+EXTRA_OECONF = "--with-cross-build=${STAGING_ICU_DIR_NATIVE} --disable-icu-config ac_cv_path_install='${HOSTTOOLS_DIR}/install -c'"
+EXTRA_OECONF:class-native = "--disable-icu-config ac_cv_path_install='${HOSTTOOLS_DIR}/install -c'"
+EXTRA_OECONF:class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE} --disable-icu-config ac_cv_path_install='${HOSTTOOLS_DIR}/install -c'"
 
  EXTRA_OECONF:append:class-target ="${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', ' 
--with-data-packaging=archive', '', d)}"
  TARGET_CXXFLAGS:append ="${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', ' 
-DICU_DATA_DIR=\\""${datadir}/${BPN}/${@icu_install_folder(d)}\\""', '', d)}"

Does this work if you just use:

Quoted 3 lines

ac_cv_path_install='install -c'

?

It works well,  bitbake icu can build successfully.  And it can also fix the original do_package_qa issue:

in function remove_build_host_references, only hosttool path is removed('s:${HOSTTOOLS_DIR}/::g'),

so when install under STAGING_BINDIR_NATIVE is used,  qa error happened.

But if use ac_cv_path_install='install -c', the actually used install maybe under STAGING_BINDIR_NATIVE or HOSTTOOLS_DIR,

decide if install is under STAGING_BINDIR_NATIVE when do_install is runned.

So I use '${HOSTTOOLS_DIR}/install -c' to make install under hosttools is always used.

Regards

Changqing

Quoted 4 lines

Cheers,

Richard

#6 lore raw
Quoted 19 lines · Changqing Li


On 4/24/25 18:33, Richard Purdie wrote:

Quoted 5 lines

Does this work if you just use:

ac_cv_path_install='install -c'

?

It works well,  bitbake icu can build successfully.  And it can also fix the original do_package_qa issue:

in function remove_build_host_references, only hosttool path is removed('s:${HOSTTOOLS_DIR}/::g'),

Quoted 7 lines

so when install under STAGING_BINDIR_NATIVE is used,  qa error happened.

But if use ac_cv_path_install='install -c', the actually used install maybe under STAGING_BINDIR_NATIVE or HOSTTOOLS_DIR, decide if install is under STAGING_BINDIR_NATIVE when do_install is runned.

So I use '${HOSTTOOLS_DIR}/install -c' to make install under hosttools is always used.

We use the tool from PATH everywhere else in the project so it should be fine to do that here as well. I would be concerned if that tool behaved differently between the two and we'd have bigger problems if it did. This therefore should be fine.

Cheers,

Richard