All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe] gdb-cross-canadian: build gdb with python support
@ 2011-12-23  7:12 Eric Bénard
  2011-12-23 11:02 ` Otavio Salvador
  2012-01-04  5:18 ` Khem Raj
  0 siblings, 2 replies; 19+ messages in thread
From: Eric Bénard @ 2011-12-23  7:12 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Eric Bénard

* python support is needed for providing finer scripting control
in gdb, and for remote controling gdb for example from qtcreator
* gdb/configure tries to autodetect python using python executable
with --includes --ldflags --exec-prefix to get the right flags
As it's difficult to achieve in OE's context, we generate a
script which will return the right values and make gdb's build
system happy. This idea was taken from the following article :
http://www.mentby.com/doug-evans-2/python-enabled-gdb-on-windows-and-relocation.html
* tested using angstrom & armv7/armv5 targets & qtcreator 201005 & 2.4.0

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 .../gdb/gdb-cross-canadian_7.3.1.bbappend          |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)
 create mode 100644 meta-oe/recipes-devtools/gdb/gdb-cross-canadian_7.3.1.bbappend

diff --git a/meta-oe/recipes-devtools/gdb/gdb-cross-canadian_7.3.1.bbappend b/meta-oe/recipes-devtools/gdb/gdb-cross-canadian_7.3.1.bbappend
new file mode 100644
index 0000000..3bbfe38
--- /dev/null
+++ b/meta-oe/recipes-devtools/gdb/gdb-cross-canadian_7.3.1.bbappend
@@ -0,0 +1,20 @@
+DEPENDS += "python-nativesdk"
+RDEPENDS += "python-nativesdk-core python-nativesdk-lang python-nativesdk-re \
+			 python-nativesdk-codecs python-nativesdk-netclient"
+
+EXTRA_OECONF_append = "--with-python=${WORKDIR}/python"
+PRINC = "1"
+
+do_configure_prepend() {
+cat > ${WORKDIR}/python << EOF
+#! /bin/sh
+case "\$2" in
+	--includes) echo "-I${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}${exec_prefix}/include/python${PYTHON_BASEVERSION}/" ;;
+	--ldflags) echo "-L${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}${libdir}/python${PYTHON_BASEVERSION}/config/config -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;;
+	--exec-prefix) echo "/usr" ;;
+	*) exit 1 ;;
+esac
+exit 0
+EOF
+	chmod +x ${WORKDIR}/python
+}
-- 
1.7.6.4




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

* Re: [meta-oe] gdb-cross-canadian: build gdb with python support
  2011-12-23  7:12 [meta-oe] gdb-cross-canadian: build gdb with python support Eric Bénard
@ 2011-12-23 11:02 ` Otavio Salvador
  2012-01-04  5:18 ` Khem Raj
  1 sibling, 0 replies; 19+ messages in thread
From: Otavio Salvador @ 2011-12-23 11:02 UTC (permalink / raw)
  To: openembedded-devel

+1 :-) very cool :-D

2011/12/23 Eric Bénard <eric@eukrea.com>

> * python support is needed for providing finer scripting control
> in gdb, and for remote controling gdb for example from qtcreator
> * gdb/configure tries to autodetect python using python executable
> with --includes --ldflags --exec-prefix to get the right flags
> As it's difficult to achieve in OE's context, we generate a
> script which will return the right values and make gdb's build
> system happy. This idea was taken from the following article :
>
> http://www.mentby.com/doug-evans-2/python-enabled-gdb-on-windows-and-relocation.html
> * tested using angstrom & armv7/armv5 targets & qtcreator 201005 & 2.4.0
>
> Signed-off-by: Eric Bénard <eric@eukrea.com>
> ---
>  .../gdb/gdb-cross-canadian_7.3.1.bbappend          |   20
> ++++++++++++++++++++
>  1 files changed, 20 insertions(+), 0 deletions(-)
>  create mode 100644
> meta-oe/recipes-devtools/gdb/gdb-cross-canadian_7.3.1.bbappend
>
> diff --git
> a/meta-oe/recipes-devtools/gdb/gdb-cross-canadian_7.3.1.bbappend
> b/meta-oe/recipes-devtools/gdb/gdb-cross-canadian_7.3.1.bbappend
> new file mode 100644
> index 0000000..3bbfe38
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/gdb/gdb-cross-canadian_7.3.1.bbappend
> @@ -0,0 +1,20 @@
> +DEPENDS += "python-nativesdk"
> +RDEPENDS += "python-nativesdk-core python-nativesdk-lang
> python-nativesdk-re \
> +                        python-nativesdk-codecs
> python-nativesdk-netclient"
> +
> +EXTRA_OECONF_append = "--with-python=${WORKDIR}/python"
> +PRINC = "1"
> +
> +do_configure_prepend() {
> +cat > ${WORKDIR}/python << EOF
> +#! /bin/sh
> +case "\$2" in
> +       --includes) echo
> "-I${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}${exec_prefix}/include/python${PYTHON_BASEVERSION}/"
> ;;
> +       --ldflags) echo
> "-L${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}${libdir}/python${PYTHON_BASEVERSION}/config/config
> -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;;
> +       --exec-prefix) echo "/usr" ;;
> +       *) exit 1 ;;
> +esac
> +exit 0
> +EOF
> +       chmod +x ${WORKDIR}/python
> +}
> --
> 1.7.6.4
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>



-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br


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

* Re: [meta-oe] gdb-cross-canadian: build gdb with python support
  2011-12-23  7:12 [meta-oe] gdb-cross-canadian: build gdb with python support Eric Bénard
  2011-12-23 11:02 ` Otavio Salvador
@ 2012-01-04  5:18 ` Khem Raj
  2012-01-04  8:05   ` Eric Bénard
  1 sibling, 1 reply; 19+ messages in thread
From: Khem Raj @ 2012-01-04  5:18 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Eric Bénard

On (23/12/11 08:12), Eric Bénard wrote:
> * python support is needed for providing finer scripting control
> in gdb, and for remote controling gdb for example from qtcreator
> * gdb/configure tries to autodetect python using python executable
> with --includes --ldflags --exec-prefix to get the right flags
> As it's difficult to achieve in OE's context, we generate a
> script which will return the right values and make gdb's build
> system happy. This idea was taken from the following article :
> http://www.mentby.com/doug-evans-2/python-enabled-gdb-on-windows-and-relocation.html
> * tested using angstrom & armv7/armv5 targets & qtcreator 201005 & 2.4.0

I think this change should go into oe-core. Can you please redo it
w.r.t. oe-core 

> 
> Signed-off-by: Eric Bénard <eric@eukrea.com>
> ---
>  .../gdb/gdb-cross-canadian_7.3.1.bbappend          |   20 ++++++++++++++++++++
>  1 files changed, 20 insertions(+), 0 deletions(-)
>  create mode 100644 meta-oe/recipes-devtools/gdb/gdb-cross-canadian_7.3.1.bbappend
> 
> diff --git a/meta-oe/recipes-devtools/gdb/gdb-cross-canadian_7.3.1.bbappend b/meta-oe/recipes-devtools/gdb/gdb-cross-canadian_7.3.1.bbappend
> new file mode 100644
> index 0000000..3bbfe38
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/gdb/gdb-cross-canadian_7.3.1.bbappend
> @@ -0,0 +1,20 @@
> +DEPENDS += "python-nativesdk"
> +RDEPENDS += "python-nativesdk-core python-nativesdk-lang python-nativesdk-re \
> +			 python-nativesdk-codecs python-nativesdk-netclient"
> +
> +EXTRA_OECONF_append = "--with-python=${WORKDIR}/python"
> +PRINC = "1"
> +
> +do_configure_prepend() {
> +cat > ${WORKDIR}/python << EOF
> +#! /bin/sh
> +case "\$2" in
> +	--includes) echo "-I${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}${exec_prefix}/include/python${PYTHON_BASEVERSION}/" ;;
> +	--ldflags) echo "-L${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}${libdir}/python${PYTHON_BASEVERSION}/config/config -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;;
> +	--exec-prefix) echo "/usr" ;;
> +	*) exit 1 ;;
> +esac
> +exit 0
> +EOF
> +	chmod +x ${WORKDIR}/python
> +}
> -- 
> 1.7.6.4
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

-- 
-Khem



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

* Re: [meta-oe] gdb-cross-canadian: build gdb with python support
  2012-01-04  5:18 ` Khem Raj
