From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2] vlc: fix compile error with uClibc-ng Linuxthreads
Date: Fri, 26 Aug 2016 11:15:26 +0200 [thread overview]
Message-ID: <20160826111526.10e4606b@free-electrons.com> (raw)
In-Reply-To: <20160825190832.GA4674@waldemar-brodkorb.de>
Hello,
On Thu, 25 Aug 2016 21:08:32 +0200, Waldemar Brodkorb wrote:
> diff --git a/package/vlc/0008-fix-fallback-time.patch b/package/vlc/0008-fix-fallback-time.patch
> new file mode 100644
> index 0000000..9692001
> --- /dev/null
> +++ b/package/vlc/0008-fix-fallback-time.patch
> @@ -0,0 +1,27 @@
> +fix fallback code and add missing libraries to link command
> +
> +Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
VLC is hosted in a Git repository, so a Git-formatted patch would be
preferred.
> ++ AC_CHECK_LIB([rt], [posix_spawnp], [VLC_ADD_LIBS([libvlccore],[-lpthread -lrt])], [], [-lpthread])
Why are you linking with -lpthread here?
With uClibc, seems like linking with -lrt is sufficient:
thomas at skate:~/projets/buildroot (master)$ ./output/host/usr/bin/arm-linux-gcc -o foo foo.c
/tmp/ccigljuI.o: In function `main':
foo.c:(.text+0x2c): undefined reference to `posix_spawn'
collect2: error: ld returned 1 exit status
thomas at skate:~/projets/buildroot (master)$ ./output/host/usr/bin/arm-linux-gcc -o foo foo.c -lrt
thomas at skate:~/projets/buildroot (master)$
And it builds fine with glibc with no additional library at all
(neither -lrt nor -lpthread).
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
prev parent reply other threads:[~2016-08-26 9:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-25 19:08 [Buildroot] [PATCH v2] vlc: fix compile error with uClibc-ng Linuxthreads Waldemar Brodkorb
2016-08-26 9:15 ` 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=20160826111526.10e4606b@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