All of lore.kernel.org
 help / color / mirror / Atom feed
* Trying to use python3-pygobject-native to compile NetworkManager
@ 2017-12-29 11:59 Diaz de Grenu, Jose
  2018-01-02 12:12 ` Alexander Kanavin
  0 siblings, 1 reply; 10+ messages in thread
From: Diaz de Grenu, Jose @ 2017-12-29 11:59 UTC (permalink / raw)
  To: poky

[-- Attachment #1: Type: text/plain, Size: 5184 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 9708 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Trying to use python3-pygobject-native to compile NetworkManager
  2017-12-29 11:59 Trying to use python3-pygobject-native to compile NetworkManager Diaz de Grenu, Jose
@ 2018-01-02 12:12 ` Alexander Kanavin
  2018-01-02 12:26   ` Diaz de Grenu, Jose
  0 siblings, 1 reply; 10+ messages in thread
From: Alexander Kanavin @ 2018-01-02 12:12 UTC (permalink / raw)
  To: Diaz de Grenu, Jose, poky

On 12/29/2017 01:59 PM, Diaz de Grenu, Jose wrote:

> # 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'

What is $PYTHON set to?

Alex


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Trying to use python3-pygobject-native to compile NetworkManager
  2018-01-02 12:12 ` Alexander Kanavin
@ 2018-01-02 12:26   ` Diaz de Grenu, Jose
  2018-01-02 12:30     ` Alexander Kanavin
  0 siblings, 1 reply; 10+ messages in thread
From: Diaz de Grenu, Jose @ 2018-01-02 12:26 UTC (permalink / raw)
  To: Alexander Kanavin, poky


-----Original Message-----
From: Alexander Kanavin [mailto:alexander.kanavin@linux.intel.com] 

> What is $PYTHON set to?

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

Just in case, here is the whole environment: https://pastebin.com/55hr7pwQ


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Trying to use python3-pygobject-native to compile NetworkManager
  2018-01-02 12:26   ` Diaz de Grenu, Jose
@ 2018-01-02 12:30     ` Alexander Kanavin
  2018-01-02 12:55       ` Diaz de Grenu, Jose
  0 siblings, 1 reply; 10+ messages in thread
From: Alexander Kanavin @ 2018-01-02 12:30 UTC (permalink / raw)
  To: Diaz de Grenu, Jose, poky

On 01/02/2018 02:26 PM, Diaz de Grenu, Jose wrote:
> 
> -----Original Message-----
> From: Alexander Kanavin [mailto:alexander.kanavin@linux.intel.com]
> 
>> What is $PYTHON set to?
> 
> root:~/workspaces-yocto/2.4/ccimx6ulsbc/tmp/work/cortexa7hf-neon-dey-linux-gnueabi/networkmanager/1.8.2-r0/NetworkManager-1.8.2# echo $PYTHON
> /home/jdepedro/workspaces-yocto/2.4/ccimx6ulsbc/tmp/work/cortexa7hf-neon-dey-linux-gnueabi/networkmanager/1.8.2-r0/recipe-sysroot-native/usr/bin/python3-native/python3
> 
> Just in case, here is the whole environment: https://pastebin.com/55hr7pwQ
> 

Also, where is the networkmanager recipe from? meta-oe has its own 
recipe for it, and it does not match what you posted to pastebin. Can 
you try with the meta-oe version?

Alex


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Trying to use python3-pygobject-native to compile NetworkManager
  2018-01-02 12:30     ` Alexander Kanavin
@ 2018-01-02 12:55       ` Diaz de Grenu, Jose
  2018-01-02 13:06         ` Alexander Kanavin
  0 siblings, 1 reply; 10+ messages in thread
From: Diaz de Grenu, Jose @ 2018-01-02 12:55 UTC (permalink / raw)
  To: Alexander Kanavin, poky

-----Original Message-----
From: Alexander Kanavin [mailto:alexander.kanavin@linux.intel.com] 

> Also, where is the networkmanager recipe from? meta-oe has its own recipe for it, and it does not match what you posted to pastebin. 

It is a custom recipe, as I need to use a newer version of NetworkManager. This recipe was working fine on Yocto 2.2, and I suspect that the problem may be in the python3 package, not in the recipe itself.

> Can you try with the meta-oe version?

That one works.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Trying to use python3-pygobject-native to compile NetworkManager
  2018-01-02 12:55       ` Diaz de Grenu, Jose
@ 2018-01-02 13:06         ` Alexander Kanavin
  2018-01-02 13:34           ` Alexander Kanavin
  2018-01-02 17:36           ` Diaz de Grenu, Jose
  0 siblings, 2 replies; 10+ messages in thread
From: Alexander Kanavin @ 2018-01-02 13:06 UTC (permalink / raw)
  To: Diaz de Grenu, Jose, poky

On 01/02/2018 02:55 PM, Diaz de Grenu, Jose wrote:
> -----Original Message-----
> From: Alexander Kanavin [mailto:alexander.kanavin@linux.intel.com]
> 
>> Also, where is the networkmanager recipe from? meta-oe has its own recipe for it, and it does not match what you posted to pastebin.
> 
> It is a custom recipe, as I need to use a newer version of NetworkManager. This recipe was working fine on Yocto 2.2, and I suspect that the problem may be in the python3 package, not in the recipe itself.

I think that's correct - the older version from meta-oe does not have a 
hard failure if pygobject isn't working. I can't help you with the error 
itself that python is printing; you need to dig into the point in the 
code where it happens and take it from there.

