All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neuer User <auslands-kv@gmx.de>
To: yocto@yoctoproject.org
Subject: Re: Newbie question: How to get dependencies into compile of custom recipe?
Date: Tue, 22 Apr 2014 16:48:45 +0200	[thread overview]
Message-ID: <lj5vgd$njl$1@ger.gmane.org> (raw)
In-Reply-To: <CF7BEDE6.25E3D9%rcalhoun@shotspotter.com>

H Rob

Thanks for the information.

To clarify: My recipe is a very simple one. It is just one c file with
maybe 40 lines or so.

But it uses library functions from another recipe "gst-rtsp", which
again uses "gstreamer".

Both, "gstreamer" and "gst-rtsp" are compiled and working nicely, as far
as I can tell.

Now I have a simple c program file that needs to be compiled and linked
against "gst-rtsp". Hmmm.

I don't have a makefile. I don't use any autotools for this file. The bb
recipe is based on the example in the Yocto Development guide for a
simple c file.

I have to admit: I am extremely new to Yocto. I am also not a c
programmer. If I program, I typically use python or Qt5. :-)

I guess, I try the "devshell" and see what variables are set and what
pkg-config output is like.

In the end, it is probably very simple to do, but for a Newbie like
me... :-)

Am 22.04.2014 16:32, schrieb Robert Calhoun:
> 
> 
> On 4/22/14 3:57 AM, "Neuer User"
> <auslands-kv@gmx.de> wrote:
>> Sorry for this simple question. I've just started building my
>> first image with yocto and would now like to add a (very simple)
>> own recipe.
> 
> (I am not familiar with gstreamer, but it looks like a big project
> and maybe not so simple!)
> 
> The yocto build system figures out dependencies and build order, sets
> the environment, and generates shell scripts to do the actual tasks.
> The actual "work" is done by these shell scripts, not by the python
> code.
> 
> Your recipe explicitly defines some steps like do_compile(). When you
> do this, you are saying "Let me control the compilation, I know what
> I am doing!". Your do_compile() step is going to generate a
> run.do_compile script, and that has to work just as if you were
> running the script yourself.
> 
> 
> If something doesn't work, try "bitbake {pkg} -c devshell".  That
> will drop you into the environment the compiler is going to see. The
> shell scripts are in ../temp. Each script is a single step
> (do_compile etc). All of the substitutions that Richard described
> will already have been made; and you will see all the environment
> variables being set and the calls made to the compiler, linker etc.
> This directory also contains the log files from recent executions.
> 
> You can run these manually, e.g. ../temp/run.do_compile. (The files 
> without PIDs are symlinks to the latest script.) You can edit this
> script and re-run the compile and link step until it works. Once
> you've figured out what needs to be set or run, modify the recipe to
> generate that environment or command.
> 
> An important thing to understand is that each step lives in its own
> little world; an environment variable set in the do_compile is not
> present in do_install unless you put it there. Avoidance of global
> state allows the build system to run multiple tasks in parallel.
> 
> -Rob Calhoun (still figuring this stuff out myself)
> 




  reply	other threads:[~2014-04-22 14:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-22  7:57 Newbie question: How to get dependencies into compile of custom recipe? Neuer User
2014-04-22  8:42 ` Richard Purdie
2014-04-22 12:56   ` Neuer User
2014-04-22 14:41     ` Gary Thomas
2014-04-22 14:32 ` Robert Calhoun
2014-04-22 14:48   ` Neuer User [this message]
2014-04-22 14:58     ` [solved] " Neuer User

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='lj5vgd$njl$1@ger.gmane.org' \
    --to=auslands-kv@gmx.de \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.