the-modem-distro / pinephone_modem_sdk

Pinephone Modem SDK: Tools to build your own bootloader, kernel and rootfs
GNU General Public License v3.0
597 stars 64 forks source link

Unable to build 0.7.4 #209

Open jg110 opened 1 year ago

jg110 commented 1 year ago

When trying to build 0.7.4 on Fedora 38, I'm getting this error:

 ERROR: ExpansionError during parsing /home/jg110/Documents/repos/pinephone_modem_sdk/yocto/meta/recipes-rt/images/core-image-rt.bb                                                                   | ETA:  0:00:41
Traceback (most recent call last):
  File "/home/jg110/Documents/repos/pinephone_modem_sdk/yocto/bitbake/lib/bb/data_smart.py", line 454, in DataSmart.expandWithRefs(s='\t${@\' \'.join([\'%s_%s="%s";\' % (arg, name, d.getVar(\'%s_%s\' % (arg, name))) for arg in d.getVar(\'MULTIUBI_ARGS\').split() for name in d.getVar(\'MULTIUBI_BUILD\').split()])}\n\t# Split MKUBIFS_ARGS_<name> and UBINIZE_ARGS_<name>\n\tfor name in ${MULTIUBI_BUILD}; do\n\t\teval local mkubifs_args=\\"\\$MKUBIFS_ARGS_${name}\\"\n\t\teval local ubinize_args=\\"\\$UBINIZE_ARGS_${name}\\"\n\n\t\tmultiubi_mkfs "${mkubifs_args}" "${ubinize_args}" "${name}"\n\tdone\n', varname='IMAGE_CMD:multiubi'):
                     try:
    >                    s = __expand_python_regexp__.sub(varparse.python_sub, s)
                     except SyntaxError as e:
  File "/home/jg110/Documents/repos/pinephone_modem_sdk/yocto/bitbake/lib/bb/data_smart.py", line 144, in VariableParse.python_sub(match=<re.Match object; span=(1, 169), match='${@\' \'.join([\'%s_%s="%s";\' % (arg, name, d.ge>):
                         self.contains[k].update(parser.contains[k])
    >            value = utils.better_eval(codeobj, DataContext(self.d), {'d' : self.d})
                 return str(value)
  File "/home/jg110/Documents/repos/pinephone_modem_sdk/yocto/bitbake/lib/bb/utils.py", line 432, in better_eval(source=<code object <module> at 0x7fcce07006c0, file "Var <IMAGE_CMD:multiubi>", line 1>, locals={'d': <bb.data_smart.DataSmart object at 0x7fcce0623910>}, extraglobals={'d': <bb.data_smart.DataSmart object at 0x7fcce0623910>}):
                 ctx[g] = extraglobals[g]
    >    return eval(source, ctx, locals)

  File "Var <IMAGE_CMD:multiubi>", line 1, in <module>
  File "Var <IMAGE_CMD:multiubi>", line 1, in <listcomp>(.0=<list_iterator object at 0x7fcce0513370>)
bb.data_smart.ExpansionError: Failure expanding variable IMAGE_CMD:multiubi, expression was     ${@' '.join(['%s_%s="%s";' % (arg, name, d.getVar('%s_%s' % (arg, name))) for arg in d.getVar('MULTIUBI_ARGS').split() for name in d.getVar('MULTIUBI_BUILD').split()])}
        # Split MKUBIFS_ARGS_<name> and UBINIZE_ARGS_<name>
        for name in ${MULTIUBI_BUILD}; do
                eval local mkubifs_args=\"\$MKUBIFS_ARGS_${name}\"
                eval local ubinize_args=\"\$UBINIZE_ARGS_${name}\"

                multiubi_mkfs "${mkubifs_args}" "${ubinize_args}" "${name}"
        done
 which triggered exception AttributeError: 'NoneType' object has no attribute 'split'
The variable dependency chain for the failure is: IMAGE_CMD:multiubi

ERROR: Parsing halted due to errors, see error messages above

Summary: There was 1 WARNING message.
Summary: There were 2 ERROR messages, returning a non-zero exit code.
make: *** [Makefile:77: root_fs] Error 1

This happens for make everything VERSION="0.7.4", make aboot, make root_fs, and make recovery_fs (didn't test any others). I've tried both the release tarball and cloning the repo in its current state.

Biktorgj commented 1 year ago

Hi! I patched this in the development branch but didn't in kirkstone. Long story short a variable that didn't need to be specifically set now needs to be set, even if empty.

Please apply this inside SDK_PATH/yocto/meta-qcom/conf/machine/include/mdm9607.inc https://github.com/the-modem-distro/meta-qcom/commit/9fee8a2c0a297869088d6c6a10410ed038032ca3

jg110 commented 1 year ago

Looks like that fixes it, thanks.