Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fuego + WASM = fuego.js? #4

Open
klueq opened this issue Nov 25, 2018 · 0 comments
Open

Fuego + WASM = fuego.js? #4

klueq opened this issue Nov 25, 2018 · 0 comments

Comments

@klueq
Copy link

klueq commented Nov 25, 2018

It would be interesting to compile Fuego with Emscripten into a WASM library and then use in JS web apps. It could be a in-the-browser Go bot or a tool to analyze games or tsumegos.

I gave it a try, installed boost and sys headers, but still emcc gives way too many cryptic errors:

emcc -O3  \
    -s WASM=1 \
    -I /usr/include \
    -I smartgame \
    smartgame/*.cpp

Parts of the output:

In file included from smartgame/SgBoardConst.cpp:7:
In file included from smartgame/SgBoardConst.h:9:
In file included from /usr/include/boost/shared_ptr.hpp:17:
In file included from /usr/include/boost/smart_ptr/shared_ptr.hpp:28:
In file included from /usr/include/boost/smart_ptr/detail/shared_count.hpp:29:
In file included from /usr/include/boost/smart_ptr/detail/sp_counted_base.hpp:45:
In file included from /usr/include/boost/smart_ptr/detail/sp_counted_base_clang.hpp:18:
In file included from /usr/include/boost/detail/sp_typeinfo.hpp:20:
In file included from /usr/include/boost/core/typeinfo.hpp:119:
In file included from /usr/include/boost/core/demangle.hpp:14:
In file included from /usr/share/emscripten/system/include/libcxx/string:437:
In file included from /usr/share/emscripten/system/include/libcxx/cstdio:100:
/usr/include/stdio.h:831:8: error: unknown type name '__gnuc_va_list'
                            _G_va_list __args)
                            ^
/usr/include/bits/_G_config.h:51:20: note: expanded from macro '_G_va_list'
#define _G_va_list __gnuc_va_list
                   ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
ERROR    root: compiler frontend failed to generate LLVM bitcode, halting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant