Hello, looks like the custom implementation of lrintf is not working on i386 on Ubuntu i386
https://launchpad.net/ubuntu/+source/faad2/2.8.8-3/+build/16916356
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility=hidden -g -O2 -fdebug-prefix-map=/<<pkgbuilddir>>=. -fstack-protector-strong -Wformat -Werror=format-security -c drc.c -fPIC -DPIC -o .libs/libfaad_la-drc.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility=hidden -g -O2 -fdebug-prefix-map=/<<pkgbuilddir>>=. -fstack-protector-strong -Wformat -Werror=format-security -c cfft.c -fPIC -DPIC -o .libs/libfaad_la-cfft.o
In file included from common.h:370,
from decoder.c:31:
/usr/include/i386-linux-gnu/bits/mathcalls.h:314:1: error: conflicting types for ‘lrintf’
MATHDECL (long int,lrint,, (Mdouble x));
^~~~~~~~~~
In file included from decoder.c:31:
common.h:335:23: note: previous definition of ‘lrintf’ was here
static INLINE int lrintf(float f)
^~~~~~
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility=hidden -g -O2 -fdebug-prefix-map=/<<pkgbuilddir>>=. -fstack-protector-strong -Wformat -Werror=format-security -c bits.c -fPIC -DPIC -o .libs/libfaad_la-bits.o</pkgbuilddir></pkgbuilddir></pkgbuilddir>
But I don't really care, because I want to use the system version anyway, and with a wl,asneeded fix I succeeded in finding it on the system.
patch: http://launchpadlibrarian.net/427773869/faad2_2.8.8-3_2.8.8-3ubuntu1.diff.gz
--- faad2-2.8.8.orig/configure.ac
+++ faad2-2.8.8/configure.ac
@@ -91,8 +91,8 @@ AC_DEFUN([AC_C99_FUNC_LRINTF],
[AC_CACHE_CHECK(for lrintf,
ac_cv_c99_lrintf,
[
-lrintf_save_CFLAGS=$CFLAGS
-CFLAGS="-O -lm"
+lrintf_save_LIBS=$LIBS
+LIBS="-O -lm"
AC_TRY_LINK([
#define _ISOC9X_SOURCE 1
#define _ISOC99_SOURCE 1
@@ -102,7 +102,7 @@ AC_TRY_LINK([
#include <math.h>
]</math.h>, if (!lrintf(3.14159)) lrintf(2.7183);, ac_cv_c99_lrintf=yes, ac_cv_c99_lrintf=no)
-CFLAGS=$lrintf_save_CFLAGS
+LIBS=$lrintf_save_LIBS
])
libs should be added at the end of the build command line, so in LIBS section and not CFLAGS.
Please apply, thanks!
https://github.com/knik0/faad2/commit/920ec985a74c6f88fe507181df07a0cd7e51d519