Skip to contentSkip to conversation

vlc: fix build with libvorbis and tremor

PATCH New Fabrice Fontaine 2 participants 2 messages Oct 16, 2018 – Oct 17, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vlc: fix build with libvorbis and tremor

Commit 550c42509c203891c47d934b058a19c2fa490973 "package/vlc: fix
linking with tremor" fixed build with BR2_PACKAGE_TREMOR and without
BR2_PACKAGE_LIBVORBIS. However, it breaks build if BR2_PACKAGE_TREMOR
and BR2_PACKAGE_LIBVORBIS are both enabled.
Indeed, by overiding VORBIS_LIBS by -lvorbisidec, link of codec/.libs/libvorbis_plugin_la-vorbis.o with -lvorbis
failed because VORBIS_LIBS is normally used to save "-logg
-lvorbis -lvorbisenc":
PKG_ENABLE_MODULES_VLC([VORBIS], [], [ogg vorbis >= 1.1 vorbisenc >= 1.1], [Vorbis decoder and encoder], [auto])

So replace fourth patch by an upstreamable patch which uses pkg-config to set TREMOR_LIBS if tremor is found instead of "hacking" VORBIS_LIBS

Fixes:
- http://autobuild.buildroot.org/results/85a7bb1996b78dee037d5900b124cbdf5b66a6ac

---
 ...he-name-of-the-vorbis-and-ogg-librar.patch | 31 ------------
 ...ld-use-pkg-config-to-get-tremor-libs.patch | 50 +++++++++++++++++++
 package/vlc/vlc.mk                            |  1 -
 3 files changed, 50 insertions(+), 32 deletions(-)
 delete mode 100644 package/vlc/0004-Don-t-hardcode-the-name-of-the-vorbis-and-ogg-librar.patch
 create mode 100644 package/vlc/0004-build-use-pkg-config-to-get-tremor-libs.patch
package/vlc/0004-Don-t-hardcode-the-name-of-the-vorbis-and-ogg-librar.patch deleted +0 -31
deleted file mode 100644
index a5352b7498..0000000000
@@ -1,31 +0,0 @@
-From 6515c423f9e6b8b607678a260a16db2684d88a4e Mon Sep 17 00:00:00 2001
-From: Bernd Kuhls <[email protected]>
-Date: Tue, 1 May 2018 22:30:09 +0200
-Subject: [PATCH] Don't hardcode the name of the vorbis and ogg libraries
-
-Fixes linking error with tremor due to wrong library name.
-
-Downloaded from Gentoo package
-https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-video/vlc/files/vlc-2.1.0-fix-libtremor-libs.patch?view=markup
-
-Signed-off-by: Bernd Kuhls <[email protected]>
----
- modules/codec/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/modules/codec/Makefile.am b/modules/codec/Makefile.am
-index 10132a92f3..2fb52a586e 100644
---- a/modules/codec/Makefile.am
-+++ b/modules/codec/Makefile.am
-@@ -324,7 +324,7 @@ codec_LTLIBRARIES += $(LTLIBdaala)
- libtremor_plugin_la_SOURCES = codec/vorbis.c
- libtremor_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DMODULE_NAME_IS_tremor
- libtremor_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(codecdir)'
--libtremor_plugin_la_LIBADD = -lvorbisdec -logg
-+libtremor_plugin_la_LIBADD = $(VORBIS_LIBS) $(OGG_LIBS)
- EXTRA_LTLIBRARIES += libtremor_plugin.la
- codec_LTLIBRARIES += $(LTLIBtremor)
- 
--- 
-2.14.4
-
package/vlc/0004-build-use-pkg-config-to-get-tremor-libs.patch new file +50 -0

50 lines not on this page · raw message

package/vlc/vlc.mk +0 -1
index 4d2e5f26c2..73f84d5eb2 100644
@@ -512,7 +512,6 @@ VLC_CONF_OPTS += --disable-taglib
 endif
 
 ifeq ($(BR2_PACKAGE_TREMOR),y)
-VLC_CONF_ENV += VORBIS_LIBS="-lvorbisidec"
 VLC_CONF_OPTS += --enable-tremor
 VLC_DEPENDENCIES += tremor
 else
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 vlc: fix build with libvorbis and tremor

Hello,

Quoted 16 lines · Fabrice Fontaine

Commit 550c42509c203891c47d934b058a19c2fa490973 "package/vlc: fix
linking with tremor" fixed build with BR2_PACKAGE_TREMOR and without
BR2_PACKAGE_LIBVORBIS. However, it breaks build if BR2_PACKAGE_TREMOR
and BR2_PACKAGE_LIBVORBIS are both enabled.
Indeed, by overiding VORBIS_LIBS by -lvorbisidec, link of codec/.libs/libvorbis_plugin_la-vorbis.o with -lvorbis
failed because VORBIS_LIBS is normally used to save "-logg
-lvorbis -lvorbisenc":
PKG_ENABLE_MODULES_VLC([VORBIS], [], [ogg vorbis >= 1.1 vorbisenc >= 1.1], [Vorbis decoder and encoder], [auto])

So replace fourth patch by an upstreamable patch which uses pkg-config to set TREMOR_LIBS if tremor is found instead of "hacking" VORBIS_LIBS

Fixes:
- http://autobuild.buildroot.org/results/85a7bb1996b78dee037d5900b124cbdf5b66a6ac

Quoted 8 lines
---
 ...he-name-of-the-vorbis-and-ogg-librar.patch | 31 ------------
 ...ld-use-pkg-config-to-get-tremor-libs.patch | 50 +++++++++++++++++++
 package/vlc/vlc.mk                            |  1 -
 3 files changed, 50 insertions(+), 32 deletions(-)
 delete mode 100644 package/vlc/0004-Don-t-hardcode-the-name-of-the-vorbis-and-ogg-librar.patch
 create mode 100644 package/vlc/0004-build-use-pkg-config-to-get-tremor-libs.patch

Many thanks for having investigated this problem, and found a fix that indeed looks good. Applied to master, thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com