wasm-sample
wasm-sample copied to clipboard
Getting error on build
wasm-sample/sample1/cmake-build-wasm$ make -j 4
[ 20%] Linking CXX executable WasmSample.js
wasm-ld-13: warning: function signature mismatch: _ZN6tflite15FlatBufferModel13BuildFromFileEPKcPNS_13ErrorReporterE
>>> defined as (i32, i32) -> i32 in CMakeFiles/WasmSample.dir/include/cutemodel/cute_model.cpp.o
>>> defined as (i32, i32, i32) -> void in /home/casper/ml/wasm-sample/sample1/tflite/lib/simd/libtensorflow-lite.a(model_builder.cc.o)
wasm-ld-13: warning: function signature mismatch: _ZN6tflite15FlatBufferModel15BuildFromBufferEPKcmPNS_13ErrorReporterE
>>> defined as (i32, i32, i32) -> i32 in CMakeFiles/WasmSample.dir/include/cutemodel/cute_model.cpp.o
>>> defined as (i32, i32, i32, i32) -> void in /home/casper/ml/wasm-sample/sample1/tflite/lib/simd/libtensorflow-lite.a(model_builder.cc.o)
error: undefined symbol: _ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_ (referenced by top-level compiled C/C++ code)
warning: Link with `-s LLD_REPORT_UNDEFINED` to get more information on undefined symbols
warning: To disable errors for undefined symbols use `-s ERROR_ON_UNDEFINED_SYMBOLS=0`
warning: __ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_ may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
Error: Aborting compilation due to previous errors
em++: error: '/usr/bin/node /usr/share/emscripten/src/compiler.js /tmp/tmp_9ryy1u1.json' failed (returned 1)
make[2]: *** [CMakeFiles/WasmSample.dir/build.make:165: WasmSample.js] Error 1
make[1]: *** [CMakeFiles/Makefile2:403: CMakeFiles/WasmSample.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
Have you updated the Git submodule? A submodule called vccc is being used. Run git submodule update after git submodule init.
@cyborgdennett
- Have you built your own
libtensorflow-lite.a? If so, what version oftensorflowandemsdkwere used for building it? - Have you checked the version of
emsdkmentioned in the Readme? I think the version ofemsdkyou used does not match what I used for building the sample - I haven't checked if the newer versions of emsdk are working well with the compiled libraries and the code. I think you must build your own
tfliteandopencvto build the sample with the newer versions of emsdk
@Dabin22 Yes, I updated the submodules, which did not work.
@leeyongeun9 I have emcc version 3.1.5
For the rest I have not build anything other than the default install commands.
I will try building tflite and opencv with new emcc now.