Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Denys Dmytriyenko <denis@denix.org>
To: openembedded-core@lists.openembedded.org
Subject: eglibc_2.17.bb: Failure expanding variable SELECTED_OPTIMIZATION[:=]
Date: Fri, 06 Sep 2013 14:57:41 -0400	[thread overview]
Message-ID: <20130906185741.GA5834@denix.org> (raw)

Hi,

Has anyone seen this error before? It happens for me quite often, but not 
always, on Dylan branch during initial parsing:

Parsing recipes...
ERROR: ExpansionError during parsing .../oe-core/meta/recipes-core/eglibc/eglibc_2.17.bb:
  Failure expanding variable SELECTED_OPTIMIZATION[:=], expression was ${@get_optimization(d)}
  which triggered exception NameError: name 'get_optimization' is not defined
ERROR: Command execution failed: Exited with 1


Looking at the code, I don't see anything suspicious:

# eglibc can't be built without optimization, if someone tries to compile an
# entire image as -O0, we override it with -O2 here and give a note about it.
def get_optimization(d):
    selected_optimization = d.getVar("SELECTED_OPTIMIZATION", True)
    if base_contains("SELECTED_OPTIMIZATION", "-O0", "x", "", d) == "x":
        bb.note("eglibc can't be built with -O0, -O2 will be used instead.")
        return selected_optimization.replace("-O0", "-O2")
    return selected_optimization

SELECTED_OPTIMIZATION := "${@get_optimization(d)}"


It sounds like by the time SELECTED_OPTIMIZATION tries to make an assignment 
with immediate var expansion, get_optimization() function is not yet defined.

This happens with high BB_NUM_THREADS and bitbake 1.18. Trying bitbake from 
master on Dylan gives "AttributeError: 'NoneType' object has no attribute 
'rfind'", but that's another story.

Anyone has any clues or suggestions? Thanks.

-- 
Denys


             reply	other threads:[~2013-09-06 18:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-06 18:57 Denys Dmytriyenko [this message]
2013-09-09 13:51 ` eglibc_2.17.bb: Failure expanding variable SELECTED_OPTIMIZATION[:=] Denys Dmytriyenko
2013-09-09 15:24   ` Richard Purdie
2013-09-09 16:22     ` Denys Dmytriyenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130906185741.GA5834@denix.org \
    --to=denis@denix.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox