Dafang-Hacks / Main

140 stars 63 forks source link

WIP - FFmpeg compile script #85

Closed tim-devel closed 3 years ago

tim-devel commented 3 years ago

The version of libav shipped with dafang hacks is ancient and doesn't have proper AAC support. I have been trying to compile a new version of FFmpeg but have hit a brick wall. I have been using the following examples as reference:

https://github.com/hawkhsieh/ffmpeg-mips/blob/master/Dockerfile https://github.com/openmiko/openmiko/tree/master/custompackages/package/ffmpeg https://trac.ffmpeg.org/wiki/CompilationGuide/MIPS

Potential fix for issue: EliasKotlyar/Xiaomi-Dafang-Hacks#1658

jmtatsch commented 3 years ago

Is this where you are stuck compiling?

`Compiling Modules/ffmpeg setting /home/tatsch/Workspace/Main --2021-03-21 13:53:00-- https://ffmpeg.org/releases/ffmpeg-4.3.2.tar.gz Resolving ffmpeg.org (ffmpeg.org)... 79.124.17.100 Connecting to ffmpeg.org (ffmpeg.org)|79.124.17.100|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 14104501 (13M) [application/x-gzip] Saving to: ‘ffmpeg-4.3.2.tar.gz’

ffmpeg-4.3.2.tar.gz 100%[================================================================================================================>] 13,45M 6,41MB/s in 2,1s

2021-03-21 13:53:02 (6,41 MB/s) - ‘ffmpeg-4.3.2.tar.gz’ saved [14104501/14104501]

install prefix /home/tatsch/Workspace/Main/Modules/ffmpeg/build source path . C compiler mips-linux-gnu-gcc C library glibc host C compiler gcc host C library glibc ARCH c (generic) big-endian yes runtime cpu detection yes debug symbols yes strip symbols yes optimize for size no optimizations no static yes shared no postprocessing support no network support no threading support no safe bitstream reader yes texi2html enabled no perl enabled yes pod2man enabled yes makeinfo enabled yes makeinfo supports HTML yes

External libraries:

External libraries providing hardware acceleration:

Libraries: avcodec avdevice avfilter avformat avutil swresample swscale

Programs: ffmpeg ffprobe

Enabled decoders:

Enabled encoders:

Enabled hwaccels:

Enabled parsers: aac bmp dpx g723_1 h264 mpegaudio rv40 vp3 aac_latm cavsvideo dvaudio g729 hevc mpegvideo sbc vp8 ac3 cook dvbsub gif jpeg2000 opus sipr vp9 adx dca dvd_nav gsm mjpeg png tak webp av1 dirac dvdsub h261 mlp pnm vc1 xma avs2 dnxhd flac h263 mpeg4video rv30 vorbis

Enabled demuxers: aa bfstm filmstrip image_dds_pipe lrc nuv rpl tty aac bink fits image_dpx_pipe lvf ogg rsd txd ac3 bintext flac image_exr_pipe lxf oma rso ty acm bit flic image_gif_pipe m4v paf s337m v210 act bmv flv image_j2k_pipe matroska pcm_alaw sami v210x adf boa fourxm image_jpeg_pipe mgsts pcm_f32be sbc vag adp brstm frm image_jpegls_pipe microdvd pcm_f32le sbg vc1 ads c93 fsb image_pam_pipe mjpeg pcm_f64be scc vc1t adx caf fwse image_pbm_pipe mjpeg_2000 pcm_f64le sdr2 vividas aea cavsvideo g722 image_pcx_pipe mlp pcm_mulaw sds vivo afc cdg g723_1 image_pgm_pipe mlv pcm_s16be sdx vmd aiff cdxl g726 image_pgmyuv_pipe mm pcm_s16le segafilm vobsub aix cine g726le image_pictor_pipe mmf pcm_s24be ser voc alp codec2 g729 image_png_pipe mov pcm_s24le shorten vpk amr codec2raw gdv image_ppm_pipe mp3 pcm_s32be siff vplayer amrnb concat genh image_psd_pipe mpc pcm_s32le sln vqf amrwb data gif image_qdraw_pipe mpc8 pcm_s8 smacker w64 anm daud gsm image_sgi_pipe mpegps pcm_u16be smjpeg wav apc dcstr gxf image_sunrast_pipe mpegts pcm_u16le smush wc3 ape derf h261 image_svg_pipe mpegtsraw pcm_u24be sol webm_dash_manifest apm dfa h263 image_tiff_pipe mpegvideo pcm_u24le sox webvtt apng dhav h264 image_webp_pipe mpjpeg pcm_u32be spdif wsaud aptx dirac hca image_xpm_pipe mpl2 pcm_u32le srt wsd aptx_hd dnxhd hcom image_xwd_pipe mpsub pcm_u8 stl wsvqa aqtitle dsf hevc ingenient msf pcm_vidc str wtv argo_asf dsicin hls ipmovie msnwc_tcp pjs subviewer wv asf dss hnm ircam mtaf pmp subviewer1 wve asf_o dts ico iss mtv pp_bnk sup xa ass dtshd idcin iv8 musx pva svag xbin ast dv idf ivf mv pvf swf xmv au dvbsub iff ivr mvi qcp tak xvag av1 dvbtxt ifv jacosub mxf r3d tedcaptions xwma avi dxa ilbc jv mxg rawvideo thp yop avr ea image2 kux nc realtext threedostr yuv4mpegpipe avs ea_cdata image2_alias_pix kvag nistsphere redspark tiertexseq avs2 eac3 image2_brender_pix live_flv nsp rl2 tmv bethsoftvid epaf image2pipe lmlm4 nsv rm truehd bfi ffmetadata image_bmp_pipe loas nut roq tta

Enabled muxers: a64 codec2raw g723_1 jacosub mpeg2svcd pcm_s16be rtp_mpegts uncodedframecrc ac3 crc g726 kvag mpeg2video pcm_s16le sbc vc1 adts dash g726le latm mpeg2vob pcm_s24be scc vc1t adx data gif lrc mpegts pcm_s24le segafilm voc aiff daud gsm m4v mpjpeg pcm_s32be segment w64 amr dirac gxf matroska mxf pcm_s32le singlejpeg wav apng dnxhd h261 matroska_audio mxf_d10 pcm_s8 smjpeg webm aptx dts h263 md5 mxf_opatom pcm_u16be smoothstreaming webm_chunk aptx_hd dv h264 microdvd null pcm_u16le sox webm_dash_manifest asf eac3 hash mjpeg nut pcm_u24be spdif webp asf_stream f4v hds mkvtimestamp_v2 oga pcm_u24le spx webvtt ass ffmetadata hevc mlp ogg pcm_u32be srt wtv ast fifo_test hls mmf ogv pcm_u32le stream_segment wv au filmstrip ico mov oma pcm_u8 streamhash yuv4mpegpipe avi fits ilbc mp2 opus pcm_vidc sup avm2 flac image2 mp3 pcm_alaw psp swf avs2 flv image2pipe mp4 pcm_f32be rawvideo tee bit framecrc ipod mpeg1system pcm_f32le rm tg2 caf framehash ircam mpeg1vcd pcm_f64be roq tgp cavsvideo framemd5 ismv mpeg1video pcm_f64le rso truehd codec2 g722 ivf mpeg2dvd pcm_mulaw rtp tta

Enabled protocols: cache crypto file md5 prompeg tee concat data hls pipe subfile

Enabled filters: abench anlmdn cas displace headphone minterpolate selectivecolor telecine abitscope anlms cellauto dnn_processing hflip mix sendcmd testsrc acompressor anoisesrc channelmap doubleweave highpass movie separatefields testsrc2 acontrast anull channelsplit drawbox highshelf negate setdar thistogram acopy anullsink chorus drawgraph hilbert nlmeans setfield threshold acrossfade anullsrc chromahold drawgrid histogram noformat setparams thumbnail acrossover apad chromakey drmeter hqx noise setpts tile acrusher aperms chromashift dynaudnorm hstack normalize setrange tlut2 acue aphasemeter ciescope earwax hue null setsar tmedian addroi aphaser codecview ebur128 hwdownload nullsink settb tmix adeclick apulsator color edgedetect hwmap nullsrc showcqt tonemap adeclip arealtime colorbalance elbg hwupload oscilloscope showfreqs tpad adelay aresample colorchannelmixer entropy hysteresis overlay showinfo transpose aderivative areverse colorhold equalizer idet pad showpalette treble adrawgraph arnndn colorkey erosion il pal100bars showspatial tremolo aecho aselect colorlevels extractplanes inflate pal75bars showspectrum trim aemphasis asendcmd colorspace extrastereo interleave palettegen showspectrumpic unpremultiply aeval asetnsamples compand fade join paletteuse showvolume unsharp aevalsrc asetpts compensationdelay fftdnoiz lagfun pan showwaves untile afade asetrate concat fftfilt lenscorrection perms showwavespic v360 afftdn asettb convolution field life photosensitivity shuffleframes vectorscope afftfilt ashowinfo convolve fieldhint limiter pixdesctest shuffleplanes vflip afifo asidedata copy fieldmatch loop pixscope sidechaincompress vfrdet afir asoftclip crop fieldorder loudnorm premultiply sidechaingate vibrance afirsrc asplit crossfeed fifo lowpass prewitt sidedata vibrato aformat astats crystalizer fillborders lowshelf pseudocolor sierpinski vignette agate astreamselect cue firequalizer lumakey psnr signalstats vmafmotion agraphmonitor asubboost curves flanger lut qp silencedetect volume ahistogram atadenoise datascope floodfill lut1d random silenceremove volumedetect aiir atempo dblur format lut2 readeia608 sinc vstack aintegral atrim dcshift fps lut3d readvitc sine w3fdif ainterleave avectorscope dctdnoiz framepack lutrgb realtime smptebars waveform alimiter avgblur deband framerate lutyuv remap smptehdbars weave allpass axcorrelate deblock framestep mandelbrot removegrain sobel xbr allrgb bandpass decimate freezedetect maskedclamp removelogo spectrumsynth xfade allyuv bandreject deconvolve freezeframes maskedmax replaygain split xmedian aloop bass dedot gblur maskedmerge reverse sr xstack alphaextract bbox deesser geq maskedmin rgbashift ssim yadif alphamerge bench deflate gradfun maskedthreshold rgbtestsrc stereotools yaepblur amerge bilateral deflicker gradients maskfun roberts stereowiden yuvtestsrc ametadata biquad dejudder graphmonitor mcompand rotate streamselect zoompan amix bitplanenoise derain greyedge median scale superequalizer amovie blackdetect deshake haas mergeplanes scale2ref surround amplify blend despill haldclut mestimate scdet swaprect amultiply bm3d detelecine haldclutsrc metadata scroll swapuv anequalizer bwdif dilation hdcd midequalizer select tblend

Enabled bsfs: aac_adtstoasc dca_core h264_metadata hevc_mp4toannexb mp3_header_decompress opus_metadata trace_headers vp9_superframe_split av1_frame_merge dump_extradata h264_mp4toannexb imx_dump_header mpeg2_metadata pcm_rechunk truehd_core av1_frame_split eac3_core h264_redundant_pps mjpeg2jpeg mpeg4_unpack_bframes prores_metadata vp9_metadata av1_metadata extract_extradata hapqa_extract mjpega_dump_header noise remove_extradata vp9_raw_reorder chomp filter_units hevc_metadata mov2textsub null text2movsub vp9_superframe

Enabled indevs: fbdev lavfi

Enabled outdevs: fbdev

License: LGPL version 2.1 or later

WARNING: The --disable-yasm option is only provided for compatibility and will be removed in the future. Use --enable-x86asm / --disable-x86asm instead. WARNING: mips-linux-gnu-pkg-config not found, library detection may fail. WARNING: generic cpu selected GEN libavutil/libavutil.version GEN libswscale/libswscale.version GEN libswresample/libswresample.version GEN libavcodec/libavcodec.version GEN libavformat/libavformat.version GEN libavfilter/libavfilter.version GEN libavdevice/libavdevice.version CC libavdevice/alldevices.o In file included from /usr/mips-linux-gnu/include/features.h:470, from /usr/mips-linux-gnu/include/bits/libc-header-start.h:33, from /usr/mips-linux-gnu/include/stdint.h:26, from /usr/lib/gcc-cross/mips-linux-gnu/9/include/stdint.h:9, from ./libavformat/internal.h:24, from libavdevice/alldevices.c:23: /usr/mips-linux-gnu/include/gnu/stubs.h:17:11: fatal error: gnu/stubs-o32_hard_2008.h: No such file or directory 17 | # include <gnu/stubs-o32_hard_2008.h> | ^~~~~~~ compilation terminated. make: *** [ffbuild/common.mak:59: libavdevice/alldevices.o] Error 1`

