Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasm-ld: error: dist/lib/libavformat.a: archive has no index; run ranlib to add one #9705

Closed
yyqangular1 opened this issue Oct 25, 2019 · 15 comments

Comments

@yyqangular1
Copy link

@yyqangular1 yyqangular1 commented Oct 25, 2019

Hi,
I'm getting these errors while compiling ffmpeg with emcc

wasm-ld: error: dist/lib/libavformat.a: archive has no index; run ranlib to add one
wasm-ld: error: dist/lib/libavcodec.a: archive has no index; run ranlib to add one
wasm-ld: error: dist/lib/libavutil.a: archive has no index; run ranlib to add one
wasm-ld: error: dist/lib/libswscale.a: archive has no index; run ranlib to add one
shared:ERROR: '/opt/h265player/emsdk/upstream/bin/wasm-ld -o /tmp/emscripten_temp_jCijDj/libffmpeg.wasm --allow-undefined --lto-O0 /tmp/emscripten_temp_jCijDj/decoder_0.o dist/lib/libavformat.a dist/lib/libavcodec.a dist/lib/libavutil.a -L/opt/h265player/emsdk/upstream/emscripten/system/local/lib dist/lib/libswscale.a -L/opt/h265player/emsdk/upstream/emscripten/system/lib -L/root/.emscripten_cache/wasm-obj /root/.emscripten_cache/wasm-obj/libc.a /root/.emscripten_cache/wasm-obj/libcompiler_rt.a /root/.emscripten_cache/wasm-obj/libc-wasm.a /root/.emscripten_cache/wasm-obj/libdlmalloc.a /root/.emscripten_cache/wasm-obj/libpthread_stub.a /root/.emscripten_cache/wasm-obj/libc_rt_wasm.a --import-memory --import-table -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --export __wasm_call_ctors --export __data_end --export initDecoder --export uninitDecoder --export openDecoder --export closeDecoder --export sendData --export decodeOnePacket --export seekTo --export main --export malloc --export free --export setThrew --export __errno_location --export _get_tzname --export _get_daylight --export _get_timezone --export emscripten_builtin_memalign --export memalign --export emscripten_builtin_free --export _get_environ -z stack-size=5242880 --initial-memory=67108864 --no-entry --max-memory=67108864 --global-base=1024' failed (1)
Finished Build

(I see this error referenced in #9329 but i already set [--cc="emcc" --ar="emar"].)

The below is the build script

  1. build_decoder.sh
echo "Beginning Build:"
rm -r dist
mkdir -p dist
cd ../ffmpeg
make clean
emconfigure ./configure --cc="emcc" --cxx="em++" --ar="emar" --prefix=$(pwd)/../WasmVideoPlayer/dist --enable-cross-compile --target-os=none \
        --arch=x86_32 --cpu=generic --enable-gpl --enable-version3 --disable-avdevice --disable-swresample --disable-postproc --disable-avfilter \
        --disable-programs --disable-logging --disable-everything --enable-avformat --enable-decoder=hevc --enable-decoder=h264 --enable-decoder=aac \
        --disable-ffplay --disable-ffprobe --disable-ffserver --disable-asm --disable-doc --disable-devices --disable-network --disable-hwaccels \
        --disable-parsers --disable-bsfs --disable-debug --enable-protocol=file --enable-demuxer=mov --disable-indevs --disable-outdevs
make
make install
cd ../WasmVideoPlayer
./build_decoder_wasm.sh

2)build_decoder_wasm.sh

rm -rf libffmpeg.wasm libffmpeg.js
export TOTAL_MEMORY=67108864
export EXPORTED_FUNCTIONS="[ \
    '_initDecoder', \
    '_uninitDecoder', \
    '_openDecoder', \
    '_closeDecoder', \
    '_sendData', \
    '_decodeOnePacket', \
    '_seekTo', \
    '_main'
]"

echo "Running Emscripten..."
emcc decoder.c dist/lib/libavformat.a dist/lib/libavcodec.a dist/lib/libavutil.a dist/lib/libswscale.a \
    -O3 \
    -I "dist/include" \
    -s WASM=1 \
    -s TOTAL_MEMORY=${TOTAL_MEMORY} \
    -s EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS}" \
    -s EXTRA_EXPORTED_RUNTIME_METHODS="['addFunction']" \
    -s RESERVED_FUNCTION_POINTERS=14 \
    -s FORCE_FILESYSTEM=1 \
    -v \
    -o libffmpeg.js

echo "Finished Build"
@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Oct 25, 2019

I would look at the commands used to build the libraries. According the wasm-ld they don't have indexes. How is dist/lib/libavcodec.a being built? Can you post the command?

@brion
Copy link
Collaborator

@brion brion commented Oct 25, 2019

I had a similar error with a library that used the 'strip' command in it's build process to remove debugging symbols from the .a artifact. On Linux this seemed to get confused with the new backend and damaged the files; replacing strip with a no-op worked around it. Might be something to check for.

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Oct 25, 2019

Interesting. Presumably this is because the native strip doesn't know anything about wasm object format. I'm surprised it clobbered the existing index though. Another solution there is to replace strip will llvm-strip which does know about those symbols.

@kripken
Copy link
Member

@kripken kripken commented Oct 25, 2019

I'm curious what version version this was on, and which backend - if this is a regression in the new backend that would be worrying.

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Oct 25, 2019

I would imagine the same thing would happen with fastcomp, since strip also won't understand bitcode files, but perhaps fastcomp linking doesn't require a index in the way that wasm-ld does? If thats the case then we have become stricter yes. I'll will check. If if that is the case I'm not sure that really counts a regression but we should document it for sure.

@brion
Copy link
Collaborator

@brion brion commented Oct 25, 2019

Here's a gist with a small library build that triggers the different behavior between fastcomp (where it builds) and upstream (where it gives you the 'no index' error):

https://gist.github.com/brion/ef605cb6b71a81c763c59ed15efd9a78

I definitely recommend checking the ffmpeg build process for it running strip or other such modifications on the binaries, especially if it's being compiled in release mode that's a common thing to do. It may be easy to override the executable, or you may have to hack up the build or play tricks with the PATH. ;)

@yyqangular1
Copy link
Author

@yyqangular1 yyqangular1 commented Oct 28, 2019

I would look at the commands used to build the libraries. According the wasm-ld they don't have indexes. How is dist/lib/libavcodec.a being built? Can you post the command?

very sorry, i'm later :(
I use this command to build ffmpeg:

