SOLUTION: Re: Updating daisy -> Python.h not found


Neuer User <auslands-kv@...>
 

Am 18.10.2014 um 11:10 schrieb Martin Jansa:
On Sat, Oct 18, 2014 at 10:51:30AM +0200, Neuer User wrote:
http://git.openembedded.org/openembedded-core/commit/?h=daisy&id=de5797b27a358954eb15318d0d77ad1981981861
THANKS A LOT!!!

This is it. This patch broke the recipe. I reverted it and it runs
through now without error.

THANKS A LOT!!!

What shall we do now? Is this a bug in this patch? Or does my recipe
need some adaptation?


Martin Jansa
 

On Sat, Oct 18, 2014 at 11:32:47AM +0200, Neuer User wrote:
Am 18.10.2014 um 11:10 schrieb Martin Jansa:
On Sat, Oct 18, 2014 at 10:51:30AM +0200, Neuer User wrote:
http://git.openembedded.org/openembedded-core/commit/?h=daisy&id=de5797b27a358954eb15318d0d77ad1981981861
THANKS A LOT!!!

This is it. This patch broke the recipe. I reverted it and it runs
through now without error.

THANKS A LOT!!!

What shall we do now? Is this a bug in this patch? Or does my recipe
need some adaptation?
+ Tyler Hall

My guess is that your app is receiving the include path with sysroot
prefix now from sysconfig and then adds another sysroot prefix so it
points to non-existent directory, check the include paths (e.g. run
make -n in your configured qmake project) and if it's the
case then debug where it's added (OE_QMAKE_DEBUG_OUTPUT = "-d" should
help)

--
Martin 'JaMa' Jansa jabber: Martin.Jansa@...


Tyler Hall <tylerwhall@...>
 

That patch changed python3-config to use distutils.sysconfig to get
paths. That was already patched by OE to use environment variables to
substitute the correct path, but it seems there's nothing guaranteeing
those variables are exported.

PREFIX = os.path.normpath(sys.prefix).replace( os.getenv("BUILD_SYS"),
os.getenv("HOST_SYS") )

This gives error

TypeError: Can't convert 'NoneType' object to str implicitly
It may have worked previously because python3-config returned the path
to the native sysroot and it compiled successfully despite picking up
the header from the wrong place.

There are a few python recipes that export these variables explicitly,
but it doesn't seem like something that clients should have to know
about.

From python-pycurl:

# need to export these variables for python-config to work
export BUILD_SYS
export HOST_SYS
export STAGING_INCDIR
export STAGING_LIBDIR
This is also done in python-pygobject and python-dbus. Is this
something that distutils.bbclass should do?

-Tyler


Tyler Hall <tylerwhall@...>
 

** Resent to [yocto] as apparently I wasn't subscribed **

That patch changed python3-config to use distutils.sysconfig to get
paths. That was already patched by OE to use environment variables to
substitute the correct path, but it seems there's nothing guaranteeing
those variables are exported.

PREFIX = os.path.normpath(sys.prefix).
replace( os.getenv("BUILD_SYS"),
os.getenv("HOST_SYS") )

This gives error

TypeError: Can't convert 'NoneType' object to str implicitly
It may have worked previously because python3-config returned the path
to the native sysroot and it compiled successfully despite picking up
the header from the wrong place.

There are a few python recipes that export these variables explicitly,
but it doesn't seem like something that clients should have to know
about.

From python-pycurl:

# need to export these variables for python-config to work
export BUILD_SYS
export HOST_SYS
export STAGING_INCDIR
export STAGING_LIBDIR
This is also done in python-pygobject and python-dbus. Is this
something that distutils.bbclass should do?

On Sat, Oct 18, 2014 at 6:03 AM, Martin Jansa <martin.jansa@...> wrote:
On Sat, Oct 18, 2014 at 11:32:47AM +0200, Neuer User wrote:
Am 18.10.2014 um 11:10 schrieb Martin Jansa:
On Sat, Oct 18, 2014 at 10:51:30AM +0200, Neuer User wrote:
http://git.openembedded.org/openembedded-core/commit/?h=daisy&id=de5797b27a358954eb15318d0d77ad1981981861
THANKS A LOT!!!

This is it. This patch broke the recipe. I reverted it and it runs
through now without error.

THANKS A LOT!!!

What shall we do now? Is this a bug in this patch? Or does my recipe
need some adaptation?
+ Tyler Hall

My guess is that your app is receiving the include path with sysroot
prefix now from sysconfig and then adds another sysroot prefix so it
points to non-existent directory, check the include paths (e.g. run
make -n in your configured qmake project) and if it's the
case then debug where it's added (OE_QMAKE_DEBUG_OUTPUT = "-d" should
help)

--
Martin 'JaMa' Jansa jabber: Martin.Jansa@...


Neuer User <auslands-kv@...>
 

Am 18.10.2014 um 23:33 schrieb Tyler Hall:

# need to export these variables for python-config to work
export BUILD_SYS
export HOST_SYS
export STAGING_INCDIR
export STAGING_LIBDIR
Tested and this works, when added to my pyotherside recipe.

It is indeed not very intuitive, but writing recipes is anyway something
mysterical (e.g. I need to inherit python3-native, whereas pycurl only
inherits distutils; strange).

Thanks a lot. This is probably the best solution.