[FFmpeg-user] ffmpeg cross compile error
Moritz Barsnick
barsnick at gmx.net
Wed Jul 24 17:04:34 EEST 2019
On Wed, Jul 24, 2019 at 15:28:04 +0200, Thomas Schmiedl wrote:
> Hello,
>
> I try to cross compile ffmpeg (git) using this toolchain
> https://freetz.github.io/ for a MIPS-based router. My goal is to extract
> a single image from this mjpeg-webcam-stream
> http://gwm.ccshpraha.cz:8087/. Attached are the make output and
> config.log (contains the configure parameters)
[...]
> CC libavdevice/alldevices.o
> In file included from /home/user/freetz/toolchain/build/mips_gcc-5.5.0_uClibc-1.0.14-nptl_kernel-3.10/mips-linux-uclibc/include/stdlib.h:32:0,
> from /home/user/freetz/toolchain/build/mips_gcc-5.5.0_uClibc-1.0.14-nptl_kernel-3.10/mips-linux-uclibc/include/bits/sched.h:116,
> from /home/user/freetz/toolchain/build/mips_gcc-5.5.0_uClibc-1.0.14-nptl_kernel-3.10/mips-linux-uclibc/include/sched.h:34,
> from /home/user/freetz/toolchain/build/mips_gcc-5.5.0_uClibc-1.0.14-nptl_kernel-3.10/mips-linux-uclibc/include/pthread.h:24,
> from ./libavutil/thread.h:30,
> from libavdevice/alldevices.c:22:
> ./config.h:17:19: error: expected identifier or '(' before 'void'
> #define getenv(x) NULL
> ^
> ./config.h:17:19: error: expected ')' before numeric constant
> #define getenv(x) NULL
> ^
> In file included from ./libavutil/internal.h:176:0,
> from ./libavutil/common.h:491,
> from ./libavutil/avutil.h:296,
> from ./libavutil/samplefmt.h:24,
> from ./libavcodec/avcodec.h:31,
> from ./libavformat/avformat.h:317,
> from ./libavformat/internal.h:27,
> from libavdevice/alldevices.c:23:
> ./libavutil/libm.h:54:32: error: static declaration of 'cbrt' follows non-static declaration
> static av_always_inline double cbrt(double x)
> ^
This looks like this:
https://github.com/openwrt/packages/issues/6735
and the workaround seems to be adding "--cpu=<something>". See
https://github.com/openwrt/packages/pull/6743/commits/8067051bfc99f48d02aec52265fc9b78f8e60dee
I don't know if there's a real bug in ffmpeg's source here. This here:
> ./config.h:17:19: error: expected identifier or '(' before 'void'
> #define getenv(x) NULL
indicates that the NULL macro is different on MIPS, and ffmpeg's macro
might have to be:
> #define getenv(x) (NULL)
just in case??
Moritz
More information about the ffmpeg-user
mailing list