Many thanks for the much needed reply, please see below ...

BTW, you or may or may not be interested to know that since subscribing to
this and the libav-user list, I've been receiving phishing spam.

>     C E Macfarlane <c.e.macfarlane <at> macfh.co.uk> writes:
>
>     > I've tried:
>     >         ffmpeg-2.2.tar.gz, downloaded 28-03-2014
>     >         ffmpeg-2.2.7.tar.gz, downloaded within the last
>     couple of days
>     >         ffmpeg-2.3.3.tar.gz, downloaded within the last
>     couple of days
>
>     Why didn't you try current git head which is the
>     only version supported on this mailing list?
>     (It won't make a difference but since a fix will
>     only reach current git head, you will have to
>     test in any case.)

I've never got involved with git, as I'm not interested in bleeding edge.  I
just want to get ffmpeg working on this particular device.

>     > Various configuration options have been tried,
>     > based around:
>
>     Various?
>
>     > ./configure --prefix=/opt/share --enable-gpl
>
>     > --enable-nonfree
>
>     Please remove it, it has no effect except changing
>     the license of your binaries (you may not pass
>     them on.)

Will do

>     > --enable-shared
>
>     This is ok, but it may make sense to test without
>     it first.

AFAICR I did, and it made no difference to the end result.  Will try again,
though.

>
>     > --arch=mips
>
>     This is definitely wrong:
>     Either you are cross-compiling, then this is
>     needed but many options are missing, or you
>     are not cross-compiling, then --arch should
>     not be used.

Will remove

>     > --disable-mips32r2 --disable-mipsdspr1
>     > --disable-mipsdspr2 --disable-mipsfpu
>
>     Are they really all necessary?

At least the --disable-mipsdspr1 and --disable-mipsdspr2 are nesessary,
otherwise further compile errors occur.

>     I ask because some effort was put into
>     optimisations for arm

I think you mean MIPS?  (But, BTW, the only way I could get FFMPEG to
compile on another device, a Zyxel NAS221 running on Ox810, ARM926EJ-S rev 5
(v5l) 183 BogoMIPS, was to disable many ARM
optimisations, --cpu=armv5te --disable-armv6 --disable-armv6t2 --disable-neo
n --disable-vfp --disable-vfpv3; however that is history, FFMpeg is working
well on that device now.)

>       and you disable
>     them all afaict...
>
>     > CC      libavdevice/alldevices.o
>     > In file included from ./libavutil/internal.h:167,
>     >                  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:88: error: static declaration of
>     > 'fminf' follows non-static declaration
>
>     Please provide the following:
>     Output of: $ grep HAVE_FMINF config.h
>     The content of config.log starting with
>     "check_mathfunc fminf" until "check_mathfunc"
>     And the output of "make V=1 libavdevice/alldevices.o"

Ok, here's the output from a rerun with the configuration changes you have
suggested:

