Skip to content

cpufrequtils: fix latent do_install build failure

Alex Kiernan openembedded-devel 1 version New

Get series with b4
b4 am [email protected] change-id 20260814-cpufrequtils-0a49f332a1c2

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2cpufrequtils: fetch from git.kernel.org, mark PV as post-releasemeta-oe/recipes-bsp/cpufrequtils/cpufrequtils_008.bb+7 -70 replies
2/2cpufrequtils: fix do_install, drop the toolchain patch, add nls PACKAGECONFIGmeta-oe/recipes-bsp/cpufrequtils/cpufrequtils/0001-dont-unset-cflags.patch meta-oe/recipes-bsp/cpufrequtils/cpufrequtils_008.bb+7 -420 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [meta-oe][PATCH 0/2] cpufrequtils: fix latent do_install build failure

do_install runs make with -e, and install: depends on all:, so anything out of date at install time gets recompiled under -e. -e makes the environment beat the makefile's own assignments, and every CPPFLAGS and CFLAGS use in this makefile is +=, seeded from the environment. bitbake exports CPPFLAGS (empty by default), so the makefile's

  CPPFLAGS += -DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PACKAGE)\" \
              -DPACKAGE_BUGREPORT=\"$(PACKAGE_BUGREPORT)\" -D_GNU_SOURCE

is discarded. print_header() in utils/info.c and utils/set.c uses PACKAGE and VERSION unconditionally, so the recompile fails:

utils/info.c:447:16: error: 'PACKAGE' undeclared (first use in this function) utils/set.c:38:16: error: 'PACKAGE' undeclared (first use in this function)
make: *** [Makefile:166: cpufreq-info] Error 1

A from-scratch build does not hit this: do_compile leaves everything up to date, so all: has nothing to redo and nothing is compiled under -e. It bites only when something is newer than the binaries by the time do_install runs, which is why it survived this long. To reproduce on an unpatched tree:

bitbake cpufrequtils -c compile
touch .../cpufrequtils-008/utils/info.c
bitbake cpufrequtils -c install

Dropping -e fixes it, and also makes do_install compile with the same flags do_compile used - the install-time relink was otherwise losing -pipe and $(WARNINGS) too.

-e is also why 0001-dont-unset-cflags.patch exists: it was there to override the makefile's CC/LD/AR/STRIP/RANLIB assignments. CC is the only one the makefile ever references, so passing it on the make command line replaces the patch entirely.

Patch 1 is source provenance and whitespace only; patch 2 is the fix above, plus NLS as a PACKAGECONFIG.

Verified with clean cleansstate builds for a 32-bit Arm target, and the reproducer above no longer fails.

---
Alex Kiernan (2):
cpufrequtils: fetch from git.kernel.org, mark PV as post-release
cpufrequtils: fix do_install, drop the toolchain patch, add nls PACKAGECONFIG

 .../cpufrequtils/0001-dont-unset-cflags.patch      | 32 ----------------------
 .../recipes-bsp/cpufrequtils/cpufrequtils_008.bb   | 27 ++++++++----------
 2 files changed, 12 insertions(+), 47 deletions(-)

---
base-commit: 58dbc84826947c9436d4b527a4569fdd1ce5ea19
change-id: 20260814-cpufrequtils-0a49f332a1c2

Best regards,

Signature · 1 line
Alex Kiernan <[email protected]>