tim-devel commented 3 years ago

I managed to fix that by doing a symbolic link of stubs-o32_hard_2008.h to /usr/mips-linux-gnu/include/gnu/stubs-032.h but then you get another load of errors

jmtatsch commented 3 years ago

Can you post the errors you are facing then? So it's less effort for people to dive in ...

tim-devel commented 3 years ago

yes, of course. Sorry :-) ......

libavutil/avconfig.h is unchanged
libavfilter/filter_list.c is unchanged
libavcodec/codec_list.c is unchanged
libavcodec/parser_list.c is unchanged
libavcodec/bsf_list.c is unchanged
libavformat/demuxer_list.c is unchanged
libavformat/muxer_list.c is unchanged
libavdevice/indev_list.c is unchanged
libavdevice/outdev_list.c is unchanged
libavformat/protocol_list.c is unchanged
ffbuild/config.sh is unchanged
GEN libavutil/libavutil.version
GEN libswscale/libswscale.version
GEN libswresample/libswresample.version
GEN libavcodec/libavcodec.version
GEN libavformat/libavformat.version
GEN libavfilter/libavfilter.version
GEN libavdevice/libavdevice.version
CC  libavdevice/alldevices.o
In file included from /usr/mips-linux-gnu/include/sys/types.h:144,
                 from /usr/mips-linux-gnu/include/stdlib.h:394,
                 from ./libavutil/common.h:39,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/samplefmt.h:24,
                 from ./libavcodec/avcodec.h:31,
                 from ./libavformat/avformat.h:312,
                 from ./libavformat/internal.h:27,
                 from libavdevice/alldevices.c:23:
