[poky] Parsing fails when a recipe is using distutils.bbclass

Koen Kooi koen at dominion.thruhere.net
Sat Jan 15 03:28:48 PST 2011


Hi,

I'm trying to build gnuradio using the meta-openembedded overlay which is causing me some problems with python-cheeta. When I have built python(-native), everything is fine, but on a build from scratch (hitting the pseudo redirect):

koen at dominion:/OE/tentacle$ MACHINE=beagleboard ./oebb.sh bitbake foo
Executing: MACHINE=beagleboard bitbake foo
Pseudo has not been built, building this first before the main build
ERROR: Error evaluating '${@python_dir(d)}'                                                                            | ETA:  00:00:35
Traceback (most recent call last):
  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 117, in expandWithRefs
    s = __expand_python_regexp__.sub(varparse.python_sub, s)
  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 76, in python_sub
    value = utils.better_eval(codeobj, DataContext(self.d))
  File "/OE/tentacle/sources/bitbake/lib/bb/utils.py", line 387, in better_eval
    return eval(source, _context, locals)
  File "PYTHON_DIR", line 1, in <module>
  File "python-dir.bbclass", line 7, in python_dir
Exception: No Python in STAGING_INCDIR. Forgot to build python-native?

ERROR: Error evaluating '${libdir}/${PYTHON_DIR}/site-packages'
Traceback (most recent call last):
  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 116, in expandWithRefs
    s = __expand_var_regexp__.sub(varparse.var_sub, s)
  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 60, in var_sub
    var = self.d.getVar(key, 1)
  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 260, in getVar
    return self.expand(value, var)
  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 132, in expand
    return self.expandWithRefs(s, varname).value
  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 117, in expandWithRefs
    s = __expand_python_regexp__.sub(varparse.python_sub, s)
  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 76, in python_sub
    value = utils.better_eval(codeobj, DataContext(self.d))
  File "/OE/tentacle/sources/bitbake/lib/bb/utils.py", line 387, in better_eval
    return eval(source, _context, locals)
  File "PYTHON_DIR", line 1, in <module>
  File "python-dir.bbclass", line 7, in python_dir
Exception: No Python in STAGING_INCDIR. Forgot to build python-native?

ERROR: Error evaluating '        install -d ${D}${PYTHON_SITEPACKAGES_DIR}
        STAGING_INCDIR=${STAGING_INCDIR} \
        STAGING_LIBDIR=${STAGING_LIBDIR} \
        PYTHONPATH=${D}/${PYTHON_SITEPACKAGES_DIR} \
        BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
        ${STAGING_BINDIR_NATIVE}/python setup.py install ${DISTUTILS_INSTALL_ARGS} || \
        oefatal "python setup.py install execution failed."

        for i in `find ${D} -name "*.py"` ; do \
            sed -i -e s:${D}::g $i
        done

        if test -e ${D}${bindir} ; then
            for i in ${D}${bindir}/* ; do \
                sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
            done
        fi

        if test -e ${D}${sbindir}; then
            for i in ${D}${sbindir}/* ; do \
                sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
            done
        fi

        rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth

        #
        # FIXME: Bandaid against wrong datadir computation
        #
        if test -e ${D}${datadir}/share; then
            mv -f ${D}${datadir}/share/* ${D}${datadir}/
        fi

        # These are generated files, on really slow systems the storage/speed trade off
        # might be worth it, but in general it isn't
        find ${D}${libdir}/${PYTHON_DIR}/site-packages -iname '*.pyo' -exec rm {} \;
'
Traceback (most recent call last):
  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 116, in expandWithRefs
    s = __expand_var_regexp__.sub(varparse.var_sub, s)
  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 60, in var_sub
    var = self.d.getVar(key, 1)
  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 260, in getVar
    return self.expand(value, var)
  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 132, in expand
    return self.expandWithRefs(s, varname).value
  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 116, in expandWithRefs
    s = __expand_var_regexp__.sub(varparse.var_sub, s)
  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 60, in var_sub
    var = self.d.getVar(key, 1)
  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 260, in getVar
    return self.expand(value, var)
  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 132, in expand
    return self.expandWithRefs(s, varname).value
  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 117, in expandWithRefs
    s = __expand_python_regexp__.sub(varparse.python_sub, s)
  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 76, in python_sub
    value = utils.better_eval(codeobj, DataContext(self.d))
  File "/OE/tentacle/sources/bitbake/lib/bb/utils.py", line 387, in better_eval
    return eval(source, _context, locals)
  File "PYTHON_DIR", line 1, in <module>
  File "python-dir.bbclass", line 7, in python_dir
Exception: No Python in STAGING_INCDIR. Forgot to build python-native?

NOTE: Error expanding variable distutils_do_install
ERROR: Error parsing /OE/tentacle/sources/layers/meta-openembedded/recipes-devtools/python/python-cheetah_2.4.4.bb: No Python in STAGING_INCDIR. Forgot to build python-native?
ERROR: Command execution failed: Exited with 1
koen at dominion:/OE/tentacle$ 

This is after syncing the needed classes with OE: http://dominion.thruhere.net/git/cgit.cgi/yocto/log/?h=koen but I get a similar error when using an unpatched tree.

The cheetah recipe looks like this: http://dominion.thruhere.net/git/cgit.cgi/openembedded/tree/recipes/python/python-cheetah_2.4.4.bb?h=org.openembedded.dev

Does anyone have a clue why the yocto bitbake is trying to expand PYTHONDIR during parsing?

regards,

Koen


More information about the poky mailing list