[yocto] Linking of external libraries in the recipe

Priya Agarwal priya_agarwal at students.iitmandi.ac.in
Sat Mar 14 23:23:00 PDT 2015


I wrote the following in squid_3.4.7.bbappend:

DPENDS_append = "usdpaa"
EXTRA_OECONF_append = "
LDFLAGS=-L/media/NewVolume/yocto/build_t4240qds_release/tmp/sysroots/t4240qds/usr/lib/
\
            LIBS=-lusdpaa_dma -lusdpaa_dma_mem -lusdpaa_of -lusdpaa_fman
-lusdpaa_qbman -lusdpaa_syscfg \

CXXFLAGS=-I/media/NewVolume/yocto/build_t4240qds_release/tmp/sysroots/t4240qds/usr/include/"

So the error is that it is not able to recognize the option
-lusdpaa_dma_mem. ( I tried linking only 1 linrary, then it worked but when
I link more than 1 the 2nd one is unrecognized). oe_runconf is failing
basically. How to link all the libraries successfully?

Basically I have many static libraries in
/media/NewVolume/yocto/build_t4240qds_release/tmp/sysroots/t4240qds/usr/lib/
and I want to link all of them while building squid code. To do that I need
to run ./configure with these extra parameters LDFLAGS,LIBS,CXXFLAGS.



On Thu, Mar 12, 2015 at 10:39 PM, Priya Agarwal <
priya_agarwal at students.iitmandi.ac.in> wrote:

> Okay I think I understood. It has to be DEPENDS = "usdpaa" . Basically the
> recipe which is building the libraries is
> /meta-fsl-ppc/recipe-tools/usdpaa/usdpaa_git.bb.
> Thanks.
>
> On Thu, Mar 12, 2015 at 9:58 PM, Priya Agarwal <
> priya_agarwal at students.iitmandi.ac.in> wrote:
>
>> If the libraries are already generated during the build it might be a
>>> case where you just DEPENDS_append = " <libraryproviderpackage>" at
>>
>> he .bbappend file
>>
>>
>> I know where the libraries are but how do I make out which is the
>> package.
>> (The needed '.a' files are in ..../usdpaa/git-r5/git/lib_powerpc/*)
>>
>>
>>
>>
>>
>> On Thu, Mar 12, 2015 at 9:23 PM, Benjamin Esquivel <
>> benjamin.esquivel at linux.intel.com> wrote:
>>
>>> 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.
>>> >
>>> >
>>> >
>>>
>>>
>>> --
>>> _______________________________________________
>>> yocto mailing list
>>> yocto at yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/yocto
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20150315/441a273b/attachment.html>


More information about the yocto mailing list