cd ../ffmpeg
make clean
emconfigure ./configure --cc="emcc" --cxx="em++" --ar="emar" --prefix=$(pwd)/../WasmVideoPlayer/dist --enable-cross-compile --target-os=none \
        --arch=x86_32 --cpu=generic --enable-gpl --enable-version3 --disable-avdevice --disable-swresample --disable-postproc --disable-avfilter \
        --disable-programs --disable-logging --disable-everything --enable-avformat --enable-decoder=hevc --enable-decoder=h264 --enable-decoder=aac \
        --disable-ffplay --disable-ffprobe --disable-ffserver --disable-asm --disable-doc --disable-devices --disable-network --disable-hwaccels \
        --disable-parsers --disable-bsfs --disable-debug --enable-protocol=file --enable-demuxer=mov --disable-indevs --disable-outdevs
make
make install

Compiled to generate the following files:

xxx@xxxxx:/opt/h265player/WasmVideoPlayer/dist/lib# ls | sed "s:^:`pwd`/: "
/opt/h265player/WasmVideoPlayer/dist/lib/libavcodec.a
/opt/h265player/WasmVideoPlayer/dist/lib/libavformat.a
/opt/h265player/WasmVideoPlayer/dist/lib/libavutil.a
/opt/h265player/WasmVideoPlayer/dist/lib/libswscale.a
/opt/h265player/WasmVideoPlayer/dist/lib/pkgconfig

No error at this step, but when i build my project...(Below is my project directory)

xx@xxxxxx:/opt/h265player/WasmVideoPlayer# ls | sed "s:^:`pwd`/: "
/opt/h265player/WasmVideoPlayer/build_decoder.sh
/opt/h265player/WasmVideoPlayer/build_decoder_wasm.sh
/opt/h265player/WasmVideoPlayer/common.js
/opt/h265player/WasmVideoPlayer/decoder.c
/opt/h265player/WasmVideoPlayer/decoder.js
/opt/h265player/WasmVideoPlayer/dist
/opt/h265player/WasmVideoPlayer/downloader.js
/opt/h265player/WasmVideoPlayer/img
/opt/h265player/WasmVideoPlayer/index.html
/opt/h265player/WasmVideoPlayer/LICENSE
/opt/h265player/WasmVideoPlayer/pcm-player.js
/opt/h265player/WasmVideoPlayer/player.js
/opt/h265player/WasmVideoPlayer/README.md
/opt/h265player/WasmVideoPlayer/styles
/opt/h265player/WasmVideoPlayer/video
/opt/h265player/WasmVideoPlayer/webgl.js

the build commond is this:

emcc decoder.c dist/lib/libavformat.a dist/lib/libavcodec.a dist/lib/libavutil.a dist/lib/libswscale.a \
    -O3 \
    -I "dist/include" \
    -s WASM=1 \
    -s TOTAL_MEMORY=${TOTAL_MEMORY} \
    -s EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS}" \
    -s EXTRA_EXPORTED_RUNTIME_METHODS="['addFunction']" \
    -s RESERVED_FUNCTION_POINTERS=14 \
    -s FORCE_FILESYSTEM=1 \
    -v \
    -o libffmpeg.js

I got the wasm-ld: error: dist/lib/libavformat.a: archive has no index; run ranlib to add one

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Oct 28, 2019

Can you remove the libavformat.a library and the rebuilt it in order to see exactly how it is being build?
e.g.

rm path/to/libavcodec.a
make path/to/libavcodec.a

@kripken
Copy link
Member

@kripken kripken commented Oct 28, 2019

@sbc100

Looks like this may be a common problem given the simple reproducer @brion provided. Perhaps the error wasm-ld: error: ./liba.a: archive has no index; run ranlib to add one could say a little more, like (avoid using the system "strip" command as it may remove the wasm index)?

Alternatively, could wasm-ld create the index on demand perhaps?

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Oct 28, 2019

I don't think it makes sense to build such magic into wasm-ld, but we can build more magic into emscripten if we like.

How about this:

for each_input_library:
   if not has_index:
      if STRICT:
          error_with_useful_message()
     else:
          try_to_generate_index()

?

@kripken
Copy link
Member

@kripken kripken commented Oct 28, 2019

@sbc100 that sounds good!

@yyqangular1
Copy link
Author

@yyqangular1 yyqangular1 commented Oct 29, 2019

Can you remove the libavformat.a library and the rebuilt it in order to see exactly how it is being build?
e.g.

rm path/to/libavcodec.a
make path/to/libavcodec.a

Of course,when i rebuild it, the compilation process is as follows:(sorry,the info is too long:()

xx@xxxxx:/opt/h265player/WasmVideoPlayer# ./build_decoder.sh 
Beginning Build:
nm: /tmp/ffconf.6WeFH8wk.o: File format not recognized
emscripten sdl2-config called with /opt/h265player/emsdk/upstream/emscripten/system/bin/sdl2-config --cflags
emscripten sdl2-config called with /opt/h265player/emsdk/upstream/emscripten/system/bin/sdl2-config --libs
install prefix            /opt/h265player/ffmpeg/../WasmVideoPlayer/dist
source path               .
C compiler                emcc
C library                 
host C compiler           gcc
host C library            glibc
ARCH                      c (generic)
big-endian                no
runtime cpu detection     yes
debug symbols             no
strip symbols             yes
optimize for size         no
optimizations             yes
static                    yes
shared                    no
postprocessing support    no
network support           no
threading support         pthreads
safe bitstream reader     yes
texi2html enabled         no
perl enabled              yes
pod2man enabled           yes
makeinfo enabled          yes
makeinfo supports HTML    yes

External libraries:
iconv			 sdl			  sdl2			   xlib

External libraries providing hardware acceleration:

Libraries:
avcodec			 avformat		  avutil		   swscale

Programs:

Enabled decoders:
aac			 h264			  hevc

Enabled encoders:

Enabled hwaccels:

Enabled parsers:

Enabled demuxers:
mov

Enabled muxers:

Enabled protocols:
file

Enabled filters:

Enabled bsfs:

Enabled indevs:

Enabled outdevs:

License: GPL version 3 or later
Creating configuration files ...
libavutil/avconfig.h is unchanged
libavcodec/bsf_list.c is unchanged
libavformat/protocol_list.c is unchanged
CC	libavformat/allformats.o
CC	libavformat/avio.o
libavformat/avio.c:59:137: warning: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-int-float-conversion]
    {"rw_timeout", "Timeout for IO operations (in microseconds)", offsetof(URLContext, rw_timeout), AV_OPT_TYPE_INT64, { .i64 = 0 }, 0, INT64_MAX, AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_DECODING_PARAM },
    ~                                                                                                                                   ^~~~~~~~~
/opt/h265player/emsdk/upstream/emscripten/system/include/libc/stdint.h:46:21: note: expanded from macro 'INT64_MAX'
#define INT64_MAX  (0x7fffffffffffffff)
                    ^~~~~~~~~~~~~~~~~~
