Changes to bitbake environment variable handling breakage?

Hi,

My continuing saga to get everything building with head versions of OE and up to date bitbake-1.8 continues.

It seems that something has changed in the handling of environment variables with up to date bitbake.

$bitbake console-image
ERROR: opening ${OE_HOME}/local/packages//.bb: file not found
ERROR: opening ${OE_HOME}/org.openembedded.dev/packages//.bb: file not found

NOTE: Parsing finished. 0 cached, 0 parsed, 0 skipped, 0 masked.
NOTE: Cache is clean, not saving.
NOTE: build 200810291030: started
sh: line 0: cd: /local/: No such file or directory
fatal: Not a git repository
sh: line 0: cd: /local/: No such file or directory
fatal: Not a git repository

And with debug information it gives the rather wrong looking lines of

$ bitbake console-image -D
DEBUG: Removed the following variables from the environment:GNOME_DESKTOP_SESSION_ID,http_proxy,LESSOPEN,PS1,WINDOWPATH,SHLVL,OE_HOME,
WINDOWID,GDM_XSERVER_LOCATION,ftp_proxy,GDMSESSION,LESSCLOSE,OLDPWD,GDM_LANG,HISTCONTROL,no_proxy,LS_COLORS

i.e. It seems to be stripping the OE_HOME variable. I have the same setup as described http://elinux.org/BeagleBoardAndOpenEmbeddedGit except I am running a local overlay. Contents of profile.sh are

export OE_HOME=$HOME/beagle/oe
export BBPATH=$OE_HOME/local:$OE_HOME/org.openembedded.dev
export PATH=$OE_HOME/opt/bitbake/bin:$PATH

Relevant overlay lines from site.conf are

BBFILES += “${OE_HOME}/local/packages//.bb”
BBFILE_COLLECTIONS = “overlay”
BBFILE_PATTERN_overlay = “${OE_HOME}/local”
BBFILE_PRIORITY_overlay = 5

Any idea what has changed to stop this setup working?

John

Hi,

I had the same problem. The Bitbake conf files can’t handle environment variables. You have to change $OE_HOME to the actual hardcoded path to the location.

Ian

Bitbake now clears the env to get a more deterministic buid env (e.g.
having 'TOP' set breaks openssh build). You can whitelist variables
with:

export BB_ENV_EXTRAWHITE="MACHINE DISTRO ANGSTROM_MODE"

in the shell that bitbake will run in. IN your case that would be:

export BB_ENV_EXTRAWHITE="MACHINE DISTRO ANGSTROM_MODE OE_HOME"

regards,

Koen

Hi,

My continuing saga to get everything building with head versions of OE and
up to date bitbake-1.8 continues.

It seems that something has changed in the handling of environment variables
with up to date bitbake.

Any idea what has changed to stop this setup working?

Bitbake now clears the env to get a more deterministic buid env (e.g.
having ‘TOP’ set breaks openssh build). You can whitelist variables
with:

export BB_ENV_EXTRAWHITE=“MACHINE DISTRO ANGSTROM_MODE”

This is where I get a little confused between env variables passed from profile.sh, and the syntax of the conf files (which look like env variables, but are not - correct?). Would you mind clearing this up for me?

in the shell that bitbake will run in. IN your case that would be:

export BB_ENV_EXTRAWHITE=“MACHINE DISTRO ANGSTROM_MODE OE_HOME”

But according to my proile.sh I only set

export OE_HOME=$HOME/beagle/oe
export BBPATH=$OE_HOME/local:$OE_HOME/org.openembedded.dev

export PATH=$OE_HOME/opt/bitbake/bin:$PATH

so I would only need to whitelist OE_HOME and BBPATH, correct?

Things like MACHINE and DISTRO are set from within other conf files, so are not strictly env vars, in the sense that thy will not be stripped by BB. Is this correct?

John

> > Hi,

> > My continuing saga to get everything building with head versions of OE
> and
> > up to date bitbake-1.8 continues.

> > It seems that something has changed in the handling of environment
> variables
> > with up to date bitbake.

> > Any idea what has changed to stop this setup working?

> Bitbake now clears the env to get a more deterministic buid env (e.g.
> having 'TOP' set breaks openssh build). You can whitelist variables
> with:

> export BB_ENV_EXTRAWHITE="MACHINE DISTRO ANGSTROM_MODE"

This is where I get a little confused between env variables passed from
profile.sh, and the syntax of the conf files (which look like env variables,
but are not - correct?). Would you mind clearing this up for me?

> in the shell that bitbake will run in. IN your case that would be:

> export BB_ENV_EXTRAWHITE="MACHINE DISTRO ANGSTROM_MODE OE_HOME"

But according to my proile.sh I only set

export OE_HOME=$HOME/beagle/oe
export BBPATH=$OE_HOME/local:$OE_HOME/org.openembedded.dev
export PATH=$OE_HOME/opt/bitbake/bin:$PATH

so I would only need to whitelist OE_HOME and BBPATH, correct?

BBPATH is whitelitsted by default, so no need to add that to the extra
whitelist.

Things like MACHINE and DISTRO are set from within other conf files, so are
not strictly env vars, in the sense that thy will not be stripped by BB. Is
this correct?

No, it will epmty out the env for anything that isn't in the whitelist
that bitbake ships with. Note that I say 'bitbake', not 'OE', so you
have to whitelist MACHINE and ANGSTROM if you want to do things like:

MACHINE=beagleboard bitbake <foo> ; MACHINE=davinci-dvevm bitbake
<bar> ; MACHINE=beagleboard ANGSTROM_MODE=uclibc bitbake foo

If you are fine with putting that in local.conf or auto.conf you'll
only need to add OE_HOME to the exta whitelist.

regards,

Koen