[yocto] Compile on recipe works the second time

Bryan Evenson bevenson at melinkcorp.com
Tue Nov 19 08:19:02 PST 2013


Paul,

> -----Original Message-----
> From: Paul Eggleton [mailto:paul.eggleton at linux.intel.com]
> Sent: Tuesday, November 19, 2013 10:47 AM
> To: Bryan Evenson
> Cc: yocto at yoctoproject.org
> Subject: Re: [yocto] Compile on recipe works the second time
> 
> 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.

I made the suggested change and I'm still having the same build issue.  I pulled the applicable lines from the compile log when I get the failure.

...
make[3]: *** No rule to make target `../../ports/linux/bip-init.o', needed by `libbacnet.a'.  Stop.
make[3]: Leaving directory `/media/sda3/poky/poky-build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-stack-0-7-1/lib'
make[2]: *** [../../lib/libbacnet.a] Error 2
make[2]: Leaving directory `/media/sda3/poky/poky-build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-stack-0-7-1/demo/readprop'
make[1]: *** [readprop.all] Error 2
make[1]: Leaving directory `/media/sda3/poky/poky-build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-stack-0-7-1/demo'
make: *** [demos] Error 2
make: *** Waiting for unfinished jobs....
arm-poky-linux-gnueabi-gcc  -march=armv5te -marm -mthumb-interwork -mtune=arm926ej-s -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/media/sda3/poky/poky-build/tmp/sysroots/at91sam9x5ek -c -Wall -Wmissing-prototypes  -Os  -I/media/sda3/poky/poky-build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-stack-0-7-1/ports/linux -I/media/sda3/poky/poky-build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-stack-0-7-1/demo/object -I/media/sda3/poky/poky-build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-stack-0-7-1/demo/handler -Iusr/include/glib-2.0 -I/media/sda3/poky/poky-build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-stack-0-7-1/include `pkg-config --cflags --libs glib-2.0 uuid` -DPRINT_ENABLED=1 -DBACAPP_ALL -DBACFILE -DINTRINSIC_REPORTING -DBAC_ROUTING -DBACDL_BIP=1 -DBBMD_ENABLED=1 -DWEAK_FUNC=  -O2 -pipe -g -feliminate-unused-debug-types /media/sda3/poky/poky-build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-stack-0-7-1/ports/linux/bip-init.c -o /media/sda3/poky/poky-build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-stack-0-7-1/ports/linux/bip-init.o
...

If I'm reading this right, the build of the static library fails because it doesn't know how to build bip-init.o, but immediately after the static library build fails then bip-init.o gets built.  Any thoughts on what could be wrong?

Thanks,
Bryan

> 
> Cheers,
> Paul
> 
> --
> 
> Paul Eggleton
> Intel Open Source Technology Centre



More information about the yocto mailing list