Problem Description ====================== sysstat build failed when add lm-sensors to the rootfs Expected Behavior ====================== sysstat should build successfully! Observed Behavior ====================== | a - common.o | a - ioconf.o | i686-wrs-linux-gnu-gcc -m64 -Wl,-O1 -Wl,--hash-style=gnu --sysroot=/buildarea2/fli/intel-xeon-core/bitbake_build/tmp/sysroots/intel-xeon-core -o sadc -O2 -pipe -g -feliminate-unused-debug-types -Wall -Wstrict-prototypes -pipe -O2 sadc.o act_sadc.o sa_wrap.o sa_common.o librdstats.a librdsensors.a libsyscom.a | sadc.o: In function `main': | /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/sysstat-10.0.3/sadc.c:987: undefined reference to `sensors_init' | /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/sysstat-10.0.3/sadc.c:1143: undefined reference to `sensors_cleanup' | /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/sysstat-10.0.3/sadc.c:989: undefined reference to `sensors_strerror' | librdsensors.a(rd_sensors.o): In function `read_fan': | /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/sysstat-10.0.3/rd_sensors.c:66: undefined reference to `sensors_get_detected_chips' | /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/sysstat-10.0.3/rd_sensors.c:68: undefined reference to `sensors_get_features' | /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/sysstat-10.0.3/rd_sensors.c:72: undefined reference to `sensors_snprintf_chip_name' | /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/sysstat-10.0.3/rd_sensors.c:74: undefined reference to `sensors_get_all_subfeatures' | /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/sysstat-10.0.3/rd_sensors.c:82: undefined reference to `sensors_get_value' | /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/sysstat-10.0.3/rd_sensors.c:77: undefined reference to `sensors_get_value' | librdsensors.a(rd_sensors.o): In function `read_temp': | /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/sysstat-10.0.3/rd_sensors.c:120: undefined reference to `sensors_get_detected_chips' | /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/sysstat-10.0.3/rd_sensors.c:122: undefined reference to `sensors_get_features' | /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/sysstat-10.0.3/rd_sensors.c:126: undefined reference to `sensors_snprintf_chip_name' | /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/sysstat-10.0.3/rd_sensors.c:128: undefined reference to `sensors_get_all_subfeatures' | /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/sysstat-10.0.3/rd_sensors.c:141: undefined reference to `sensors_get_value' | /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/sysstat-10.0.3/rd_sensors.c:131: undefined reference to `sensors_get_value' | /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/sysstat-10.0.3/rd_sensors.c:136: undefined reference to `sensors_get_value' | librdsensors.a(rd_sensors.o): In function `read_in': | /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/sysstat-10.0.3/rd_sensors.c:179: undefined reference to `sensors_get_detected_chips' | /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/sysstat-10.0.3/rd_sensors.c:181: undefined reference to `sensors_get_features' | /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/sysstat-10.0.3/rd_sensors.c:185: undefined reference to `sensors_snprintf_chip_name' | /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/sysstat-10.0.3/rd_sensors.c:187: undefined reference to `sensors_get_all_subfeatures' | /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/sysstat-10.0.3/rd_sensors.c:190: undefined reference to `sensors_get_value' | /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/sysstat-10.0.3/rd_sensors.c:200: undefined reference to `sensors_get_value' | /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/sysstat-10.0.3/rd_sensors.c:195: undefined reference to `sensors_get_value' | librdsensors.a(rd_sensors.o): In function `get_sensors_nr': | /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/sysstat-10.0.3/rd_sensors.c:231: undefined reference to `sensors_get_detected_chips' | /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/sysstat-10.0.3/rd_sensors.c:233: undefined reference to `sensors_get_features' | collect2: ld returned 1 exit status | make: *** [sadc] Error 1 | ERROR: oe_runmake failed | ERROR: Function failed: do_compile (see /buildarea2/fli/intel-xeon-core/bitbake_build/tmp/work/x86_64-wrs-linux/sysstat-10.0.3-r1/temp/do_compile/log.do_compile.19161 for further information) NOTE: package sysstat-10.0.3-r1: task do_compile: Failed ERROR: Task 4 (/buildarea2/fli/intel-xeon-core/layers/oe-core/meta/recipes-extended/sysstat/sysstat_10.0.3.bb, do_compile) failed with exit code '1' NOTE: Tasks Summary: Attempted 181 tasks of which 176 didn't need to be rerun and 1 failed. Summary: 1 task failed: /buildarea2/fli/intel-xeon-core/layers/oe-core/meta/recipes-extended/sysstat/sysstat_10.0.3.bb, do_compile Summary: There was 1 ERROR message shown, returning a non-zero exit code. make: *** [sysstat.compile] Error 1 make: Leaving directory `/buildarea2/fli/intel-xeon-core/build' Misc Info ====================== when added the lm-sensors to the rootfs, sysstat will detect the sensors existing, and would compile sadc with sensors lib, but in the sysstat.inc file, it set EXTRA_OEMAKE += 'LFLAGS=""' this empty LFLAGS will pass to sysstat Makefile and rm the sensors lib, so that this cause errors Steps to Reproduce ====================== configure --enable-board=intel-xeon-core --enable-rootfs=glibc_std --enable-kernel=standard --with-layer=<wrll-runtime-testing>/userspace --with-template=feature/userspace-base make -C build lm-sensors.addpkg make -C build sysstat
sysstat has been upated to version 10.1.1 now. In new stsstat recipe, there is EXTRA_OECONF += "--disable-sensors" line, this will ignore the lm-sensors lib.so the defect has been fixed by this.
Verified on meta-intel master branch, commit ID:fa655a783bc1e41109f408ff49b785d664f64106