[yocto] Linking of external libraries in the recipe

Benjamin Esquivel benjamin.esquivel at linux.intel.com
Thu Mar 12 08:53:26 PDT 2015


On Thu, 2015-03-12 at 18:00 +0530, Priya Agarwal wrote:
> Hello,
> 
> 
> I have taken a recipe for the package squid from OpenEmbedded.org and
> have built it along with the kernel image. 
> 
> 
> Now I want to edit its recipe so that it will include some external
> libraries.
> But these libraries are the ones that are generated during the build.
> So how do I edit the recipe to include those libraries?
> 
Hi Priya, if you want to use a recipe and make some modifications to
it's behavior it is recommended that you do it via a .bbappend file

http://www.yoctoproject.org/docs/1.7.1/dev-manual/dev-manual.html#using-bbappend-files

If the libraries are already generated during the build it might be a
case where you just DEPENDS_append = " <libraryproviderpackage>" at
the .bbappend file. When the dependiencies are resolved prior your
recipe is built, the headers and libraries are placed in a special part
of the working directory that the recipes know where to look for (if
they don't deviate of the standard, of course). 

> 
> Location of
> library:  ../yocto/<build-directory>/............/libusdpaa.a
> 
> 
> 
> currently the do_compile task is failing as I have used an extra
> function whose library I haven't included. Snippet of the error:
> 
> | main.cc: In function 'int SquidMainSafe(int, char**)':
> | main.cc:1259:10: error: 'of_init' was not declared in this scope
> | make[3]: *** [main.o] Error 1
> | make[3]: *** Waiting for unfinished jobs....
> | make[3]: Leaving directory
> `/media/NewVolume/yocto/build_t4240qds_release/tmp/work/ppce6500-fsl_networking-linux/squid/3.4.7-r0/squid-3.4.7/src'
> | make[2]: *** [all-recursive] Error 1
> | make[2]: Leaving directory
> `/media/NewVolume/yocto/build_t4240qds_release/tmp/work/ppce6500-fsl_networking-linux/squid/3.4.7-r0/squid-3.4.7/src'
> | make[1]: *** [all] Error 2
> | make[1]: Leaving directory
> `/media/NewVolume/yocto/build_t4240qds_release/tmp/work/ppce6500-fsl_networking-linux/squid/3.4.7-r0/squid-3.4.7/src'
> | make: *** [all-recursive] Error 1
> | ERROR: oe_runmake failed
> | ERROR: Function failed: do_compile
> (see /media/NewVolume/yocto/build_t4240qds_release/tmp/work/ppce6500-fsl_networking-linux/squid/3.4.7-r0/temp/log.do_compile.28810 for further information)
> ERROR: Task 799
> (/media/NewVolume/yocto/meta-oe/meta-networking/recipes-daemons/squid/squid_3.4.7.bb, do_compile) failed with exit code '1'
> 
> 
> I have attached my recipe.
> 
> 
> 





More information about the yocto mailing list