Skip to contentSkip to conversation

gdb-cross-canadian: fix enabling of Python support

PATCH In review Jonathan Liu 2 participants 7 messages Mar 25, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gdb-cross-canadian: fix enabling of Python support

Python support was not being enabled because of a conflicting --without-python configure argument in OE_EXTRACONF.

---
 meta/recipes-devtools/gdb/gdb-cross-canadian.inc | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-devtools/gdb/gdb-cross-canadian.inc +1 -0
index ae97759..6fd3e3e 100644
@@ -13,6 +13,7 @@ RDEPENDS_${PN} += "nativesdk-python-core nativesdk-python-lang nativesdk-python-
 
 GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
 
+EXTRA_OECONF_remove = "--without-python"
 EXTRA_OECONF_append = " --with-python=${WORKDIR}/python"
 
 SSTATE_DUPWHITELIST += "${STAGING_DATADIR}/gdb"
Signature · 1 line
2.7.3
#1 lore raw
Quoted 14 lines · Jonathan Liu

Python support was not being enabled because of a conflicting --without-python configure argument in OE_EXTRACONF.

---
 meta/recipes-devtools/gdb/gdb-cross-canadian.inc | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-devtools/gdb/gdb-cross-canadian.inc +0 -0
index ae97759..6fd3e3e 100644

meta/recipes-devtools/gdb/gdb-cross-canadian.inc RDEPENDS_${PN} += "nativesdk-python-core nativesdk · line 17

Quoted 6 lines
meta/recipes-devtools/gdb/gdb-cross-canadian.inc +1 -1
@@ -13,6 +13,7 @@ RDEPENDS_${PN} += "nativesdk-python-core nativesdk
-python-lang nativesdk-python-
 
 GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
 
+EXTRA_OECONF_remove = "--without-python"
 EXTRA_OECONF_append = " --with-python=${WORKDIR}/python"

Would a PACKAGECONFIG += "python" have the same effect?

Cheers,

Richard

#2 lore raw

Hi Richard,

Quoted 19 lines · Richard Purdie
Quoted 18 lines · Jonathan Liu

Python support was not being enabled because of a conflicting --without-python configure argument in OE_EXTRACONF.

---
 meta/recipes-devtools/gdb/gdb-cross-canadian.inc | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-devtools/gdb/gdb-cross-canadian.inc +0 -1
index ae97759..6fd3e3e 100644
@@ -13,6 +13,7 @@ RDEPENDS_${PN} += "nativesdk-python-core nativesdk
-python-lang nativesdk-python-
 
 GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
 
Quoted 11 lines

meta/recipes-devtools/gdb/gdb-cross-canadian.inc RDEPENDS_${PN} += "nativesdk-python-core nativesdk-python-lang nativesdk-python- · line 17

Quoted 2 lines
meta/recipes-devtools/gdb/gdb-cross-canadian.inc +1 -0
+EXTRA_OECONF_remove = "--without-python"
 EXTRA_OECONF_append = " --with-python=${WORKDIR}/python"

Would a PACKAGECONFIG += "python" have the same effect?

Cheers,

Richard

No, it wouldn't. It would depend on python and python-codecs then fail when building SDK.

Regards,
Jonathan

#3 lore raw
Quoted 31 lines · Jonathan Liu

Hi Richard,

Quoted 27 lines · Richard Purdie
Quoted 15 lines · Jonathan Liu

Python support was not being enabled because of a conflicting --without-python configure argument in OE_EXTRACONF.

---
 meta/recipes-devtools/gdb/gdb-cross-canadian.inc | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-devtools/gdb/gdb-cross-canadian.inc +0 -0
index ae97759..6fd3e3e 100644
@@ -13,6 +13,7 @@ RDEPENDS_${PN} += "nativesdk-python-core

nativesdk

meta/recipes-devtools/gdb/gdb-cross-canadian.inc RDEPENDS_${PN} += "nativesdk-python-core nativesdk-python-lang nativesdk-python- · line 17

Quoted 6 lines
meta/recipes-devtools/gdb/gdb-cross-canadian.inc +1 -1
-python-lang nativesdk-python-
 
 GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
 
+EXTRA_OECONF_remove = "--without-python"
 EXTRA_OECONF_append = " --with-python=${WORKDIR}/python"

Would a PACKAGECONFIG += "python" have the same effect?

Cheers,

Quoted 8 lines
Quoted 4 lines

Richard

No, it wouldn't. It would depend on python and python-codecs then fail
when building SDK.

Ok, I still don't think the above is the right fix though as it still leaves things fragile, if for example I try and enable python for gdb by default on target.

I think we may need to do something like:

-PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without -python,python,python python-codecs"
+ PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without -python,python,${GDBPYTHON_RDEPENDS}"

+GDBPYTHON_RDEPENDS = "python python-codecs"

and then set:

GDBPYTHON_RDEPENDS = ""
PACKAGECONFIG += "python"

in the cross recipes.

Would that work?

Cheers,

Richard

#4 lore raw

Hi Richard,

Quoted 59 lines · Richard Purdie
Quoted 31 lines · Jonathan Liu

Hi Richard,

Quoted 27 lines · Richard Purdie
Quoted 15 lines · Jonathan Liu

Python support was not being enabled because of a conflicting --without-python configure argument in OE_EXTRACONF.

---
 meta/recipes-devtools/gdb/gdb-cross-canadian.inc | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-devtools/gdb/gdb-cross-canadian.inc +0 -0
index ae97759..6fd3e3e 100644
@@ -13,6 +13,7 @@ RDEPENDS_${PN} += "nativesdk-python-core

nativesdk

