All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Neuer User <auslands-kv@gmx.de>
Cc: yocto@yoctoproject.org
Subject: Re: Newbie question: How to get dependencies into compile of custom recipe?
Date: Tue, 22 Apr 2014 09:42:33 +0100	[thread overview]
Message-ID: <1398156153.16672.28.camel@ted> (raw)
In-Reply-To: <lj57d5$6ao$1@ger.gmane.org>

On Tue, 2014-04-22 at 09:57 +0200, Neuer User wrote:
> Hi
> 
> 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 followed the Yocto Development guide, added my own layer and included
> the "helloworld" example.
> 
> Now I would like to exchange the helloworld.c code with a simple
> gstreamer-rtsp server code
> (http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/tree/examples/test-launch.c).
> 
> I changed the bb file as follows, adding expecially the DEPENDS:
> 
> #
> # This file was derived from the 'Hello World!' example recipe in the
> # Yocto Project Development Manual.
> #
> 
> DESCRIPTION = "Simple helloworld application"
> SECTION = "multimedia"
> LICENSE = "MIT"
> LIC_FILES_CHKSUM =
> "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
> PR = "r0"
> 
> SRC_URI = "file://cameraserver.c"
> 
> DEPENDS = "gst-rtsp gstreamer"
> 
> S = "${WORKDIR}"
> 
> do_compile() {
>              ${CC} cameraserver.c -o cameraserver
> }
> 
> do_install() {
>              install -d ${D}${bindir}
>              install -m 0755 cameraserver ${D}${bindir}
> }
> 
> 
> The package "gst-rtsp" is correctly built (as
> libgstrtspserver-0.10-0-0.10.8-r0@cortexa9hf_vfp_neon), but the
> compilation process of the "cameraserver.c" does not find the necessary
> header include files.
> 
> NOTE: recipe camera-server-0.1-r0: task do_compile: Started
> Log data follows:
> | DEBUG: Executing shell function do_compile
> | cameraserver.c:20:21: fatal error: gst/gst.h: No such file or directory
> |  #include <gst/gst.h>
> |                      ^
> | compilation terminated.
> | WARNING: exit code 1 from a shell command.
> | ERROR: Function failed: do_compile (log file is located at
> /home/ubuntu/yocto/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/camera-server/0.1-r0/temp/log.do_compile.26393)
> NOTE: recipe camera-server-0.1-r0: task do_compile: Failed
> 
> 
> The debug of bitbake shows, however, that it correctly identifies the
> dependent packages:
> 
> DEBUG: providers for gst-rtsp are: ['gst-rtsp']
> DEBUG: sorted runtime providers for gst-rtsp are:
> ['/home/ubuntu/yocto/sources/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer/gst-rtsp_0.10.8.bb']
> DEBUG: adding
> '/home/ubuntu/yocto/sources/meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer/gst-rtsp_0.10.8.bb'
> to satisfy runtime 'gst-rtsp'
> DEBUG: providers for gstreamer are: ['gstreamer']
> DEBUG: sorted runtime providers for gstreamer are:
> ['/home/ubuntu/yocto/sources/poky/meta/recipes-multimedia/gstreamer/gstreamer_0.10.36.bb']
> DEBUG: adding
> '/home/ubuntu/yocto/sources/poky/meta/recipes-multimedia/gstreamer/gstreamer_0.10.36.bb'
> to satisfy runtime 'gstreamer'
> 
> 
> So, what am I doing wrong? Do I explicitly need to add the dependencies
> to the compile environment somehow? If yes, where are the found
> directories stored?
> 
> Or am I doing this all very wrong? I am really very new to Yocto.

Basically, you need to pass in the correct compiler and linker flags.

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/faq/html/chapter-developing.html

Adding:

`pkg-config --cflags --libs gstreamer`

to your compiler line will probably help. The system will automatically
figure out things from there, the environment contains things that
pkg-config can use to generate the correct options.

Cheers,

Richard






  reply	other threads:[~2014-04-22  8:42 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 [this message]
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
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=1398156153.16672.28.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=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.