1 warning generated.
CC	libavformat/aviobuf.o
CC	libavformat/cutils.o
CC	libavformat/dump.o
libavformat/dump.c:233:55: warning: implicit conversion from 'unsigned int' to 'float' changes value from 4294967295 to 4294967296 [-Wimplicit-int-float-conversion]
        av_log(ctx, AV_LOG_INFO, "%f", (float) peak / UINT32_MAX);
                                                    ~ ^~~~~~~~~~
/opt/h265player/emsdk/upstream/emscripten/system/include/libc/stdint.h:50:21: note: expanded from macro 'UINT32_MAX'
#define UINT32_MAX (0xffffffffu)
                    ^~~~~~~~~~~
libavformat/dump.c:462:29: warning: 'codec' is deprecated [-Wdeprecated-declarations]
    avctx->properties = st->codec->properties;
                            ^
libavformat/avformat.h:892:5: note: 'codec' has been explicitly marked deprecated here
    attribute_deprecated
    ^
./libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
libavformat/dump.c:463:29: warning: 'codec' is deprecated [-Wdeprecated-declarations]
    avctx->codec      = st->codec->codec;
                            ^
libavformat/avformat.h:892:5: note: 'codec' has been explicitly marked deprecated here
    attribute_deprecated
    ^
./libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
libavformat/dump.c:464:29: warning: 'codec' is deprecated [-Wdeprecated-declarations]
    avctx->qmin       = st->codec->qmin;
                            ^
libavformat/avformat.h:892:5: note: 'codec' has been explicitly marked deprecated here
    attribute_deprecated
    ^
./libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
libavformat/dump.c:465:29: warning: 'codec' is deprecated [-Wdeprecated-declarations]
    avctx->qmax       = st->codec->qmax;
                            ^
libavformat/avformat.h:892:5: note: 'codec' has been explicitly marked deprecated here
    attribute_deprecated
    ^
./libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
libavformat/dump.c:466:31: warning: 'codec' is deprecated [-Wdeprecated-declarations]
    avctx->coded_width  = st->codec->coded_width;
                              ^
libavformat/avformat.h:892:5: note: 'codec' has been explicitly marked deprecated here
    attribute_deprecated
    ^
./libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
libavformat/dump.c:467:31: warning: 'codec' is deprecated [-Wdeprecated-declarations]
    avctx->coded_height = st->codec->coded_height;
                              ^
libavformat/avformat.h:892:5: note: 'codec' has been explicitly marked deprecated here
    attribute_deprecated
    ^
./libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
libavformat/dump.c:502:23: warning: 'codec' is deprecated [-Wdeprecated-declarations]
        int tbc = st->codec->time_base.den && st->codec->time_base.num;
                      ^
libavformat/avformat.h:892:5: note: 'codec' has been explicitly marked deprecated here
    attribute_deprecated
    ^
./libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
libavformat/dump.c:502:51: warning: 'codec' is deprecated [-Wdeprecated-declarations]
        int tbc = st->codec->time_base.den && st->codec->time_base.num;
                                                  ^
libavformat/avformat.h:892:5: note: 'codec' has been explicitly marked deprecated here
    attribute_deprecated
    ^
./libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
libavformat/dump.c:514:38: warning: 'codec' is deprecated [-Wdeprecated-declarations]
            print_fps(1 / av_q2d(st->codec->time_base), "tbc");
                                     ^
libavformat/avformat.h:892:5: note: 'codec' has been explicitly marked deprecated here
    attribute_deprecated
    ^
./libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
10 warnings generated.
CC	libavformat/file.o
CC	libavformat/format.o
CC	libavformat/id3v1.o
CC	libavformat/id3v2.o
CC	libavformat/isom.o
CC	libavformat/metadata.o
CC	libavformat/mov.o
CC	libavformat/mov_chan.o
CC	libavformat/mux.o
CC	libavformat/options.o
In file included from libavformat/options.c:33:
libavformat/options_table.h:39:96: warning: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-int-float-conversion]
{"probesize", "set probing size", OFFSET(probesize), AV_OPT_TYPE_INT64, {.i64 = 5000000 }, 32, INT64_MAX, D},
~                                                                                              ^~~~~~~~~
/opt/h265player/emsdk/upstream/emscripten/system/include/libc/stdint.h:46:21: note: expanded from macro 'INT64_MAX'
#define INT64_MAX  (0x7fffffffffffffff)
                    ^~~~~~~~~~~~~~~~~~
In file included from libavformat/options.c:33:
libavformat/options_table.h:61:151: warning: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-int-float-conversion]
{"analyzeduration", "specify how many microseconds are analyzed to probe the input", OFFSET(max_analyze_duration), AV_OPT_TYPE_INT64, {.i64 = 0 }, 0, INT64_MAX, D},
~                                                                                                                                                     ^~~~~~~~~
/opt/h265player/emsdk/upstream/emscripten/system/include/libc/stdint.h:46:21: note: expanded from macro 'INT64_MAX'
#define INT64_MAX  (0x7fffffffffffffff)
                    ^~~~~~~~~~~~~~~~~~
In file included from libavformat/options.c:33:
libavformat/options_table.h:68:156: warning: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-int-float-conversion]
{"start_time_realtime", "wall-clock time when stream begins (PTS==0)", OFFSET(start_time_realtime), AV_OPT_TYPE_INT64, {.i64 = AV_NOPTS_VALUE}, INT64_MIN, INT64_MAX, E},
~                                                                                                                                                          ^~~~~~~~~
/opt/h265player/emsdk/upstream/emscripten/system/include/libc/stdint.h:46:21: note: expanded from macro 'INT64_MAX'
#define INT64_MAX  (0x7fffffffffffffff)
                    ^~~~~~~~~~~~~~~~~~
In file included from libavformat/options.c:33:
libavformat/options_table.h:86:159: warning: implicit conversion from 'long long' to 'double' changes value from 9223372036854775806 to 9223372036854775808 [-Wimplicit-int-float-conversion]
{"skip_initial_bytes", "set number of bytes to skip before reading header and frames", OFFSET(skip_initial_bytes), AV_OPT_TYPE_INT64, {.i64 = 0}, 0, INT64_MAX-1, D},
~                                                                                                                                                    ~~~~~~~~~^~
libavformat/options_table.h:90:113: warning: implicit conversion from 'long long' to 'double' changes value from -9223372036854775807 to -9223372036854775808 [-Wimplicit-int-float-conversion]
{"output_ts_offset", "set output timestamp offset", OFFSET(output_ts_offset), AV_OPT_TYPE_DURATION, {.i64 = 0}, -INT64_MAX, INT64_MAX, E},
~                                                                                                               ^~~~~~~~~~
libavformat/options_table.h:90:125: warning: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-int-float-conversion]
{"output_ts_offset", "set output timestamp offset", OFFSET(output_ts_offset), AV_OPT_TYPE_DURATION, {.i64 = 0}, -INT64_MAX, INT64_MAX, E},
~                                                                                                                           ^~~~~~~~~
/opt/h265player/emsdk/upstream/emscripten/system/include/libc/stdint.h:46:21: note: expanded from macro 'INT64_MAX'
#define INT64_MAX  (0x7fffffffffffffff)
                    ^~~~~~~~~~~~~~~~~~
