[go: nahoru, domu]

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

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), #23

Closed
BlueBubbleWei opened this issue Oct 24, 2019 · 9 comments

Comments

@BlueBubbleWei
Copy link

再执行下面的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

@yyqangular1
Copy link

@BlueBubbleWei 你前面的ffmpeg的编译可以正确执行吗?
我在执行./build_decoder.sh 时就报错:

$ ./build_decoder.sh 
Beginning Build:
emcc is unable to create an executable file.
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
ffmpeg-user@ffmpeg.org 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)))

@yyqangular1
Copy link

换到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

请指教一下。

@bjhanfeng
Copy link

@yyqangular1 我也遇到相同的问题。你解决了嘛?

@yyqangular1
Copy link
yyqangular1 commented Oct 29, 2019

@yyqangular1 我也遇到相同的问题。你解决了嘛?
我这边已经通过修改参数暂时可以通过编译,修改 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

@bjhanfeng
Copy link

@yyqangular1 我也遇到相同的问题。你解决了嘛?
我这边已经通过修改参数暂时可以通过编译,修改 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是什么版本的

@yyqangular1
Copy link

@yyqangular1 我也遇到相同的问题。你解决了嘛?
我这边已经通过修改参数暂时可以通过编译,修改 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

@tmkmk
Copy link
tmkmk commented May 18, 2020

@yyqangular1

@yyqangular1 我也遇到相同的问题。你解决了嘛?
我这边已经通过修改参数暂时可以通过编译,修改 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.
这是什么情况啊?

@yyqangular1
Copy link

@yyqangular1

@yyqangular1 我也遇到相同的问题。你解决了嘛?
我这边已经通过修改参数暂时可以通过编译,修改 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吗?

@aceip
Copy link
aceip commented Dec 7, 2021

--disable-ffserver 删掉这个 重新编译 可以过去 感觉原因是最新版的ffmpeg设置参数有变化

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants