BPG Emscripten编译错误

时间:2015-02-27 14:12:59

标签: javascript clang llvm emscripten bpg

我正在尝试编译BPG解码器以获得等效的Javascript(是的,我知道一个已经由作者提供);这是通过Emscripten完成的。不幸的是,我收到以下错误:

emcc -Os -Wall -MMD -fno-asynchronous-unwind-tables -fdata-sections -ffunction-sections -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_REENTRANT -I. -DCONFIG_BPG_VERSION=\"0.9.5\" -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DHAVE_AV_CONFIG_H -std=c99 -D_GNU_SOURCE=1 -DUSE_VAR_BIT_DEPTH -c -o libavutil/buffer.js.o libavutil/buffer.c
In file included from libavutil/buffer.c:22:
In file included from libavutil/atomic.h:29:
libavutil/atomic_gcc.h:54:12: error: cannot compile this atomic library call yet
    return __atomic_add_fetch(ptr, inc, __ATOMIC_SEQ_CST);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
ERROR    root: compiler frontend failed to generate LLVM bitcode, halting
Makefile:202: recipe for target 'libavutil/buffer.js.o' failed
make: *** [libavutil/buffer.js.o] Error 1

关于如何解决它的任何想法?

1 个答案:

答案 0 :(得分:0)

问题是由Ubuntu 14.10附带的Emscripten编译器引起的;我升级了,现在一切正常:

$ ./emcc -v
emcc (Emscripten GCC-like replacement + linker emulating GNU ld ) 1.29.0
clang version 3.4

这里的附注是我还需要更新版本的libpng