package/ffmpeg: Bump to version 2.3.1
PATCH 1/1 package/ffmpeg: Bump to version 2.3.1
- remove obsolete option --disable-vis
- add patch to fix compile error with uClibc
- add patch to fix compile error in freerdp
Compile-tested against all packages depending on ffmpeg using this defconfig:
BR2_TOOLCHAIN_EXTERNAL=y
BR2_PACKAGE_GSTREAMER=y
BR2_PACKAGE_GST_FFMPEG=y
BR2_PACKAGE_MPD=y
BR2_PACKAGE_MPD_FFMPEG=y
BR2_PACKAGE_XORG7=y
BR2_PACKAGE_FREERDP=y
BR2_PACKAGE_OPENCV=y
BR2_PACKAGE_OPENCV_WITH_FFMPEG=y
BR2_PACKAGE_MEDIASTREAMER=y
BR2_PACKAGE_MINIDLNA=y
VLC also compiled when the build of vlc-static is disabled in Makefiles, otherwise this known error occurs:
http://autobuild.buildroot.net/results/022/022252176c051ff3365b2cb820f32aafc802803a/
--- package/ffmpeg/ffmpeg-0001-fminf.patch | 47 +++++++++++++++++ package/ffmpeg/ffmpeg.mk | 3 +- package/freerdp/freerdp-0001-ffmpeg.patch | 78 +++++++++++++++++++++++++++++ 3 files changed, 126 insertions(+), 2 deletions(-) create mode 100644 package/ffmpeg/ffmpeg-0001-fminf.patch create mode 100644 package/freerdp/freerdp-0001-ffmpeg.patch
package/ffmpeg/ffmpeg-0001-fminf.patch new file +47 -0
@@ -0,0 +1,47 @@ +Fix build error + +CC libavdevice/alldevices.o +In file included from ./libavutil/internal.h:167:0, + from ./libavutil/common.h:415, + from ./libavutil/avutil.h:289, + from ./libavutil/log.h:25, + from libavdevice/avdevice.h:46, + from libavdevice/alldevices.c:22: +./libavutil/libm.h:87:40: error: static declaration of 'fminf' follows non-static declaration + static av_always_inline av_const float fminf(float x, float y) + ^ +make: *** [libavdevice/alldevices.o] Error 1 + +using buildroot-compiled uClibc toolchain, used defconfig: + +BR2_x86_64=y +BR2_x86_corei7=y +BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y +BR2_TOOLCHAIN_BUILDROOT_INET_IPV6=y +BR2_TOOLCHAIN_BUILDROOT_INET_RPC=y +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y + +Signed-off-by: Bernd Kuhls <[email protected]> + + +diff -uNr ffmpeg-d028c907004e8a3c0f5161ce595331e4cc57c86c.org/libavutil/libm.h ffmpeg-d028c907004e8a3c0f5161ce595331e4cc57c86c/libavutil/libm.h +--- ffmpeg-d028c907004e8a3c0f5161ce595331e4cc57c86c.org/libavutil/libm.h 2014-07-16 20:37:20.000000000 +0200 ++++ ffmpeg-d028c907004e8a3c0f5161ce595331e4cc57c86c/libavutil/libm.h 2014-07-17 22:58:01.781316442 +0200 +@@ -82,16 +82,6 @@ + #define exp2f(x) ((float)exp2(x)) + #endif /* HAVE_EXP2F */ + +-#if !HAVE_FMINF +-#undef fminf +-static av_always_inline av_const float fminf(float x, float y) +-{ +- //Note, the NaN special case is needed for C spec compliance, it should be +- //optimized away if the users compiler is configured to assume no NaN +- return x > y ? y : (x == x ? x : y); +-} +-#endif +- + #if !HAVE_ISINF + static av_always_inline av_const int isinf(float x) + {
package/ffmpeg/ffmpeg.mk +1 -2
@@ -4,7 +4,7 @@ # ################################################################################ -FFMPEG_VERSION = 1.2.7 +FFMPEG_VERSION = 2.3.1 FFMPEG_SOURCE = ffmpeg-$(FFMPEG_VERSION).tar.bz2 FFMPEG_SITE = http://ffmpeg.org/releases FFMPEG_INSTALL_STAGING = YES
@@ -65,7 +65,6 @@ FFMPEG_CONF_OPT = \ --disable-libtheora \ --disable-libvo-aacenc \ --disable-libvo-amrwbenc \ - --disable-vis \ --disable-sram \ --disable-symver \ --disable-doc
package/freerdp/freerdp-0001-ffmpeg.patch new file +78 -0
78 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH 1/1 package/ffmpeg: Bump to version 2.3.1
Dear Bernd Kuhls,
Quoted 3 lines · Bernd Kuhls
- remove obsolete option --disable-vis
- add patch to fix compile error with uClibc
- add patch to fix compile error in freerdp
I've applied the patch. However, I have one comment, below.
Quoted 7 lines
+diff -uNr
ffmpeg-d028c907004e8a3c0f5161ce595331e4cc57c86c.org/libavutil/libm.hffmpeg-d028c907004e8a3c0f5161ce595331e4cc57c86c/libavutil/libm.h
+---ffmpeg-d028c907004e8a3c0f5161ce595331e4cc57c86c.org/libavutil/libm.h2014-07-16 20:37:20.000000000 +0200
++++ffmpeg-d028c907004e8a3c0f5161ce595331e4cc57c86c/libavutil/libm.h2014-07-17 22:58:01.781316442 +0200
+@@ -82,16 +82,6 @@
+ #define exp2f(x) ((float)exp2(x))
+ #endif /*HAVE_EXP2F*/
+
Quoted 9 lines
+-#if !HAVE_FMINF
+-#undef fminf
+-static av_always_inline av_const float fminf(float x, float y)
+-{
+- //Note, the NaN special case is needed for C spec compliance, it should be
+- //optimized away if the users compiler is configured to assume no NaN
+- return x > y ? y : (x == x ? x : y);
+-}
+-#endifThis looks weird: if fminf() is already defined in uClibc, then HAVE_FMINF should have been true and this code should not have been included into the build.
What happened with the HAVE_FMINF test? Maybe it would be worth having a look to do a upstream acceptable fix for this issue?
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 package/ffmpeg: Bump to version 2.3.1
[posted and mailed]
Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8 @public.gmane.org> wrote in news:20140803102404.7d7fa4b6 at free-electrons.com:
Quoted 6 lines
This looks weird: if
fminf()is already defined in uClibc, thenHAVE_FMINFshould have been true and this code should not have been included into the build.What happened with the
HAVE_FMINFtest? Maybe it would be worth having a look to do a upstream acceptable fix for this issue?
Hi,
output/build/ffmpeg-2.3.1/config.log contains ffconf.Vyn5TU6p.c:(.text+0x1f): undefined reference to `fminf'
which leads to
#define HAVE_FMINF 0
in output/build/ffmpeg-2.3.1/config.h which seems true when looking at
http://git.uclibc.org/uClibc/tree/libm/float_wrappers.c#n48
Tested with
BR2_UCLIBC_VERSION_0_9_33=y
# BR2_UCLIBC_VERSION_SNAPSHOT is not set
BR2_UCLIBC_VERSION_STRING="0.9.33.2"
and
BR2_UCLIBC_VERSION_SNAPSHOT=y
BR2_USE_UCLIBC_SNAPSHOT="snapshot"
Regards, Bernd
PATCH 1/1 package/ffmpeg: Bump to version 2.3.1
Dear Bernd Kuhls,
Quoted 9 lines · Bernd Kuhls
output/build/ffmpeg-2.3.1/config.log contains ffconf.Vyn5TU6p.c:(.text+0x1f): undefined reference to `fminf'
which leads to
#define
HAVE_FMINF0in
output/build/ffmpeg-2.3.1/config.hwhich seems true when looking at
http://git.uclibc.org/uClibc/tree/libm/float_wrappers.c#n48
So, this should work without the need for your patch, right?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 package/ffmpeg: Bump to version 2.3.1
Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8 @public.gmane.org> wrote in news:20140803143250.362afa9e at free-electrons.com:
Quoted 7 lines
Dear Bernd Kuhls,
Quoted 3 lines · Bernd Kuhls
output/build/ffmpeg-2.3.1/config.log contains ffconf.Vyn5TU6p.c:(.text+0x1f): undefined reference to `fminf'
Quoted 8 lines
Quoted 6 lines
which leads to
#define
HAVE_FMINF0in
output/build/ffmpeg-2.3.1/config.hwhich seems true when looking at
http://git.uclibc.org/uClibc/tree/libm/float_wrappers.c#n48So, this should work without the need for your patch, right?
Hi,
I do not know why the code is broken, but without my patch ffmpeg did not compile. Because uClibc does not provide fminf ffmpeg?s own implementation of fminf in libavutil/libm.h is compiled, but this breaks.
Removing the whole fminf function works because fminf is used nowhere in ffmpeg.
Having a look at
http://git.videolan.org/?p=ffmpeg.git;a=history;f=libavutil/libm.h;h=
28d5df871b39a1a8f99bc9540d7f9a8ccd840d59;hb=HEAD
we can see that there were already five commits to implement fminf. I will open a bug report.
Regards, Bernd