[Buildroot] [PATCH v2] vlc: fix compile error with uClibc-ng Linuxthreads
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Fri Aug 26 09:15:26 UTC 2016
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 at 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
More information about the buildroot
mailing list