I think i might have a hint for how to solve it, I am missing some standard library files, and there's a way to generate those running: "python embuilder.py build dlmalloc libcxx libc gl libcxxabi libcxx_noexcept wasm-libc" from `external/emscripten_toolchain` but when i do that, i get:
embuilder:INFO: building and verifying dlmalloc embuilder:INFO: ...success embuilder:INFO: building and verifying libcxx embuilder:ERROR: unfamiliar build target: libcxx Any idea? On Mon, May 20, 2019 at 12:55 PM Tsvi Sabo <[email protected]> wrote: > Thanks a lot for your reply, will try it, but the reason i was using the > Bazel to pull and build emscripten rather than installing > the SDK is that i would like to have a Bazel target which i can build with > emscripten on any platform, > you think that's possible? > > On Mon, May 20, 2019 at 12:39 PM Floh <[email protected]> wrote: > >> Wow, that looks overly complicated (I guess that's Bazel's fault). >> >> If you are on a Mac, the easiest way to get a working emscripten >> environment is via homebrew: >> >> > brew install emscripten >> >> On Linux, check whether the emscripten SDK is provided by your distro's >> package manager, otherwise (or if on Windows), follow the steps described >> here to install the emscripten SDK: >> >> https://emscripten.org/docs/getting_started/downloads.html >> >> ...and to test whether this worked, write a small hello.c: >> >> #include <stdio.h> >> int main() { >> printf("Hello World!\n"); >> return 0; >> } >> >> ...then run: >> >> > emcc hello.c -o hello.html >> ... >> >> ..this should produce 3 files: hello.html, hello.js and hello.wasm >> >> ...to test whether the produced application works: >> >> > emrun hello.html >> Starting browser: open http://localhost:6931/hello.html >> ... >> >> ...this should open the system's default browser and show the emscripten >> standard demo page, at the bottom of the page there should be a "Hello >> World!" message in a text output field. >> >> From there, move to more complex stuff. But I would move to build systems >> only when you're sure that the emscripten installation itself works. >> >> Build systems just add more things that can go wrong, and the additional >> "obfuscation layer" (which the build systems add on top of the compiler >> toolchain) can make it harder to find the actual problems. >> >> Cheers, >> -Floh. >> >> On Monday, 20 May 2019 11:01:32 UTC+2, Tsvi Sabo wrote: >>> >>> Following this tutorial: >>> >>> https://docs.bazel.build/versions/master/tutorial/cc-toolchain-config.html >>> And after fixing some of the configuration's paths, >>> i manage to build a really simple `hello-world` `c` file, but when i >>> follow the example completely, and include some cpp headers such as >>> <ctime>, i get the following: >>> >>> "In file included from /home/tsvi/IOTA_DEV/entangled/hello-world.cc:2: >>> In file included from >>> external/emscripten_toolchain/system/include/libcxx/iostream:38: >>> In file included from >>> external/emscripten_toolchain/system/include/libcxx/ios:216: >>> external/emscripten_toolchain/system/include/libcxx/__locale:417:32: >>> error: use of undeclared identifier '_CTYPE_S' >>> static const mask space = _CTYPE_S;" >>> >>> >>> So, i am guessing, it might be using wrong include paths of clang after >>> all? >>> How do i fix this? >>> Thanks >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "emscripten-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/emscripten-discuss/9cff3f50-bee1-43ac-be9b-f7076024d47e%40googlegroups.com >> <https://groups.google.com/d/msgid/emscripten-discuss/9cff3f50-bee1-43ac-be9b-f7076024d47e%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- *IOTA Foundation* c/o Nextland Strassburgerstraße 55 10405 Berlin, Germany Board of Directors: Sergey Ivancheglo, Serguei Popov, Ralf Rottmann, Dominik Schiener, David Sønstebø ID/Company No.: 3416/1234/2 -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAGtHauKgEgvS4nCORf5v6ahJ%3Dzq_wYBOmkF%2BGxc6%3DjunfT%2Bg_A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