./config.h:17:19: error: expected identifier or ‘(’ before ‘void’
   17 | #define getenv(x) NULL
      |                   ^~~~
./config.h:17:19: error: expected ‘)’ before numeric constant
   17 | #define getenv(x) NULL
      |                   ^~~~
In file included from ./libavutil/internal.h:176,
                 from ./libavutil/common.h:533,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/samplefmt.h:24,
                 from ./libavcodec/avcodec.h:31,
                 from ./libavformat/avformat.h:312,
                 from ./libavformat/internal.h:27,
                 from libavdevice/alldevices.c:23:
./libavutil/libm.h:54:32: error: static declaration of ‘cbrt’ follows non-static declaration
   54 | static av_always_inline double cbrt(double x)
      |                                ^~~~
In file included from /usr/mips-linux-gnu/include/features.h:461,
                 from /usr/mips-linux-gnu/include/pthread.h:21,
                 from ./libavutil/thread.h:30,
                 from libavdevice/alldevices.c:22:
/usr/mips-linux-gnu/include/bits/mathcalls.h:152:1: note: previous declaration of ‘cbrt’ was here
  152 | __MATHCALL (cbrt,, (_Mdouble_ __x));
      | ^~~~~~~~~~
In file included from ./libavutil/internal.h:176,
                 from ./libavutil/common.h:533,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/samplefmt.h:24,
                 from ./libavcodec/avcodec.h:31,
                 from ./libavformat/avformat.h:312,
                 from ./libavformat/internal.h:27,
                 from libavdevice/alldevices.c:23:
