gekomad / Cinnamon

C++ UCI chess engine
GNU Lesser General Public License v3.0
31 stars 8 forks source link

compile cinnamon-js fails : Permission denied #54

Closed tissatussa closed 3 years ago

tissatussa commented 3 years ago

hi, i successfilly compiled Cinnamon v2.4 on Xubuntu 20.04, but your JavaScript version does NOT compile .. what is wrong ? I'm not a beginner at Linux, i can provide more info eg. installed modules / versions .. at this point i have no clue :

roelof@roelof-SATELLITE-C855-226:~/Downloads/tmp3/Cinnamon/src$ make cinnamon-js
emcc -std=c++11 -w -DNDEBUG -DJS_MODE -DDLOG_LEVEL=_FATAL util/Bitboard.cpp -fsigned-char namespaces/board.cpp ChessBoard.cpp Eval.cpp Hash.cpp IterativeDeeping.cpp GenMoves.cpp js/main.cpp \
Search.cpp SearchManager.cpp perft/Perft.cpp util/Timer.cpp perft/PerftThread.cpp \
-s WASM=0 -s EXPORTED_FUNCTIONS="['_main','_perft','_command','_isvalid']" -s EXTRA_EXPORTED_RUNTIME_METHODS='["cwrap"]' -s NO_EXIT_RUNTIME=1 -o cinnamon.js -O3 --memory-init-file 0
/bin/sh: 1: emcc: Permission denied
make: *** [Makefile:80: cinnamon-js] Error 127
gekomad commented 3 years ago

hi, seems to be a issue on you emcc installation, try to run simply 'emcc' , do you get 'Permission denied' ?

tissatussa commented 3 years ago

emcc was not installed on my OS .. i managed to do that by installing its SDK and following some instructions, but then i ran into more problems when trying to implement the cinnamon-js file into a webpage and be able to play chess against the engine .. it seems i also need "chess.js" and some CSS files to make it run, but your documentation is not fully clear .. i found https://gekomad.github.io/Cinnamon/ to play online, but the source code of that web page contains some (minor) basic errors -which you could easily fix, i think- and at the bottom i see 2 JS files "cinnamon_2.4.js" and "cinnamon.js" !? I have to dive into this to make it work .. maybe later.

gekomad commented 3 years ago

thanks for reporting, I've uploaded again cinnamon_javascript_2.4.zip on this page https://github.com/gekomad/Cinnamon/releases/tag/v2.4 (jquery-3.6.0.min.js was missing)

try to open ./cinnamon_javascript_2.4/chessboard_js/chessboard_js.html

tissatussa commented 3 years ago

Yes, it's complete now ! It's easy to make it work .. thanks !