Somewhat related, but maybe not really:

When I set PACKAGECONFIG for perf in a perf.bbappend file, without
python being in there, the build breaks:

| Makefile.config:277: ***
.../tmp/work/qemuarm64-poky-linux/perf/1.0/recipe-sysroot-native/usr/bin/python3-native/python3-config
not found.  Stop.
| make[1]: *** [Makefile.perf:242: sub-make] Error 2

If I instead set the same PACKAGECONFIG value, but by doing

PACKAGECONFIG:pn-perf = "tui libunwind libtraceevent"

in some global configuration file, it works as expected.

====

I think the difference is due to the

inherit ${@bb.utils.contains('PACKAGECONFIG', 'python',
'python3targetconfig', '', d)}

line in the perf recipe. At the time where this line is evaluated, if
PACKAGECONFIG is set via a .bbappend, this ends up evaluated using the
??= value which does include python, and hence we end up inheriting
python3targetconfig, which in turn inherits python3native, which does

export PYTHON

And since PYTHON is now exported, perf's logic ends up in this fragment
in tools/perf/Makefile.config:

# If PYTHON is defined but PYTHON_CONFIG isn't, then take
$(PYTHON)-config as if it was the user
# supplied value for PYTHON_CONFIG. Because it's "user supplied", error
out if it doesn't exist.
ifdef PYTHON
  ifndef PYTHON_CONFIG
    PYTHON_CONFIG_AUTO := $(call get-executable,$(PYTHON)-config)
    PYTHON_CONFIG := $(if $(PYTHON_CONFIG_AUTO),$(PYTHON_CONFIG_AUTO),\
                          $(call $(error $(PYTHON)-config not found)))
  endif
endif

which breaks because the value of PACKAGECONFIG that ended up
determining buildtime dependencies did not pull in that python3-config.

====

This difference is, to put it mildly, quite confusing and surprising
(and took quite some time to track down). I don't know if there's
anything to do about it. Is setting PACKAGECONFIG via :pn-foo overrides
the only supported method, or is this just a quirk of the perf recipe
that one has to live with?

Rasmus

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#190222): 
https://lists.openembedded.org/g/openembedded-core/message/190222
Mute This Topic: https://lists.openembedded.org/mt/102420698/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to