All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH 0/2] cpufrequtils: fix latent do_install build failure
@ 2026-08-14 14:29 Alex Kiernan
  2026-08-14 14:29 ` [meta-oe][PATCH 1/2] cpufrequtils: fetch from git.kernel.org, mark PV as post-release Alex Kiernan
  2026-08-14 14:29 ` [meta-oe][PATCH 2/2] cpufrequtils: fix do_install, drop the toolchain patch, add nls PACKAGECONFIG Alex Kiernan
  0 siblings, 2 replies; 3+ messages in thread
From: Alex Kiernan @ 2026-08-14 14:29 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Alex Kiernan

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.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---
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,
--  
Alex Kiernan <alex.kiernan@gmail.com>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-14 14:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-14 14:29 [meta-oe][PATCH 0/2] cpufrequtils: fix latent do_install build failure Alex Kiernan
2026-08-14 14:29 ` [meta-oe][PATCH 1/2] cpufrequtils: fetch from git.kernel.org, mark PV as post-release Alex Kiernan
2026-08-14 14:29 ` [meta-oe][PATCH 2/2] cpufrequtils: fix do_install, drop the toolchain patch, add nls PACKAGECONFIG Alex Kiernan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.