Skip to contentSkip to conversation

icu-native: not relocatable via sstate

PATCH New André Draszik 1 participant 2 messages May 18, 2015

lore
Share & tools
lore
#0 lore raw

cover icu-native: not relocatable via sstate

The icu recipe installs icu-native twice, once in the usual location, and once for cross builds into the path given by --with-cross-build.

This latter path is not included in the list of paths recognised by chrpath.bbclass, hence the binaries in there retain the rpath as used during compilation. This causes the package to not be relocateable from sstate.
[YOCTO #6851]

Please note that the attached change alone doesn't cause the sstate signature to become invalid, hence bitbake will use an existing archive from sstate (which still has the old rpaths).
Not sure what's missing to force a signature change here, other than doing a -c cleansstate

Also, in the patch, I did try using ${STAGING_ICU_DIR_NATIVE} instead of open-coding ${datadir}/${BPN}/${PV}, originally, but that didn't work, as at the time chrpath.bbclass was running, this translated into .../usr/lib instead of .../usr/share (as it should and does during all the other tasks). I didn't find the reason for that.

Cheers,
Andre'

#1 lore raw

PATCH 1/1 icu-native: fix hard paths in native icu

The icu recipe installs icu-native twice, once in the usual location, and once for cross builds into the path given by --with-cross-build.

This latter path is not included in the list of paths recognised by chrpath.bbclass, hence the binaries in there retain the rpath as used during compilation. This causes the package to not be relocateable from sstate
[YOCTO #6851]

We use the infrastructure that is in place already, and simply set PREPROCESS_RELOCATE_DIRS as necessary, and things start to work.

---
 meta/recipes-support/icu/icu.inc | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-support/icu/icu.inc +1 -0
index f4254b5..cc6f222 100644
@@ -26,6 +26,7 @@ EXTRA_OECONF = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}"
 EXTRA_OECONF_class-native = ""
 EXTRA_OECONF_class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}"
 
+PREPROCESS_RELOCATE_DIRS = "${datadir}/${BPN}/${PV}"
 do_install_append_class-native() {
 	mkdir -p ${D}/${STAGING_ICU_DIR_NATIVE}/config
 	cp -r ${B}/config/icucross.mk ${D}/${STAGING_ICU_DIR_NATIVE}/config
Signature · 1 line
2.1.4