meta/recipes-devtools/gdb/gdb-cross-canadian.inc RDEPENDS_${PN} += "nativesdk-python-core nativesdk-python-lang nativesdk-python- · line 17

Quoted 6 lines
meta/recipes-devtools/gdb/gdb-cross-canadian.inc +1 -1
-python-lang nativesdk-python-
 
 GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
 
+EXTRA_OECONF_remove = "--without-python"
 EXTRA_OECONF_append = " --with-python=${WORKDIR}/python"

Would a PACKAGECONFIG += "python" have the same effect?

Cheers,

Quoted 8 lines
Quoted 4 lines

Richard

No, it wouldn't. It would depend on python and python-codecs then fail
when building SDK.

Ok, I still don't think the above is the right fix though as it still leaves things fragile, if for example I try and enable python for gdb by default on target.

I think we may need to do something like:

(quoted diff) +2 -3
-PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without
-python,python,python python-codecs"
+ PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without
-python,python,${GDBPYTHON_RDEPENDS}"
 
+GDBPYTHON_RDEPENDS = "python python-codecs"

and then set:

GDBPYTHON_RDEPENDS = ""
PACKAGECONFIG += "python"

Quoted 7 lines

in the cross recipes.

Would that work?

Cheers,

Richard

The path to python is different too.
gdb-cross.inc: EXTRA_OECONF += "--with-python=${STAGING_BINDIR_NATIVE}/python-native/python" gdb-cross-canadian.inc: EXTRA_OECONF_append = " --with-python=${WORKDIR}/python"

Does it really make sense to have these PACKAGECONFIG options in a common include?
babeltrace for example doesn't have have BBCLASSEXTEND for native and nativesdk.

I wonder if the commit should just be reverted.

Regards,
Jonathan

#5 lore raw
Quoted 80 lines · Jonathan Liu

Hi Richard,

Quoted 62 lines · Richard Purdie
Quoted 31 lines · Jonathan Liu

Hi Richard,

Quoted 27 lines · Richard Purdie
Quoted 15 lines · Jonathan Liu

Python support was not being enabled because of a conflicting --without-python configure argument in OE_EXTRACONF.

---
 meta/recipes-devtools/gdb/gdb-cross-canadian.inc | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-devtools/gdb/gdb-cross-canadian.inc +0 -0
index ae97759..6fd3e3e 100644
@@ -13,6 +13,7 @@ RDEPENDS_${PN} += "nativesdk-python-core

nativesdk

meta/recipes-devtools/gdb/gdb-cross-canadian.inc RDEPENDS_${PN} += "nativesdk-python-core nativesdk-python-lang nativesdk-python- · line 17

Quoted 6 lines
meta/recipes-devtools/gdb/gdb-cross-canadian.inc +1 -1
-python-lang nativesdk-python-
 
 GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
 
+EXTRA_OECONF_remove = "--without-python"
 EXTRA_OECONF_append = " --with-python=${WORKDIR}/python"

Would a PACKAGECONFIG += "python" have the same effect?

Cheers,

Quoted 8 lines
Quoted 4 lines

Richard

No, it wouldn't. It would depend on python and python-codecs then fail
when building SDK.

Ok, I still don't think the above is the right fix though as it still
leaves things fragile, if for example I try and enable python for gdb
by default on target.

I think we may need to do something like:

(quoted diff) +2 -4
-PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without
-python,python,python python-codecs"
+ PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,-
-without
-python,python,${GDBPYTHON_RDEPENDS}"
 
+GDBPYTHON_RDEPENDS = "python python-codecs"

and then set:

GDBPYTHON_RDEPENDS = ""
PACKAGECONFIG += "python"

Quoted 7 lines

in the cross recipes.

Would that work?

Cheers,

Richard

The path to python is different too.
gdb-cross.inc: EXTRA_OECONF += "--with-python=${STAGING_BINDIR_NATIVE}/python-native/python" gdb-cross-canadian.inc: EXTRA_OECONF_append = " --with -python=${WORKDIR}/python"

Quoted 6 lines

Does it really make sense to have these PACKAGECONFIG options in a common include?
babeltrace for example doesn't have have BBCLASSEXTEND for native and nativesdk.

I wonder if the commit should just be reverted.

The original code had other bugs and was very confused about other options which should have been enabled or not enabled in various combinations. So whilst we could revert it, it just swaps this issue for others.

Given your comments above, I think the best option might be to set:

PACKAGECONFIG += "python"
PACKAGECONFIG[python] = "--with-python=${STAGING_BINDIR_NATIVE}/python-native/python,--without-python,python"

in gcc-cross-canadian since that should correctly override the problem cases yet make it clearer what is going on. A comment about it would also likely be good.

Cheers,

Richard

#6 lore raw
In reply to Jonathan Liu
Quoted 21 lines · Jonathan Liu

Python support was not being enabled because of a conflicting --without-python configure argument in OE_EXTRACONF.

---
 meta/recipes-devtools/gdb/gdb-cross-canadian.inc | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-devtools/gdb/gdb-cross-canadian.inc +1 -1
index ae97759..6fd3e3e 100644
@@ -13,6 +13,7 @@ RDEPENDS_${PN} += "nativesdk-python-core nativesdk-python-lang nativesdk-python-
 
 GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
 
+EXTRA_OECONF_remove = "--without-python"
 EXTRA_OECONF_append = " --with-python=${WORKDIR}/python"
 
 SSTATE_DUPWHITELIST += "${STAGING_DATADIR}/gdb"
--
Quoted 2 lines

2.7.3

Please ignore this patch.
It is is replaced by "gdb-cross-canadian: use PACKAGECONFIG for python and readline".

Regards,
Jonathan