First for finds of fminf (I'd already got that far, so I'll include them
anyway, before following your advice):
Searching for: fminf in *.*
config.log(3269): fminf
config.log(3539): fminf
config.log(8567): check_mathfunc fminf 2
config.log(8572): 2     float foo(float f, float g) { return fminf(f, g); }
config.log(8578): ffconf.8kYhEsYK.c:(.text+0x20): undefined reference to
`fminf'
libavutil\libm.h(86): #undef fminf
libavutil\libm.h(87): static av_always_inline av_const float fminf(float x,
float y)
doc\config.texi(198): @c @set have-fminf no
Found 8 occurrence(s) in 3 file(s)

Next you wanted a section of config.log as follows (the entire file is
appended):
check_mathfunc fminf 2
check_ld cc
check_cc
BEGIN /share/external/USB_DRIVE_A1/.tmp/ffconf.8kYhEsYK.c
    1   #include <math.h>
    2   float foo(float f, float g) { return fminf(f, g); }
    3   int main(void){ return (int) foo; }
END /share/external/USB_DRIVE_A1/.tmp/ffconf.8kYhEsYK.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_S
OURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -std=c99 -fomit-frame-pointer -fPIC -
mips32r2 -mhard-float -pthread -c -o
/share/external/USB_DRIVE_A1/.tmp/ffconf.EfcsfFPa.o
/share/external/USB_DRIVE_A1/.tmp/ffconf.8kYhEsYK.c
gcc -Wl,--as-needed -o /share/external/USB_DRIVE_A1/.tmp/ffconf.wAa1LEmp
/share/external/USB_DRIVE_A1/.tmp/ffconf.EfcsfFPa.o -lm -lbz2 -lz -pthread
/share/external/USB_DRIVE_A1/.tmp/ffconf.EfcsfFPa.o: In function `foo':
ffconf.8kYhEsYK.c:(.text+0x20): undefined reference to `fminf'
collect2: ld returned 1 exit status

Finally, here's the the results of a new attempt including your suggested
configuration changes:

[build]$ cd ffmpeg-2.3.3
[ffmpeg-2.3.3]$ cp -a /mnt/nfs/FFMpeg-Configure-QNAP.sh .
[ffmpeg-2.3.3]$ cat ./FFMpeg-Configure-QNAP.sh
./configure --prefix=/opt/share --enable-gpl --disable-mipsdspr1 --disable-m
ipsdspr2 --disable-doc $*
[ffmpeg-2.3.3]$ ./FFMpeg-Configure-QNAP.sh > FFMpeg-Configure-QNAP.log
cmp: config.h: No such file or directory
cmp: libavutil/avconfig.h: No such file or directory
[ffmpeg-2.3.3]$ make
CC      libavdevice/alldevices.o
In file included from ./libavutil/libm.h:33,
                 from ./libavutil/internal.h:167,
                 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/mips/libm_mips.h:72:1: warning: "HAVE_LRINTF" redefined
In file included from libavdevice/alldevices.c:21:
./config.h:223:1: warning: this is the location of the previous definition
In file included from ./libavutil/internal.h:167,
                 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:88: error: static declaration of 'fminf' follows
non-static declaration
./libavutil/libm.h:159: error: static declaration of 'lrint' follows
non-static declaration
./libavutil/libm.h:173: error: static declaration of 'round' follows
non-static declaration
./libavutil/libm.h:180: error: static declaration of 'roundf' follows
non-static declaration
./libavutil/libm.h:187: error: static declaration of 'trunc' follows
non-static declaration
./libavutil/libm.h:194: error: static declaration of 'truncf' follows
non-static declaration
make: *** [libavdevice/alldevices.o] Error 1

Additionally, I've just discovered this.  Unfortunately, the rather arcane
posting restrictions means that I can't send the whole file, but here is a
section that looks relevant to the problem, and there is a link below to
download the package if that should be required ...

/opt/info/gcc.info:

=== Begin Quote ===

5.44 Other built-in functions provided by GCC
=============================================

GCC provides a large number of built-in functions other than the ones
mentioned above.  Some of these are for internal use in the processing
of exceptions or variable-length argument lists and will not be
documented here because they may change from time to time; we do not
recommend general use of these functions.

 The remaining functions are provided for optimization purposes.

 GCC includes built-in versions of many of the functions in the standard
C library.  The versions prefixed with `__builtin_' will always be
treated as having the same meaning as the C library function even if you
specify the `-fno-builtin' option.  (*note C Dialect Options::) Many of
these functions are only optimized in certain cases; if they are not
optimized in a particular case, a call to the library function will be
emitted.

 Outside strict ISO C mode (`-ansi', `-std=c89' or `-std=c99'), the
functions `_exit', `alloca', `bcmp', `bzero', `dcgettext', `dgettext',
`dremf', `dreml', `drem', `exp10f', `exp10l', `exp10', `ffsll', `ffsl',
`ffs', `fprintf_unlocked', `fputs_unlocked', `gammaf', `gammal',
`gamma', `gettext', `index', `isascii', `j0f', `j0l', `j0', `j1f',
`j1l', `j1', `jnf', `jnl', `jn', `mempcpy', `pow10f', `pow10l', `pow10',
`printf_unlocked', `rindex', `scalbf', `scalbl', `scalb', `signbit',
`signbitf', `signbitl', `significandf', `significandl', `significand',
`sincosf', `sincosl', `sincos', `stpcpy', `strdup', `strfmon',
`toascii', `y0f', `y0l', `y0', `y1f', `y1l', `y1', `ynf', `ynl' and `yn'
may be handled as built-in functions.  All these functions have
corresponding versions prefixed with `__builtin_', which may be used
even in strict C89 mode.

 The ISO C99 functions `_Exit', `acoshf', `acoshl', `acosh', `asinhf',
