Bug 15301 - icu / icu-native : no rebuild triggered when changing do_make_icudata
Summary: icu / icu-native : no rebuild triggered when changing do_make_icudata
Status: RESOLVED OBSOLETE
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: oe-core other (show other bugs)
Version: 4.0.14
Hardware: x86 Multiple
: Medium normal
Target Milestone: 4.0.32
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2023-11-29 20:32 UTC by Jan-Simon Moeller
Modified: 2026-03-26 15:14 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments
archive with bitbake -e output for original and patched case (317.68 KB, text/plain)
2023-11-29 21:31 UTC, Jan-Simon Moeller
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan-Simon Moeller 2023-11-29 20:32:12 UTC
The bug (being a recipe bug or a bitbake issue) surfaces if you turn do_make_icudata back on in the icu recipe.
In my case I have a need for icu-native to produce the icudata file. Otherwise my native npm/nodejs execution is broken due to the icu.dat file missing (will file this in a different bug).

Reproducer:

clone kirkstone branch

source oe-init-build-env

bitbake icu-native

bitbake -e > icu-native-orig.env
grep BASEHASH icu-native-orig.env > icu-native-orig.basehash


Now:

bbappend icu like this:
-----snip------
PACKAGECONFIG:append = " make-icudata"
do_make_icudata:class-native () {
    ${@bb.utils.contains('PACKAGECONFIG', 'make-icudata', '', 'exit 0', d)}
    cd ${S}
    rm -rf data
    cp -a ${WORKDIR}/data .
    AR='${BUILD_AR}' \
    CC='${BUILD_CC}' \
    CPP='${BUILD_CPP}' \
    CXX='${BUILD_CXX}' \
    RANLIB='${BUILD_RANLIB}' \
    CFLAGS='${BUILD_CFLAGS}' \
    CPPFLAGS='${BUILD_CPPFLAGS}' \
    CXXFLAGS='${BUILD_CXXFLAGS}' \
    LDFLAGS='${BUILD_LDFLAGS}' \
    ICU_DATA_FILTER_FILE=${WORKDIR}/filter.json \
    ./runConfigureICU Linux --with-data-packaging=archive
    oe_runmake
    install -Dm644 ${S}/data/out/icudt${ICU_MAJOR_VER}l.dat ${S}/data/in/icudt${ICU_MAJOR_VER}l.dat
}
-----snip------

IOW enable icudata for icu-native package.

Now run:

bitbake -e > icu-native-new.env
grep BASEHASH icu-native-new.env > icu-native-new.basehash

bitbake icu-native 
NOTE: Tasks Summary: Attempted 120 tasks of which 120 didn't need to be rerun and all succeeded.
# should not build as sstate is considered present


Expected is a rebuild of icu-native with the dat file. This does not happen. 



diff -Napur icu-native-orig.basehash icu-native-new.basehash

--- icu-native-kirkstone-orig.basehash  2023-11-29 20:07:28.316143172 +0000
+++ icu-native-kirkstone-new.basehash      2023-11-29 20:10:17.749386392 +0000
@@ -13,7 +13,7 @@ BB_BASEHASH:task-do_cleansstate="81060e5
 # $BB_BASEHASH:task-do_compile
 BB_BASEHASH:task-do_compile="3b79e1a010a584ddd4430755eee07b526894c29983d763741b85f4f7e386e29e"
 # $BB_BASEHASH:task-do_configure
-BB_BASEHASH:task-do_configure="8093ed634cfadccb2a6ada2aa63f086ad42d39a307a7379a7c3203c0570a09cb"
+BB_BASEHASH:task-do_configure="5a068dd5b5d219753780258a2c5ed4a646bcbcc06d8d3eb49802f9ce43cb5fd9"
 # $BB_BASEHASH:task-do_deploy_source_date_epoch
 BB_BASEHASH:task-do_deploy_source_date_epoch="ccbd1a9eb0adef26e650a567db121e7601d2e7f19819fdad2d5fa48f0b75f2ea"
 # $BB_BASEHASH:task-do_deploy_source_date_epoch_setscene
