[poky] Trying to use python3-pygobject-native to compile NetworkManager

Diaz de Grenu, Jose Jose.DiazdeGrenu at digi.com
Fri Dec 29 03:59:19 PST 2017


Hi,

I am using Yocto 2.4 and trying to compile NetworkManager using the following recipe:

https://pastebin.com/zryYY6Fj

Notice the python3-pygobject-native on the dependencies.

This recipe was working fine with Yocto 2.2, but in Yocto 2.4 I get the following error:

(...)
| checking for python extension module directory... ${libdir}/python3.5/site-packages
| checking for gtk-doc... no
| configure: WARNING:
|   You will not be able to create source packages with 'make dist'
|   because gtk-doc >= 1.0 is not found.
| checking for gtkdoc-check... gtkdoc-check.test
| checking for gtkdoc-check... /home/jdepedro/workspaces-yocto/2.4/tmp/work/cortexa9hf-neon-dey-linux-gnueabi/networkmanager/1.8.2-r0/recipe-sysroot-native/usr/bin/gtkdoc-check
| checking for gtkdoc-rebase... /home/jdepedro/workspaces-yocto/2.4/tmp/work/cortexa9hf-neon-dey-linux-gnueabi/networkmanager/1.8.2-r0/recipe-sysroot-native/usr/bin/gtkdoc-rebase
| checking for gtkdoc-mkpdf... /home/jdepedro/workspaces-yocto/2.4/tmp/work/cortexa9hf-neon-dey-linux-gnueabi/networkmanager/1.8.2-r0/recipe-sysroot-native/usr/bin/gtkdoc-mkpdf
| checking whether to build gtk-doc documentation... no
| checking for glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0... yes
| configure: error: "--enable-introspection aims to build the settings documentation. This requires GObject introspection for python (pygobject)
(...)
networkmanager_1.8.2.bb:do_configure) failed with exit code '1'
(...)

Looking at the log.do_configure and NetworkManager configure.ac file I find the line throwing the error:

# If g-i is installed we know we have python, but we might not have pygobject
    if ! "$PYTHON" -c 'from gi.repository import GObject' >& /dev/null; then
        as_fn_error $? "\"--enable-introspection aims to build the settings documentation. This requires GObject introspection for python (pygobject)" "$LINENO" 5
    fi

I am able to reproduce the problem in the devshell:

# bitbake -c devshell NetworkManager
(....)
root:~/workspaces-yocto/2.4/tmp/work/cortexa9hf-neon-dey-linux-gnueabi/networkmanager/1.8.2-r0/NetworkManager-1.8.2# "$PYTHON" -c 'from gi.repository import GObject'
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 890, in _find_spec
AttributeError: 'DynamicImporter' object has no attribute 'find_spec'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "workspaces-yocto/2.4/tmp/work/cortexa9hf-neon-dey-linux-gnueabi/networkmanager/1.8.2-r0/recipe-sysroot-native/usr/lib/python3.5/site-packages/gi/importer.py", line 127, in find_module
    'introspection typelib not found' % namespace)
ImportError: cannot import name GObject, introspection typelib not found


I tried finding more information about the python3 installation in the SDK for the NetworkManager recipe:

root:~/workspaces-yocto/2.4/tmp/work/cortexa9hf-neon-dey-linux-gnueabi/networkmanager/1.8.2-r0/NetworkManager-1.8.2# echo $PYTHON
/home/jdepedro/workspaces-yocto/2.4/tmp/work/cortexa9hf-neon-dey-linux-gnueabi/networkmanager/1.8.2-r0/recipe-sysroot-native/usr/bin/python3-native/python3

root:~/workspaces-yocto/2.4/tmp/work/cortexa9hf-neon-dey-linux-gnueabi/networkmanager/1.8.2-r0/NetworkManager-1.8.2# find /home/jdepedro/workspaces-yocto/2.4/tmp/work/cortexa9hf-neon-dey-linux-gnueabi/networkmanager/1.8.2-r0/recipe-sysroot-native/ -name "*GObject*"
/home/jdepedro/workspaces-yocto/2.4/tmp/work/cortexa9hf-neon-dey-linux-gnueabi/networkmanager/1.8.2-r0/recipe-sysroot-native/usr/share/gir-1.0/GObject-2.0.gir
/home/jdepedro/workspaces-yocto/2.4/tmp/work/cortexa9hf-neon-dey-linux-gnueabi/networkmanager/1.8.2-r0/recipe-sysroot-native/usr/lib/python3.5/site-packages/gi/overrides/GObject.py
/home/jdepedro/workspaces-yocto/2.4/tmp/work/cortexa9hf-neon-dey-linux-gnueabi/networkmanager/1.8.2-r0/recipe-sysroot-native/usr/lib/python3.5/site-packages/gi/overrides/__pycache__/GObject.cpython-35.pyc
/home/jdepedro/workspaces-yocto/2.4/tmp/work/cortexa9hf-neon-dey-linux-gnueabi/networkmanager/1.8.2-r0/recipe-sysroot-native/usr/lib/python3.5/site-packages/gi/overrides/__pycache__/GObject.cpython-35.opt-1.pyc
/home/jdepedro/workspaces-yocto/2.4/tmp/work/cortexa9hf-neon-dey-linux-gnueabi/networkmanager/1.8.2-r0/recipe-sysroot-native/usr/lib/python2.7/site-packages/gi/overrides/GObject.py
/home/jdepedro/workspaces-yocto/2.4/tmp/work/cortexa9hf-neon-dey-linux-gnueabi/networkmanager/1.8.2-r0/recipe-sysroot-native/usr/lib/python2.7/site-packages/gi/overrides/GObject.pyo
/home/jdepedro/workspaces-yocto/2.4/tmp/work/cortexa9hf-neon-dey-linux-gnueabi/networkmanager/1.8.2-r0/recipe-sysroot-native/usr/lib/python2.7/site-packages/gi/overrides/GObject.pyc
/home/jdepedro/workspaces-yocto/2.4/tmp/work/cortexa9hf-neon-dey-linux-gnueabi/networkmanager/1.8.2-r0/recipe-sysroot-native/usr/lib/girepository-1.0/GObject-2.0.typelib


Seems to me like GObject is in fact available in the native SDK that is being used to compile the NetworkManager.

I am not sure how to keep on to debug and solve this problem. Any help is much appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/poky/attachments/20171229/68446b96/attachment.html>


More information about the poky mailing list