All of lore.kernel.org
 help / color / mirror / Atom feed
* Add new module to recipe + meta-toolchain-qt: add gdb
@ 2013-09-10 11:23 Jose Mª Ferreiro
  2013-09-10 14:05 ` Jegan Chandru
  0 siblings, 1 reply; 5+ messages in thread
From: Jose Mª Ferreiro @ 2013-09-10 11:23 UTC (permalink / raw)
  To: yocto

Hello

We have compiled meta-toolchain-qt (Yocto dylan). Now we can run QT 
applications on Desktop (Ubuntu 12.04) and on target (iMX6 sabre Lite 
board). We can also debug the applications on board, but we can not 
debug on desktop.

When /usr/bin/gdb is started it starts automatically /usr/bin/python. It 
fails because Ubuntu python does not recognize sys.lib variable from 
/op/poky...python. We have found no way to tell gdb to start changing 
PYTHONHOME to Ubuntu python home to avoid the problem.

So we need to add gdb to the toolchain. If we get it to work, we suppose 
the /op/poky...gdb will start the /opt/poky...python (we test it and 
that python knows what sys.lib is).

We try to add to conf/local.conf: TOOLCHAIN_HOST_TASK_append = " 
nativesdk-gdb". But nativesdk-gdb is not a defined name.

So the cuestion is: how can i know what recipes are avaliable to sdk 
host toolchain and what are their names?

Thank you and best regards



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

* Re: Add new module to recipe + meta-toolchain-qt: add gdb
  2013-09-10 11:23 Add new module to recipe + meta-toolchain-qt: add gdb Jose Mª Ferreiro
@ 2013-09-10 14:05 ` Jegan Chandru
  2013-09-10 17:26   ` Jose Mª Ferreiro
  0 siblings, 1 reply; 5+ messages in thread
From: Jegan Chandru @ 2013-09-10 14:05 UTC (permalink / raw)
  To: Jose Mª Ferreiro; +Cc: yocto

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

Hello,

On Tue, Sep 10, 2013 at 4:53 PM, Jose Mª Ferreiro <jose.ferreiro@horus.es>wrote:

> Hello
>
> We have compiled meta-toolchain-qt (Yocto dylan). Now we can run QT
> applications on Desktop (Ubuntu 12.04) and on target (iMX6 sabre Lite
> board). We can also debug the applications on board, but we can not debug
> on desktop.
>
> When /usr/bin/gdb is started it starts automatically /usr/bin/python. It
> fails because Ubuntu python does not recognize sys.lib variable from
> /op/poky...python. We have found no way to tell gdb to start changing
> PYTHONHOME to Ubuntu python home to avoid the problem.
>
> So we need to add gdb to the toolchain. If we get it to work, we suppose
> the /op/poky...gdb will start the /opt/poky...python (we test it and that
> python knows what sys.lib is).
>
> We try to add to conf/local.conf: TOOLCHAIN_HOST_TASK_append = "
> nativesdk-gdb". But nativesdk-gdb is not a defined name.
>

try adding packagegroup-cross-canadian-${TRANSLATED_TARGET_ARCH} in
TOOLCHAIN_HOST_TASK_append which will add cross toolchain to your sdk which
includes cross gdb as well. There is no nativesdk-gdb afaik unless if
someone says otherwise. see ./recipes-core/packagegroups/
packagegroup-cross-canadian.bb for details.


>
> So the cuestion is: how can i know what recipes are avaliable to sdk host
> toolchain and what are their names?
>
> Thank you and best regards
>
> ______________________________**_________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.**org/listinfo/yocto<https://lists.yoctoproject.org/listinfo/yocto>
>


Cheers,

[-- Attachment #2: Type: text/html, Size: 2410 bytes --]

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

* Re: Add new module to recipe + meta-toolchain-qt: add gdb
  2013-09-10 14:05 ` Jegan Chandru
@ 2013-09-10 17:26   ` Jose Mª Ferreiro
  2013-09-10 19:16     ` Philipp Wagner
  0 siblings, 1 reply; 5+ messages in thread
From: Jose Mª Ferreiro @ 2013-09-10 17:26 UTC (permalink / raw)
  To: Jegan Chandru; +Cc: yocto

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

Hi Jegan

