添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

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 ffmpeg执行 ./configure时报错,shared:ERROR: dist/lib/libavformat.a: No such file or directory ("dist/lib/libavformat.a" was expected to be an input file, based on the commandline arguments provided), ffmpeg执行 ./configure时报错,shared:ERROR: dist/lib/libavformat.a: No such file or directory ("dist/lib/libavformat.a" was expected to be an input file, based on the commandline arguments provided), BlueBubbleWei opened this issue Oct 24, 2019 · 9 comments

再执行下面的sh build_decoder_wasm.sh就会有问题,root@DESKTOP-7ME2BST:/home/blue/data/WasmVideoPlayer# sh build_decoder_wasm.sh
Running Emscripten...
shared:ERROR: dist/lib/libavformat.a: No such file or directory ("dist/lib/libavformat.a" was expected to be an input file, based on the commandline arguments provided)
Finished Build

C compiler test failed. If you think configure made a mistake, make sure you are using the latest version from Git. If the latest version fails, report the problem to the [email protected] mailing list or IRC #ffmpeg on irc.freenode.net. Rerun configure with logging enabled (do not use --disable-logging), and include the log this produces with your report. 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 CC libavdevice/avdevice.o libavdevice/avdevice.c:88:26: warning: 'av_oformat_next' is deprecated [-Wdeprecated-declarations] if (!(prev = av_oformat_next(prev)))

换到ubuntu环境进行编译,前面ffmpeg编译已经通过,后面build_decoder_wasm.sh执行时报错

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_dOEtMZ/libffmpeg.wasm --allow-undefined --lto-O0 /tmp/emscripten_temp_dOEtMZ/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

请指教一下。

我这边已经通过修改参数暂时可以通过编译,修改 build_decoder.sh如下:

emconfigure ./configure --cc="emcc" --cxx="em++" --ar="emar" --ranlib="emranlib" --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
我这边已经通过修改参数暂时可以通过编译,修改 build_decoder.sh如下:

emconfigure ./configure --cc="emcc" --cxx="em++" --ar="emar" --ranlib="emranlib" --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

你用的ffmpeg是什么版本的

我这边已经通过修改参数暂时可以通过编译,修改 build_decoder.sh如下:

emconfigure ./configure --cc="emcc" --cxx="em++" --ar="emar" --ranlib="emranlib" --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

你用的ffmpeg是什么版本的

@bjhanfeng 我的ffmpeg版本3.3.9

我这边已经通过修改参数暂时可以通过编译,修改 build_decoder.sh如下:

emconfigure ./configure --cc="emcc" --cxx="em++" --ar="emar" --ranlib="emranlib" --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

你用的ffmpeg是什么版本的

@bjhanfeng 我的ffmpeg版本3.3.9

我也下载了3.3.9 也使用你的命令.提示 emcc is unable to create an executable file.
这是什么情况啊?

我这边已经通过修改参数暂时可以通过编译,修改 build_decoder.sh如下:

emconfigure ./configure --cc="emcc" --cxx="em++" --ar="emar" --ranlib="emranlib" --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

你用的ffmpeg是什么版本的

@bjhanfeng 我的ffmpeg版本3.3.9

我也下载了3.3.9 也使用你的命令.提示 emcc is unable to create an executable file.
这是什么情况啊?

你这个跟ffmpeg版本没有关系,你的Emscripten环境ok吗?