`asinhl', `asinh', `atanhf', `atanhl', `atanh', `cabsf', `cabsl',
`cabs', `cacosf', `cacoshf', `cacoshl', `cacosh', `cacosl', `cacos',
`cargf', `cargl', `carg', `casinf', `casinhf', `casinhl', `casinh',
`casinl', `casin', `catanf', `catanhf', `catanhl', `catanh', `catanl',
`catan', `cbrtf', `cbrtl', `cbrt', `ccosf', `ccoshf', `ccoshl',
`ccosh', `ccosl', `ccos', `cexpf', `cexpl', `cexp', `cimagf', `cimagl',
`cimag', `conjf', `conjl', `conj', `copysignf', `copysignl',
`copysign', `cpowf', `cpowl', `cpow', `cprojf', `cprojl', `cproj',
`crealf', `creall', `creal', `csinf', `csinhf', `csinhl', `csinh',
`csinl', `csin', `csqrtf', `csqrtl', `csqrt', `ctanf', `ctanhf',
`ctanhl', `ctanh', `ctanl', `ctan', `erfcf', `erfcl', `erfc', `erff',
`erfl', `erf', `exp2f', `exp2l', `exp2', `expm1f', `expm1l', `expm1',
`fdimf', `fdiml', `fdim', `fmaf', `fmal', `fmaxf', `fmaxl', `fmax',
`fma', `fminf', `fminl', `fmin', `hypotf', `hypotl', `hypot', `ilogbf',
`ilogbl', `ilogb', `imaxabs', `isblank', `iswblank', `lgammaf',
`lgammal', `lgamma', `llabs', `llrintf', `llrintl', `llrint',
`llroundf', `llroundl', `llround', `log1pf', `log1pl', `log1p',
`log2f', `log2l', `log2', `logbf', `logbl', `logb', `lrintf', `lrintl',
`lrint', `lroundf', `lroundl', `lround', `nearbyintf', `nearbyintl',
`nearbyint', `nextafterf', `nextafterl', `nextafter', `nexttowardf',
`nexttowardl', `nexttoward', `remainderf', `remainderl', `remainder',
`remquof', `remquol', `remquo', `rintf', `rintl', `rint', `roundf',
`roundl', `round', `scalblnf', `scalblnl', `scalbln', `scalbnf',
`scalbnl', `scalbn', `snprintf', `tgammaf', `tgammal', `tgamma',
`truncf', `truncl', `trunc', `vfscanf', `vscanf', `vsnprintf' and
`vsscanf' are handled as built-in functions except in strict ISO C90
mode (`-ansi' or `-std=c89').

=== End Quote ===

The ipkg details for gcc are:

Package: gcc
Version: 4.0.4-1
Depends: binutils, libc-dev
Section: base
Architecture: mipsel
Maintainer: NSLU2 Linux <[email protected]>
MD5Sum: 1a3a1a372c1a6234740fc73b548f6a2f
Size: 14679987
Filename: gcc_4.0.4-1_mipsel.ipk
Source: http://ftp.gnu.org/gnu/gcc/gcc-4.0.4/gcc-4.0.4.tar.bz2
Description: The GNU Compiler Collection.

The ipkg source download was:
http://ipkg.nslu2-linux.org/feeds/optware/wdtv/cross/stable/gcc_4.0.4-1_mips
el.ipk

Thanks again for any further advice you can give.


_______________________________________________
ffmpeg-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

Reply via email to