[yocto] Compile on recipe works the second time

Paul Eggleton paul.eggleton at linux.intel.com
Tue Nov 19 07:47:15 PST 2013


Hi Bryan,

On Tuesday 19 November 2013 08:57:40 Bryan Evenson wrote:
> I'm on poky/dylan-9.0.1 and I've created a layer for a separate open source
> project to include in my image.  The layer is at
> https://github.com/evensonbryan/meta-bacnet for those of you who want to
> try and duplicate my results.  Just add this layer to your setup and build
> the recipe "bacnet-stack".
> 
> I have a very odd build issue.  The first time I build the recipe, the build
> fails during the compile step.  However, if I then build the recipe again,
> the compile completes without errors.  For example:
> 
> 1. bitbake -c clean bacnet-stack
> 2. bitbake bacnet-stack (compile fails)
> 3. bitbake bacnet-stack (compile succeeds, rest of image packaging works)
> 
> Additionally, the following order compiles without error:
> 1. bitbake -c clean bacnet-stack
> 2. bitbake -c devshell bacnet-stack
> 3. (from devshell) make all (compile succeeds)
> 
> This project is divided into a static library and multiple demo
> applications.  The static library needs to be built first, and then the
> demo applications include the static library in their build.  I suspect I
> have an issue with either populating the static library or the related
> include files in the sysroot which causes the demo applications to fail to
> build the first time but work the second.  However, I can't figure out how
> to fix the issue.  Any pointers on what is setup wrong with this recipe?

>From bacnet-stack.inc:
> do_install () {
>     install -d ${D}${bindir} ${D}${datadir} ${D}${libdir} > 
${STAGING_INCDIR}/${PN}
>     ...
>     install -m 0644 ${S}/include/* ${STAGING_INCDIR}/${PN}
> }

Don't poke files directly into the sysroot like this. Install the headers to 
${D}${incdir} instead, and they will be staged to the sysroot for you.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the yocto mailing list