Skip to contentSkip to conversation

wanting to clarify variables related to using host tools

DISCUSSION [email protected] 2 participants 3 messages Mar 23, 2020

lore
Share & tools
lore
#0 lore raw

(given some spare time these days, i'm trying to clean up some docs,
so yet another question regarding some OE variables.)

i'm trying to organize OE variables into related sub-categories, and
there are a few related to using host tools i can see:

ASSUME_PROVIDED
HOSTTOOLS
HOSTTOOLS_DIR
HOSTTOOLS_NONFATAL

here's how i read it.

first, ASSUME_PROVIDED (set initially in bitbake.conf) defines
simply those recipes that will not be built if required, as in:

  ASSUME_PROVIDED = "\
    bzip2-native \
    chrpath-native \
    file-native \
    findutils-native \
    gawk-native \
    git-native \
    grep-native \
    ... etc etc ...

now, AIUI, that variable says nothing about whether those corresponding tools are actually *available* on the build system, only that those recipes will not be built, is that correct?

related to that (also in bitbake.conf), we have HOSTTOOLS which
(again, AIUI) reflects commands that *must* be on the host system:

# Tools needed to run builds with OE-Core

HOSTTOOLS += " \
    [ ar as awk basename bash bzip2 cat chgrp chmod chown chrpath cmp comm cp cpio \
    cpp cut date dd diff diffstat dirname du echo egrep env expand expr false \
    fgrep file find flock g++ gawk gcc getconf getopt git grep gunzip gzip \
    head hostname iconv id install ld ldd ln ls make md5sum mkdir mknod \
    mktemp mv nm objcopy objdump od patch perl pr printf pwd \
    python3 ranlib readelf readlink realpath rm rmdir rpcgen sed seq sh \
    sha1sum sha224sum sha256sum sha384sum sha512sum \
    sleep sort split stat strings strip tail tar tee test touch tr true uname \
    uniq wc wget which xargs \

"

any one of whose absence triggers an error based on this from base.bbclass:

... snip ...
if notfound and fatal:
bb.fatal("The following required tools (as specified by
HOSTTOOLS) appear to be unavailable in PATH, please install them in order to proceed:\n %s" % " ".join(notfound))

this suggests a strong correspondence between those two variables --
ASSUME_PROVIDED lists what will not be built (natively), while HOSTTOOLS should then list the host tools that correspond to pretty much the very host tools that those recipes would provide. IOW, adding another native recipe to ASSUME_PROVIDED should require its corresponding membership in HOSTTOOLS to make up for it not being built (and vice versa).

in that case, i notice this line from bitbake.conf regarding
ASSUME_PROVIDED:

  # gzip-native should be listed above?

which seems like a reasonable question since both gzip and gunzip are listed in HOSTTOOLS, so why would gzip-native *not* be in ASSUME_PROVIDED? (and possibly some others, as long as i am reading this correctly.)

just trying to clarify that those two variables should stay
reasonably in sync.

rday

#1 lore raw
Quoted 10 lines · On Mon, Mar 23, 2020 at 12:26:04PM -0400, [email protected] wrote:

...
in that case, i notice this line from bitbake.conf regarding
ASSUME_PROVIDED:

  # gzip-native should be listed above?

which seems like a reasonable question since both gzip and gunzip are listed in HOSTTOOLS, so why would gzip-native *not* be in ASSUME_PROVIDED?
...

meta/conf/distro/include/default-providers.inc:
PREFERRED_PROVIDER_gzip-native ?= "pigz-native"

Quoted 1 line

rday

cu
Adrian

#2 lore raw
Quoted 7 lines · Adrian Bunk
Quoted 6 lines · On Mon, Mar 23, 2020 at 12:26:04PM -0400, [email protected] wrote:

...
in that case, i notice this line from bitbake.conf regarding
ASSUME_PROVIDED:

  # gzip-native should be listed above?
Quoted 7 lines
Quoted 4 lines

which seems like a reasonable question since both gzip and gunzip are listed in HOSTTOOLS, so why would gzip-native *not* be in ASSUME_PROVIDED?
...

meta/conf/distro/include/default-providers.inc:
PREFERRED_PROVIDER_gzip-native ?= "pigz-native"

ah, thanks, must remember to take that file into account.

rday