@@ -27,7 +27,7 @@ BB_BASEHASH:task-do_install="0d74741f27c
 # $BB_BASEHASH:task-do_listtasks
 BB_BASEHASH:task-do_listtasks="12ae738d3561f977d3dc38ff7b21073cd916045f993f8be8e394b5b683ed26c9"
 # $BB_BASEHASH:task-do_make_icudata
-BB_BASEHASH:task-do_make_icudata="8036781e2a98d8eccd7615ae5706cb56245110b494e9d89cb67334ed9a076fb4"
+BB_BASEHASH:task-do_make_icudata="c9231f5124dee9f3afa59194d5986a7e3d4f04a9ec9f6dedd20a9b0edc05ad3e"
 # $BB_BASEHASH:task-do_patch
 BB_BASEHASH:task-do_patch="48ce1f041d3f00fe5af8c7b0d9f0cc023eb2d832c364fa6ada7a17010adce433"
 # $BB_BASEHASH:task-do_populate_lic


It seems the BASEHASHES for setscene are not invalidated through the change made, we pull from sstate. Hmm.



My gut-feeling is that it is an issue with the icu recipe:

https://git.yoctoproject.org/poky/tree/meta/recipes-support/icu/icu_70.1.bb?h=kirkstone#n123

We have an empty 
do_make_icudata() {
    :
}
addtask make_icudata before do_configure after do_patch do_prepare_recipe_sysroot

That is replaced with:
do_make_icudata:class-target () {
    ${@bb.utils.contains('PACKAGECONFIG', 'make-icudata', '', 'exit 0', d)}
    cd ${S}
    rm -rf data
    cp -a ${WORKDIR}/data .
    AR='${BUILD_AR}' \
    CC='${BUILD_CC}' \
    CPP='${BUILD_CPP}' \
    CXX='${BUILD_CXX}' \
    RANLIB='${BUILD_RANLIB}' \
    CFLAGS='${BUILD_CFLAGS}' \
    CPPFLAGS='${BUILD_CPPFLAGS}' \
    CXXFLAGS='${BUILD_CXXFLAGS}' \
    LDFLAGS='${BUILD_LDFLAGS}' \
    ICU_DATA_FILTER_FILE=${WORKDIR}/filter.json \
    ./runConfigureICU Linux --with-data-packaging=archive
    oe_runmake
    install -Dm644 ${S}/data/out/icudt${ICU_MAJOR_VER}l.dat ${S}/data/in/icudt${ICU_MAJOR_VER}l.dat
}

and in my case
do_make_icudata:class-native () {
    ${@bb.utils.contains('PACKAGECONFIG', 'make-icudata', '', 'exit 0', d)}
    cd ${S}
    rm -rf data
    cp -a ${WORKDIR}/data .
    AR='${BUILD_AR}' \
    CC='${BUILD_CC}' \
    CPP='${BUILD_CPP}' \
    CXX='${BUILD_CXX}' \
    RANLIB='${BUILD_RANLIB}' \
    CFLAGS='${BUILD_CFLAGS}' \
    CPPFLAGS='${BUILD_CPPFLAGS}' \
    CXXFLAGS='${BUILD_CXXFLAGS}' \
    LDFLAGS='${BUILD_LDFLAGS}' \
    ICU_DATA_FILTER_FILE=${WORKDIR}/filter.json \
    ./runConfigureICU Linux --with-data-packaging=archive
    oe_runmake
    install -Dm644 ${S}/data/out/icudt${ICU_MAJOR_VER}l.dat ${S}/data/in/icudt${ICU_MAJOR_VER}l.dat
}



The problematic bit might be the empty initial do_make_icudata ?


How would I inspect this on master as there are no BASEHASH'es I can compare ?
Is there a way to produce a similar output on master ?
Maybe its fixed there and only an issue on kirkstone.
Comment 1 Jan-Simon Moeller 2023-11-29 21:19:25 UTC
Master seems not affected

# orig is plain poky master
# new is with bbappend 