@ 2012-01-04  8:05   ` Eric Bénard
  2012-02-02  7:45     ` Martin Jansa
  0 siblings, 1 reply; 19+ messages in thread
From: Eric Bénard @ 2012-01-04  8:05 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-devel

Hi Khem,

Le Tue, 3 Jan 2012 21:18:49 -0800,
Khem Raj <raj.khem@gmail.com> a écrit :
> On (23/12/11 08:12), Eric Bénard wrote:
> > * python support is needed for providing finer scripting control
> > in gdb, and for remote controling gdb for example from qtcreator
> > * gdb/configure tries to autodetect python using python executable
> > with --includes --ldflags --exec-prefix to get the right flags
> > As it's difficult to achieve in OE's context, we generate a
> > script which will return the right values and make gdb's build
> > system happy. This idea was taken from the following article :
> > http://www.mentby.com/doug-evans-2/python-enabled-gdb-on-windows-and-relocation.html
> > * tested using angstrom & armv7/armv5 targets & qtcreator 201005 & 2.4.0
> 
> I think this change should go into oe-core. Can you please redo it
> w.r.t. oe-core 
> 
I agree with you, I initally submited it for oe-core and was asked
to put it into meta-oe by Jessica :
http://lists.linuxtogo.org/pipermail/openembedded-core/2011-December/014828.html
http://lists.linuxtogo.org/pipermail/openembedded-core/2011-December/014833.html

Eric



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

* Re: [meta-oe] gdb-cross-canadian: build gdb with python support
  2012-01-04  8:05   ` Eric Bénard
@ 2012-02-02  7:45     ` Martin Jansa
  2012-02-02  8:06       ` Eric Bénard
                         ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Martin Jansa @ 2012-02-02  7:45 UTC (permalink / raw)
  To: openembedded-devel

On Wed, Jan 4, 2012 at 9:05 AM, Eric Bénard <eric@eukrea.com> wrote:
> Hi Khem,
>
> Le Tue, 3 Jan 2012 21:18:49 -0800,
> Khem Raj <raj.khem@gmail.com> a écrit :
>> On (23/12/11 08:12), Eric Bénard wrote:
>> > * python support is needed for providing finer scripting control
>> > in gdb, and for remote controling gdb for example from qtcreator
>> > * gdb/configure tries to autodetect python using python executable
>> > with --includes --ldflags --exec-prefix to get the right flags
>> > As it's difficult to achieve in OE's context, we generate a
>> > script which will return the right values and make gdb's build
>> > system happy. This idea was taken from the following article :
>> > http://www.mentby.com/doug-evans-2/python-enabled-gdb-on-windows-and-relocation.html
>> > * tested using angstrom & armv7/armv5 targets & qtcreator 201005 & 2.4.0
>>
>> I think this change should go into oe-core. Can you please redo it
>> w.r.t. oe-core
>>
> I agree with you, I initally submited it for oe-core and was asked
> to put it into meta-oe by Jessica :
> http://lists.linuxtogo.org/pipermail/openembedded-core/2011-December/014828.html
> http://lists.linuxtogo.org/pipermail/openembedded-core/2011-December/014833.html
>
> Eric

Hi Eric,

with this patch I see gdb-cross-canadian_7.3.1.bb failing with:
| checking whether to use python...
/OE/shr-core/tmp/work/x86_64-nativesdk-oesdk-linux/gdb-cross-canadian-arm/gdb-cross-canadian-arm-7.3.1-r5.1/python
| checking for python2.7... no
| configure: error: no usable python found at
/OE/shr-core/tmp/work/x86_64-nativesdk-oesdk-linux/gdb-cross-canadian-arm/gdb-cross-canadian-arm-7.3.1-r5.1/python

and
/OE/shr-core/tmp/work/x86_64-nativesdk-oesdk-linux/gdb-cross-canadian-arm/gdb-cross-canadian-arm-7.3.1-r5.1/python
is really script from this patch

Any hint how to fix this?

Cheers,



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

* Re: [meta-oe] gdb-cross-canadian: build gdb with python support
  2012-02-02  7:45     ` Martin Jansa
@ 2012-02-02  8:06       ` Eric Bénard
  2012-02-02  8:40       ` Martin Jansa
  2012-02-02  8:58       ` Eric Bénard
  2 siblings, 0 replies; 19+ messages in thread
From: Eric Bénard @ 2012-02-02  8:06 UTC (permalink / raw)
  To: openembedded-devel

Hi Martin,

Le Thu, 2 Feb 2012 08:45:13 +0100,
Martin Jansa <martin.jansa@gmail.com> a écrit :

> On Wed, Jan 4, 2012 at 9:05 AM, Eric Bénard <eric@eukrea.com> wrote:
> > Hi Khem,
> >
> > Le Tue, 3 Jan 2012 21:18:49 -0800,
> > Khem Raj <raj.khem@gmail.com> a écrit :
> >> On (23/12/11 08:12), Eric Bénard wrote:
> >> > * python support is needed for providing finer scripting control
> >> > in gdb, and for remote controling gdb for example from qtcreator
> >> > * gdb/configure tries to autodetect python using python executable
> >> > with --includes --ldflags --exec-prefix to get the right flags
> >> > As it's difficult to achieve in OE's context, we generate a
> >> > script which will return the right values and make gdb's build
> >> > system happy. This idea was taken from the following article :
> >> > http://www.mentby.com/doug-evans-2/python-enabled-gdb-on-windows-and-relocation.html
> >> > * tested using angstrom & armv7/armv5 targets & qtcreator 201005 & 2.4.0
> >>
> >> I think this change should go into oe-core. Can you please redo it
> >> w.r.t. oe-core
> >>
> > I agree with you, I initally submited it for oe-core and was asked
> > to put it into meta-oe by Jessica :
> > http://lists.linuxtogo.org/pipermail/openembedded-core/2011-December/014828.html
> > http://lists.linuxtogo.org/pipermail/openembedded-core/2011-December/014833.html
> >
> > Eric
> 
> Hi Eric,
> 
> with this patch I see gdb-cross-canadian_7.3.1.bb failing with:
> | checking whether to use python...
> /OE/shr-core/tmp/work/x86_64-nativesdk-oesdk-linux/gdb-cross-canadian-arm/gdb-cross-canadian-arm-7.3.1-r5.1/python
> | checking for python2.7... no
> | configure: error: no usable python found at
> /OE/shr-core/tmp/work/x86_64-nativesdk-oesdk-linux/gdb-cross-canadian-arm/gdb-cross-canadian-arm-7.3.1-r5.1/python
> 
> and
> /OE/shr-core/tmp/work/x86_64-nativesdk-oesdk-linux/gdb-cross-canadian-arm/gdb-cross-canadian-arm-7.3.1-r5.1/python
> is really script from this patch
> 
> Any hint how to fix this?
> 
can you check the content of :
${WORKDIR}/python
and if
${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}${exec_prefix}/include/python${PYTHON_BASEVERSION}/
and
${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}${libdir}/python${PYTHON_BASEVERSION}/config/config  
exist ?

Eric



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

* Re: [meta-oe] gdb-cross-canadian: build gdb with python support
  2012-02-02  7:45     ` Martin Jansa
  2012-02-02  8:06       ` Eric Bénard
@ 2012-02-02  8:40       ` Martin Jansa
  2012-02-02  9:17         ` Martin Jansa
  2012-02-02  8:58       ` Eric Bénard
  2 siblings, 1 reply; 19+ messages in thread
From: Martin Jansa @ 2012-02-02  8:40 UTC (permalink / raw)
  To: openembedded-devel

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

On Thu, Feb 02, 2012 at 08:45:13AM +0100, Martin Jansa wrote:
> On Wed, Jan 4, 2012 at 9:05 AM, Eric Bénard <eric@eukrea.com> wrote:
> > Hi Khem,
> >
> > Le Tue, 3 Jan 2012 21:18:49 -0800,
> > Khem Raj <raj.khem@gmail.com> a écrit :
> >> On (23/12/11 08:12), Eric Bénard wrote:
> >> > * python support is needed for providing finer scripting control
> >> > in gdb, and for remote controling gdb for example from qtcreator
> >> > * gdb/configure tries to autodetect python using python executable
> >> > with --includes --ldflags --exec-prefix to get the right flags
> >> > As it's difficult to achieve in OE's context, we generate a
> >> > script which will return the right values and make gdb's build
> >> > system happy. This idea was taken from the following article :
> >> > http://www.mentby.com/doug-evans-2/python-enabled-gdb-on-windows-and-relocation.html
> >> > * tested using angstrom & armv7/armv5 targets & qtcreator 201005 & 2.4.0
> >>
> >> I think this change should go into oe-core. Can you please redo it
> >> w.r.t. oe-core
> >>
> > I agree with you, I initally submited it for oe-core and was asked
> > to put it into meta-oe by Jessica :
> > http://lists.linuxtogo.org/pipermail/openembedded-core/2011-December/014828.html
> > http://lists.linuxtogo.org/pipermail/openembedded-core/2011-December/014833.html
> >
> > Eric
> 
> Hi Eric,
> 
> with this patch I see gdb-cross-canadian_7.3.1.bb failing with:
> | checking whether to use python...
> /OE/shr-core/tmp/work/x86_64-nativesdk-oesdk-linux/gdb-cross-canadian-arm/gdb-cross-canadian-arm-7.3.1-r5.1/python
> | checking for python2.7... no
> | configure: error: no usable python found at
> /OE/shr-core/tmp/work/x86_64-nativesdk-oesdk-linux/gdb-cross-canadian-arm/gdb-cross-canadian-arm-7.3.1-r5.1/python
> 
> and
> /OE/shr-core/tmp/work/x86_64-nativesdk-oesdk-linux/gdb-cross-canadian-arm/gdb-cross-canadian-arm-7.3.1-r5.1/python
> is really script from this patch
> 
> Any hint how to fix this?

And here are details from:
gdb-cross-canadian-arm-7.3.1-r5.1/build-arm-oe-linux-gnueabi/gdb/config.log

configure:10440: $? = 0
configure:10440: result: yes
configure:10465: checking whether to use python
configure:10467: result: /OE/shr-core/tmp/work/x86_64-nativesdk-oesdk-linux/gdb-cross-canadian-arm/gdb-cross-canadian-arm-7.3.1-r5.1/python
configure:10685: checking for python2.7
configure:10703: x86_64-oesdk-linux-gcc  --sysroot=/OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux -o conftest -isystem/OE/shr-core/tmp/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/include -O2 -pipe -isystem/OE/shr-core/tmp/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/include  -I/OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/include/python2.7/  -L/OE/shr-core/tmp/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/lib/armv4t-oe-linux-gnueabi -Wl,-rpath-link,/OE/shr-core/tmp/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/lib/armv4t-oe-linux-gnueabi -Wl,-rpath,/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/lib/armv4t-oe-linux-gnueabi -Wl,-O1 -L/OE/shr-core/tmp/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/lib -Wl,-rpath-link,/OE/shr-core/tmp/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/lib -Wl,-rpath,/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/lib -Wl,-O1 conftest.c -lncurses -lz -lm    -L/OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/lib/armv4t-oe-linux-gnueabi/python2.7/config/config -lpthread -ldl -lutil -lm -lpython2.7 >&5
conftest.c:91:20: fatal error: Python.h: No such file or directory
compilation terminated.

And Python.h is in
/OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/include/python2.7/Python.h
not
/OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/include/python2.7/

oecore-x86_64-arm doesn't exist at all in /OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local

Cheers,
-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

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

* Re: [meta-oe] gdb-cross-canadian: build gdb with python support
  2012-02-02  7:45     ` Martin Jansa
  2012-02-02  8:06       ` Eric Bénard
  2012-02-02  8:40       ` Martin Jansa
@ 2012-02-02  8:58       ` Eric Bénard
  2 siblings, 0 replies; 19+ messages in thread
From: Eric Bénard @ 2012-02-02  8:58 UTC (permalink / raw)
  To: openembedded-devel

Hi Martin,

(sorry if you get the mail twice, I'm trying with a new smtp as the
previous one seems to have high latency with mailing lists).

Le Thu, 2 Feb 2012 08:45:13 +0100,
Martin Jansa <martin.jansa@gmail.com> a écrit :

> On Wed, Jan 4, 2012 at 9:05 AM, Eric Bénard <eric@eukrea.com> wrote:  
> > Hi Khem,
> >
> > Le Tue, 3 Jan 2012 21:18:49 -0800,
> > Khem Raj <raj.khem@gmail.com> a écrit :  
> >> On (23/12/11 08:12), Eric Bénard wrote:  
> >> > * python support is needed for providing finer scripting control
> >> > in gdb, and for remote controling gdb for example from qtcreator
> >> > * gdb/configure tries to autodetect python using python executable
> >> > with --includes --ldflags --exec-prefix to get the right flags
> >> > As it's difficult to achieve in OE's context, we generate a
> >> > script which will return the right values and make gdb's build
> >> > system happy. This idea was taken from the following article :
> >> > http://www.mentby.com/doug-evans-2/python-enabled-gdb-on-windows-and-relocation.html
> >> > * tested using angstrom & armv7/armv5 targets & qtcreator 201005 & 2.4.0  
> >>
> >> I think this change should go into oe-core. Can you please redo it
> >> w.r.t. oe-core
> >>  
> > I agree with you, I initally submited it for oe-core and was asked
> > to put it into meta-oe by Jessica :
> > http://lists.linuxtogo.org/pipermail/openembedded-core/2011-December/014828.html
> > http://lists.linuxtogo.org/pipermail/openembedded-core/2011-December/014833.html
> >
> > Eric  
> 
> Hi Eric,
> 
> with this patch I see gdb-cross-canadian_7.3.1.bb failing with:
> | checking whether to use python...
> /OE/shr-core/tmp/work/x86_64-nativesdk-oesdk-linux/gdb-cross-canadian-arm/gdb-cross-canadian-arm-7.3.1-r5.1/python
> | checking for python2.7... no
> | configure: error: no usable python found at
> /OE/shr-core/tmp/work/x86_64-nativesdk-oesdk-linux/gdb-cross-canadian-arm/gdb-cross-canadian-arm-7.3.1-r5.1/python
> 
> and
> /OE/shr-core/tmp/work/x86_64-nativesdk-oesdk-linux/gdb-cross-canadian-arm/gdb-cross-canadian-arm-7.3.1-r5.1/python
> is really script from this patch
> 
> Any hint how to fix this?
>   
can you check the content of :
${WORKDIR}/python
and if
${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}${exec_prefix}/include/python${PYTHON_BASEVERSION}/
and
${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}${libdir}/python${PYTHON_BASEVERSION}/config/config  
exist ?

Eric
-- 
http://eukrea.com/en/news/104-2012



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

* Re: [meta-oe] gdb-cross-canadian: build gdb with python support
  2012-02-02  8:40       ` Martin Jansa
@ 2012-02-02  9:17         ` Martin Jansa
  2012-02-02 10:11           ` Eric Bénard
  0 siblings, 1 reply; 19+ messages in thread
From: Martin Jansa @ 2012-02-02  9:17 UTC (permalink / raw)
  To: openembedded-devel

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

On Thu, Feb 02, 2012 at 09:40:00AM +0100, Martin Jansa wrote:
> On Thu, Feb 02, 2012 at 08:45:13AM +0100, Martin Jansa wrote:
> > On Wed, Jan 4, 2012 at 9:05 AM, Eric Bénard <eric@eukrea.com> wrote:
> > > Hi Khem,
> > >
> > > Le Tue, 3 Jan 2012 21:18:49 -0800,
> > > Khem Raj <raj.khem@gmail.com> a écrit :
> > >> On (23/12/11 08:12), Eric Bénard wrote:
> > >> > * python support is needed for providing finer scripting control
> > >> > in gdb, and for remote controling gdb for example from qtcreator
> > >> > * gdb/configure tries to autodetect python using python executable
> > >> > with --includes --ldflags --exec-prefix to get the right flags
> > >> > As it's difficult to achieve in OE's context, we generate a
> > >> > script which will return the right values and make gdb's build
> > >> > system happy. This idea was taken from the following article :
> > >> > http://www.mentby.com/doug-evans-2/python-enabled-gdb-on-windows-and-relocation.html
> > >> > * tested using angstrom & armv7/armv5 targets & qtcreator 201005 & 2.4.0
> > >>
> > >> I think this change should go into oe-core. Can you please redo it
> > >> w.r.t. oe-core
> > >>
> > > I agree with you, I initally submited it for oe-core and was asked
> > > to put it into meta-oe by Jessica :
> > > http://lists.linuxtogo.org/pipermail/openembedded-core/2011-December/014828.html
> > > http://lists.linuxtogo.org/pipermail/openembedded-core/2011-December/014833.html
> > >
> > > Eric
> > 
> > Hi Eric,
> > 
> > with this patch I see gdb-cross-canadian_7.3.1.bb failing with:
> > | checking whether to use python...
> > /OE/shr-core/tmp/work/x86_64-nativesdk-oesdk-linux/gdb-cross-canadian-arm/gdb-cross-canadian-arm-7.3.1-r5.1/python
> > | checking for python2.7... no
> > | configure: error: no usable python found at
> > /OE/shr-core/tmp/work/x86_64-nativesdk-oesdk-linux/gdb-cross-canadian-arm/gdb-cross-canadian-arm-7.3.1-r5.1/python
> > 
> > and
> > /OE/shr-core/tmp/work/x86_64-nativesdk-oesdk-linux/gdb-cross-canadian-arm/gdb-cross-canadian-arm-7.3.1-r5.1/python
> > is really script from this patch
> > 
> > Any hint how to fix this?
> 
> And here are details from:
> gdb-cross-canadian-arm-7.3.1-r5.1/build-arm-oe-linux-gnueabi/gdb/config.log
> 
> configure:10440: $? = 0
> configure:10440: result: yes
> configure:10465: checking whether to use python
> configure:10467: result: /OE/shr-core/tmp/work/x86_64-nativesdk-oesdk-linux/gdb-cross-canadian-arm/gdb-cross-canadian-arm-7.3.1-r5.1/python
> configure:10685: checking for python2.7
> configure:10703: x86_64-oesdk-linux-gcc  --sysroot=/OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux -o conftest -isystem/OE/shr-core/tmp/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/include -O2 -pipe -isystem/OE/shr-core/tmp/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/include  -I/OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/include/python2.7/  -L/OE/shr-core/tmp/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/lib/armv4t-oe-linux-gnueabi -Wl,-rpath-link,/OE/shr-core/tmp/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/lib/armv4t-oe-linux-gnueabi -Wl,-rpath,/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/lib/armv4t-oe-linux-gnueabi -Wl,-O1 -L/OE/shr-core/tmp/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/lib -Wl,-rpath-link,/OE/shr-core/tmp/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/lib -Wl,-rpath,/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/lib -Wl,-O1 conftest.c -lncurses -lz -lm    -L/OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/lib/armv4t-oe-linux-gnueabi/python2.7/config/config -lpthread -ldl -lutil -lm -lpython2.7 >&5
> conftest.c:91:20: fatal error: Python.h: No such file or directory
> compilation terminated.
> 
> And Python.h is in
> /OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/include/python2.7/Python.h
> not
> /OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/include/python2.7/
> 
> oecore-x86_64-arm doesn't exist at all in /OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local

OE @ ~ $ ls /OE/shr-core/tmp/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/
oecore-x86_64-arm
OE @ ~ $ ls /OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/
oecore-x86_64-x86_64

OE @ ~ $ find /OE/shr-core/tmp/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/ -name python2.7
OE @ ~ $ find /OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/ -name python2.7
/OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/lib/python2.7
/OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/include/python2.7

and gdb is trying to use oecore-x86_64-arm in x86_64-nativesdk-oesdk-linux

Cheers,

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

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

* Re: [meta-oe] gdb-cross-canadian: build gdb with python support
  2012-02-02  9:17         ` Martin Jansa
@ 2012-02-02 10:11           ` Eric Bénard
  2012-02-03  7:28             ` Martin Jansa
  0 siblings, 1 reply; 19+ messages in thread
From: Eric Bénard @ 2012-02-02 10:11 UTC (permalink / raw)
  To: openembedded-devel

Hi Martin,

Le Thu, 2 Feb 2012 10:17:26 +0100,
Martin Jansa <martin.jansa@gmail.com> a écrit :
> OE @ ~ $ ls /OE/shr-core/tmp/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/
> oecore-x86_64-arm
> OE @ ~ $ ls /OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/
> oecore-x86_64-x86_64
> 
using Angstrom I don't have the same directories here :
[ebenard@eb-e6520 setup-scripts]$ ls
build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-nativesdk-angstromsdk-linux/usr/local/
angstrom-eglibc-x86_64-armv5te

> OE @ ~ $ find /OE/shr-core/tmp/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/ -name python2.7
> OE @ ~ $ find /OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/ -name python2.7
> /OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/lib/python2.7
> /OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/include/python2.7
> 
strange :
$ find build/tmp-angstrom_2010_x-eglibc/sysroots/ -name python2.7
build/tmp-angstrom_2010_x-eglibc/sysroots/at91sam9m10g45ek/usr/include/python2.7
build/tmp-angstrom_2010_x-eglibc/sysroots/at91sam9m10g45ek/usr/lib/python2.7
build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-nativesdk-angstromsdk-linux/usr/local/angstrom-eglibc-x86_64-armv5te/sysroots/x86_64-angstromsdk-linux/usr/include/python2.7
build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-nativesdk-angstromsdk-linux/usr/local/angstrom-eglibc-x86_64-armv5te/sysroots/x86_64-angstromsdk-linux/usr/lib/python2.7
build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/bin/python2.7
build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/include/python2.7
build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/lib/python2.7

Eric
-- 
http://eukrea.com/en/news/104-2012



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

* Re: [meta-oe] gdb-cross-canadian: build gdb with python support
  2012-02-02 10:11           ` Eric Bénard
@ 2012-02-03  7:28             ` Martin Jansa
  2012-02-03  9:41                 ` SDK confusion Was: " Martin Jansa
  0 siblings, 1 reply; 19+ messages in thread
From: Martin Jansa @ 2012-02-03  7:28 UTC (permalink / raw)
  To: openembedded-devel

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

On Thu, Feb 02, 2012 at 11:11:27AM +0100, Eric Bénard wrote:
> Hi Martin,
> 
> Le Thu, 2 Feb 2012 10:17:26 +0100,
> Martin Jansa <martin.jansa@gmail.com> a écrit :
> > OE @ ~ $ ls /OE/shr-core/tmp/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/
> > oecore-x86_64-arm
> > OE @ ~ $ ls /OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/
> > oecore-x86_64-x86_64
> > 
> using Angstrom I don't have the same directories here :
> [ebenard@eb-e6520 setup-scripts]$ ls
> build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-nativesdk-angstromsdk-linux/usr/local/
> angstrom-eglibc-x86_64-armv5te

I usually don't build SDKs, so I'm not really not familiar with
oesdk-linux-nativesdk and nativesdk-oesdk-linux differences :/

But I'll try your patch for oe-core
http://patchwork.openembedded.org/patch/17129/
with oe-core only (and distroless) and if it behaves the same I'll
report on oe-core ML.

Cheers,

> 
> > OE @ ~ $ find /OE/shr-core/tmp/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/ -name python2.7
> > OE @ ~ $ find /OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/ -name python2.7
> > /OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/lib/python2.7
> > /OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/include/python2.7
> > 
> strange :
> $ find build/tmp-angstrom_2010_x-eglibc/sysroots/ -name python2.7
> build/tmp-angstrom_2010_x-eglibc/sysroots/at91sam9m10g45ek/usr/include/python2.7
> build/tmp-angstrom_2010_x-eglibc/sysroots/at91sam9m10g45ek/usr/lib/python2.7
> build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-nativesdk-angstromsdk-linux/usr/local/angstrom-eglibc-x86_64-armv5te/sysroots/x86_64-angstromsdk-linux/usr/include/python2.7
> build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-nativesdk-angstromsdk-linux/usr/local/angstrom-eglibc-x86_64-armv5te/sysroots/x86_64-angstromsdk-linux/usr/lib/python2.7
> build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/bin/python2.7
> build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/include/python2.7
> build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/lib/python2.7
> 
> Eric
> -- 
> http://eukrea.com/en/news/104-2012
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

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

* SDK confusion Was: [oe] [meta-oe] gdb-cross-canadian: build gdb with python support
  2012-02-03  7:28             ` Martin Jansa
@ 2012-02-03  9:41                 ` Martin Jansa
  0 siblings, 0 replies; 19+ messages in thread
From: Martin Jansa @ 2012-02-03  9:41 UTC (permalink / raw)
  To: openembedded-devel; +Cc: openembedded-core

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

On Fri, Feb 03, 2012 at 08:28:08AM +0100, Martin Jansa wrote:
> On Thu, Feb 02, 2012 at 11:11:27AM +0100, Eric Bénard wrote:
> > Hi Martin,
> > 
> > Le Thu, 2 Feb 2012 10:17:26 +0100,
> > Martin Jansa <martin.jansa@gmail.com> a écrit :
> > > OE @ ~ $ ls /OE/shr-core/tmp/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/
> > > oecore-x86_64-arm
> > > OE @ ~ $ ls /OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/
> > > oecore-x86_64-x86_64
> > > 
> > using Angstrom I don't have the same directories here :
> > [ebenard@eb-e6520 setup-scripts]$ ls
> > build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-nativesdk-angstromsdk-linux/usr/local/
> > angstrom-eglibc-x86_64-armv5te
> 
> I usually don't build SDKs, so I'm not really not familiar with
> oesdk-linux-nativesdk and nativesdk-oesdk-linux differences :/
> 
> But I'll try your patch for oe-core
> http://patchwork.openembedded.org/patch/17129/
> with oe-core only (and distroless) and if it behaves the same I'll
> report on oe-core ML.

It fails the same when building from scratch for qemuarm in distroless
oe-core:

bitbake -k gdb-cross-canadian-arm
...
| checking whether to use python... /OE/oe-core/tmp-eglibc/work/x86_64-nativesdk-oesdk-linux/gdb-cross-canadian-arm-7.3.1-r5.1/python
| checking for python2.7... no
| configure: error: no usable python found at /OE/oe-core/tmp-eglibc/work/x86_64-nativesdk-oesdk-linux/gdb-cross-canadian-arm-7.3.1-r5.1/python
...

from config.log
configure:10465: checking whether to use python
configure:10467: result: /OE/oe-core/tmp-eglibc/work/x86_64-nativesdk-oesdk-linux/gdb-cross-canadian-arm-7.3.1-r5.1/python
configure:10685: checking for python2.7
configure:10703: x86_64-oesdk-linux-gcc  --sysroot=/OE/oe-core/tmp-eglibc/sysroots/x86_64-nativesdk-oesdk-linux -o conftest -isystem/OE/oe-core/tmp-eglibc/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/include -O2 -pipe -isystem/OE/oe-core/tmp-eglibc/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/include  -I/OE/oe-core/tmp-eglibc/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/include/python2.7/  -L/OE/oe-core/tmp-eglibc/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/lib/armv5te-oe-linux-gnueabi -Wl,-rpath-link,/OE/oe-core/tmp-eglibc/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/lib/armv5te-oe-linux-gnueabi -Wl,-rpath,/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/lib/armv5te-oe-linux-gnueabi -Wl,-O1 -L/OE/oe-core/tmp-eglibc/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/lib -Wl,-rpath-link,/OE/oe-core/tmp-eglibc/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/lib -Wl,-rpath,/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/lib -Wl,-O1 conftest.c -lncurses -lz -lm    -L/OE/oe-core/tmp-eglibc/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/lib/armv5te-oe-linux-gnueabi/python2.7/config/config -lpthread -ldl -lutil -lm -lpython2.7 >&5
conftest.c:91:20: fatal error: Python.h: No such file or directory

OE @ ~/oe-core/tmp-eglibc $ find sysroots/ -name python2.7
sysroots/x86_64-linux/usr/bin/python2.7
sysroots/x86_64-linux/usr/lib/python2.7
sysroots/x86_64-linux/usr/include/python2.7
sysroots/qemuarm/usr/lib/python2.7
sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/lib/python2.7
sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/include/python2.7

in x86_64-oesdk-linux there are only gcc+binutils crosssdk
binutils-crosssdk-2.22-r2  gcc-crosssdk-4.6.2+svnr181430-r22  gcc-crosssdk-initial-4.6.2+svnr181430-r22  gcc-crosssdk-intermediate-4.6.2+svnr181430-r22
the rest is in 
x86_64-nativesdk-oesdk-linux

gdb-cross-canadian-arm is only package were exec_prefix points to oecore-x86_64-arm
./gdb-cross-canadian-arm-7.3.1-r5.1/temp/run.do_configure.1688
export exec_prefix="/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr"

while all nativesdk packages are using oecore-x86_64-x86_64
./python-nativesdk-2.7.2-r0.5/temp/run.do_configure.14043
export exec_prefix="/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr"

So I think that using exec_prefix/libdir is wrong to when cross-canadian-arm is looking 
for nativesdk headers/libs. Don't know what are correct variables to use...

Cheers,

> 
> Cheers,
> 
> > 
> > > OE @ ~ $ find /OE/shr-core/tmp/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/ -name python2.7
> > > OE @ ~ $ find /OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/ -name python2.7
> > > /OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/lib/python2.7
> > > /OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/include/python2.7
> > > 
> > strange :
> > $ find build/tmp-angstrom_2010_x-eglibc/sysroots/ -name python2.7
> > build/tmp-angstrom_2010_x-eglibc/sysroots/at91sam9m10g45ek/usr/include/python2.7
> > build/tmp-angstrom_2010_x-eglibc/sysroots/at91sam9m10g45ek/usr/lib/python2.7
> > build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-nativesdk-angstromsdk-linux/usr/local/angstrom-eglibc-x86_64-armv5te/sysroots/x86_64-angstromsdk-linux/usr/include/python2.7
> > build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-nativesdk-angstromsdk-linux/usr/local/angstrom-eglibc-x86_64-armv5te/sysroots/x86_64-angstromsdk-linux/usr/lib/python2.7
> > build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/bin/python2.7
> > build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/include/python2.7
> > build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/lib/python2.7
> > 
> > Eric
> > -- 
> > http://eukrea.com/en/news/104-2012
> > 
> > _______________________________________________
> > Openembedded-devel mailing list
> > Openembedded-devel@lists.openembedded.org
> > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
> 
> -- 
> Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com



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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

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

* SDK confusion Was: [meta-oe] gdb-cross-canadian: build gdb with python support
@ 2012-02-03  9:41                 ` Martin Jansa
  0 siblings, 0 replies; 19+ messages in thread
