From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2] minidlna: fix static link
Date: Thu, 9 Jul 2015 14:09:49 +0200 [thread overview]
Message-ID: <20150709140949.379f15fe@free-electrons.com> (raw)
In-Reply-To: <1436436004-21802-1-git-send-email-Vincent.Riera@imgtec.com>
Dear Vicente Olivert Riera,
On Thu, 9 Jul 2015 12:00:04 +0200, Vicente Olivert Riera wrote:
> minidlna needs to be linked with -lintl when gettext is needed (with
> locales), and also needs to be linked with -lvorbis, -lvorbisenc and
> -lswresample, otherwise it will cause link failures with lots of
> undefined references:
>
> /br/output/build/libexif-0.6.21/libexif/exif-data.c:1197:
> undefined reference to `libintl_dgettext'
>
> /br/output/build/ffmpeg-2.6.2/libavcodec/libvorbisenc.c:311:
> undefined reference to `vorbis_analysis'
>
> /br/output/build/ffmpeg-2.6.2/libavcodec/libvorbisenc.c:113:
> undefined reference to `vorbis_encode_ctl'
>
> /br/output/build/ffmpeg-2.6.2/libavcodec/opusdec.c:374:
> undefined reference to `swr_is_initialized'
>
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> ---
> v1 -> v2: remove unnecessary -lexif
>
> package/minidlna/minidlna.mk | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/package/minidlna/minidlna.mk b/package/minidlna/minidlna.mk
> index 7adb832..37543d6 100644
> --- a/package/minidlna/minidlna.mk
> +++ b/package/minidlna/minidlna.mk
> @@ -17,8 +17,13 @@ MINIDLNA_DEPENDENCIES = \
> ifeq ($(BR2_STATIC_LIBS),y)
> # the configure script / Makefile forgets to link with some of the dependent
> # libraries breaking static linking, so help it along
> +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
> MINIDLNA_CONF_ENV = \
> - LIBS='-lavformat -lavcodec -lavutil -logg -lz -lpthread -lm'
> + LIBS='-lavformat -lavcodec -lavutil -logg -lvorbis -lvorbisenc -lswresample -lz -lpthread -lm -lintl'
> +else
> +MINIDLNA_CONF_ENV = \
> + LIBS='-lavformat -lavcodec -lavutil -logg -lvorbis -lvorbisenc -lswresample -lz -lpthread -lm'
> +endif
Sorry, but this is really getting ridiculous. Please use pkg-config to
find at least some of these dependencies and avoid such conditions in
Buildroot .mk files.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
prev parent reply other threads:[~2015-07-09 12:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-09 10:00 [Buildroot] [PATCH v2] minidlna: fix static link Vicente Olivert Riera
2015-07-09 12:09 ` Thomas Petazzoni [this message]
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=20150709140949.379f15fe@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox