shared:ERROR: closure compiler failed (rc: 1)
shared:ERROR: closure compiler failed (rc: 1)
我想构建 ffmpeg.js,但是当 运行 make all 时出现以下错误:
pop()()}}var shouldRunNow=true;if(Module["noInitialRun"])
{shouldRunNow=false}Module["noExitRuntime"]=true;run();return
__ffmpegjs_return}module["exports"]=__ffmpegjs;
^^^^^^^^^^^^^^^
1 error(s), 6 warning(s)
shared:ERROR: closure compiler failed (rc: 1)
Makefile:316: recipe for target 'ffmpeg-webm.js' failed
make: *** [ffmpeg-webm.js] Error 1
Makefile 中的相关行是:
# Compile bitcode to JavaScript.
# NOTE(Kagami): Bump heap size to 64M, default 16M is not enough even
# for simple tests and 32M tends to run slower than 64M.
EMCC_COMMON_ARGS = \
--closure 1 \
-s TOTAL_MEMORY=67108864 \
-s OUTLINING_LIMIT=20000 \
-O3 --memory-init-file 0 \
--pre-js $(PRE_JS) \
-o $@
ffmpeg-webm.js: $(FFMPEG_WEBM_BC) $(PRE_JS) $(POST_JS_SYNC)
emcc $(FFMPEG_WEBM_BC) $(WEBM_SHARED_DEPS) \ --------->>>>> THIS IS LINE 316
--post-js $(POST_JS_SYNC) \
$(EMCC_COMMON_ARGS)
如何使用 emcc 正确构建 ffmpeg.js?
它说关闭编译器失败。删除 --closure 1
。您可能需要将优化标志减少到 -O2
才能编译。如您所见,根据我的经验,Emscripten 优化器在 JS 模块化代码方面存在一些错误。
尝试在没有任何优化标志的情况下编译任何东西总是好的,然后逐渐启用它们。
我想构建 ffmpeg.js,但是当 运行 make all 时出现以下错误:
pop()()}}var shouldRunNow=true;if(Module["noInitialRun"])
{shouldRunNow=false}Module["noExitRuntime"]=true;run();return
__ffmpegjs_return}module["exports"]=__ffmpegjs;
^^^^^^^^^^^^^^^
1 error(s), 6 warning(s)
shared:ERROR: closure compiler failed (rc: 1)
Makefile:316: recipe for target 'ffmpeg-webm.js' failed
make: *** [ffmpeg-webm.js] Error 1
Makefile 中的相关行是:
# Compile bitcode to JavaScript.
# NOTE(Kagami): Bump heap size to 64M, default 16M is not enough even
# for simple tests and 32M tends to run slower than 64M.
EMCC_COMMON_ARGS = \
--closure 1 \
-s TOTAL_MEMORY=67108864 \
-s OUTLINING_LIMIT=20000 \
-O3 --memory-init-file 0 \
--pre-js $(PRE_JS) \
-o $@
ffmpeg-webm.js: $(FFMPEG_WEBM_BC) $(PRE_JS) $(POST_JS_SYNC)
emcc $(FFMPEG_WEBM_BC) $(WEBM_SHARED_DEPS) \ --------->>>>> THIS IS LINE 316
--post-js $(POST_JS_SYNC) \
$(EMCC_COMMON_ARGS)
如何使用 emcc 正确构建 ffmpeg.js?
它说关闭编译器失败。删除 --closure 1
。您可能需要将优化标志减少到 -O2
才能编译。如您所见,根据我的经验,Emscripten 优化器在 JS 模块化代码方面存在一些错误。
尝试在没有任何优化标志的情况下编译任何东西总是好的,然后逐渐启用它们。