From: Martin Jansa @ 2012-02-03  9:41 UTC (permalink / raw)
  To: openembedded-devel; +Cc: openembedded-core

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

On Fri, Feb 03, 2012 at 08:28:08AM +0100, Martin Jansa wrote:
> On Thu, Feb 02, 2012 at 11:11:27AM +0100, Eric Bénard wrote:
> > Hi Martin,
> > 
> > Le Thu, 2 Feb 2012 10:17:26 +0100,
> > Martin Jansa <martin.jansa@gmail.com> a écrit :
> > > OE @ ~ $ ls /OE/shr-core/tmp/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/
> > > oecore-x86_64-arm
> > > OE @ ~ $ ls /OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/
> > > oecore-x86_64-x86_64
> > > 
> > using Angstrom I don't have the same directories here :
> > [ebenard@eb-e6520 setup-scripts]$ ls
> > build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-nativesdk-angstromsdk-linux/usr/local/
> > angstrom-eglibc-x86_64-armv5te
> 
> I usually don't build SDKs, so I'm not really not familiar with
> oesdk-linux-nativesdk and nativesdk-oesdk-linux differences :/
> 
> But I'll try your patch for oe-core
> http://patchwork.openembedded.org/patch/17129/
> with oe-core only (and distroless) and if it behaves the same I'll
> report on oe-core ML.

It fails the same when building from scratch for qemuarm in distroless
oe-core:

bitbake -k gdb-cross-canadian-arm
...
| checking whether to use python... /OE/oe-core/tmp-eglibc/work/x86_64-nativesdk-oesdk-linux/gdb-cross-canadian-arm-7.3.1-r5.1/python
| checking for python2.7... no
| configure: error: no usable python found at /OE/oe-core/tmp-eglibc/work/x86_64-nativesdk-oesdk-linux/gdb-cross-canadian-arm-7.3.1-r5.1/python
...

from config.log
configure:10465: checking whether to use python
configure:10467: result: /OE/oe-core/tmp-eglibc/work/x86_64-nativesdk-oesdk-linux/gdb-cross-canadian-arm-7.3.1-r5.1/python
configure:10685: checking for python2.7
configure:10703: x86_64-oesdk-linux-gcc  --sysroot=/OE/oe-core/tmp-eglibc/sysroots/x86_64-nativesdk-oesdk-linux -o conftest -isystem/OE/oe-core/tmp-eglibc/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/include -O2 -pipe -isystem/OE/oe-core/tmp-eglibc/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/include  -I/OE/oe-core/tmp-eglibc/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/include/python2.7/  -L/OE/oe-core/tmp-eglibc/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/lib/armv5te-oe-linux-gnueabi -Wl,-rpath-link,/OE/oe-core/tmp-eglibc/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/lib/armv5te-oe-linux-gnueabi -Wl,-rpath,/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/lib/armv5te-oe-linux-gnueabi -Wl,-O1 -L/OE/oe-core/tmp-eglibc/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/lib -Wl,-rpath-link,/OE/oe-core/tmp-eglibc/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/lib -Wl,-rpath,/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/lib -Wl,-O1 conftest.c -lncurses -lz -lm    -L/OE/oe-core/tmp-eglibc/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr/lib/armv5te-oe-linux-gnueabi/python2.7/config/config -lpthread -ldl -lutil -lm -lpython2.7 >&5
conftest.c:91:20: fatal error: Python.h: No such file or directory

OE @ ~/oe-core/tmp-eglibc $ find sysroots/ -name python2.7
sysroots/x86_64-linux/usr/bin/python2.7
sysroots/x86_64-linux/usr/lib/python2.7
sysroots/x86_64-linux/usr/include/python2.7
sysroots/qemuarm/usr/lib/python2.7
sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/lib/python2.7
sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/include/python2.7

in x86_64-oesdk-linux there are only gcc+binutils crosssdk
binutils-crosssdk-2.22-r2  gcc-crosssdk-4.6.2+svnr181430-r22  gcc-crosssdk-initial-4.6.2+svnr181430-r22  gcc-crosssdk-intermediate-4.6.2+svnr181430-r22
the rest is in 
x86_64-nativesdk-oesdk-linux

gdb-cross-canadian-arm is only package were exec_prefix points to oecore-x86_64-arm
./gdb-cross-canadian-arm-7.3.1-r5.1/temp/run.do_configure.1688
export exec_prefix="/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr"

while all nativesdk packages are using oecore-x86_64-x86_64
./python-nativesdk-2.7.2-r0.5/temp/run.do_configure.14043
export exec_prefix="/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr"

So I think that using exec_prefix/libdir is wrong to when cross-canadian-arm is looking 
for nativesdk headers/libs. Don't know what are correct variables to use...

Cheers,

> 
> Cheers,
> 
> > 
> > > OE @ ~ $ find /OE/shr-core/tmp/sysroots/x86_64-oesdk-linux-nativesdk/usr/local/ -name python2.7
> > > OE @ ~ $ find /OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/ -name python2.7
> > > /OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/lib/python2.7
> > > /OE/shr-core/tmp/sysroots/x86_64-nativesdk-oesdk-linux/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr/include/python2.7
> > > 
> > strange :
> > $ find build/tmp-angstrom_2010_x-eglibc/sysroots/ -name python2.7
> > build/tmp-angstrom_2010_x-eglibc/sysroots/at91sam9m10g45ek/usr/include/python2.7
> > build/tmp-angstrom_2010_x-eglibc/sysroots/at91sam9m10g45ek/usr/lib/python2.7
> > build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-nativesdk-angstromsdk-linux/usr/local/angstrom-eglibc-x86_64-armv5te/sysroots/x86_64-angstromsdk-linux/usr/include/python2.7
> > build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-nativesdk-angstromsdk-linux/usr/local/angstrom-eglibc-x86_64-armv5te/sysroots/x86_64-angstromsdk-linux/usr/lib/python2.7
> > build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/bin/python2.7
> > build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/include/python2.7
> > build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/lib/python2.7
> > 
> > Eric
> > -- 
> > http://eukrea.com/en/news/104-2012
> > 
> > _______________________________________________
> > Openembedded-devel mailing list
> > Openembedded-devel@lists.openembedded.org
> > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
> 
> -- 
> Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com



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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

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

