wasm-sample icon indicating copy to clipboard operation
wasm-sample copied to clipboard

Getting error on build

Open cyborgdennett opened this issue 2 years ago • 3 comments

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

cyborgdennett avatar Sep 18 '23 16:09 cyborgdennett

Have you updated the Git submodule? A submodule called vccc is being used. Run git submodule update after git submodule init.

Dabin22 avatar Sep 19 '23 02:09 Dabin22

@cyborgdennett

  1. Have you built your own libtensorflow-lite.a ? If so, what version of tensorflow and emsdk were used for building it?
  2. Have you checked the version of emsdk mentioned in the Readme? I think the version of emsdk you used does not match what I used for building the sample
  3. 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 tflite and opencv to build the sample with the newer versions of emsdk

leeyongeun9 avatar Sep 19 '23 06:09 leeyongeun9

@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.

cyborgdennett avatar Sep 19 '23 17:09 cyborgdennett