Closed nguyenpham closed 4 years ago
Thanks for reporting. I tried to fix the issue in 646f4afce362022c87 (blindly, because I am not using OS X myself). Does that work for you?
Also the latest emscripten version I tested is 1.39.6. Latest master might have some breaking changes. I'll check that shortly.
Thanks a lot for your prompt reply and the patch! It does not work with a different error: clang-11: error: unsupported option '-mdynamic-no-pic' for target 'wasm32-unknown-emscripten'
If I quoted out from Makefile the line "CXXFLAGS += -mdynamic-no-pic", likely it works (complied without error, created stockfish.js and stockfish.wasm). But I am not sure if it is the correct fix.
Full log:
nguyenpham@Nguyens-iMac stockfish.wasm % npm run-script prepare
> stockfish.wasm@0.6.1 prepare /Users/nguyenpham/workspace/chess/stockfish.wasm
> cd src && make clean && make ARCH=wasm build -j && cd .. && cat preamble.js src/stockfish.js > stockfish.js && cp src/stockfish.worker.js src/stockfish.wasm .
Config:
debug: 'no'
sanitize: 'no'
optimize: 'yes'
arch: 'any'
bits: '64'
kernel: 'Darwin'
os: ''
prefetch: 'no'
popcnt: 'yes'
sse: 'no'
pext: 'no'
Flags:
CXX: em++
CXXFLAGS: -Wall -Wcast-qual -std=c++11 -s MODULARIZE=1 -s EXPORT_NAME=Stockfish -s NO_EXIT_RUNTIME=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=1 -s TOTAL_MEMORY=67108864 -s EXTRA_EXPORTED_RUNTIME_METHODS=[ccall] -s INCOMING_MODULE_JS_API=[print, postRun, onAbort, onRuntimeInitialized] -s ASSERTIONS=0 -s ALLOW_MEMORY_GROWTH=1 -s WASM_MEM_MAX=2147483648 --pre-js pre.js -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto
LDFLAGS: -s MODULARIZE=1 -s EXPORT_NAME=Stockfish -s NO_EXIT_RUNTIME=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=1 -s TOTAL_MEMORY=67108864 -s EXTRA_EXPORTED_RUNTIME_METHODS=[ccall] -s INCOMING_MODULE_JS_API=[print, postRun, onAbort, onRuntimeInitialized] -s ASSERTIONS=0 -s ALLOW_MEMORY_GROWTH=1 -s WASM_MEM_MAX=2147483648 --pre-js pre.js -lpthread -Wall -Wcast-qual -std=c++11 -s MODULARIZE=1 -s EXPORT_NAME=Stockfish -s NO_EXIT_RUNTIME=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=1 -s TOTAL_MEMORY=67108864 -s EXTRA_EXPORTED_RUNTIME_METHODS=[ccall] -s INCOMING_MODULE_JS_API=[print, postRun, onAbort, onRuntimeInitialized] -s ASSERTIONS=0 -s ALLOW_MEMORY_GROWTH=1 -s WASM_MEM_MAX=2147483648 --pre-js pre.js -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto
Testing config sanity. If this fails, try 'make help' ...
/Library/Developer/CommandLineTools/usr/bin/make ARCH=wasm COMP=emscripten all
em++ -Wall -Wcast-qual -std=c++11 -s MODULARIZE=1 -s EXPORT_NAME="Stockfish" -s NO_EXIT_RUNTIME=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=1 -s TOTAL_MEMORY=67108864 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']" -s "INCOMING_MODULE_JS_API=['print', 'postRun', 'onAbort', 'onRuntimeInitialized']" -s ASSERTIONS=0 -s ALLOW_MEMORY_GROWTH=1 -s WASM_MEM_MAX=2147483648 --pre-js pre.js -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o benchmark.o benchmark.cpp
em++ -Wall -Wcast-qual -std=c++11 -s MODULARIZE=1 -s EXPORT_NAME="Stockfish" -s NO_EXIT_RUNTIME=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=1 -s TOTAL_MEMORY=67108864 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']" -s "INCOMING_MODULE_JS_API=['print', 'postRun', 'onAbort', 'onRuntimeInitialized']" -s ASSERTIONS=0 -s ALLOW_MEMORY_GROWTH=1 -s WASM_MEM_MAX=2147483648 --pre-js pre.js -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o bitbase.o bitbase.cpp
em++ -Wall -Wcast-qual -std=c++11 -s MODULARIZE=1 -s EXPORT_NAME="Stockfish" -s NO_EXIT_RUNTIME=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=1 -s TOTAL_MEMORY=67108864 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']" -s "INCOMING_MODULE_JS_API=['print', 'postRun', 'onAbort', 'onRuntimeInitialized']" -s ASSERTIONS=0 -s ALLOW_MEMORY_GROWTH=1 -s WASM_MEM_MAX=2147483648 --pre-js pre.js -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o bitboard.o bitboard.cpp
em++ -Wall -Wcast-qual -std=c++11 -s MODULARIZE=1 -s EXPORT_NAME="Stockfish" -s NO_EXIT_RUNTIME=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=1 -s TOTAL_MEMORY=67108864 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']" -s "INCOMING_MODULE_JS_API=['print', 'postRun', 'onAbort', 'onRuntimeInitialized']" -s ASSERTIONS=0 -s ALLOW_MEMORY_GROWTH=1 -s WASM_MEM_MAX=2147483648 --pre-js pre.js -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o endgame.o endgame.cpp
em++ -Wall -Wcast-qual -std=c++11 -s MODULARIZE=1 -s EXPORT_NAME="Stockfish" -s NO_EXIT_RUNTIME=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=1 -s TOTAL_MEMORY=67108864 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']" -s "INCOMING_MODULE_JS_API=['print', 'postRun', 'onAbort', 'onRuntimeInitialized']" -s ASSERTIONS=0 -s ALLOW_MEMORY_GROWTH=1 -s WASM_MEM_MAX=2147483648 --pre-js pre.js -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o evaluate.o evaluate.cpp
em++ -Wall -Wcast-qual -std=c++11 -s MODULARIZE=1 -s EXPORT_NAME="Stockfish" -s NO_EXIT_RUNTIME=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=1 -s TOTAL_MEMORY=67108864 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']" -s "INCOMING_MODULE_JS_API=['print', 'postRun', 'onAbort', 'onRuntimeInitialized']" -s ASSERTIONS=0 -s ALLOW_MEMORY_GROWTH=1 -s WASM_MEM_MAX=2147483648 --pre-js pre.js -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o main.o main.cpp
em++ -Wall -Wcast-qual -std=c++11 -s MODULARIZE=1 -s EXPORT_NAME="Stockfish" -s NO_EXIT_RUNTIME=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=1 -s TOTAL_MEMORY=67108864 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']" -s "INCOMING_MODULE_JS_API=['print', 'postRun', 'onAbort', 'onRuntimeInitialized']" -s ASSERTIONS=0 -s ALLOW_MEMORY_GROWTH=1 -s WASM_MEM_MAX=2147483648 --pre-js pre.js -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o material.o material.cpp
em++ -Wall -Wcast-qual -std=c++11 -s MODULARIZE=1 -s EXPORT_NAME="Stockfish" -s NO_EXIT_RUNTIME=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=1 -s TOTAL_MEMORY=67108864 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']" -s "INCOMING_MODULE_JS_API=['print', 'postRun', 'onAbort', 'onRuntimeInitialized']" -s ASSERTIONS=0 -s ALLOW_MEMORY_GROWTH=1 -s WASM_MEM_MAX=2147483648 --pre-js pre.js -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o misc.o misc.cpp
em++ -Wall -Wcast-qual -std=c++11 -s MODULARIZE=1 -s EXPORT_NAME="Stockfish" -s NO_EXIT_RUNTIME=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=1 -s TOTAL_MEMORY=67108864 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']" -s "INCOMING_MODULE_JS_API=['print', 'postRun', 'onAbort', 'onRuntimeInitialized']" -s ASSERTIONS=0 -s ALLOW_MEMORY_GROWTH=1 -s WASM_MEM_MAX=2147483648 --pre-js pre.js -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o movegen.o movegen.cpp
em++ -Wall -Wcast-qual -std=c++11 -s MODULARIZE=1 -s EXPORT_NAME="Stockfish" -s NO_EXIT_RUNTIME=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=1 -s TOTAL_MEMORY=67108864 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']" -s "INCOMING_MODULE_JS_API=['print', 'postRun', 'onAbort', 'onRuntimeInitialized']" -s ASSERTIONS=0 -s ALLOW_MEMORY_GROWTH=1 -s WASM_MEM_MAX=2147483648 --pre-js pre.js -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o movepick.o movepick.cpp
em++ -Wall -Wcast-qual -std=c++11 -s MODULARIZE=1 -s EXPORT_NAME="Stockfish" -s NO_EXIT_RUNTIME=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=1 -s TOTAL_MEMORY=67108864 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']" -s "INCOMING_MODULE_JS_API=['print', 'postRun', 'onAbort', 'onRuntimeInitialized']" -s ASSERTIONS=0 -s ALLOW_MEMORY_GROWTH=1 -s WASM_MEM_MAX=2147483648 --pre-js pre.js -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o pawns.o pawns.cpp
em++ -Wall -Wcast-qual -std=c++11 -s MODULARIZE=1 -s EXPORT_NAME="Stockfish" -s NO_EXIT_RUNTIME=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=1 -s TOTAL_MEMORY=67108864 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']" -s "INCOMING_MODULE_JS_API=['print', 'postRun', 'onAbort', 'onRuntimeInitialized']" -s ASSERTIONS=0 -s ALLOW_MEMORY_GROWTH=1 -s WASM_MEM_MAX=2147483648 --pre-js pre.js -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o position.o position.cpp
em++ -Wall -Wcast-qual -std=c++11 -s MODULARIZE=1 -s EXPORT_NAME="Stockfish" -s NO_EXIT_RUNTIME=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=1 -s TOTAL_MEMORY=67108864 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']" -s "INCOMING_MODULE_JS_API=['print', 'postRun', 'onAbort', 'onRuntimeInitialized']" -s ASSERTIONS=0 -s ALLOW_MEMORY_GROWTH=1 -s WASM_MEM_MAX=2147483648 --pre-js pre.js -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o psqt.o psqt.cpp
em++ -Wall -Wcast-qual -std=c++11 -s MODULARIZE=1 -s EXPORT_NAME="Stockfish" -s NO_EXIT_RUNTIME=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=1 -s TOTAL_MEMORY=67108864 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']" -s "INCOMING_MODULE_JS_API=['print', 'postRun', 'onAbort', 'onRuntimeInitialized']" -s ASSERTIONS=0 -s ALLOW_MEMORY_GROWTH=1 -s WASM_MEM_MAX=2147483648 --pre-js pre.js -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o search.o search.cpp
em++ -Wall -Wcast-qual -std=c++11 -s MODULARIZE=1 -s EXPORT_NAME="Stockfish" -s NO_EXIT_RUNTIME=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=1 -s TOTAL_MEMORY=67108864 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']" -s "INCOMING_MODULE_JS_API=['print', 'postRun', 'onAbort', 'onRuntimeInitialized']" -s ASSERTIONS=0 -s ALLOW_MEMORY_GROWTH=1 -s WASM_MEM_MAX=2147483648 --pre-js pre.js -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o thread.o thread.cpp
em++ -Wall -Wcast-qual -std=c++11 -s MODULARIZE=1 -s EXPORT_NAME="Stockfish" -s NO_EXIT_RUNTIME=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=1 -s TOTAL_MEMORY=67108864 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']" -s "INCOMING_MODULE_JS_API=['print', 'postRun', 'onAbort', 'onRuntimeInitialized']" -s ASSERTIONS=0 -s ALLOW_MEMORY_GROWTH=1 -s WASM_MEM_MAX=2147483648 --pre-js pre.js -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o timeman.o timeman.cpp
em++ -Wall -Wcast-qual -std=c++11 -s MODULARIZE=1 -s EXPORT_NAME="Stockfish" -s NO_EXIT_RUNTIME=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=1 -s TOTAL_MEMORY=67108864 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']" -s "INCOMING_MODULE_JS_API=['print', 'postRun', 'onAbort', 'onRuntimeInitialized']" -s ASSERTIONS=0 -s ALLOW_MEMORY_GROWTH=1 -s WASM_MEM_MAX=2147483648 --pre-js pre.js -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o tt.o tt.cpp
em++ -Wall -Wcast-qual -std=c++11 -s MODULARIZE=1 -s EXPORT_NAME="Stockfish" -s NO_EXIT_RUNTIME=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=1 -s TOTAL_MEMORY=67108864 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']" -s "INCOMING_MODULE_JS_API=['print', 'postRun', 'onAbort', 'onRuntimeInitialized']" -s ASSERTIONS=0 -s ALLOW_MEMORY_GROWTH=1 -s WASM_MEM_MAX=2147483648 --pre-js pre.js -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o uci.o uci.cpp
em++ -Wall -Wcast-qual -std=c++11 -s MODULARIZE=1 -s EXPORT_NAME="Stockfish" -s NO_EXIT_RUNTIME=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=1 -s TOTAL_MEMORY=67108864 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']" -s "INCOMING_MODULE_JS_API=['print', 'postRun', 'onAbort', 'onRuntimeInitialized']" -s ASSERTIONS=0 -s ALLOW_MEMORY_GROWTH=1 -s WASM_MEM_MAX=2147483648 --pre-js pre.js -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o ucioption.o ucioption.cpp
root:WARNING: USE_PTHREADS + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271
root:WARNING: USE_PTHREADS + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271
root:WARNING: USE_PTHREADS + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271
root:WARNING: USE_PTHREADS + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271
root:WARNING: USE_PTHREADS + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271
root:WARNING: USE_PTHREADS + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271
clang-11: error: unsupported option '-mdynamic-no-pic' for target 'wasm32-unknown-emscripten'
clang-11: error: unsupported option '-mdynamic-no-pic' for target 'wasm32-unknown-emscripten'
clang-11: error: unsupported option '-mdynamic-no-pic' for target 'wasm32-unknown-emscripten'
clang-11: error: unsupported option '-mdynamic-no-pic' for target 'wasm32-unknown-emscripten'
em++: error: '/Users/nguyenpham/workspace/chess/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=16 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libcxx -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libcxxabi/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libunwind/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isem++: error: '/Users/nguyenpham/workspace/chess/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=16 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libcxx -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libcxxabi/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libunwind/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/cache/wasm-lto/include -DEMSCRIPTEN -fignore-exceptions -D__EMSCRIPTEN_PTHREADS__=1 -Wall -Wcast-qual -std=c++11 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -pthread -pthread endgame.cpp -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/SDL -c -o endgame.o -flto=full' failed (1)
clang-11: error: unsupported option '-mdynamic-no-pic' for target 'wasm32-unknown-emscripten'
em++: error: '/Users/nguyenpham/workspace/chess/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=16 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libcxx -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libcxxabi/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libunwind/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/cache/wasm-lto/include -DEMSCRIPTEN -fignore-exceptions -D__EMSCRIPTEN_PTHREADS__=1 -Wall -Wcast-qual -std=c++11 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -pthread -pthread bitboard.cpp -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/SDL -c -o bitboard.o -flto=full' failed (1)
ystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/cache/wasm-lto/include -DEMSCRIPTEN -fignore-exceptions -D__EMSCRIPTEN_PTHREADS__=1 -Wall -Wcast-qual -std=c++11 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -pthread -pthread benchmark.cpp -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/SDL -c -o benchmark.o -flto=full' failed (1)
clang-11: error: unsupported option '-mdynamic-no-pic' for target 'wasm32-unknown-emscripten'
root:WARNING: USE_PTHREADS + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271
root:WARNING: USE_PTHREADS + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271
em++: error: '/Users/nguyenpham/workspace/chess/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=16 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libcxx -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libcxxabi/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libunwind/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isroot:WARNING: USE_PTHREADS + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271
em++: error: '/Users/nguyenpham/workspace/chess/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=16 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libcxx -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libcxxabi/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libunwind/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isroot:WARNING: USE_PTHREADS + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271
em++: error: '/Users/nguyenpham/workspace/chess/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=16 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libcxx -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libcxxabi/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libunwind/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isroot:WARNING: USE_PTHREADS + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271
ystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/cache/wasm-lto/include -DEMSCRIPTEN -fignore-exceptions -D__EMSCRIPTEN_PTHREADS__=1 -Wall -Wcast-qual -std=c++11 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -pthread -pthread movepick.cpp -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/SDL -c -o movepick.o -flto=full' failed (1)
ystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/cache/wasm-lto/include -DEMSCRIPTEN -fignore-exceptions -D__EMSCRIPTEN_PTHREADS__=1 -Wall -Wcast-qual -std=c++11 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -pthread -pthread main.cpp -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/SDL -c -o main.o -flto=full' failed (1)
ystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/cache/wasm-lto/include -DEMSCRIPTEN -fignore-exceptions -D__EMSCRIPTEN_PTHREADS__=1 -Wall -Wcast-qual -std=c++11 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -pthread -pthread evaluate.cpp -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/SDL -c -o evaluate.o -flto=full' failed (1)
root:WARNING: USE_PTHREADS + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271
root:WARNING: USE_PTHREADS + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271
root:WARNING: USE_PTHREADS + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271
root:WARNING: USE_PTHREADS + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271
root:WARNING: USE_PTHREADS + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271
root:WARNING: USE_PTHREADS + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271
clang-11: error: unsupported option '-mdynamic-no-pic' for target 'wasm32-unknown-emscripten'
clang-11: error: unsupported option '-mdynamic-no-pic' for target 'wasm32-unknown-emscripten'
clang-11: error: unsupported option '-mdynamic-no-pic' for target 'wasm32-unknown-emscripten'
clang-11: error: unsupported option '-mdynamic-no-pic' for target 'wasm32-unknown-emscripten'
clang-11: error: unsupported option '-mdynamic-no-pic' for target 'wasm32-unknown-emscripten'
clang-11: error: unsupported option '-mdynamic-no-pic' for target 'wasm32-unknown-emscripten'
clang-11: error: unsupported option '-mdynamic-no-pic' for target 'wasm32-unknown-emscripten'
em++: error: '/Users/nguyenpham/workspace/chess/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=16 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libcxx -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libcxxabi/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libunwind/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isclang-11: error: unsupported option '-mdynamic-no-pic' for target 'wasm32-unknown-emscripten'
clang-11: error: unsupported option '-mdynamic-no-pic' for target 'wasm32-unknown-emscripten'
em++: error: '/Users/nguyenpham/workspace/chess/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=16 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libcxx -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libcxxabi/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libunwind/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isclang-11: error: unsupported option '-mdynamic-no-pic' for target 'wasm32-unknown-emscripten'
clang-11: error: unsupported option '-mdynamic-no-pic' for target 'wasm32-unknown-emscripten'
ystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/cache/wasm-lto/include -DEMSCRIPTEN -fignore-exceptions -D__EMSCRIPTEN_PTHREADS__=1 -Wall -Wcast-qual -std=c++11 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -pthread -pthread tt.cpp -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/SDL -c -o tt.o -flto=full' failed (1)
em++: error: '/Users/nguyenpham/workspace/chess/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=16 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libcxx -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libcxxabi/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libunwind/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isem++: error: '/Users/nguyenpham/workspace/chess/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=16 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libcxx -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libcxxabi/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libunwind/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/cache/wasm-lto/include -DEMSCRIPTEN -fignore-exceptions -D__EMSCRIPTEN_PTHREADS__=1 -Wall -Wcast-qual -std=c++11 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -pthread -pthread movegen.cpp -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/SDL -c -o movegen.o -flto=full' failed (1)
ystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/cache/wasm-lto/include -DEMSCRIPTEN -fignore-exceptions -D__EMSCRIPTEN_PTHREADS__=1 -Wall -Wcast-qual -std=c++11 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -pthread -pthread pawns.cpp -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/SDL -c -o pawns.o -flto=full' failed (1)
em++: error: '/Users/nguyenpham/workspace/chess/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=16 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libcxx -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/cache/wasm-lto/include -DEMSCRIPTEN -fignore-exceptions -D__EMSCRIPTEN_PTHREADS__=1 -Wall -Wcast-qual -std=c++11 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -pthread -pthread timeman.cpp -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/SDL -c -o timeman.o -flto=full' failed (1)
em++: error: '/Users/nguyenpham/workspace/chess/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=16 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libcxx -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libcxxabi/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libunwind/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -iscxxabi/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libunwind/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/cache/wasm-lto/include -DEMSCRIPTEN -fignore-exceptions -D__EMSCRIPTEN_PTHREADS__=1 -Wall -Wcast-qual -std=c++11 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -pthread -pthread misc.cpp -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/SDL -c -o misc.o -flto=full' failed (1)
ystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/cache/wasm-lto/include -DEMSCRIPTEN -fignore-exceptions -D__EMSCRIPTEN_PTHREADS__=1 -Wall -Wcast-qual -std=c++11 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -pthread -pthread position.cpp -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/SDL -c -o position.o -flto=full' failed (1)
em++: error: '/Users/nguyenpham/workspace/chess/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=16 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libcxx -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lroot:WARNING: USE_PTHREADS + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271
em++: error: '/Users/nguyenpham/workspace/chess/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=16 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libcxx -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libcxxabi/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libunwind/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isroot:WARNING: USE_PTHREADS + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271
em++: error: '/Users/nguyenpham/workspace/chess/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=16 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libcxx -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libcxxabi/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libunwind/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isem++: error: '/Users/nguyenpham/workspace/chess/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=16 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libcxx -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libcxxabi/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libunwind/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isem++: error: '/Users/nguyenpham/workspace/chess/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=16 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libcxx -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libcxxabi/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libunwind/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isib/libcxxabi/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libunwind/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/cache/wasm-lto/include -DEMSCRIPTEN -fignore-exceptions -D__EMSCRIPTEN_PTHREADS__=1 -Wall -Wcast-qual -std=c++11 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -pthread -pthread material.cpp -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/includeystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/cache/wasm-lto/include -DEMSCRIPTEN -fignore-exceptions -D__EMSCRIPTEN_PTHREADS__=1 -Wall -Wcast-qual -std=c++11 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -pthread -pthread ucioption.cpp -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/SDL -c -o ucioption.o -flto=full' failed (1)
ystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/cache/wasm-lto/include -DEMSCRIPTEN -fignore-exceptions -D__EMSCRIPTEN_PTHREADS__=1 -Wall -Wcast-qual -std=c++11 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -pthread -pthread search.cpp -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/SDL -c -o search.o -flto=full' failed (1)
ystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/cache/wasm-lto/include -DEMSCRIPTEN -fignore-exceptions -D__EMSCRIPTEN_PTHREADS__=1 -Wall -Wcast-qual -std=c++11 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -pthread -pthread psqt.cpp -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/SDL -c -o psqt.o -flto=full' failed (1)
ystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/cache/wasm-lto/include -DEMSCRIPTEN -fignore-exceptions -D__EMSCRIPTEN_PTHREADS__=1 -Wall -Wcast-qual -std=c++11 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -pthread -pthread thread.cpp -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/SDL -c -o thread.o -flto=full' failed (1)
/SDL -c -o material.o -flto=full' failed (1)
make[1]: *** [benchmark.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [bitboard.o] Error 1
clang-11: error: unsupported option '-mdynamic-no-pic' for target 'wasm32-unknown-emscripten'
clang-11: error: unsupported option '-mdynamic-no-pic' for target 'wasm32-unknown-emscripten'
em++: error: '/Users/nguyenpham/workspace/chess/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=16 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libcxx -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libcxxabi/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libunwind/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/cache/wasm-lto/include -DEMSCRIPTEN -fignore-exceptions -D__EMSCRIPTEN_PTHREADS__=1 -Wall -Wcast-qual -std=c++11 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -pthread -pthread bitbase.cpp -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/SDL -c -o bitbase.o -flto=full' failed (1)
em++: error: '/Users/nguyenpham/workspace/chess/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=16 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libcxx -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libcxxabi/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libunwind/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/cache/wasm-lto/include -DEMSCRIPTEN -fignore-exceptions -D__EMSCRIPTEN_PTHREADS__=1 -Wall -Wcast-qual -std=c++11 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -DNO_PREFETCH -msse3 -mpopcnt -DUSE_POPCNT -flto -c -pthread -pthread uci.cpp -Xclang -isystem/Users/nguyenpham/workspace/chess/emsdk/upstream/emscripten/system/include/SDL -c -o uci.o -flto=full' failed (1)
make[1]: *** [endgame.o] Error 1
make[1]: *** [main.o] Error 1
make[1]: *** [evaluate.o] Error 1
make[1]: *** [movepick.o] Error 1
make[1]: *** [misc.o] Error 1
make[1]: *** [tt.o] Error 1
make[1]: *** [pawns.o] Error 1
make[1]: *** [ucioption.o] Error 1
make[1]: *** [movegen.o] Error 1
make[1]: *** [position.o] Error 1
make[1]: *** [bitbase.o] Error 1
make[1]: *** [material.o] Error 1
make[1]: *** [psqt.o] Error 1
make[1]: *** [search.o] Error 1
make[1]: *** [timeman.o] Error 1
make[1]: *** [thread.o] Error 1
make[1]: *** [uci.o] Error 1
make: *** [build] Error 2
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! stockfish.wasm@0.6.1 prepare: `cd src && make clean && make ARCH=wasm build -j && cd .. && cat preamble.js src/stockfish.js > stockfish.js && cp src/stockfish.worker.js src/stockfish.wasm .`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the stockfish.wasm@0.6.1 prepare script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/nguyenpham/.npm/_logs/2020-05-27T02_19_16_696Z-debug.log
Thanks. The fix is correct. It's because the upstream Makefile dynamically sets some flags depending on the platform, which do not make sense for platform independent WASM builds.
I have just followed your instruction, downloaded, installed very things today (thus all are up to date) on my macOS. I can't compile. The full log as below: