This repository was archived by the owner on Mar 19, 2024. It is now read-only.
This repository was archived by the owner on Mar 19, 2024. It is now read-only.
can't make wasm #1166
Open
Description
Hi. I couldn't get WASM to work.
In local OSX.
$ docker pull emscripten/emsdk
$ docker run -it emscripten/emsdk bash
In Container.
$ em++ --version
emcc (Emscripten gcc/clang-like replacement) 2.0.11 (6e28e4fa4fa1bc50d58b9ddbbb9603a3cf21ea9e)
Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
This is free and open source software under the MIT license.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ git clone https://github.com/facebookresearch/fastText.git
$ cd fastText
$ make wasm
output:
callapsible
root@57269e14d141:/src/fastText# make wasm
em++ --bind --std=c++11 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['addOnPostRun', 'FS']" -s "DISABLE_EXCEPTION_CATCHING=0" -s "EXCEPTION_DEBUG=1" -s "FORCE_FILESYSTEM=1" -s "MODULARIZE=1" -s "EXPORT_ES6=1" -s 'EXPORT_NAME="FastTextModule"' -Isrc/ src/args.cc -o args.bc
em++: warning: generating an executable with an object extension (.bc). If you meant to build an object file please use `-c, `-r`, or `-shared` [-Wemcc]
em++ --bind --std=c++11 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['addOnPostRun', 'FS']" -s "DISABLE_EXCEPTION_CATCHING=0" -s "EXCEPTION_DEBUG=1" -s "FORCE_FILESYSTEM=1" -s "MODULARIZE=1" -s "EXPORT_ES6=1" -s 'EXPORT_NAME="FastTextModule"' -Isrc/ src/autotune.cc -o autotune.bc
em++: warning: generating an executable with an object extension (.bc). If you meant to build an object file please use `-c, `-r`, or `-shared` [-Wemcc]
em++ --bind --std=c++11 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['addOnPostRun', 'FS']" -s "DISABLE_EXCEPTION_CATCHING=0" -s "EXCEPTION_DEBUG=1" -s "FORCE_FILESYSTEM=1" -s "MODULARIZE=1" -s "EXPORT_ES6=1" -s 'EXPORT_NAME="FastTextModule"' -Isrc/ src/matrix.cc -o matrix.bc
em++: warning: generating an executable with an object extension (.bc). If you meant to build an object file please use `-c, `-r`, or `-shared` [-Wemcc]
em++ --bind --std=c++11 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['addOnPostRun', 'FS']" -s "DISABLE_EXCEPTION_CATCHING=0" -s "EXCEPTION_DEBUG=1" -s "FORCE_FILESYSTEM=1" -s "MODULARIZE=1" -s "EXPORT_ES6=1" -s 'EXPORT_NAME="FastTextModule"' -Isrc/ src/dictionary.cc -o dictionary.bc
em++: warning: generating an executable with an object extension (.bc). If you meant to build an object file please use `-c, `-r`, or `-shared` [-Wemcc]
em++ --bind --std=c++11 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['addOnPostRun', 'FS']" -s "DISABLE_EXCEPTION_CATCHING=0" -s "EXCEPTION_DEBUG=1" -s "FORCE_FILESYSTEM=1" -s "MODULARIZE=1" -s "EXPORT_ES6=1" -s 'EXPORT_NAME="FastTextModule"' -Isrc/ src/loss.cc -o loss.bc
em++: warning: generating an executable with an object extension (.bc). If you meant to build an object file please use `-c, `-r`, or `-shared` [-Wemcc]
em++ --bind --std=c++11 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['addOnPostRun', 'FS']" -s "DISABLE_EXCEPTION_CATCHING=0" -s "EXCEPTION_DEBUG=1" -s "FORCE_FILESYSTEM=1" -s "MODULARIZE=1" -s "EXPORT_ES6=1" -s 'EXPORT_NAME="FastTextModule"' -Isrc/ src/productquantizer.cc -o productquantizer.bc
em++: warning: generating an executable with an object extension (.bc). If you meant to build an object file please use `-c, `-r`, or `-shared` [-Wemcc]
em++ --bind --std=c++11 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['addOnPostRun', 'FS']" -s "DISABLE_EXCEPTION_CATCHING=0" -s "EXCEPTION_DEBUG=1" -s "FORCE_FILESYSTEM=1" -s "MODULARIZE=1" -s "EXPORT_ES6=1" -s 'EXPORT_NAME="FastTextModule"' -Isrc/ src/densematrix.cc -o densematrix.bc
em++: warning: generating an executable with an object extension (.bc). If you meant to build an object file please use `-c, `-r`, or `-shared` [-Wemcc]
em++ --bind --std=c++11 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['addOnPostRun', 'FS']" -s "DISABLE_EXCEPTION_CATCHING=0" -s "EXCEPTION_DEBUG=1" -s "FORCE_FILESYSTEM=1" -s "MODULARIZE=1" -s "EXPORT_ES6=1" -s 'EXPORT_NAME="FastTextModule"' -Isrc/ src/quantmatrix.cc -o quantmatrix.bc
em++: warning: generating an executable with an object extension (.bc). If you meant to build an object file please use `-c, `-r`, or `-shared` [-Wemcc]
em++ --bind --std=c++11 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['addOnPostRun', 'FS']" -s "DISABLE_EXCEPTION_CATCHING=0" -s "EXCEPTION_DEBUG=1" -s "FORCE_FILESYSTEM=1" -s "MODULARIZE=1" -s "EXPORT_ES6=1" -s 'EXPORT_NAME="FastTextModule"' -Isrc/ src/vector.cc -o vector.bc
em++: warning: generating an executable with an object extension (.bc). If you meant to build an object file please use `-c, `-r`, or `-shared` [-Wemcc]
em++ --bind --std=c++11 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['addOnPostRun', 'FS']" -s "DISABLE_EXCEPTION_CATCHING=0" -s "EXCEPTION_DEBUG=1" -s "FORCE_FILESYSTEM=1" -s "MODULARIZE=1" -s "EXPORT_ES6=1" -s 'EXPORT_NAME="FastTextModule"' -Isrc/ src/model.cc -o model.bc
em++: warning: generating an executable with an object extension (.bc). If you meant to build an object file please use `-c, `-r`, or `-shared` [-Wemcc]
em++ --bind --std=c++11 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['addOnPostRun', 'FS']" -s "DISABLE_EXCEPTION_CATCHING=0" -s "EXCEPTION_DEBUG=1" -s "FORCE_FILESYSTEM=1" -s "MODULARIZE=1" -s "EXPORT_ES6=1" -s 'EXPORT_NAME="FastTextModule"' -Isrc/ src/utils.cc -o utils.bc
em++: warning: generating an executable with an object extension (.bc). If you meant to build an object file please use `-c, `-r`, or `-shared` [-Wemcc]
em++ --bind --std=c++11 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['addOnPostRun', 'FS']" -s "DISABLE_EXCEPTION_CATCHING=0" -s "EXCEPTION_DEBUG=1" -s "FORCE_FILESYSTEM=1" -s "MODULARIZE=1" -s "EXPORT_ES6=1" -s 'EXPORT_NAME="FastTextModule"' -Isrc/ src/meter.cc -o meter.bc
em++: warning: generating an executable with an object extension (.bc). If you meant to build an object file please use `-c, `-r`, or `-shared` [-Wemcc]
em++ --bind --std=c++11 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['addOnPostRun', 'FS']" -s "DISABLE_EXCEPTION_CATCHING=0" -s "EXCEPTION_DEBUG=1" -s "FORCE_FILESYSTEM=1" -s "MODULARIZE=1" -s "EXPORT_ES6=1" -s 'EXPORT_NAME="FastTextModule"' -Isrc/ src/fasttext.cc -o fasttext.bc
em++: warning: generating an executable with an object extension (.bc). If you meant to build an object file please use `-c, `-r`, or `-shared` [-Wemcc]
em++ --bind --std=c++11 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['addOnPostRun', 'FS']" -s "DISABLE_EXCEPTION_CATCHING=0" -s "EXCEPTION_DEBUG=1" -s "FORCE_FILESYSTEM=1" -s "MODULARIZE=1" -s "EXPORT_ES6=1" -s 'EXPORT_NAME="FastTextModule"' -Isrc/ webassembly/fasttext_wasm.cc -o main.bc
em++: warning: generating an executable with an object extension (.bc). If you meant to build an object file please use `-c, `-r`, or `-shared` [-Wemcc]
error: undefined symbol: _ZN8fasttext11DenseMatrixC1Ev (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: __ZN8fasttext11DenseMatrixC1Ev may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZN8fasttext4ArgsC1Ev (referenced by top-level compiled C/C++ code)
warning: __ZN8fasttext4ArgsC1Ev may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZN8fasttext6Vector4zeroEv (referenced by top-level compiled C/C++ code)
warning: __ZN8fasttext6Vector4zeroEv may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZN8fasttext6VectorC1Ex (referenced by top-level compiled C/C++ code)
warning: __ZN8fasttext6VectorC1Ex may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZN8fasttext8FastText12getAnalogiesEiRKNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_S9_ (referenced by top-level compiled C/C++ code)
warning: __ZN8fasttext8FastText12getAnalogiesEiRKNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_S9_ may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZN8fasttext8FastText17getSentenceVectorERNSt3__213basic_istreamIcNS1_11char_traitsIcEEEERNS_6VectorE (referenced by top-level compiled C/C++ code)
warning: __ZN8fasttext8FastText17getSentenceVectorERNSt3__213basic_istreamIcNS1_11char_traitsIcEEEERNS_6VectorE may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZN8fasttext8FastText5getNNERKNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEi (referenced by top-level compiled C/C++ code)
warning: __ZN8fasttext8FastText5getNNERKNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEi may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZN8fasttext8FastText5trainERKNS_4ArgsERKNSt3__28functionIFvffddxEEE (referenced by top-level compiled C/C++ code)
warning: __ZN8fasttext8FastText5trainERKNS_4ArgsERKNSt3__28functionIFvffddxEEE may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZN8fasttext8FastText9loadModelERKNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE (referenced by top-level compiled C/C++ code)
warning: __ZN8fasttext8FastText9loadModelERKNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZN8fasttext8FastText9saveModelERKNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE (referenced by top-level compiled C/C++ code)
warning: __ZN8fasttext8FastText9saveModelERKNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZN8fasttext8FastTextC1Ev (referenced by top-level compiled C/C++ code)
warning: __ZN8fasttext8FastTextC1Ev may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK8fasttext10Dictionary11getSubwordsERKNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERNS1_6vectorIiNS5_IiEEEERNSA_IS7_NS5_IS7_EEEE (referenced by top-level compiled C/C++ code)
warning: __ZNK8fasttext10Dictionary11getSubwordsERKNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERNS1_6vectorIiNS5_IiEEEERNSA_IS7_NS5_IS7_EEEE may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK8fasttext10Dictionary4hashERKNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE (referenced by top-level compiled C/C++ code)
warning: __ZNK8fasttext10Dictionary4hashERKNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK8fasttext10Dictionary5getIdERKNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEj (referenced by top-level compiled C/C++ code)
warning: __ZNK8fasttext10Dictionary5getIdERKNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEj may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK8fasttext10Dictionary7getTypeERKNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE (referenced by top-level compiled C/C++ code)
warning: __ZNK8fasttext10Dictionary7getTypeERKNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK8fasttext10Dictionary7getTypeEi (referenced by top-level compiled C/C++ code)
warning: __ZNK8fasttext10Dictionary7getTypeEi may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK8fasttext10Dictionary7getWordEi (referenced by top-level compiled C/C++ code)
warning: __ZNK8fasttext10Dictionary7getWordEi may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK8fasttext10Dictionary8getLabelEi (referenced by top-level compiled C/C++ code)
warning: __ZNK8fasttext10Dictionary8getLabelEi may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK8fasttext10Dictionary8readWordERNSt3__213basic_istreamIcNS1_11char_traitsIcEEEERNS1_12basic_stringIcS4_NS1_9allocatorIcEEEE (referenced by top-level compiled C/C++ code)
warning: __ZNK8fasttext10Dictionary8readWordERNSt3__213basic_istreamIcNS1_11char_traitsIcEEEERNS1_12basic_stringIcS4_NS1_9allocatorIcEEEE may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK8fasttext10Dictionary9getCountsENS_10entry_typeE (referenced by top-level compiled C/C++ code)
warning: __ZNK8fasttext10Dictionary9getCountsENS_10entry_typeE may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK8fasttext5Meter6recallEv (referenced by top-level compiled C/C++ code)
warning: __ZNK8fasttext5Meter6recallEv may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK8fasttext5Meter7f1ScoreEv (referenced by top-level compiled C/C++ code)
warning: __ZNK8fasttext5Meter7f1ScoreEv may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK8fasttext5Meter9precisionEv (referenced by top-level compiled C/C++ code)
warning: __ZNK8fasttext5Meter9precisionEv may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK8fasttext8FastText11predictLineERNSt3__213basic_istreamIcNS1_11char_traitsIcEEEERNS1_6vectorINS1_4pairIfNS1_12basic_stringIcS4_NS1_9allocatorIcEEEEEENSA_ISD_EEEEif (referenced by top-level compiled C/C++ code)
warning: __ZNK8fasttext8FastText11predictLineERNSt3__213basic_istreamIcNS1_11char_traitsIcEEEERNS1_6vectorINS1_4pairIfNS1_12basic_stringIcS4_NS1_9allocatorIcEEEEEENSA_ISD_EEEEif may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK8fasttext8FastText12getDimensionEv (referenced by top-level compiled C/C++ code)
warning: __ZNK8fasttext8FastText12getDimensionEv may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK8fasttext8FastText12getSubwordIdERKNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE (referenced by top-level compiled C/C++ code)
warning: __ZNK8fasttext8FastText12getSubwordIdERKNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK8fasttext8FastText13getDictionaryEv (referenced by top-level compiled C/C++ code)
warning: __ZNK8fasttext8FastText13getDictionaryEv may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK8fasttext8FastText13getWordVectorERNS_6VectorERKNSt3__212basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE (referenced by top-level compiled C/C++ code)
warning: __ZNK8fasttext8FastText13getWordVectorERNS_6VectorERKNSt3__212basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK8fasttext8FastText14addInputVectorERNS_6VectorEi (referenced by top-level compiled C/C++ code)
warning: __ZNK8fasttext8FastText14addInputVectorERNS_6VectorEi may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK8fasttext8FastText14getInputMatrixEv (referenced by top-level compiled C/C++ code)
warning: __ZNK8fasttext8FastText14getInputMatrixEv may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK8fasttext8FastText15getOutputMatrixEv (referenced by top-level compiled C/C++ code)
warning: __ZNK8fasttext8FastText15getOutputMatrixEv may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK8fasttext8FastText4testERNSt3__213basic_istreamIcNS1_11char_traitsIcEEEEifRNS_5MeterE (referenced by top-level compiled C/C++ code)
warning: __ZNK8fasttext8FastText4testERNSt3__213basic_istreamIcNS1_11char_traitsIcEEEEifRNS_5MeterE may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK8fasttext8FastText7getArgsEv (referenced by top-level compiled C/C++ code)
warning: __ZNK8fasttext8FastText7getArgsEv may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK8fasttext8FastText7isQuantEv (referenced by top-level compiled C/C++ code)
warning: __ZNK8fasttext8FastText7isQuantEv may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK8fasttext8FastText9getWordIdERKNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE (referenced by top-level compiled C/C++ code)
warning: __ZNK8fasttext8FastText9getWordIdERKNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
Error: Aborting compilation due to previous errors
em++: error: '/emsdk/node/12.18.1_64bit/bin/node /emsdk/upstream/emscripten/src/compiler.js /tmp/tmp78z6n_eu.txt' failed (1)
make: *** [Makefile:81: main.bc] Error 1
Is there a docker image or something that guarantees that master can build?