./libavutil/libm.h:61:31: error: static declaration of ‘cbrtf’ follows non-static declaration
   61 | static av_always_inline float cbrtf(float x)
      |                               ^~~~~
In file included from ./libavutil/common.h:36,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/samplefmt.h:24,
                 from ./libavcodec/avcodec.h:31,
                 from ./libavformat/avformat.h:312,
                 from ./libavformat/internal.h:27,
                 from libavdevice/alldevices.c:23:
/usr/mips-linux-gnu/include/bits/mathcalls.h:152:1: note: previous declaration of ‘cbrtf’ was here
  152 | __MATHCALL (cbrt,, (_Mdouble_ __x));
      | ^~~~~~~~~~
In file included from ./libavutil/internal.h:176,
                 from ./libavutil/common.h:533,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/samplefmt.h:24,
                 from ./libavcodec/avcodec.h:31,
                 from ./libavformat/avformat.h:312,
                 from ./libavformat/internal.h:27,
                 from libavdevice/alldevices.c:23:
./libavutil/libm.h:68:32: error: static declaration of ‘copysign’ follows non-static declaration
   68 | static av_always_inline double copysign(double x, double y)
      |                                ^~~~~~~~
In file included from /usr/mips-linux-gnu/include/features.h:461,
                 from /usr/mips-linux-gnu/include/pthread.h:21,
                 from ./libavutil/thread.h:30,
                 from libavdevice/alldevices.c:22:
/usr/mips-linux-gnu/include/bits/mathcalls.h:198:1: note: previous declaration of ‘copysign’ was here
  198 | __MATHCALLX (copysign,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
      | ^~~~~~~~~~~
In file included from ./libavutil/internal.h:176,
                 from ./libavutil/common.h:533,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/samplefmt.h:24,
                 from ./libavcodec/avcodec.h:31,
                 from ./libavformat/avformat.h:312,
                 from ./libavformat/internal.h:27,
                 from libavdevice/alldevices.c:23:
./libavutil/libm.h:121:22: error: static declaration of ‘erf’ follows non-static declaration
  121 | static inline double erf(double z)
      |                      ^~~
In file included from /usr/mips-linux-gnu/include/features.h:461,
                 from /usr/mips-linux-gnu/include/pthread.h:21,
                 from ./libavutil/thread.h:30,
                 from libavdevice/alldevices.c:22:
/usr/mips-linux-gnu/include/bits/mathcalls.h:231:1: note: previous declaration of ‘erf’ was here
  231 | __MATHCALL (erf,, (_Mdouble_));
      | ^~~~~~~~~~
In file included from ./libavutil/internal.h:176,
                 from ./libavutil/common.h:533,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/samplefmt.h:24,
                 from ./libavcodec/avcodec.h:31,
                 from ./libavformat/avformat.h:312,
                 from ./libavformat/internal.h:27,
                 from libavdevice/alldevices.c:23:
./libavutil/libm.h:340: warning: "isnan" redefined
  340 | #define isnan(x)                  \
      | 
In file included from ./libavutil/common.h:36,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/samplefmt.h:24,
                 from ./libavcodec/avcodec.h:31,
                 from ./libavformat/avformat.h:312,
                 from ./libavformat/internal.h:27,
                 from libavdevice/alldevices.c:23:
/usr/mips-linux-gnu/include/math.h:991: note: this is the location of the previous definition
  991 | #  define isnan(x) __builtin_isnan (x)
      | 
In file included from ./libavutil/internal.h:176,
                 from ./libavutil/common.h:533,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/samplefmt.h:24,
                 from ./libavcodec/avcodec.h:31,
                 from ./libavformat/avformat.h:312,
                 from ./libavformat/internal.h:27,
                 from libavdevice/alldevices.c:23:
./libavutil/libm.h:359: warning: "isfinite" redefined
  359 | #define isfinite(x)                  \
      | 
In file included from ./libavutil/common.h:36,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/samplefmt.h:24,
                 from ./libavcodec/avcodec.h:31,
                 from ./libavformat/avformat.h:312,
                 from ./libavformat/internal.h:27,
                 from libavdevice/alldevices.c:23:
/usr/mips-linux-gnu/include/math.h:974: note: this is the location of the previous definition
  974 | #  define isfinite(x) __builtin_isfinite (x)
      | 
In file included from ./libavutil/internal.h:176,
                 from ./libavutil/common.h:533,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/samplefmt.h:24,
                 from ./libavcodec/avcodec.h:31,
                 from ./libavformat/avformat.h:312,
                 from ./libavformat/internal.h:27,
                 from libavdevice/alldevices.c:23:
./libavutil/libm.h:366:31: error: static declaration of ‘hypot’ follows non-static declaration
  366 | static inline av_const double hypot(double x, double y)
      |                               ^~~~~
In file included from /usr/mips-linux-gnu/include/features.h:461,
                 from /usr/mips-linux-gnu/include/pthread.h:21,
                 from ./libavutil/thread.h:30,
                 from libavdevice/alldevices.c:22:
/usr/mips-linux-gnu/include/bits/mathcalls.h:147:1: note: previous declaration of ‘hypot’ was here
  147 | __MATHCALL (hypot,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~
In file included from ./libavutil/internal.h:176,
                 from ./libavutil/common.h:533,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/samplefmt.h:24,
                 from ./libavcodec/avcodec.h:31,
                 from ./libavformat/avformat.h:312,
                 from ./libavformat/internal.h:27,
                 from libavdevice/alldevices.c:23:
./libavutil/libm.h: In function ‘hypot’:
./libavutil/libm.h:368:12: warning: unused variable ‘ret’ [-Wunused-variable]
  368 |     double ret, temp;
      |            ^~~
./libavutil/libm.h: At top level:
./libavutil/libm.h:423:22: error: static declaration of ‘rint’ follows non-static declaration
  423 | static inline double rint(double x)
      |                      ^~~~
In file included from /usr/mips-linux-gnu/include/features.h:461,
                 from /usr/mips-linux-gnu/include/pthread.h:21,
                 from ./libavutil/thread.h:30,
                 from libavdevice/alldevices.c:22:
/usr/mips-linux-gnu/include/bits/mathcalls.h:259:1: note: previous declaration of ‘rint’ was here
  259 | __MATHCALL (rint,, (_Mdouble_ __x));
      | ^~~~~~~~~~
In file included from ./libavutil/internal.h:176,
                 from ./libavutil/common.h:533,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/samplefmt.h:24,
                 from ./libavcodec/avcodec.h:31,
                 from ./libavformat/avformat.h:312,
                 from ./libavformat/internal.h:27,
                 from libavdevice/alldevices.c:23:
./libavutil/libm.h:430:43: error: static declaration of ‘lrint’ follows non-static declaration
  430 | static av_always_inline av_const long int lrint(double x)
      |                                           ^~~~~
In file included from /usr/mips-linux-gnu/include/features.h:461,
                 from /usr/mips-linux-gnu/include/pthread.h:21,
                 from ./libavutil/thread.h:30,
                 from libavdevice/alldevices.c:22:
/usr/mips-linux-gnu/include/bits/mathcalls.h:317:1: note: previous declaration of ‘lrint’ was here
  317 | __MATHDECL (long int,lrint,, (_Mdouble_ __x));
      | ^~~~~~~~~~
In file included from ./libavutil/internal.h:176,
                 from ./libavutil/common.h:533,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/samplefmt.h:24,
                 from ./libavcodec/avcodec.h:31,
                 from ./libavformat/avformat.h:312,
                 from ./libavformat/internal.h:27,
                 from libavdevice/alldevices.c:23:
./libavutil/libm.h:437:43: error: static declaration of ‘lrintf’ follows non-static declaration
  437 | static av_always_inline av_const long int lrintf(float x)
      |                                           ^~~~~~
In file included from ./libavutil/common.h:36,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/samplefmt.h:24,
                 from ./libavcodec/avcodec.h:31,
                 from ./libavformat/avformat.h:312,
                 from ./libavformat/internal.h:27,
                 from libavdevice/alldevices.c:23:
/usr/mips-linux-gnu/include/bits/mathcalls.h:317:1: note: previous declaration of ‘lrintf’ was here
  317 | __MATHDECL (long int,lrint,, (_Mdouble_ __x));
      | ^~~~~~~~~~
In file included from ./libavutil/internal.h:176,
                 from ./libavutil/common.h:533,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/samplefmt.h:24,
                 from ./libavcodec/avcodec.h:31,
                 from ./libavformat/avformat.h:312,
                 from ./libavformat/internal.h:27,
                 from libavdevice/alldevices.c:23:
./libavutil/libm.h:444:41: error: static declaration of ‘round’ follows non-static declaration
  444 | static av_always_inline av_const double round(double x)
      |                                         ^~~~~
In file included from /usr/mips-linux-gnu/include/features.h:461,
                 from /usr/mips-linux-gnu/include/pthread.h:21,
                 from ./libavutil/thread.h:30,
                 from libavdevice/alldevices.c:22:
/usr/mips-linux-gnu/include/bits/mathcalls.h:301:1: note: previous declaration of ‘round’ was here
  301 | __MATHCALLX (round,, (_Mdouble_ __x), (__const__));
      | ^~~~~~~~~~~
In file included from ./libavutil/internal.h:176,
                 from ./libavutil/common.h:533,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/samplefmt.h:24,
                 from ./libavcodec/avcodec.h:31,
                 from ./libavformat/avformat.h:312,
                 from ./libavformat/internal.h:27,
                 from libavdevice/alldevices.c:23:
./libavutil/libm.h:451:40: error: static declaration of ‘roundf’ follows non-static declaration
  451 | static av_always_inline av_const float roundf(float x)
      |                                        ^~~~~~
In file included from ./libavutil/common.h:36,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/samplefmt.h:24,
                 from ./libavcodec/avcodec.h:31,
                 from ./libavformat/avformat.h:312,
                 from ./libavformat/internal.h:27,
                 from libavdevice/alldevices.c:23:
/usr/mips-linux-gnu/include/bits/mathcalls.h:301:1: note: previous declaration of ‘roundf’ was here
  301 | __MATHCALLX (round,, (_Mdouble_ __x), (__const__));
      | ^~~~~~~~~~~
In file included from ./libavutil/internal.h:176,
                 from ./libavutil/common.h:533,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/samplefmt.h:24,
                 from ./libavcodec/avcodec.h:31,
                 from ./libavformat/avformat.h:312,
                 from ./libavformat/internal.h:27,
                 from libavdevice/alldevices.c:23:
./libavutil/libm.h:458:41: error: static declaration of ‘trunc’ follows non-static declaration
  458 | static av_always_inline av_const double trunc(double x)
      |                                         ^~~~~
In file included from /usr/mips-linux-gnu/include/features.h:461,
                 from /usr/mips-linux-gnu/include/pthread.h:21,
                 from ./libavutil/thread.h:30,
                 from libavdevice/alldevices.c:22:
/usr/mips-linux-gnu/include/bits/mathcalls.h:305:1: note: previous declaration of ‘trunc’ was here
  305 | __MATHCALLX (trunc,, (_Mdouble_ __x), (__const__));
      | ^~~~~~~~~~~
In file included from ./libavutil/internal.h:176,
                 from ./libavutil/common.h:533,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/samplefmt.h:24,
                 from ./libavcodec/avcodec.h:31,
                 from ./libavformat/avformat.h:312,
                 from ./libavformat/internal.h:27,
                 from libavdevice/alldevices.c:23:
./libavutil/libm.h:465:40: error: static declaration of ‘truncf’ follows non-static declaration
  465 | static av_always_inline av_const float truncf(float x)
      |                                        ^~~~~~
In file included from ./libavutil/common.h:36,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/samplefmt.h:24,
                 from ./libavcodec/avcodec.h:31,
                 from ./libavformat/avformat.h:312,
                 from ./libavformat/internal.h:27,
                 from libavdevice/alldevices.c:23:
/usr/mips-linux-gnu/include/bits/mathcalls.h:305:1: note: previous declaration of ‘truncf’ was here
  305 | __MATHCALLX (trunc,, (_Mdouble_ __x), (__const__));
      | ^~~~~~~~~~~
make: *** [ffbuild/common.mak:59: libavdevice/alldevices.o] Error 1