lichess-org / stockfish.wasm

WebAssembly port of the strong chess engine Stockfish
https://npmjs.com/package/stockfish.wasm
GNU General Public License v3.0
271 stars 46 forks source link

compile c++ to wasm (old version) #33

Closed ghost closed 2 years ago

ghost commented 2 years ago

Hello I found stockfish 5 on this link

https://github.com/lichess-org/stockfish.wasm/tree/54f8a9cb138a1bc0b0054b98f911fafd8d1b03ad

i want to covert stockfish 5 c++ project to wasm with Emscripten in linux

i use this code for compile

make ARCH=wasm build -j

but this error

Testing config sanity. If this fails, try 'make help' ...

Makefile:409: recipe for target 'config-sanity' failed make[1]: [config-sanity] Error 1 make[1]: Leaving directory '/root/stockfish/src' Makefile:365: recipe for target 'build' failed make: [build] Error 2

it is possible to convert this c++ version to wasm ?? what commend I use to compile this version ? please help ,thank you

niklasf commented 2 years ago

It's possible, but it requires some changes/work, similar to the patches from this repository - that's why this repository exists in the first place.

For inspiration, view:

git remote add official-stockfish https://github.com/official-stockfish/Stockfish.git
git fetch
git diff SF_Classical

The patch set of the more modern https://github.com/hi-ogawa/Stockfish/ is even more straight forward. Also see https://github.com/hi-ogawa/Stockfish/wiki/Branch-policy.

ghost commented 2 years ago

i find also stockfish 5 in hi-ogawa project and make it but it make only stockfish not stockfish.js or stockfish.wasm

https://github.com/hi-ogawa/Stockfish/tree/54f8a9cb138a1bc0b0054b98f911fafd8d1b03ad

i prefer to use stockfish (11,12,13,14) but i see this version have problem but stockfish 5 dont have its problem

why stockfish 5 is better than all of version 11 , 12 , 13 , 14 ?!

ghost commented 2 years ago

i solved this problem with php and c++

thanks for guide from Niklas Fiekas

but there is no way to build .wasm for stockfish old version