[oe] [meta-oe] gdb-cross-canadian: build gdb with python support

Martin Jansa martin.jansa at gmail.com
Thu Feb 2 09:17:26 UTC 2012


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 at eukrea.com> wrote:
> > > Hi Khem,
> > >
> > > Le Tue, 3 Jan 2012 21:18:49 -0800,
> > > Khem Raj <raj.khem at 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 at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20120202/e933c50e/attachment-0002.sig>


More information about the Openembedded-devel mailing list