Build race around fwk_module_idx.h
We've seen a build race in scp-firmware 2.6.0 when building for Juno:
== Building Sensor for cortex-m3
[ ... ]
In file included from mod_clock.c:11:
/home/pokybuild/yocto-worker/meta-arm/build/build/tmp/work/juno-poky-linux/scp-firmware/2.6.0-r0/git/module/clock/include/mod_clock.h:63:9: error: 'FWK_MODULE_IDX_CLOCK' undeclared here (not in a function)
63 | FWK_MODULE_IDX_CLOCK,
| ^~~~~~~~~~~~~~~~~~~~
/home/pokybuild/yocto-worker/meta-arm/build/build/tmp/work/juno-poky-linux/scp-firmware/2.6.0-r0/git/framework/include/fwk_id.h:352:27: note: in definition of macro 'FWK_ID_NOTIFICATION_INIT'
352 | .module_idx = MODULE_IDX, \
| ^~~~~~~~~~
In file included from /home/pokybuild/yocto-worker/meta-arm/build/build/tmp/work/juno-poky-linux/scp-firmware/2.6.0-r0/git/framework/include/fwk_event.h:18,
from /home/pokybuild/yocto-worker/meta-arm/build/build/tmp/work/juno-poky-linux/scp-firmware/2.6.0-r0/git/framework/include/fwk_module.h:17,
from mod_sds.c:15:
/home/pokybuild/yocto-worker/meta-arm/build/build/tmp/work/juno-poky-linux/scp-firmware/2.6.0-r0/git/module/sds/include/mod_sds.h:116:9: error: 'FWK_MODULE_IDX_SDS' undeclared here (not in a function)
116 | FWK_MODULE_IDX_SDS,
| ^~~~~~~~~~~~~~~~~~
/home/pokybuild/yocto-worker/meta-arm/build/build/tmp/work/juno-poky-linux/scp-firmware/2.6.0-r0/git/framework/include/fwk_id.h:352:27: note: in definition of macro 'FWK_ID_NOTIFICATION_INIT'
352 | .module_idx = MODULE_IDX, \
| ^~~~~~~~~~
/home/pokybuild/yocto-worker/meta-arm/build/build/tmp/work/juno-poky-linux/scp-firmware/2.6.0-r0/git/module/clock/include/mod_clock.h:63:9: error: 'FWK_MODULE_IDX_CLOCK' undeclared here (not in a function)
63 | FWK_MODULE_IDX_CLOCK,
| ^~~~~~~~~~~~~~~~~~~~
/home/pokybuild/yocto-worker/meta-arm/build/build/tmp/work/juno-poky-linux/scp-firmware/2.6.0-r0/git/framework/include/fwk_id.h:352:27: note: in definition of macro 'FWK_ID_NOTIFICATION_INIT'
352 | .module_idx = MODULE_IDX, \
| ^~~~~~~~~~
mod_sds.c: In function 'init_sds':
mod_sds.c:457:22: error: 'fwk_module_id_sds' undeclared (first use in this function); did you mean 'fwk_module_bind'?
457 | .source_id = fwk_module_id_sds,
| ^~~~~~~~~~~~~~~~~
| fwk_module_bind
mod_sds.c:457:22: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [/home/pokybuild/yocto-worker/meta-arm/build/build/tmp/work/juno-poky-linux/scp-firmware/2.6.0-r0/git/tools/build_system/rules.mk:224: /home/pokybuild/yocto-worker/meta-arm/build/build/tmp/work/juno-poky-linux/scp-firmware/2.6.0-r0/build/product/juno/scp_romfw/module/sds_nt/release/obj/mod_sds.o] Error 1
make[2]: Leaving directory '/home/pokybuild/yocto-worker/meta-arm/build/build/tmp/work/juno-poky-linux/scp-firmware/2.6.0-r0/git/module/sds/src'
make[2]: *** [/home/pokybuild/yocto-worker/meta-arm/build/build/tmp/work/juno-poky-linux/scp-firmware/2.6.0-r0/git/tools/build_system/rules.mk:224: /home/pokybuild/yocto-worker/meta-arm/build/build/tmp/work/juno-poky-linux/scp-firmware/2.6.0-r0/build/product/juno/scp_romfw/module/clock_nt/release/obj/mod_clock.o] Error 1
make[2]: Leaving directory '/home/pokybuild/yocto-worker/meta-arm/build/build/tmp/work/juno-poky-linux/scp-firmware/2.6.0-r0/git/module/clock/src'
make[1]: *** [/home/pokybuild/yocto-worker/meta-arm/build/build/tmp/work/juno-poky-linux/scp-firmware/2.6.0-r0/git/tools/build_system/rules.mk:216: /home/pokybuild/yocto-worker/meta-arm/build/build/tmp/work/juno-poky-linux/scp-firmware/2.6.0-r0/git/module/sds/src] Error 2