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 14:56:45 +0200	[thread overview]
Message-ID: <lj5oue$t5b$1@ger.gmane.org> (raw)
In-Reply-To: <1398156153.16672.28.camel@ted>

Am 22.04.2014 10:42, schrieb Richard Purdie:
> 
> 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
> 

Thanks, that helped, but I'm still not through, I'm afraid.

My recipe look like this now:


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} `pkg-config --cflags --libs gstreamer-0.10`
cameraserver.c -o cameraserver
}

do_install() {
             install -d ${D}${bindir}
             install -m 0755 cameraserver ${D}${bindir}
}

It only worked with "gstreamer-0.10". Now the compilation works, but
linking stops:

Log data follows:
| DEBUG: Executing shell function do_compile
| /tmp/cckmN8NC.o: In function `main':
| cameraserver.c:(.text+0x70): undefined reference to `gst_rtsp_server_new'
| cameraserver.c:(.text+0x7c): undefined reference to
`gst_rtsp_server_get_media_mapping'
| cameraserver.c:(.text+0x84): undefined reference to
`gst_rtsp_media_factory_new'
| cameraserver.c:(.text+0xa0): undefined reference to
`gst_rtsp_media_factory_set_launch'
| cameraserver.c:(.text+0xb4): undefined reference to
`gst_rtsp_media_mapping_add_factory'
| cameraserver.c:(.text+0xc8): undefined reference to
`gst_rtsp_server_attach'
| collect2: error: ld returned 1 exit status

As it seems only linking to gst-rtsp, not to gstreamer, if I see that
correctly.

I then tried to add "gst-rtsp" or "gst-rtsp-server" or "gst-rtsp-0.10"
or "gst-rtsp-server-0.10" to the pkg-config part, but none of them were
found.

I tell you, I feel extremely stupid. The solution is probably so simple,
yet I do not find a solution (even with using Google).




  reply	other threads:[~2014-04-22 12:56 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 [this message]
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='lj5oue$t5b$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.