* eglibc_2.17.bb: Failure expanding variable SELECTED_OPTIMIZATION[:=]
@ 2013-09-06 18:57 Denys Dmytriyenko
2013-09-09 13:51 ` Denys Dmytriyenko
0 siblings, 1 reply; 4+ messages in thread
From: Denys Dmytriyenko @ 2013-09-06 18:57 UTC (permalink / raw)
To: openembedded-core
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: eglibc_2.17.bb: Failure expanding variable SELECTED_OPTIMIZATION[:=]
2013-09-06 18:57 eglibc_2.17.bb: Failure expanding variable SELECTED_OPTIMIZATION[:=] Denys Dmytriyenko
@ 2013-09-09 13:51 ` Denys Dmytriyenko
2013-09-09 15:24 ` Richard Purdie
0 siblings, 1 reply; 4+ messages in thread
From: Denys Dmytriyenko @ 2013-09-09 13:51 UTC (permalink / raw)
To: openembedded-core
Any ideas or suggestions at this point would be greatly appreciated! Thanks.
On Fri, Sep 06, 2013 at 02:57:41PM -0400, Denys Dmytriyenko wrote:
> 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
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: eglibc_2.17.bb: Failure expanding variable SELECTED_OPTIMIZATION[:=]
2013-09-09 13:51 ` Denys Dmytriyenko
@ 2013-09-09 15:24 ` Richard Purdie
2013-09-09 16:22 ` Denys Dmytriyenko
0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2013-09-09 15:24 UTC (permalink / raw)
To: Denys Dmytriyenko; +Cc: openembedded-core
On Mon, 2013-09-09 at 09:51 -0400, Denys Dmytriyenko wrote:
> Any ideas or suggestions at this point would be greatly appreciated! Thanks.
I have vague recollections about this from something happening in
master. Perhaps try with:
http://git.openembedded.org/bitbake/commit/?id=4d50690489ee8dc329a9b0c7bc4ceb29b71e95e9
applied. This might things more deterministic, perhaps always breaking
or perhaps never.
Have you got two definitions of the "get_optimization" function?
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: eglibc_2.17.bb: Failure expanding variable SELECTED_OPTIMIZATION[:=]
2013-09-09 15:24 ` Richard Purdie
@ 2013-09-09 16:22 ` Denys Dmytriyenko
0 siblings, 0 replies; 4+ messages in thread
From: Denys Dmytriyenko @ 2013-09-09 16:22 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
On Mon, Sep 09, 2013 at 04:24:23PM +0100, Richard Purdie wrote:
> On Mon, 2013-09-09 at 09:51 -0400, Denys Dmytriyenko wrote:
> > Any ideas or suggestions at this point would be greatly appreciated! Thanks.
Richard,
> I have vague recollections about this from something happening in
> master. Perhaps try with:
>
> http://git.openembedded.org/bitbake/commit/?id=4d50690489ee8dc329a9b0c7bc4ceb29b71e95e9
>
> applied. This might things more deterministic, perhaps always breaking
> or perhaps never.
Ah, good call! Massaging the patch onto 1.18 seems to have solved the parsing
breakage - it passed 10 out of 10 tries so far. I'll keep testing and run a
few real builds, but would you be willing to backport it to 1.18? Please let
me know if you need an updated patch re-submitted. Thanks.
> Have you got two definitions of the "get_optimization" function?
I grepped through all my layers and eglibc_2.17.inc is the only place where it
gets defined and used.
--
Denys
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-09-09 16:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-06 18:57 eglibc_2.17.bb: Failure expanding variable SELECTED_OPTIMIZATION[:=] Denys Dmytriyenko
2013-09-09 13:51 ` Denys Dmytriyenko
2013-09-09 15:24 ` Richard Purdie
2013-09-09 16:22 ` Denys Dmytriyenko
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.