Olaf icon indicating copy to clipboard operation
Olaf copied to clipboard

make web fails

Open excid3 opened this issue 3 years ago • 0 comments

Was just trying to compile this and ran into an error when I run make web

$ make web
emcc -o wasm/js/olaf.html  -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s EXPORTED_FUNCTIONS="['_malloc','_free']" -s EXTRA_EXPORTED_RUNTIME_METHODS='["cwrap"]' src/olaf_wasm.c src/pffft.c src/olaf_ep_extractor.c src/olaf_fp_extractor.c src/olaf_fp_db_mem.c src/olaf_fp_db_writer_mem.c src/olaf_fp_matcher_fast.c src/olaf_config.c  -O3 -Wall -lm -lc -W -I.
src/olaf_wasm.c:125:8: error: initializing 'int' with an expression of incompatible type 'void'
                        int maxMatchScore = olaf_fp_matcher_match(state.fp_matcher,state.fingerprints);
                            ^               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
emcc: error: '/Users/chris/code/emsdk/upstream/bin/clang -target wasm32-unknown-emscripten -DEMSCRIPTEN -fignore-exceptions -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=17 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL --sysroot=/Users/chris/code/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -O3 -Wall -W -I. src/olaf_wasm.c -c -o /var/folders/gb/dws9z6hs4f12k5m58zl7s1c40000gn/T/emscripten_temp_6q5sozgt/olaf_wasm_0.o' failed (1)
make: *** [web] Error 1
$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin20.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

I'm not too familiar with C these days. Any ideas?

excid3 avatar Apr 19 '21 14:04 excid3