* Re: [oe] SDK confusion Was: [meta-oe] gdb-cross-canadian: build gdb with python support
  2012-02-03  9:41                 ` SDK confusion Was: " Martin Jansa
@ 2012-02-03 10:20                   ` Eric Bénard
  -1 siblings, 0 replies; 19+ messages in thread
From: Eric Bénard @ 2012-02-03 10:20 UTC (permalink / raw)
  To: openembedded-devel; +Cc: openembedded-core

Hi Martin,

Le Fri, 3 Feb 2012 10:41:05 +0100,
Martin Jansa <martin.jansa@gmail.com> a écrit :
> in x86_64-oesdk-linux there are only gcc+binutils crosssdk
> binutils-crosssdk-2.22-r2  gcc-crosssdk-4.6.2+svnr181430-r22  gcc-crosssdk-initial-4.6.2+svnr181430-r22  gcc-crosssdk-intermediate-4.6.2+svnr181430-r22
> the rest is in 
> x86_64-nativesdk-oesdk-linux
> 
> gdb-cross-canadian-arm is only package were exec_prefix points to oecore-x86_64-arm
> ./gdb-cross-canadian-arm-7.3.1-r5.1/temp/run.do_configure.1688
> export exec_prefix="/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr"
> 
> while all nativesdk packages are using oecore-x86_64-x86_64
> ./python-nativesdk-2.7.2-r0.5/temp/run.do_configure.14043
> export exec_prefix="/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr"
> 
here is the big difference when using Angstrom :
python-nativesdk-2.7.2-r0.5/temp/run.do_configure.30951:73:export
exec_prefix="/usr/local/angstrom-eglibc-x86_64-armv7a/sysroots/x86_64-angstromsdk-linux/usr"
I don't yet know where this difference comes from.

Eric
-- 
http://eukrea.com/en/news/104-2012



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

* Re: SDK confusion Was: [meta-oe] gdb-cross-canadian: build gdb with python support
@ 2012-02-03 10:20                   ` Eric Bénard
  0 siblings, 0 replies; 19+ messages in thread
From: Eric Bénard @ 2012-02-03 10:20 UTC (permalink / raw)
  To: openembedded-devel; +Cc: openembedded-core

Hi Martin,

Le Fri, 3 Feb 2012 10:41:05 +0100,
Martin Jansa <martin.jansa@gmail.com> a écrit :
> in x86_64-oesdk-linux there are only gcc+binutils crosssdk
> binutils-crosssdk-2.22-r2  gcc-crosssdk-4.6.2+svnr181430-r22  gcc-crosssdk-initial-4.6.2+svnr181430-r22  gcc-crosssdk-intermediate-4.6.2+svnr181430-r22
> the rest is in 
> x86_64-nativesdk-oesdk-linux
> 
> gdb-cross-canadian-arm is only package were exec_prefix points to oecore-x86_64-arm
> ./gdb-cross-canadian-arm-7.3.1-r5.1/temp/run.do_configure.1688
> export exec_prefix="/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr"
> 
> while all nativesdk packages are using oecore-x86_64-x86_64
> ./python-nativesdk-2.7.2-r0.5/temp/run.do_configure.14043
> export exec_prefix="/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr"
> 
here is the big difference when using Angstrom :
python-nativesdk-2.7.2-r0.5/temp/run.do_configure.30951:73:export
exec_prefix="/usr/local/angstrom-eglibc-x86_64-armv7a/sysroots/x86_64-angstromsdk-linux/usr"
I don't yet know where this difference comes from.

Eric
-- 
http://eukrea.com/en/news/104-2012



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

* Re: [oe] SDK confusion Was: [meta-oe] gdb-cross-canadian: build gdb with python support
  2012-02-03 10:20                   ` Eric Bénard
@ 2012-02-03 11:44                     ` Martin Jansa
  -1 siblings, 0 replies; 19+ messages in thread
From: Martin Jansa @ 2012-02-03 11:44 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: openembedded-devel

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

On Fri, Feb 03, 2012 at 11:20:37AM +0100, Eric Bénard wrote:
> Hi Martin,
> 
> Le Fri, 3 Feb 2012 10:41:05 +0100,
> Martin Jansa <martin.jansa@gmail.com> a écrit :
> > in x86_64-oesdk-linux there are only gcc+binutils crosssdk
> > binutils-crosssdk-2.22-r2  gcc-crosssdk-4.6.2+svnr181430-r22  gcc-crosssdk-initial-4.6.2+svnr181430-r22  gcc-crosssdk-intermediate-4.6.2+svnr181430-r22
> > the rest is in 
> > x86_64-nativesdk-oesdk-linux
> > 
> > gdb-cross-canadian-arm is only package were exec_prefix points to oecore-x86_64-arm
> > ./gdb-cross-canadian-arm-7.3.1-r5.1/temp/run.do_configure.1688
> > export exec_prefix="/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr"
> > 
> > while all nativesdk packages are using oecore-x86_64-x86_64
> > ./python-nativesdk-2.7.2-r0.5/temp/run.do_configure.14043
> > export exec_prefix="/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr"
> > 
> here is the big difference when using Angstrom :
> python-nativesdk-2.7.2-r0.5/temp/run.do_configure.30951:73:export
> exec_prefix="/usr/local/angstrom-eglibc-x86_64-armv7a/sysroots/x86_64-angstromsdk-linux/usr"
> I don't yet know where this difference comes from.

I also don't really understand using oecore-x86_64-x86_64 when building
for qemuarm

Last part should be TARGET_ARCH from
conf/bitbake.conf:SDK_NAME = "oecore-${SDK_ARCH}-${TARGET_ARCH}"

but TARGET_ARCH is defined couple of times:
conf/bitbake.conf:TARGET_ARCH = "${TUNE_ARCH}"

classes/native.bbclass:TARGET_ARCH = "${BUILD_ARCH}"
classes/crosssdk.bbclass:TARGET_ARCH = "${SDK_ARCH}"
classes/nativesdk.bbclass:TARGET_ARCH = "${SDK_ARCH}"

So it looks like TARGET_ARCH from bitbake.conf wins for you and here
it's using TARGET_ARCH = "${SDK_ARCH}" from nativesdk.bbclass

With following modification I was able to configure and build it fine,
but seems like your oecore-x86_64-arm correct and oecore-x86_64-x86_64
should be used only e.g. for qemux86-64 not qemuarm

Cheers,

diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
index b5746ce..bac63b7 100644
--- a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
+++ b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
@@ -10,12 +10,18 @@ RDEPENDS += "python-nativesdk-core python-nativesdk-lang python-nativesdk-re \

 EXTRA_OECONF_append = "--with-python=${WORKDIR}/python"

+NATIVESDK_NAME = "oecore-${SDK_ARCH}-${SDK_ARCH}"
+NATIVESDK_PATH = "/usr/local/${NATIVESDK_NAME}"
+NATIVESDK_PATHNATIVE = "${NATIVESDK_PATH}/sysroots/${SDK_SYS}"
+NATIVESDK_LIBDIR = "${NATIVESDK_PATHNATIVE}${libdir_nativesdk}"
+NATIVESDK_INCLUDEDIR = "${NATIVESDK_PATHNATIVE}${includedir_nativesdk}"
+
 do_configure_prepend() {
 cat > ${WORKDIR}/python << EOF
 #! /bin/sh
 case "\$2" in
-        --includes) echo "-I${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}${exec_prefix}/include/python${PYTHON_BASEVERSION}/" ;;
-        --ldflags) echo "-L${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}${libdir}/python${PYTHON_BASEVERSION}/config/config -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;;
+        --includes) echo "-I${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}${NATIVESDK_INCLUDEDIR}/python${PYTHON_BASEVERSION}/" ;;
+        --ldflags) echo "-L${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}${NATIVESDK_LIBDIR}/python${PYTHON_BASEVERSION}/config -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;;
         --exec-prefix) echo "/usr" ;;
         *) exit 1 ;;
 esac

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

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

* Re: [OE-core] SDK confusion Was: [meta-oe] gdb-cross-canadian: build gdb with python support
@ 2012-02-03 11:44                     ` Martin Jansa
  0 siblings, 0 replies; 19+ messages in thread