In file included from libavformat/options.c:33:
libavformat/options_table.h:91:146: warning: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-int-float-conversion]
{"max_interleave_delta", "maximum buffering duration for interleaving", OFFSET(max_interleave_delta), AV_OPT_TYPE_INT64, { .i64 = 10000000 }, 0, INT64_MAX, E },
~                                                                                                                                                ^~~~~~~~~
/opt/h265player/emsdk/upstream/emscripten/system/include/libc/stdint.h:46:21: note: expanded from macro 'INT64_MAX'
#define INT64_MAX  (0x7fffffffffffffff)
                    ^~~~~~~~~~~~~~~~~~
7 warnings generated.
CC	libavformat/os_support.o
CC	libavformat/protocols.o
CC	libavformat/qtpalette.o
CC	libavformat/replaygain.o
CC	libavformat/riff.o
CC	libavformat/riffdec.o
CC	libavformat/sdp.o
CC	libavformat/url.o
CC	libavformat/utils.o
libavformat/utils.c:77:42: warning: adding 'unsigned long' to a string does not append to the string [-Wstring-plus-int]
    return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1;
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
libavformat/utils.c:77:42: note: use array indexing to silence this warning
    return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1;
                                         ^
           &                             [                       ]
libavformat/utils.c:2126:9: warning: variable 'pos_min' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
    if (st->index_entries) {
        ^~~~~~~~~~~~~~~~~
libavformat/utils.c:2159:53: note: uninitialized use occurs here
    pos = ff_gen_search(s, stream_index, target_ts, pos_min, pos_max, pos_limit,
                                                    ^~~~~~~
libavformat/utils.c:2126:5: note: remove the 'if' if its condition is always true
    if (st->index_entries) {
    ^~~~~~~~~~~~~~~~~~~~~~~
libavformat/utils.c:2110:5: note: variable 'pos_min' is declared here
    int64_t av_uninit(pos_min), av_uninit(pos_max), pos, pos_limit;
    ^
libavformat/utils.c:2148:13: warning: variable 'pos_max' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
        if (index >= 0) {
            ^~~~~~~~~~
libavformat/utils.c:2159:62: note: uninitialized use occurs here
    pos = ff_gen_search(s, stream_index, target_ts, pos_min, pos_max, pos_limit,
                                                             ^~~~~~~
libavformat/utils.c:2148:9: note: remove the 'if' if its condition is always true
        if (index >= 0) {
        ^~~~~~~~~~~~~~~~
libavformat/utils.c:2126:9: warning: variable 'pos_max' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
    if (st->index_entries) {
        ^~~~~~~~~~~~~~~~~
libavformat/utils.c:2159:62: note: uninitialized use occurs here
    pos = ff_gen_search(s, stream_index, target_ts, pos_min, pos_max, pos_limit,
                                                             ^~~~~~~
libavformat/utils.c:2126:5: note: remove the 'if' if its condition is always true
    if (st->index_entries) {
    ^~~~~~~~~~~~~~~~~~~~~~~
libavformat/utils.c:2110:5: note: variable 'pos_max' is declared here
    int64_t av_uninit(pos_min), av_uninit(pos_max), pos, pos_limit;
    ^
libavformat/utils.c:2642:40: warning: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-int-float-conversion]
        if (bitrate >= 0 && bitrate <= INT64_MAX)
                                    ~~ ^~~~~~~~~
/opt/h265player/emsdk/upstream/emscripten/system/include/libc/stdint.h:46:21: note: expanded from macro 'INT64_MAX'
#define INT64_MAX  (0x7fffffffffffffff)
                    ^~~~~~~~~~~~~~~~~~
libavformat/utils.c:5401:42: warning: 'codec' is deprecated [-Wdeprecated-declarations]
    const AVCodecContext *dec_ctx = ist->codec;
                                         ^
libavformat/avformat.h:892:5: note: 'codec' has been explicitly marked deprecated here
    attribute_deprecated
    ^
./libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
libavformat/utils.c:5402:42: warning: 'codec' is deprecated [-Wdeprecated-declarations]
    AVCodecContext       *enc_ctx = ost->codec;
                                         ^
libavformat/avformat.h:892:5: note: 'codec' has been explicitly marked deprecated here
    attribute_deprecated
    ^
./libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
7 warnings generated.
AR	libavformat/libavformat.a
CC	libavcodec/aacadtsdec.o
CC	libavcodec/aacdec.o
CC	libavcodec/aacps_float.o
CC	libavcodec/aacpsdsp_float.o
CC	libavcodec/aacsbr.o
CC	libavcodec/aactab.o
CC	libavcodec/ac3tab.o
CC	libavcodec/allcodecs.o
CC	libavcodec/audioconvert.o
CC	libavcodec/avdct.o
CC	libavcodec/avfft.o
CC	libavcodec/avpacket.o
CC	libavcodec/avpicture.o
CC	libavcodec/bitstream.o
CC	libavcodec/bitstream_filter.o
libavcodec/bitstream_filter.c:39:12: warning: returning 'const AVBitStreamFilter *' (aka 'const struct AVBitStreamFilter *') from a function with result type 'AVBitStreamFilter *' (aka 'struct AVBitStreamFilter *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
    return av_bsf_next(&opaque);
           ^~~~~~~~~~~~~~~~~~~~
libavcodec/bitstream_filter.c:132:14: warning: assigning to 'uint8_t *' (aka 'unsigned char *') from 'const uint8_t *' (aka 'const unsigned char *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
    pkt.data = buf;
             ^ ~~~
2 warnings generated.
CC	libavcodec/bitstream_filters.o
CC	libavcodec/bsf.o
CC	libavcodec/bswapdsp.o
CC	libavcodec/cabac.o
CC	libavcodec/cbrt_data.o
CC	libavcodec/codec_desc.o
CC	libavcodec/d3d11va.o
CC	libavcodec/dirac.o
CC	libavcodec/dv_profile.o
CC	libavcodec/error_resilience.o
CC	libavcodec/faandct.o
CC	libavcodec/faanidct.o
CC	libavcodec/fdctdsp.o
CC	libavcodec/fft_fixed.o
CC	libavcodec/fft_fixed_32.o
CC	libavcodec/fft_float.o
CC	libavcodec/fft_init_table.o
CC	libavcodec/golomb.o
CC	libavcodec/h2645_parse.o
CC	libavcodec/h264_cabac.o
CC	libavcodec/h264_cavlc.o
CC	libavcodec/h264_direct.o
CC	libavcodec/h264_loopfilter.o
CC	libavcodec/h264_mb.o
CC	libavcodec/h264_parse.o
CC	libavcodec/h264_picture.o
CC	libavcodec/h264_ps.o
CC	libavcodec/h264_refs.o
CC	libavcodec/h264_sei.o
CC	libavcodec/h264_slice.o
CC	libavcodec/h264chroma.o
CC	libavcodec/h264data.o
CC	libavcodec/h264dec.o
CC	libavcodec/h264dsp.o
CC	libavcodec/h264idct.o
CC	libavcodec/h264pred.o
CC	libavcodec/h264qpel.o
CC	libavcodec/hevc_cabac.o
CC	libavcodec/hevc_data.o
CC	libavcodec/hevc_filter.o
CC	libavcodec/hevc_mvs.o
CC	libavcodec/hevc_ps.o
CC	libavcodec/hevc_refs.o
CC	libavcodec/hevc_sei.o
CC	libavcodec/hevcdec.o
CC	libavcodec/hevcdsp.o
CC	libavcodec/hevcpred.o
CC	libavcodec/idctdsp.o
CC	libavcodec/imgconvert.o
CC	libavcodec/jfdctfst.o
CC	libavcodec/jfdctint.o
CC	libavcodec/jni.o
CC	libavcodec/jrevdct.o
CC	libavcodec/kbdwin.o
CC	libavcodec/mathtables.o
CC	libavcodec/mdct15.o
CC	libavcodec/mdct_fixed.o
CC	libavcodec/mdct_fixed_32.o
CC	libavcodec/mdct_float.o
CC	libavcodec/me_cmp.o
CC	libavcodec/mediacodec.o
CC	libavcodec/mjpegenc_huffman.o
CC	libavcodec/mpeg12framerate.o
CC	libavcodec/mpeg4audio.o
CC	libavcodec/mpegaudiodata.o
CC	libavcodec/options.o
In file included from libavcodec/options.c:37:
libavcodec/options_table.h:45:110: warning: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-int-float-conversion]
{"b", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT64, {.i64 = AV_CODEC_DEFAULT_BITRATE }, 0, INT64_MAX, A|V|E},
~                                                                                                            ^~~~~~~~~
/opt/h265player/emsdk/upstream/emscripten/system/include/libc/stdint.h:46:21: note: expanded from macro 'INT64_MAX'
#define INT64_MAX  (0x7fffffffffffffff)
                    ^~~~~~~~~~~~~~~~~~
In file included from libavcodec/options.c:37:
libavcodec/options_table.h:447:154: warning: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-int-float-conversion]
{"timecode_frame_start", "GOP timecode frame start number, in non-drop-frame format", OFFSET(timecode_frame_start), AV_OPT_TYPE_INT64, {.i64 = -1 }, -1, INT64_MAX, V|E},
~                                                                                                                                                        ^~~~~~~~~
/opt/h265player/emsdk/upstream/emscripten/system/include/libc/stdint.h:46:21: note: expanded from macro 'INT64_MAX'
#define INT64_MAX  (0x7fffffffffffffff)
                    ^~~~~~~~~~~~~~~~~~
In file included from libavcodec/options.c:37:
libavcodec/options_table.h:450:92: warning: implicit conversion from 'unsigned long long' to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Wimplicit-int-float-conversion]
{"channel_layout", NULL, OFFSET(channel_layout), AV_OPT_TYPE_UINT64, {.i64 = DEFAULT }, 0, UINT64_MAX, A|E|D, "channel_layout"},
~                                                                                          ^~~~~~~~~~
/opt/h265player/emsdk/upstream/emscripten/system/include/libc/stdint.h:51:21: note: expanded from macro 'UINT64_MAX'
#define UINT64_MAX (0xffffffffffffffffu)
                    ^~~~~~~~~~~~~~~~~~~
In file included from libavcodec/options.c:37:
libavcodec/options_table.h:451:108: warning: implicit conversion from 'unsigned long long' to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Wimplicit-int-float-conversion]
{"request_channel_layout", NULL, OFFSET(request_channel_layout), AV_OPT_TYPE_UINT64, {.i64 = DEFAULT }, 0, UINT64_MAX, A|D, "request_channel_layout"},
~                                                                                                          ^~~~~~~~~~
/opt/h265player/emsdk/upstream/emscripten/system/include/libc/stdint.h:51:21: note: expanded from macro 'UINT64_MAX'
#define UINT64_MAX (0xffffffffffffffffu)
                    ^~~~~~~~~~~~~~~~~~~
libavcodec/options.c:303:119: warning: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-int-float-conversion]
{"best_effort_timestamp", "", FOFFSET(best_effort_timestamp), AV_OPT_TYPE_INT64, {.i64 = AV_NOPTS_VALUE }, INT64_MIN, INT64_MAX, 0},
~                                                                                                                     ^~~~~~~~~
/opt/h265player/emsdk/upstream/emscripten/system/include/libc/stdint.h:46:21: note: expanded from macro 'INT64_MAX'
#define INT64_MAX  (0x7fffffffffffffff)
                    ^~~~~~~~~~~~~~~~~~
libavcodec/options.c:304:79: warning: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-int-float-conversion]
{"pkt_pos", "", FOFFSET(pkt_pos), AV_OPT_TYPE_INT64, {.i64 = -1 }, INT64_MIN, INT64_MAX, 0},
~                                                                             ^~~~~~~~~
/opt/h265player/emsdk/upstream/emscripten/system/include/libc/stdint.h:46:21: note: expanded from macro 'INT64_MAX'
#define INT64_MAX  (0x7fffffffffffffff)
                    ^~~~~~~~~~~~~~~~~~
libavcodec/options.c:305:81: warning: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-int-float-conversion]
{"pkt_size", "", FOFFSET(pkt_size), AV_OPT_TYPE_INT64, {.i64 = -1 }, INT64_MIN, INT64_MAX, 0},
~                                                                               ^~~~~~~~~
/opt/h265player/emsdk/upstream/emscripten/system/include/libc/stdint.h:46:21: note: expanded from macro 'INT64_MAX'
#define INT64_MAX  (0x7fffffffffffffff)
                    ^~~~~~~~~~~~~~~~~~
libavcodec/options.c:310:84: warning: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-int-float-conversion]
{"channel_layout", "", FOFFSET(channel_layout), AV_OPT_TYPE_INT64, {.i64 = 0 }, 0, INT64_MAX, 0},
~                                                                                  ^~~~~~~~~
/opt/h265player/emsdk/upstream/emscripten/system/include/libc/stdint.h:46:21: note: expanded from macro 'INT64_MAX'
#define INT64_MAX  (0x7fffffffffffffff)
                    ^~~~~~~~~~~~~~~~~~
8 warnings generated.
CC	libavcodec/parser.o
CC	libavcodec/pixblockdsp.o
CC	libavcodec/profiles.o
CC	libavcodec/pthread.o
CC	libavcodec/pthread_frame.o
CC	libavcodec/pthread_slice.o
CC	libavcodec/qsv_api.o
CC	libavcodec/raw.o
CC	libavcodec/resample.o
CC	libavcodec/resample2.o
CC	libavcodec/sbrdsp.o
CC	libavcodec/simple_idct.o
CC	libavcodec/sinewin.o
CC	libavcodec/sinewin_fixed.o
CC	libavcodec/startcode.o
CC	libavcodec/utils.o
libavcodec/utils.c:2825:15: warning: 'avcodec_decode_video2' is deprecated [-Wdeprecated-declarations]
        ret = avcodec_decode_video2(avctx, avctx->internal->buffer_frame,
              ^
libavcodec/avcodec.h:4900:1: note: 'avcodec_decode_video2' has been explicitly marked deprecated here
attribute_deprecated
^
./libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
libavcodec/utils.c:2830:15: warning: 'avcodec_decode_audio4' is deprecated [-Wdeprecated-declarations]
        ret = avcodec_decode_audio4(avctx, avctx->internal->buffer_frame,
              ^
libavcodec/avcodec.h:4851:1: note: 'avcodec_decode_audio4' has been explicitly marked deprecated here
attribute_deprecated
^
./libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
libavcodec/utils.c:2982:15: warning: 'avcodec_encode_video2' is deprecated [-Wdeprecated-declarations]
        ret = avcodec_encode_video2(avctx, avctx->internal->buffer_pkt,
              ^
libavcodec/avcodec.h:5415:1: note: 'avcodec_encode_video2' has been explicitly marked deprecated here
attribute_deprecated
^
./libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
libavcodec/utils.c:2985:15: warning: 'avcodec_encode_audio2' is deprecated [-Wdeprecated-declarations]
        ret = avcodec_encode_audio2(avctx, avctx->internal->buffer_pkt,
              ^
libavcodec/avcodec.h:5376:1: note: 'avcodec_encode_audio2' has been explicitly marked deprecated here
attribute_deprecated
^
./libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
libavcodec/utils.c:3473:42: warning: adding 'unsigned long' to a string does not append to the string [-Wstring-plus-int]
    return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1;
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/utils.c:3473:42: note: use array indexing to silence this warning
    return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1;
                                         ^
           &                             [                       ]
5 warnings generated.
CC	libavcodec/videodsp.o
CC	libavcodec/vorbis_parser.o
CC	libavcodec/xiph.o
AR	libavcodec/libavcodec.a
CC	libswscale/alphablend.o
CC	libswscale/gamma.o
CC	libswscale/hscale.o
CC	libswscale/hscale_fast_bilinear.o
CC	libswscale/input.o
CC	libswscale/options.o
CC	libswscale/output.o
CC	libswscale/rgb2rgb.o
CC	libswscale/slice.o
CC	libswscale/swscale.o
CC	libswscale/swscale_unscaled.o
CC	libswscale/utils.o
libswscale/utils.c:89:42: warning: adding 'unsigned long' to a string does not append to the string [-Wstring-plus-int]
    return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1;
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
libswscale/utils.c:89:42: note: use array indexing to silence this warning
    return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1;
                                         ^
           &                             [                       ]
libswscale/utils.c:335:13: warning: while loop has empty body [-Wempty-body]
    emms_c(); // FIXME should not be required but IS (even for non-MMX versions)
            ^
libswscale/utils.c:335:13: note: put the semicolon on a separate line to silence this warning
2 warnings generated.
CC	libswscale/vscale.o
CC	libswscale/yuv2rgb.o
AR	libswscale/libswscale.a
CC	libavutil/adler32.o
CC	libavutil/aes.o
CC	libavutil/aes_ctr.o
CC	libavutil/audio_fifo.o
CC	libavutil/avstring.o
CC	libavutil/base64.o
CC	libavutil/blowfish.o
CC	libavutil/bprint.o
CC	libavutil/buffer.o
CC	libavutil/camellia.o
CC	libavutil/cast5.o
CC	libavutil/channel_layout.o
CC	libavutil/color_utils.o
CC	libavutil/cpu.o
libavutil/cpu.c:127:76: warning: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-int-float-conversion]
        { "flags"   , NULL, 0, AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT64_MIN, INT64_MAX, .unit = "flags" },
        ~                                                                  ^~~~~~~~~
/opt/h265player/emsdk/upstream/emscripten/system/include/libc/stdint.h:46:21: note: expanded from macro 'INT64_MAX'
#define INT64_MAX  (0x7fffffffffffffff)
                    ^~~~~~~~~~~~~~~~~~
libavutil/cpu.c:188:76: warning: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-int-float-conversion]
        { "flags"   , NULL, 0, AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT64_MIN, INT64_MAX, .unit = "flags" },
        ~                                                                  ^~~~~~~~~
/opt/h265player/emsdk/upstream/emscripten/system/include/libc/stdint.h:46:21: note: expanded from macro 'INT64_MAX'
#define INT64_MAX  (0x7fffffffffffffff)
                    ^~~~~~~~~~~~~~~~~~
2 warnings generated.
CC	libavutil/crc.o
CC	libavutil/des.o
CC	libavutil/dict.o
CC	libavutil/display.o
CC	libavutil/downmix_info.o
CC	libavutil/error.o
CC	libavutil/eval.o
libavutil/eval.c:221:41: warning: implicit conversion from 'unsigned long long' to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Wimplicit-int-float-conversion]
            return e->value * (r * (1.0/UINT64_MAX));
                                       ~^~~~~~~~~~
/opt/h265player/emsdk/upstream/emscripten/system/include/libc/stdint.h:51:21: note: expanded from macro 'UINT64_MAX'
#define UINT64_MAX (0xffffffffffffffffu)
                    ^~~~~~~~~~~~~~~~~~~
1 warning generated.
CC	libavutil/fifo.o
CC	libavutil/file.o
CC	libavutil/file_open.o
CC	libavutil/fixed_dsp.o
CC	libavutil/float_dsp.o
CC	libavutil/frame.o
CC	libavutil/hash.o
CC	libavutil/hmac.o
CC	libavutil/hwcontext.o
CC	libavutil/imgutils.o
CC	libavutil/integer.o
CC	libavutil/intmath.o
CC	libavutil/lfg.o
CC	libavutil/lls.o
CC	libavutil/log.o
CC	libavutil/log2_tab.o
CC	libavutil/mastering_display_metadata.o
CC	libavutil/mathematics.o
CC	libavutil/md5.o
CC	libavutil/mem.o
CC	libavutil/murmur3.o
CC	libavutil/opt.o
CC	libavutil/parseutils.o
CC	libavutil/pixdesc.o
CC	libavutil/pixelutils.o
CC	libavutil/random_seed.o
CC	libavutil/rational.o
CC	libavutil/rc4.o
CC	libavutil/reverse.o
CC	libavutil/ripemd.o
CC	libavutil/samplefmt.o
CC	libavutil/sha.o
CC	libavutil/sha512.o
CC	libavutil/spherical.o
CC	libavutil/stereo3d.o
CC	libavutil/tea.o
CC	libavutil/threadmessage.o
CC	libavutil/time.o
CC	libavutil/timecode.o
CC	libavutil/tree.o
CC	libavutil/twofish.o
CC	libavutil/utils.o
libavutil/utils.c:76:42: warning: adding 'unsigned long' to a string does not append to the string [-Wstring-plus-int]
    return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1;
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
libavutil/utils.c:76:42: note: use array indexing to silence this warning
    return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1;
                                         ^
           &                             [                       ]
1 warning generated.
CC	libavutil/xga_font_data.o
CC	libavutil/xtea.o
AR	libavutil/libavutil.a
INSTALL	libavformat/libavformat.a
INSTALL	libavcodec/libavcodec.a
INSTALL	libswscale/libswscale.a
INSTALL	libavutil/libavutil.a
INSTALL	libavformat/avformat.h
INSTALL	libavformat/avio.h
INSTALL	libavformat/version.h
INSTALL	libavformat/libavformat.pc
INSTALL	libavcodec/avcodec.h
INSTALL	libavcodec/avdct.h
INSTALL	libavcodec/avfft.h
INSTALL	libavcodec/d3d11va.h
INSTALL	libavcodec/dirac.h
INSTALL	libavcodec/dv_profile.h
INSTALL	libavcodec/dxva2.h
INSTALL	libavcodec/jni.h
INSTALL	libavcodec/mediacodec.h
INSTALL	libavcodec/qsv.h
INSTALL	libavcodec/vaapi.h
INSTALL	libavcodec/vda.h
INSTALL	libavcodec/vdpau.h
INSTALL	libavcodec/version.h
INSTALL	libavcodec/videotoolbox.h
INSTALL	libavcodec/vorbis_parser.h
INSTALL	libavcodec/xvmc.h
INSTALL	libavcodec/libavcodec.pc
INSTALL	libswscale/swscale.h
INSTALL	libswscale/version.h
INSTALL	libswscale/libswscale.pc
INSTALL	libavutil/adler32.h
INSTALL	libavutil/aes.h
INSTALL	libavutil/aes_ctr.h
INSTALL	libavutil/attributes.h
INSTALL	libavutil/audio_fifo.h
INSTALL	libavutil/avassert.h
INSTALL	libavutil/avstring.h
INSTALL	libavutil/avutil.h
INSTALL	libavutil/base64.h
INSTALL	libavutil/blowfish.h
INSTALL	libavutil/bprint.h
INSTALL	libavutil/bswap.h
INSTALL	libavutil/buffer.h
INSTALL	libavutil/cast5.h
INSTALL	libavutil/camellia.h
INSTALL	libavutil/channel_layout.h
INSTALL	libavutil/common.h
INSTALL	libavutil/cpu.h
INSTALL	libavutil/crc.h
INSTALL	libavutil/des.h
INSTALL	libavutil/dict.h
INSTALL	libavutil/display.h
INSTALL	libavutil/downmix_info.h
INSTALL	libavutil/error.h
INSTALL	libavutil/eval.h
INSTALL	libavutil/fifo.h
INSTALL	libavutil/file.h
INSTALL	libavutil/frame.h
INSTALL	libavutil/hash.h
INSTALL	libavutil/hmac.h
INSTALL	libavutil/hwcontext.h
INSTALL	libavutil/hwcontext_cuda.h
INSTALL	libavutil/hwcontext_dxva2.h
INSTALL	libavutil/hwcontext_qsv.h
INSTALL	libavutil/hwcontext_vaapi.h
INSTALL	libavutil/hwcontext_vdpau.h
INSTALL	libavutil/imgutils.h
INSTALL	libavutil/intfloat.h
INSTALL	libavutil/intreadwrite.h
INSTALL	libavutil/lfg.h
INSTALL	libavutil/log.h
INSTALL	libavutil/macros.h
INSTALL	libavutil/mathematics.h
INSTALL	libavutil/mastering_display_metadata.h
INSTALL	libavutil/md5.h
INSTALL	libavutil/mem.h
INSTALL	libavutil/motion_vector.h
INSTALL	libavutil/murmur3.h
INSTALL	libavutil/opt.h
INSTALL	libavutil/parseutils.h
INSTALL	libavutil/pixdesc.h
INSTALL	libavutil/pixelutils.h
INSTALL	libavutil/pixfmt.h
INSTALL	libavutil/random_seed.h
INSTALL	libavutil/rc4.h
INSTALL	libavutil/rational.h
INSTALL	libavutil/replaygain.h
INSTALL	libavutil/ripemd.h
INSTALL	libavutil/samplefmt.h
INSTALL	libavutil/sha.h
INSTALL	libavutil/sha512.h
INSTALL	libavutil/spherical.h
INSTALL	libavutil/stereo3d.h
INSTALL	libavutil/threadmessage.h
INSTALL	libavutil/time.h
INSTALL	libavutil/timecode.h
INSTALL	libavutil/timestamp.h
INSTALL	libavutil/tree.h
INSTALL	libavutil/twofish.h
INSTALL	libavutil/version.h
INSTALL	libavutil/xtea.h
INSTALL	libavutil/tea.h
INSTALL	libavutil/avconfig.h
INSTALL	libavutil/ffversion.h
INSTALL	libavutil/libavutil.pc

Some warning messages during the compilation process.
Is there any problem here?

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Oct 30, 2019

I built this locally and did some debugging:

$ make libavcodec/libavcodec.a V=1
rm -f libavcodec/libavcodec.a
emar rcD libavcodec/libavcodec.a libavcodec/aacdec.o libavcodec/aacps_float.o libavcodec/aacpsdsp_float.o libavcodec/aacsbr.o libavcodec/aactab.o libavcodec/ac3_parser.o libavcodec/ac3tab.o libavcodec/adts_header.o libavcodec/adts_parser.o libavcodec/allcodecs.o libavcodec/avdct.o libavcodec/avfft.o libavcodec/avpacket.o libavcodec/avpicture.o libavcodec/bitstream.o libavcodec/bitstream_filter.o libavcodec/bitstream_filters.o libavcodec/bsf.o libavcodec/bswapdsp.o libavcodec/cabac.o libavcodec/cbrt_data.o libavcodec/codec_desc.o libavcodec/d3d11va.o libavcodec/decode.o libavcodec/dirac.o libavcodec/dv_profile.o libavcodec/encode.o libavcodec/error_resilience.o libavcodec/faandct.o libavcodec/faanidct.o libavcodec/fdctdsp.o libavcodec/fft_fixed.o libavcodec/fft_fixed_32.o libavcodec/fft_float.o libavcodec/fft_init_table.o libavcodec/golomb.o libavcodec/h2645_parse.o libavcodec/h264_cabac.o libavcodec/h264_cavlc.o libavcodec/h264_direct.o libavcodec/h264_loopfilter.o libavcodec/h264_mb.o libavcodec/h264_parse.o libavcodec/h264_picture.o libavcodec/h264_ps.o libavcodec/h264_refs.o libavcodec/h264_sei.o libavcodec/h264_slice.o libavcodec/h264chroma.o libavcodec/h264data.o libavcodec/h264dec.o libavcodec/h264dsp.o libavcodec/h264idct.o libavcodec/h264pred.o libavcodec/h264qpel.o libavcodec/hevc_cabac.o libavcodec/hevc_data.o libavcodec/hevc_filter.o libavcodec/hevc_mvs.o libavcodec/hevc_parse.o libavcodec/hevc_ps.o libavcodec/hevc_refs.o libavcodec/hevc_sei.o libavcodec/hevcdec.o libavcodec/hevcdsp.o libavcodec/hevcpred.o libavcodec/idctdsp.o libavcodec/imgconvert.o libavcodec/jfdctfst.o libavcodec/jfdctint.o libavcodec/jni.o libavcodec/jrevdct.o libavcodec/kbdwin.o libavcodec/mathtables.o libavcodec/mdct15.o libavcodec/mdct_fixed.o libavcodec/mdct_fixed_32.o libavcodec/mdct_float.o libavcodec/me_cmp.o libavcodec/mediacodec.o libavcodec/mjpegenc_huffman.o libavcodec/mpeg12framerate.o libavcodec/mpeg4audio.o libavcodec/mpegaudiodata.o libavcodec/null_bsf.o libavcodec/options.o libavcodec/parser.o libavcodec/parsers.o libavcodec/pixblockdsp.o libavcodec/profiles.o libavcodec/pthread.o libavcodec/pthread_frame.o libavcodec/pthread_slice.o libavcodec/qsv_api.o libavcodec/raw.o libavcodec/sbrdsp.o libavcodec/simple_idct.o libavcodec/sinewin.o libavcodec/sinewin_fixed.o libavcodec/startcode.o libavcodec/utils.o libavcodec/videodsp.o libavcodec/vorbis_parser.o libavcodec/xiph.o
ranlib -D libavcodec/libavcodec.a

So it looks like ffmpeg calls ranlib directly. If you want this to work you also need to specify --ranlib=emranlib on the configure command line.

You will also need to install 1.39.1 in order to get the fix for ranlib itself: #9714

@arkonchen
Copy link

@arkonchen arkonchen commented Oct 31, 2019

you can add --ranlib="emranlib" to build success

@yyqangular1
Copy link
Author

@yyqangular1 yyqangular1 commented Oct 31, 2019

I built this locally and did some debugging:

$ make libavcodec/libavcodec.a V=1
rm -f libavcodec/libavcodec.a
emar rcD libavcodec/libavcodec.a libavcodec/aacdec.o libavcodec/aacps_float.o libavcodec/aacpsdsp_float.o libavcodec/aacsbr.o libavcodec/aactab.o libavcodec/ac3_parser.o libavcodec/ac3tab.o libavcodec/adts_header.o libavcodec/adts_parser.o libavcodec/allcodecs.o libavcodec/avdct.o libavcodec/avfft.o libavcodec/avpacket.o libavcodec/avpicture.o libavcodec/bitstream.o libavcodec/bitstream_filter.o libavcodec/bitstream_filters.o libavcodec/bsf.o libavcodec/bswapdsp.o libavcodec/cabac.o libavcodec/cbrt_data.o libavcodec/codec_desc.o libavcodec/d3d11va.o libavcodec/decode.o libavcodec/dirac.o libavcodec/dv_profile.o libavcodec/encode.o libavcodec/error_resilience.o libavcodec/faandct.o libavcodec/faanidct.o libavcodec/fdctdsp.o libavcodec/fft_fixed.o libavcodec/fft_fixed_32.o libavcodec/fft_float.o libavcodec/fft_init_table.o libavcodec/golomb.o libavcodec/h2645_parse.o libavcodec/h264_cabac.o libavcodec/h264_cavlc.o libavcodec/h264_direct.o libavcodec/h264_loopfilter.o libavcodec/h264_mb.o libavcodec/h264_parse.o libavcodec/h264_picture.o libavcodec/h264_ps.o libavcodec/h264_refs.o libavcodec/h264_sei.o libavcodec/h264_slice.o libavcodec/h264chroma.o libavcodec/h264data.o libavcodec/h264dec.o libavcodec/h264dsp.o libavcodec/h264idct.o libavcodec/h264pred.o libavcodec/h264qpel.o libavcodec/hevc_cabac.o libavcodec/hevc_data.o libavcodec/hevc_filter.o libavcodec/hevc_mvs.o libavcodec/hevc_parse.o libavcodec/hevc_ps.o libavcodec/hevc_refs.o libavcodec/hevc_sei.o libavcodec/hevcdec.o libavcodec/hevcdsp.o libavcodec/hevcpred.o libavcodec/idctdsp.o libavcodec/imgconvert.o libavcodec/jfdctfst.o libavcodec/jfdctint.o libavcodec/jni.o libavcodec/jrevdct.o libavcodec/kbdwin.o libavcodec/mathtables.o libavcodec/mdct15.o libavcodec/mdct_fixed.o libavcodec/mdct_fixed_32.o libavcodec/mdct_float.o libavcodec/me_cmp.o libavcodec/mediacodec.o libavcodec/mjpegenc_huffman.o libavcodec/mpeg12framerate.o libavcodec/mpeg4audio.o libavcodec/mpegaudiodata.o libavcodec/null_bsf.o libavcodec/options.o libavcodec/parser.o libavcodec/parsers.o libavcodec/pixblockdsp.o libavcodec/profiles.o libavcodec/pthread.o libavcodec/pthread_frame.o libavcodec/pthread_slice.o libavcodec/qsv_api.o libavcodec/raw.o libavcodec/sbrdsp.o libavcodec/simple_idct.o libavcodec/sinewin.o libavcodec/sinewin_fixed.o libavcodec/startcode.o libavcodec/utils.o libavcodec/videodsp.o libavcodec/vorbis_parser.o libavcodec/xiph.o
ranlib -D libavcodec/libavcodec.a

So it looks like ffmpeg calls ranlib directly. If you want this to work you also need to specify --ranlib=emranlib on the configure command line.

You will also need to install 1.39.1 in order to get the fix for ranlib itself: #9714

Yes, after specifying this paramter [--ranlib="emranlib"], build successfully.
Thx :) I will close this issue later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants