meta-rust-bin icon indicating copy to clipboard operation
meta-rust-bin copied to clipboard

Not working on honister

Open hellow554 opened this issue 4 years ago • 1 comments

At least for me, the current master branch does not work on a honister version of poky:

ERROR: ExpansionError during parsing /build/source/poky/../meta-rust-bin/recipes-devtools/rust/rust-bin-cross_1.54.0.bb                                         | ETA:  0:00:45Traceback (most recent call last):
  File "/build/source/poky/bitbake/lib/bb/data_smart.py", line 426, in DataSmart.expandWithRefs(s="${@rust_target(d, 'BUILD')}", varname='RUST_BUILD_TARGET'):
                     tb = sys.exc_info()[2]
    >                raise ExpansionError(varname, s, exc).with_traceback(tb) from exc

  File "/build/source/poky/bitbake/lib/bb/data_smart.py", line 410, in DataSmart.expandWithRefs(s="${@rust_target(d, 'BUILD')}", varname='RUST_BUILD_TARGET'):
                     try:
    >                    s = __expand_python_regexp__.sub(varparse.python_sub, s)
                     except SyntaxError as e:
  File "/build/source/poky/bitbake/lib/bb/data_smart.py", line 132, in VariableParse.python_sub(match=<re.Match object; span=(0, 27), match="${@rust_target(d, 'BUILD')}">):
                         self.contains[k].update(parser.contains[k])
    >            value = utils.better_eval(codeobj, DataContext(self.d), {'d' : self.d})
                 return str(value)
  File "/build/source/poky/bitbake/lib/bb/utils.py", line 427, in better_eval(source=<code object <module> at 0x7f2b664965b0, file "Var <RUST_BUILD_TARGET>", line 1>, locals={'d': <bb.data_smart.DataSmart object at 0x7f2b66489550>}, extraglobals={'d': <bb.data_smart.DataSmart object at 0x7f2b66489550>}):
                 ctx[g] = extraglobals[g]
    >    return eval(source, ctx, locals)

  File "Var <RUST_BUILD_TARGET>", line 1, in <module>
bb.data_smart.ExpansionError: Failure expanding variable RUST_BUILD_TARGET, expression was ${@rust_target(d, 'BUILD')} which triggered exception NameError: name 'rust_target' is not defined
The variable dependency chain for the failure is: RUST_BUILD_TARGET -> S


Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

Can somebody please clarify that it works on honister branch? Maybe @Ossanes who did the original PR for it (#104)

hellow554 avatar Oct 26 '21 09:10 hellow554

Is fixed on PR https://github.com/rust-embedded/meta-rust-bin/pull/111

egimbernat avatar Nov 19 '21 04:11 egimbernat

Having the exact same problem on poky 'langdale' with meta-rust-bin master branch. Even with the fixes, the layering is always putting poky layer first on my BBPATH irrespective of how things are ordered in my bblayers.conf and the prepend change in layer.conf, and any BBMASK-ING. I can get it to work if I rename the cargo.bbclass and rust-common.bbclass to something unique, so they don't clash with poky rust bbclasses (as recommended in the bitbake dev manual)

dellgreen avatar Nov 23 '22 21:11 dellgreen

Fixed by #135

posborne avatar Oct 10 '23 16:10 posborne