Generally, calling host python to establish (via module import) if 
pygobject is available for the target is incorrect, you can simply patch 
configure.ac to remove the check. That wouldn't however fix the 
underlying problem (that of host pygobject being broken).

Alex


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Trying to use python3-pygobject-native to compile NetworkManager
  2018-01-02 13:06         ` Alexander Kanavin
@ 2018-01-02 13:34           ` Alexander Kanavin
  2018-01-02 17:36           ` Diaz de Grenu, Jose
  1 sibling, 0 replies; 10+ messages in thread
From: Alexander Kanavin @ 2018-01-02 13:34 UTC (permalink / raw)
  To: Diaz de Grenu, Jose, poky

On 01/02/2018 03:06 PM, Alexander Kanavin wrote:

> Generally, calling host python to establish (via module import) if 
> pygobject is available for the target is incorrect, you can simply patch 
> configure.ac to remove the check. That wouldn't however fix the 
> underlying problem (that of host pygobject being broken).

'Host' means 'native' here, I don't separate multiple tasks well in my 
head :)

Alex


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Trying to use python3-pygobject-native to compile NetworkManager
  2018-01-02 13:06         ` Alexander Kanavin
  2018-01-02 13:34           ` Alexander Kanavin
@ 2018-01-02 17:36           ` Diaz de Grenu, Jose
  2018-01-03  9:53             ` Alexander Kanavin
  1 sibling, 1 reply; 10+ messages in thread
From: Diaz de Grenu, Jose @ 2018-01-02 17:36 UTC (permalink / raw)
  To: Alexander Kanavin, poky

-----Original Message-----
From: Alexander Kanavin [mailto:alexander.kanavin@linux.intel.com] 


> I think that's correct - the older version from meta-oe does not have a hard failure if pygobject isn't working. I can't help you with the error itself that python is printing; you need to dig into the point in the code where it happens and take it from there.
>
> Generally, calling host python to establish (via module import) if pygobject is available for the target is incorrect, you can simply patch configure.ac to remove the check. That wouldn't however fix the underlying problem (that of host pygobject being broken).
>
> Alex

I don't really know if the problem is then the configure.ac from NetworkManager, or the pygobject recipe in the poky layer...

I was able to build NetworkManager by adding:

EXTRA_OECONF_append = " --disable-introspection"

I think introspection is only used to generate the documentation, which I don't care about.

Anyways it would be neat if the recipe would just work as it was. If I get some time I will try to understand which is the problem and maybe notify the NetworkManager mailing list if they should fix its configure.ac

Thanks!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Trying to use python3-pygobject-native to compile NetworkManager
  2018-01-02 17:36           ` Diaz de Grenu, Jose
@ 2018-01-03  9:53             ` Alexander Kanavin
  2018-01-05 19:46               ` Tim Orling
  0 siblings, 1 reply; 10+ messages in thread
From: Alexander Kanavin @ 2018-01-03  9:53 UTC (permalink / raw)
  To: Diaz de Grenu, Jose, poky

On 01/02/2018 07:36 PM, Diaz de Grenu, Jose wrote:
> I don't really know if the problem is then the configure.ac from NetworkManager, or the pygobject recipe in the poky layer...
> 
> I was able to build NetworkManager by adding:
> 
> EXTRA_OECONF_append = " --disable-introspection"
> 
> I think introspection is only used to generate the documentation, which I don't care about.

That's fair, but we would appreciate if you can get down to the bottom 
of the issue - and submit an up to date networkmanager with 
introspection support to meta-oe. YP needs not just users, but active 
contributors; it's in your own interest too.

Alex


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Trying to use python3-pygobject-native to compile NetworkManager
  2018-01-03  9:53             ` Alexander Kanavin
@ 2018-01-05 19:46               ` Tim Orling
  0 siblings, 0 replies; 10+ messages in thread
From: Tim Orling @ 2018-01-05 19:46 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: Diaz de Grenu, Jose, poky


> On Jan 3, 2018, at 1:53 AM, Alexander Kanavin <alexander.kanavin@linux.intel.com> wrote:
> 
> On 01/02/2018 07:36 PM, Diaz de Grenu, Jose wrote:
>> I don't really know if the problem is then the configure.ac from NetworkManager, or the pygobject recipe in the poky layer...
>> I was able to build NetworkManager by adding:
>> EXTRA_OECONF_append = " --disable-introspection"
>> I think introspection is only used to generate the documentation, which I don't care about.
> 
> That's fair, but we would appreciate if you can get down to the bottom of the issue - and submit an up to date networkmanager with introspection support to meta-oe. YP needs not just users, but active contributors; it's in your own interest too.
> 

“In your own interest” meaning if it was already updated in meta-oe, we might have noticed this failure already in one of the “State of the Bitbake World” reports and tried to fix it already.

We really need this to be a community effort.


> Alex
> -- 
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-01-05 19:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-29 11:59 Trying to use python3-pygobject-native to compile NetworkManager Diaz de Grenu, Jose
2018-01-02 12:12 ` Alexander Kanavin
2018-01-02 12:26   ` Diaz de Grenu, Jose
2018-01-02 12:30     ` Alexander Kanavin
2018-01-02 12:55       ` Diaz de Grenu, Jose
2018-01-02 13:06         ` Alexander Kanavin
2018-01-02 13:34           ` Alexander Kanavin
2018-01-02 17:36           ` Diaz de Grenu, Jose
2018-01-03  9:53             ` Alexander Kanavin
2018-01-05 19:46               ` Tim Orling

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.