uclibc/ffmpeg: Fix fminf-related build error
PATCH 1/1 uclibc/ffmpeg: Fix fminf-related build error
The build error I saw while bumping ffmpeg to 2.3.1 was caused by uClibc, not ffmpeg:
http://news.gmane.org/find-root.php?message_id=20140804213955.42443190%40debian
ffmpeg-0001-fminf.patch can be removed in favour of uclibc-0063-fminf.patch.
--- package/ffmpeg/ffmpeg-0001-fminf.patch | 47 --------- package/uclibc/0.9.33.2/uclibc-0063-fminf.patch | 127 +++++++++++++++++++++++ 2 files changed, 127 insertions(+), 47 deletions(-) delete mode 100644 package/ffmpeg/ffmpeg-0001-fminf.patch create mode 100644 package/uclibc/0.9.33.2/uclibc-0063-fminf.patch
package/ffmpeg/ffmpeg-0001-fminf.patch deleted +0 -47
@@ -1,47 +0,0 @@ -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/uclibc/0.9.33.2/uclibc-0063-fminf.patch new file +127 -0
127 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH 1/1 uclibc/ffmpeg: Fix fminf-related build error
Dear Bernd Kuhls,
Quoted 6 lines · Bernd Kuhls
The build error I saw while bumping ffmpeg to 2.3.1 was caused by uClibc, not ffmpeg:
http://news.gmane.org/find-root.php?message_id=20140804213955.42443190%40debianffmpeg-0001-fminf.patch can be removed in favour of uclibc-0063-fminf.patch.
Quoted 7 lines
Signed-off-by Bernd Kuhls <[email protected]>--- package/ffmpeg/ffmpeg-0001-fminf.patch | 47 --------- package/uclibc/0.9.33.2/uclibc-0063-fminf.patch | 127 +++++++++++++++++++++++ 2 files changed, 127 insertions(+), 47 deletions(-) delete mode 100644 package/ffmpeg/ffmpeg-0001-fminf.patch create mode 100644 package/uclibc/0.9.33.2/uclibc-0063-fminf.patch
Even though this looks like the right fix, it is a bit annoying, because it means that ffmpeg will no longer build with a large number of external uClibc toolchains (built with Buildroot versions older than the one that would have this commit included, built with Crosstool-NG, made available by third-parties, etc.).
Do you think we could have a solution that combines keeping the ffmpeg fminf() patch, and adding the uClibc patch? Having the uClibc patch is good because it fixes a real issue in uClibc. Keeping the ffmpeg fminf() patch ensures that our ffmpeg package builds with other uClibc toolchains than just the latest Buildroot uClibc toolchain.
What do you think?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 uclibc/ffmpeg: Fix fminf-related build error
[posted and mailed]
Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8 @public.gmane.org> wrote in news:20141005234010.17ab13c5 at free-electrons.com:
Quoted 2 lines
Do you think we could have a solution that combines keeping the ffmpeg
fminf()patch, and adding the uClibc patch?
Hi,
I will investigate, but it will take several days for me to do so. Meanwhile I will send the next ffmpeg version bump now ;)
Regards, Bernd
PATCH 1/1 uclibc/ffmpeg: Fix fminf-related build error
Dear Bernd Kuhls,
Quoted 5 lines · Bernd Kuhls
[posted and mailed]
Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8 @public.gmane.org> wrote in news:20141005234010.17ab13c5 at free-electrons.com:
Quoted 7 lines
Quoted 2 lines
Do you think we could have a solution that combines keeping the ffmpeg
fminf()patch, and adding the uClibc patch?Hi,
I will investigate, but it will take several days for me to do so. Meanwhile I will send the next ffmpeg version bump now ;)
Any progress on this issue?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 uclibc/ffmpeg: Fix fminf-related build error
[posted and mailed]
Thomas Petazzoni <[email protected]> wrote in news:20141030230535.4d6673bd at free-electrons.com:
Quoted 13 lines
Dear Bernd Kuhls,
Quoted 10 lines · Bernd Kuhls
[posted and mailed]
Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8 @public.gmane.org> wrote in news:20141005234010.17ab13c5-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8 at public.gma ne.org:
Quoted 2 lines
Do you think we could have a solution that combines keeping the ffmpeg
fminf()patch, and adding the uClibc patch?
Quoted 6 lines
Quoted 4 lines
Hi,
I will investigate, but it will take several days for me to do so. Meanwhile I will send the next ffmpeg version bump now ;)
Any progress on this issue?
Hi Thomas,
yes, upstream fixed the issue yesterday!
http://patchwork.ozlabs.org/patch/408557/
Regards, Bernd