[yocto] Confusion about autotools

Chris Larson clarson at kergoth.com
Thu Apr 10 16:50:57 PDT 2014


On Thu, Apr 10, 2014 at 4:43 PM, Patrick Doyle <wpdster at gmail.com> wrote:

> I am trying to write a recipe for a custom gstreamer plugin that
> compiles fine (natively) with autotools.
>
> I thought it would be as simple as writing a recipe that said something
> like:
>
> inherit autotools
>
> myplugin_do_fetch() {
>     commands_to_make_a_copy_of_my_source_code_in_build_tree;
> }
> EXPORT_FUNCTIONS do_fetch
>
> (I am leaving out the boilerplate DESCRIPTION, LICENSE, etc...
>
> But when I try to run my recipe, I get an error that ends like:
>
> 109: /home/wpd/.../run.do_fetch.1234 do_fetch: not found
>
> and when I look at run.do_fetch, I see on line 109
>
> do_fetch
>
> I thought that do_fetch would be inherited from base.bbclass.  I look
> in autotools.bbclass and I don't see a do_fetch function task defined
> there.
>

EXPORT_FUNCTIONS is an inheritance mechanism, to let you override a
function in a class you inherit but still be able to explicitly call the
function defined by that class. Unless you have a 'myplugin' class, nothing
will translate myplugin_do_fetch to do_fetch. If you want to override a
function like do_fetch in your recipe, just override that function, don't
prefix it.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20140410/baeacc5a/attachment.html>


More information about the yocto mailing list