From: Martin Jansa @ 2012-02-03 11:44 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: openembedded-devel

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

On Fri, Feb 03, 2012 at 11:20:37AM +0100, Eric Bénard wrote:
> Hi Martin,
> 
> Le Fri, 3 Feb 2012 10:41:05 +0100,
> Martin Jansa <martin.jansa@gmail.com> a écrit :
> > in x86_64-oesdk-linux there are only gcc+binutils crosssdk
> > binutils-crosssdk-2.22-r2  gcc-crosssdk-4.6.2+svnr181430-r22  gcc-crosssdk-initial-4.6.2+svnr181430-r22  gcc-crosssdk-intermediate-4.6.2+svnr181430-r22
> > the rest is in 
> > x86_64-nativesdk-oesdk-linux
> > 
> > gdb-cross-canadian-arm is only package were exec_prefix points to oecore-x86_64-arm
> > ./gdb-cross-canadian-arm-7.3.1-r5.1/temp/run.do_configure.1688
> > export exec_prefix="/usr/local/oecore-x86_64-arm/sysroots/x86_64-oesdk-linux/usr"
> > 
> > while all nativesdk packages are using oecore-x86_64-x86_64
> > ./python-nativesdk-2.7.2-r0.5/temp/run.do_configure.14043
> > export exec_prefix="/usr/local/oecore-x86_64-x86_64/sysroots/x86_64-oesdk-linux/usr"
> > 
> here is the big difference when using Angstrom :
> python-nativesdk-2.7.2-r0.5/temp/run.do_configure.30951:73:export
> exec_prefix="/usr/local/angstrom-eglibc-x86_64-armv7a/sysroots/x86_64-angstromsdk-linux/usr"
> I don't yet know where this difference comes from.

I also don't really understand using oecore-x86_64-x86_64 when building
for qemuarm

Last part should be TARGET_ARCH from
conf/bitbake.conf:SDK_NAME = "oecore-${SDK_ARCH}-${TARGET_ARCH}"

but TARGET_ARCH is defined couple of times:
conf/bitbake.conf:TARGET_ARCH = "${TUNE_ARCH}"

classes/native.bbclass:TARGET_ARCH = "${BUILD_ARCH}"
classes/crosssdk.bbclass:TARGET_ARCH = "${SDK_ARCH}"
classes/nativesdk.bbclass:TARGET_ARCH = "${SDK_ARCH}"

So it looks like TARGET_ARCH from bitbake.conf wins for you and here
it's using TARGET_ARCH = "${SDK_ARCH}" from nativesdk.bbclass

With following modification I was able to configure and build it fine,
but seems like your oecore-x86_64-arm correct and oecore-x86_64-x86_64
should be used only e.g. for qemux86-64 not qemuarm

Cheers,

diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
index b5746ce..bac63b7 100644
--- a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
+++ b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
@@ -10,12 +10,18 @@ RDEPENDS += "python-nativesdk-core python-nativesdk-lang python-nativesdk-re \

 EXTRA_OECONF_append = "--with-python=${WORKDIR}/python"

+NATIVESDK_NAME = "oecore-${SDK_ARCH}-${SDK_ARCH}"
+NATIVESDK_PATH = "/usr/local/${NATIVESDK_NAME}"
+NATIVESDK_PATHNATIVE = "${NATIVESDK_PATH}/sysroots/${SDK_SYS}"
+NATIVESDK_LIBDIR = "${NATIVESDK_PATHNATIVE}${libdir_nativesdk}"
+NATIVESDK_INCLUDEDIR = "${NATIVESDK_PATHNATIVE}${includedir_nativesdk}"
+
 do_configure_prepend() {
 cat > ${WORKDIR}/python << EOF
 #! /bin/sh
 case "\$2" in
-        --includes) echo "-I${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}${exec_prefix}/include/python${PYTHON_BASEVERSION}/" ;;
-        --ldflags) echo "-L${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}${libdir}/python${PYTHON_BASEVERSION}/config/config -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;;
+        --includes) echo "-I${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}${NATIVESDK_INCLUDEDIR}/python${PYTHON_BASEVERSION}/" ;;
+        --ldflags) echo "-L${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}${NATIVESDK_LIBDIR}/python${PYTHON_BASEVERSION}/config -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;;
         --exec-prefix) echo "/usr" ;;
         *) exit 1 ;;
 esac

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

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

* Re: [oe] SDK confusion Was: [meta-oe] gdb-cross-canadian: build gdb with python support
  2012-02-03 11:44                     ` [OE-core] " Martin Jansa
@ 2012-02-03 13:52                       ` Eric Bénard
  -1 siblings, 0 replies; 19+ messages in thread
From: Eric Bénard @ 2012-02-03 13:52 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: openembedded-devel

Le Fri, 3 Feb 2012 12:44:51 +0100,
Martin Jansa <martin.jansa@gmail.com> a écrit :
> I also don't really understand using oecore-x86_64-x86_64 when building
> for qemuarm
> 
I may be totally wrong but isn't that what is expected : building a gdb
which will run on the SDK_ARCH (ie x86_64 in my case), so isn't python
expected to run on the x86_64 and target x86_64 (and not arm) ?

Eric
-- 
http://eukrea.com/en/news/104-2012



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

* Re: [OE-core] SDK confusion Was: [meta-oe] gdb-cross-canadian: build gdb with python support
@ 2012-02-03 13:52                       ` Eric Bénard
  0 siblings, 0 replies; 19+ messages in thread
From: Eric Bénard @ 2012-02-03 13:52 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: openembedded-devel

Le Fri, 3 Feb 2012 12:44:51 +0100,
Martin Jansa <martin.jansa@gmail.com> a écrit :
> I also don't really understand using oecore-x86_64-x86_64 when building
> for qemuarm
> 
I may be totally wrong but isn't that what is expected : building a gdb
which will run on the SDK_ARCH (ie x86_64 in my case), so isn't python
expected to run on the x86_64 and target x86_64 (and not arm) ?

Eric
-- 
http://eukrea.com/en/news/104-2012



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

end of thread, other threads:[~2012-02-03 14:00 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-23  7:12 [meta-oe] gdb-cross-canadian: build gdb with python support Eric Bénard
2011-12-23 11:02 ` Otavio Salvador
2012-01-04  5:18 ` Khem Raj
2012-01-04  8:05   ` Eric Bénard
2012-02-02  7:45     ` Martin Jansa
2012-02-02  8:06       ` Eric Bénard
2012-02-02  8:40       ` Martin Jansa
2012-02-02  9:17         ` Martin Jansa
2012-02-02 10:11           ` Eric Bénard
2012-02-03  7:28             ` Martin Jansa
2012-02-03  9:41               ` SDK confusion Was: [oe] " Martin Jansa
2012-02-03  9:41                 ` SDK confusion Was: " Martin Jansa
2012-02-03 10:20                 ` [oe] " Eric Bénard
2012-02-03 10:20                   ` Eric Bénard
2012-02-03 11:44                   ` [oe] " Martin Jansa
2012-02-03 11:44                     ` [OE-core] " Martin Jansa
2012-02-03 13:52                     ` [oe] " Eric Bénard
2012-02-03 13:52                       ` [OE-core] " Eric Bénard
2012-02-02  8:58       ` Eric Bénard

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.