dl9pf@legolas:~/AGL/poky/build$ ls tmp.orig/stamps/x86_64-linux/icu-native/ > 1
dl9pf@legolas:~/AGL/poky/build$ ls tmp.new/stamps/x86_64-linux/icu-native/ > 2
dl9pf@legolas:~/AGL/poky/build$ diff -Napur 1 2
--- 1   2023-11-29 21:14:36.976734563 +0000
+++ 2   2023-11-29 21:16:28.228171665 +0000
@@ -1,16 +1,16 @@
-73-2.do_build.sigdata.b3ffb070ba77cb7dc72c391c0064db6652088d792e1ac680e9d107d65cf1ebf9
+73-2.do_build.sigdata.72a24f1c9ea202532269ccaea865789c33aa8bac10ee578b243f8d803e9192e7
 73-2.do_collect_spdx_deps.sigdata.e1cb20684f5410a610fef16a508ae92b3d63cf5ca397a3ea5a0194dd70811d32
-73-2.do_compile.sigdata.8267a9c5ae87ed43731867545ad8819b4109f7a521f663b674490efc808c7429
-73-2.do_configure.sigdata.096f30a05ab91756a5650e4cc0239e03aff61991bda2cff28f2de0d4ade32ada
+73-2.do_compile.sigdata.4f5643ef88254e0337614f84ab99341440c498d4894a550ee5e1de891092a148
+73-2.do_configure.sigdata.aa776fad9bd85ba7cbe24310e24c9bc1684dc179ce81eee912e197014eb7ca01
 73-2.do_create_runtime_spdx.sigdata.43abbd55918926445540d55e012c3f674e1821d04d81baba00118ac7f0d69893
 73-2.do_create_spdx.sigdata.9a1e1492ba643770fae455a08efcb1d42eb6b6df9fa779b08ef7ec114c9d32c5
 73-2.do_deploy_source_date_epoch.sigdata.a57db6f2e1d7504e4a958955f74e7b53c3b1f264e9a5eda90690c47787237bfb
 73-2.do_fetch.sigdata.4263e79583610bf26d95236ad1b73a1f7732e3116d3dee5c149967932d53dec8
-73-2.do_install.sigdata.06fe889cf33d45b47108db5cedd4fa28a00be29dd0082d5aff090413dab10d79
-73-2.do_make_icudata.sigdata.aa637c4c04cb0ab5b808b5b4a73ea91ae3833f157bab91c8e437d53915d85e03
+73-2.do_install.sigdata.088cec7a93ce567184e24835007afecc079b02a6724179795dc815f0c29369c8
+73-2.do_make_icudata.sigdata.b054e16c9351753d9e469b3523b997b388d54090af04c07ce18cc666d9518025
 73-2.do_patch.sigdata.4dbbfbd6a2420c09206b20d720e02246e1a595b5b16b8641f435b3f6be78fef9
 73-2.do_populate_lic.sigdata.7299c5e725f9e3e90f077c47dd7d7c5a3d87fd056ba7b2366450b57618a03d41
-73-2.do_populate_sysroot.sigdata.22e8489988427e66378f7fcdc97fe135a8d2ba72d7e34de85fbc31132957a258
+73-2.do_populate_sysroot.sigdata.47d64283f91e9106c64a0f668b770192099a2d9e76ede3e9b1b275f5e218b9cd
 73-2.do_prepare_recipe_sysroot.sigdata.85643bfb94cd3ac110cc49c0fcff40bbe2f21b530e0bb1845e7cf4f7c940dad1
 73-2.do_recipe_qa.sigdata.3d7a44d4ee70fa795860f44ad25347d3fe69ed6bd908d26e3d2528ae9024c169
 73-2.do_unpack.sigdata.2275baabdcbb263c11ca773c73bf202dec26aac3fff95773b64e7624b934581d
Comment 2 Jan-Simon Moeller 2023-11-29 21:31:04 UTC
Created attachment 4994 [details]
archive with bitbake -e output for original and patched case
Comment 3 Randy MacLeod 2024-10-31 15:05:54 UTC
move to unassigned. feel free to take back if you have time.
Comment 4 Randy MacLeod 2026-03-26 15:14:44 UTC
Master was unaffected. Resolved obsolete.