All of lore.kernel.org
 help / color / mirror / Atom feed
* how to install files in nativesdk
@ 2018-10-06  5:16 Steve Scott
  2018-10-08 11:10 ` Burton, Ross
  0 siblings, 1 reply; 3+ messages in thread
From: Steve Scott @ 2018-10-06  5:16 UTC (permalink / raw)
  To: yocto

Hi:

I'm a list newbie, so let me know if this should be posted somewhere else.

I am able to generate a standard SDK with native and target
sysroots. The target sysroot has header files for my custom
libraries. The header files are generally installed in
<path-to-sdk-target-sysroot>/usr/include/  

We use cmake and googletest running on the *host* for testing some of
our libraries. So I need to build googletest and the test apps using the
host (x86_64) tools. The test apps need to include the target's library
header files.

I tried specifying the SDK's *target* usr/include as an include directory to
the compiler, but files in this tree preempted the standard compiler (g++)
system include files. I can avoid this problem by installing the library
header files under the SDK's native sysroot; i.e. in 
<path-to-sdk-native-sysroot>/usr/include/ 
and setting this directory as an include directory on the compiler
command line.

However, I cannot grok how to get these files into the SDK's native
tree. It seems related to  
   BBCLASSEXTEND = "native nativesdk"
but I'm just chasing my tail trying to figure out the magic incantation.

Does anyone know how to do this? Or is there a better approach?

Thanks.

-steve scott






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

* Re: how to install files in nativesdk
  2018-10-06  5:16 how to install files in nativesdk Steve Scott
@ 2018-10-08 11:10 ` Burton, Ross
  2018-10-09  1:19   ` Steve Scott
  0 siblings, 1 reply; 3+ messages in thread
From: Burton, Ross @ 2018-10-08 11:10 UTC (permalink / raw)
  To: sscott; +Cc: Yocto-mailing-list

On Sat, 6 Oct 2018 at 06:18, Steve Scott <sscott@san.rr.com> wrote:
> I am able to generate a standard SDK with native and target
> sysroots. The target sysroot has header files for my custom
> libraries. The header files are generally installed in
> <path-to-sdk-target-sysroot>/usr/include/
>
> We use cmake and googletest running on the *host* for testing some of
> our libraries. So I need to build googletest and the test apps using the
> host (x86_64) tools. The test apps need to include the target's library
> header files.
>
> I tried specifying the SDK's *target* usr/include as an include directory to
> the compiler, but files in this tree preempted the standard compiler (g++)
> system include files. I can avoid this problem by installing the library
> header files under the SDK's native sysroot; i.e. in
> <path-to-sdk-native-sysroot>/usr/include/
> and setting this directory as an include directory on the compiler
> command line.
>
> However, I cannot grok how to get these files into the SDK's native
> tree. It seems related to
>    BBCLASSEXTEND = "native nativesdk"
> but I'm just chasing my tail trying to figure out the magic incantation.
>
> Does anyone know how to do this? Or is there a better approach?

Assuming the recipe is correctly written, simply adding:

BBCLASSEXTEND = "native nativesdk"

Will give your recipe (eg foo.bb) native and nativesdk variant
(foo-native and nativesdk-foo).  The class extension automatically
changes the paths so in general that's all you need to do.  Then just
add nativesdk-foo to your SDK using TOOLCHAIN_HOST_TASK_append = "
nativesdk-foo".

Ross


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

* Re: how to install files in nativesdk
  2018-10-08 11:10 ` Burton, Ross
@ 2018-10-09  1:19   ` Steve Scott
  0 siblings, 0 replies; 3+ messages in thread
From: Steve Scott @ 2018-10-09  1:19 UTC (permalink / raw)
  To: 'Burton, Ross'; +Cc: 'Yocto-mailing-list'

Thanks Ross. That helped me pull it all together.

-steve

> -----Original Message-----
> From: Burton, Ross [mailto:ross.burton@intel.com]
> Sent: Monday, October 08, 2018 4:11 AM
> To: sscott@san.rr.com
> Cc: Yocto-mailing-list <yocto@yoctoproject.org>
> Subject: Re: [yocto] how to install files in nativesdk
> 
> On Sat, 6 Oct 2018 at 06:18, Steve Scott <sscott@san.rr.com> wrote:
> > I am able to generate a standard SDK with native and target sysroots.
> > The target sysroot has header files for my custom libraries. The
> > header files are generally installed in
> > <path-to-sdk-target-sysroot>/usr/include/
> >
> > We use cmake and googletest running on the *host* for testing some of
> > our libraries. So I need to build googletest and the test apps using
> > the host (x86_64) tools. The test apps need to include the target's
> > library header files.
> >
> > I tried specifying the SDK's *target* usr/include as an include
> > directory to the compiler, but files in this tree preempted the
> > standard compiler (g++) system include files. I can avoid this problem
> > by installing the library header files under the SDK's native sysroot;
> > i.e. in <path-to-sdk-native-sysroot>/usr/include/
> > and setting this directory as an include directory on the compiler
> > command line.
> >
> > However, I cannot grok how to get these files into the SDK's native
> > tree. It seems related to
> >    BBCLASSEXTEND = "native nativesdk"
> > but I'm just chasing my tail trying to figure out the magic incantation.
> >
> > Does anyone know how to do this? Or is there a better approach?
> 
> Assuming the recipe is correctly written, simply adding:
> 
> BBCLASSEXTEND = "native nativesdk"
> 
> Will give your recipe (eg foo.bb) native and nativesdk variant (foo-native and
> nativesdk-foo).  The class extension automatically changes the paths so in
> general that's all you need to do.  Then just add nativesdk-foo to your SDK
> using TOOLCHAIN_HOST_TASK_append = "
> nativesdk-foo".
> 
> Ross



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

end of thread, other threads:[~2018-10-09  1:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-06  5:16 how to install files in nativesdk Steve Scott
2018-10-08 11:10 ` Burton, Ross
2018-10-09  1:19   ` Steve Scott

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.