gdb-cross-canadian: build gdb with python support
* 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
--- .../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
meta-oe/recipes-devtools/gdb/gdb-cross-canadian_7.3.1.bbappend new file +20 -0
@@ -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 +}
Signature · 1 line
1.7.6.4
+1 :-) very cool :-D
2011/12/23 Eric Bénard <[email protected]>
Quoted 62 lines
* 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.0Signed-off-by Eric Bénard <[email protected]>--- .../gdb/gdb-cross-canadian_7.3.1.bbappend | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) create mode 100644meta-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..3bbfe38meta-oe/recipes-devtools/gdb/gdb-cross-canadian_7.3.1.bbappend new file +2
-0@@ -0,0 +1,20 @@ +DEPENDS += "python-nativesdk" +RDEPENDS += "python-nativesdk-core python-nativesdk-langpython-nativesdk-re \
+ python-nativesdk-codecs
python-nativesdk-netclient"meta-oe/recipes-devtools/gdb/gdb-cross-canadian_7.3.1.bbappend new file +9
-0+ +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/configmeta-oe/recipes-devtools/gdb/gdb-cross-canadian_7.3.1.bbappend new file +7
-2-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
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Signature · 3 lines
Otavio Salvador O.S. Systems E-mail: [email protected] http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
Quoted 9 lines · 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
I think this change should go into oe-core. Can you please redo it w.r.t. oe-core
Quoted 41 lines
Signed-off-by Eric Bénard <[email protected]>--- .../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.bbappendmeta-oe/recipes-devtools/gdb/gdb-cross-canadian_7.3.1.bbappend new file +20
-0@@ -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 +}Signature · 7 lines
1.7.6.4 _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Signature · 1 line
-Khem
Hi Khem,
Quoted 11 lines · Khem Raj
Quoted 9 lines · 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
Quoted 3 lines
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
Quoted 18 lines · Eric Bénard
Hi Khem,
Quoted 11 lines · Khem Raj
Quoted 9 lines · 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.0Quoted 3 lines
I think this change should go into oe-core. Can you please redo it w.r.t. oe-core
Quoted 6 lines
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.htmlEric
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,
Quoted 35 lines · Martin Jansa
Quoted 18 lines · Eric Bénard
Hi Khem,
Quoted 11 lines · Khem Raj
Quoted 9 lines · 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.0Quoted 3 lines
I think this change should go into oe-core. Can you please redo it w.r.t. oe-core
Quoted 6 lines
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.htmlEric
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
Quoted 5 lines
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,
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 54 lines · Martin Jansa
Quoted 35 lines · Martin Jansa
Quoted 18 lines · Eric Bénard
Hi Khem,
Quoted 11 lines · Khem Raj
Quoted 9 lines · 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.0Quoted 3 lines
I think this change should go into oe-core. Can you please redo it w.r.t. oe-core
Quoted 6 lines
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.htmlEric
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/pythonQuoted 5 lines
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.logconfigure: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,-O1conftest.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.
Quoted 6 lines
And
Python.his 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,
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Hi Martin,
Quoted 5 lines · Martin Jansa
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
Quoted 5 lines
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
Signature · 1 line
http://eukrea.com/en/news/104-2012
Quoted 9 lines · Eric Bénard
Hi Martin,
Quoted 5 lines · Martin Jansa
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
Quoted 4 lines
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,
Quoted 24 lines
Quoted 6 lines
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.7strange :
$ 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.7Eric
Signature · 6 lines
http://eukrea.com/en/news/104-2012 _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
SDK confusion Was: [oe] [meta-oe] gdb-cross-canadian: build gdb with python support
Quoted 15 lines · Martin Jansa
Quoted 9 lines · Eric Bénard
Hi Martin,
Quoted 5 lines · Martin Jansa
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_64Quoted 4 lines
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
Quoted 7 lines
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,
Quoted 30 lines
Cheers,
Quoted 24 lines
Quoted 6 lines
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.7strange :
$ 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.7Eric
Signature · 6 lines
http://eukrea.com/en/news/104-2012 _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-develSignature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Re: [oe] SDK confusion Was: [meta-oe] gdb-cross-canadian: build gdb with python support
Hi Martin,
Quoted 5 lines · Martin Jansa
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
Quoted 8 lines
gdb-cross-canadian-arm is only package were
exec_prefixpoints 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
Signature · 1 line
http://eukrea.com/en/news/104-2012
Re: [oe] SDK confusion Was: [meta-oe] gdb-cross-canadian: build gdb with python support
Quoted 13 lines · Eric Bénard
Hi Martin,
Quoted 9 lines · Martin Jansa
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-linuxgdb-cross-canadian-arm is only package were
exec_prefixpoints 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"
Quoted 8 lines
Quoted 4 lines
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,
meta/recipes-devtools/gdb/gdb-cross-canadian.inc +8 -2
@@ -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
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Re: [oe] SDK confusion Was: [meta-oe] gdb-cross-canadian: build gdb with python support
Quoted 3 lines · Martin Jansa
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
Signature · 1 line
http://eukrea.com/en/news/104-2012
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).
Quoted 35 lines · Martin Jansa
Quoted 18 lines · Eric Bénard
Hi Khem,
Quoted 11 lines · Khem Raj
Quoted 9 lines · 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.0Quoted 3 lines
I think this change should go into oe-core. Can you please redo it w.r.t. oe-core
Quoted 6 lines
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.htmlEric
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
Quoted 6 lines
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
Signature · 1 line
http://eukrea.com/en/news/104-2012
Hi Martin,
Quoted 35 lines · Martin Jansa
Quoted 18 lines · Eric Bénard
Hi Khem,
Quoted 11 lines · Khem Raj
Quoted 9 lines · 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.0Quoted 3 lines
I think this change should go into oe-core. Can you please redo it w.r.t. oe-core
Quoted 6 lines
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.htmlEric
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
Quoted 6 lines
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