[yocto] Using other recipes output in Makefile-project

Jonas Jonsson L jonas.l.jonsson at ericsson.com
Fri Sep 21 05:14:17 PDT 2012


Unfortunately there are no include-files (for any of the three libs in DEPEND) available in that folder.

I've also tried running "bitbake libxml2" and it runs fine but nothing happens in the $STAGING_{INCDIR|LIBDIR} folders :---(  Must I add the dependencies to the image too, via an IMAGE_INSTALL_append directive in the 'conf/local.conf'-file?

I'm running yocto 1.2 snapshot 20120919 on an ubuntu 64-bit (VirtualBox) machine.

I don't have the time (in this project) for porting the whole buildsystem to autotools...

/Jonas (Sorry for top-posting, outlook isn't made for mail)

-----Original Message-----
From: Burton, Ross [mailto:ross.burton at intel.com] 
Sent: den 21 september 2012 12:07
To: Jonas Jonsson L
Cc: Yocto Mailinglist (yocto at yoctoproject.org)
Subject: Re: [yocto] Using other recipes output in Makefile-project

On 21 September 2012 10:06, Jonas Jonsson L <jonas.l.jonsson at ericsson.com> wrote:
> Hi, I'm having trouble with understanding how to use built libraries 
> (and their include-files).
>
> I'm writing a bitbake-recipe for some piece of software that is 
> Makefile-based.  The SW has a compilation and runtime dependency on 
> readline, Sqlite3 and libxml2.
>
> In my bb-file, I've added 'DEPEND = "readline sqlite3 libxml2"' and 
> the three packages are built and installed for my chosen architecture.
>
> Now how do I use the build artifacts for my compilation??  I would 
> like to add 'XML2_CFLAGS=FOO', 'XML2_LIBS=BAR' etc to my EXTRA_OEMAKE 
> so that my Makefile can pick up the location of the necessary 
> include-files and libraries?

I'd recommend considering porting the build system to autotools, but I know that for a lot of situations that isn't doable.

I'd also recommend changing the build system to use pkg-config for
libxml2 and sqlite3, that way it will automatically find the right headers.

The magic variables you're looking for though are ${STAGING_INCDIR} and ${STAGING_LIBDIR}, these are the include and lib directories under the staging tree for the target.

Ross




More information about the yocto mailing list