El 10/09/2013 16:05, Jegan Chandru escribió:
> Hello,
>
> On Tue, Sep 10, 2013 at 4:53 PM, Jose Mª Ferreiro 
> <jose.ferreiro@horus.es <mailto:jose.ferreiro@horus.es>> wrote:
>
>     Hello
>
>     We have compiled meta-toolchain-qt (Yocto dylan). Now we can run
>     QT applications on Desktop (Ubuntu 12.04) and on target (iMX6
>     sabre Lite board). We can also debug the applications on board,
>     but we can not debug on desktop.
>
>     When /usr/bin/gdb is started it starts automatically
>     /usr/bin/python. It fails because Ubuntu python does not recognize
>     sys.lib variable from /op/poky...python. We have found no way to
>     tell gdb to start changing PYTHONHOME to Ubuntu python home to
>     avoid the problem.
>
>     So we need to add gdb to the toolchain. If we get it to work, we
>     suppose the /op/poky...gdb will start the /opt/poky...python (we
>     test it and that python knows what sys.lib is).
>
>     We try to add to conf/local.conf: TOOLCHAIN_HOST_TASK_append = "
>     nativesdk-gdb". But nativesdk-gdb is not a defined name.
>
>
> try adding packagegroup-cross-canadian-${TRANSLATED_TARGET_ARCH} in 
> TOOLCHAIN_HOST_TASK_append which will add cross toolchain to your sdk 
> which includes cross gdb as well. There is no nativesdk-gdb afaik 
> unless if someone says otherwise. 
> see ./recipes-core/packagegroups/packagegroup-cross-canadian.bb 
> <http://packagegroup-cross-canadian.bb> for details.

I am lost. We added that but it did not work as we expected. In fact, I 
think that must be included in meta-toolchain-qt because we do not see 
any differences. Perhaps I explained it badly.

I think we already have the cross tools compiled. They are installed at:
/opt/poky/1.4.2/sysroots/i686-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi
There is a arm-...-gdb there, but this is not the failing gdb.

We expect/want to have a gdb compiled for the host machine at
/opt/poky/1.4.2/sysroots/i686-pokysdk-linux/usr/bin/

QT Desktop mode is starting /usr/bin/gdb but using the /opt/poky... 
directory as PYTHONHOME. We think if we have our 
/opt/poky/../usr/bin/gdb and we tell QT to use it, it will avoid ths 
sys.lib conflict.

Thanks and best regards

[-- Attachment #2: Type: text/html, Size: 3685 bytes --]

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

* Re: Add new module to recipe + meta-toolchain-qt: add gdb
  2013-09-10 17:26   ` Jose Mª Ferreiro
@ 2013-09-10 19:16     ` Philipp Wagner
  2013-09-11 10:20       ` jfc
  0 siblings, 1 reply; 5+ messages in thread
From: Philipp Wagner @ 2013-09-10 19:16 UTC (permalink / raw)
  To: Yocto Project

Hi Jose,

Am 10.09.2013 19:26, Jose Mª Ferreiro wrote:
> We expect/want to have a gdb compiled for the host machine at
> /opt/poky/1.4.2/sysroots/i686-pokysdk-linux/usr/bin/
> 
> QT Desktop mode is starting /usr/bin/gdb but using the /opt/poky...
> directory as PYTHONHOME. We think if we have our
> /opt/poky/../usr/bin/gdb and we tell QT to use it, it will avoid ths
> sys.lib conflict.

To debug your desktop application, why do you want to use any of the
tools from the SDK? You can just use the system's tools (e.g.
/usr/bin/python with no PYTHONHOME set)?

To do that, just start a new console, do *not* source the
/opt/poky/1.4.2/environment-* file. This should give you an empty
PYTHONHOME variable and an unmodified PATH, so you can just use the
regular tools on the desktop.

Philipp


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

* Re: Add new module to recipe + meta-toolchain-qt: add gdb
  2013-09-10 19:16     ` Philipp Wagner
@ 2013-09-11 10:20       ` jfc
  0 siblings, 0 replies; 5+ messages in thread
From: jfc @ 2013-09-11 10:20 UTC (permalink / raw)
  To: yocto

Philipp Wagner <lists@...> writes:

> 
> Hi Jose,
> 
  ...
> 
> To do that, just start a new console, do *not* source the
> /opt/poky/1.4.2/environment-* file. This should give you an empty
> PYTHONHOME variable and an unmodified PATH, so you can just use the
> regular tools on the desktop.
> 
> Philipp
> 

Hello Philipp

That works. But then we have to use a qtcreator.sh with the poky PYTHOHOME
to debug Target and another qtcreator2.sh without it to debug Desktop.

There is another workaround also: we can add to the
QTCreator-Project-Options-Desktop-Environment a new PYTHONHOME value and it
seems to have preference over the environment.sh value. This is to be done
for every project. 

However we are new to Yocto and have problems finding and understanding
things. For example this gdb/pythons thing:
  Why python is recompiled and created on /opt/poky sdk environment? 
  Why not use host python? 
  What are the steps to create gdb (or any other utlity) on the sdk
directory  (/opt/poky/..)? 
  Where is the python recipe to introduce it in host sdk to follow as an
example?

Thanks and best regards.




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

end of thread, other threads:[~2013-09-11 10:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-10 11:23 Add new module to recipe + meta-toolchain-qt: add gdb Jose Mª Ferreiro
2013-09-10 14:05 ` Jegan Chandru
2013-09-10 17:26   ` Jose Mª Ferreiro
2013-09-10 19:16     ` Philipp Wagner
2013-09-11 10:20       ` jfc

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.