Guest User

Emscripten - chat with devs

a guest
Apr 7th, 2013
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.06 KB | None | 0 0
  1. * Now talking on #emscripten
  2. * Topic for #emscripten is: http://emscripten.org
  3. * Topic for #emscripten set by azakai at Fri Mar 16 13:52:38 2012
  4. <Sketch2> Hi. Does anyone know how I would set up emscripten with CodeLite?
  5. <Sketch2> I get that C++ compiler name is emcc. and C compiler is also emcc, right?
  6. <Sketch2> linker is LLVM?
  7. <Sketch2> shared object linker? archive tool? resource compiler?
  8. <Sketch2> and then make is emmake. just need help with the other ones.
  9. * chad_ has quit (Ping timeout)
  10. <inolen> Sketch2: look at the emscripten root dir
  11. <inolen> you'll see all the tool names :)
  12. <Sketch2> ok so emar is em archive tool. and emlibntool is the resource compiler?
  13. <clb> chad: around?
  14. <Sketch2> still don't know what to put in for the linker and shared object linker
  15. <clb> hi inolen, sorry I missed you last night
  16. <inolen> clb: no problem
  17. <inolen> chad helped sort me out for the most part
  18. <clb> alright, great!
  19. <inolen> i've been spending the night sorting through issues :)
  20. <clb> brucem: I tried building trunk llvm on windows
  21. <clb> but Visual Studio compiler crashes repeatedly on trying to build clang :|
  22. <clb> hmmh, or is it actually the IDE that crashes..
  23. <clb> well anyways, I'll mark down the bugs to the tracker
  24. <brucem> clb: :(
  25. <Barna> Sketch2: Not knowing CodeLite, but it might be eassier to have a custom build script or Makefile than trying to repurpose a regular C/C++ build system for Emscripten. My Emscripten project Makefile goes from .c -> .o, from multiple .o -> .bc and from multiple .bc -> .js. All pretty much just executing "emcc -o <OUT> <IN-FILES>"
  26. * marcusbee has quit (Quit: http://www.mibbit.com ajax IRC Client)
  27. <Sketch2> well, I understand that, but it's kinda hard to make a custom makefile if you can't see how the project pulls apart. was hoping to use CodeLite to help visualise where all the code references are
  28. <Sketch2> I'm trying to port this Minecraft-style game, called Minetest over so my 8 year old can play it while he's over at his mom's house
  29. <Sketch2> I was hoping to do that so we'd get to hang out a bit more, 'cuz I don't see him much
  30. <Sketch2> I've got half a doz of the required libraried ported, but having trouble getting the last 7 or so converted to bitcode
  31. <inolen> Sketch2: there are a few dozen JS MC clones already out?
  32. <inolen> perhaps that'd be easier :)
  33. <Sketch2> eh, he likes this one and we've already built stuff together
  34. <Sketch2> cathedral, pirate ship, dinosaurs
  35. <Barna> quick google tells me Minetest depends on the Irrlicht engine... I doubt it will be easy as afaik noone has reimplemented irrlicht in JS for Emscripten yet
  36. <Sketch2> I didn't expect it to be easy, but it should be do-able.
  37. <Barna> And if you want network socket functionality you might be out of luck. Or in for quite a project rewriting it to websockets :o
  38. <Sketch2> oh, it won't convert over like that because the libraries aren't cross platform?
  39. <clb> Sketch2: the C compiler is emcc, C++ compiler is em++
  40. <clb> emcc can be used to link
  41. <clb> I maintain cmake+emscripten integration
  42. <Sketch2> oh ok, ty. that's why I was asking. do you happen to know what they call the shared object linker?
  43. <clb> emcc
  44. <Sketch2> k, cool.
  45. <clb> you invoke it with different flags
  46. <clb> although should be noted that emscripten doesn't have a concept of dynamic/shared libraries
  47. <clb> you're best of building all libraries as static
  48. <clb> *best off
  49. <clb> you can (kinda) do dynamic libraries by building them to .js
  50. <Barna> Irrlicht has (limited?) support for OpenGLES and seems to run via SDL which has been ported to Emscripten. Starting with the GLES version of Irrlicht would be better suited for WebGL than regular Desktop OpenGL.
  51. <Sketch2> right, that's what I'm trying to do
  52. <clb> but that's not very good to do multiple times, as there are things involved when you include multiple .js files built with emscripten
  53. <Sketch2> oh. well how would they have done it with other large games?
  54. <clb> they build to a single large .js/.html most likely
  55. <clb> azakai|far will be able to answer it better, but I think emscripten was not directly designed to include multiple .js files into one
  56. <clb> since the .js files each define a HEAP, and a Module the code resides in
  57. <clb> so if I understand correctly, they don't share straightforwardly if you have multiple .js files
  58. <Sketch2> I dunno, maybe I was under the assumption it was do-able 'cuz I thought SuperTux was SuperTuxCart, which happens to use the irrlicht engine
  59. <Sketch2> I realize it wasn't the same now that I glanced back at it
  60. <Sketch2> 'prolly because they loop into each other
  61. <clb> brucem: oh, managed to build clang trunk now
  62. <clb> and it does give the same error
  63. <brucem> clb: I guess that's cause for celebration.
  64. <Sketch2> hmm, well thanks for the help anyway. I'll ponder it a while. maybe I can talk to the minetest devs and see if they can impliment a version with websockets
  65. <Sketch2> most likely I'll play around with it on smaller projects
  66. <clb> https://dl.dropbox.com/u/40949268/emcc/bugs/constexpr_fail_clang33.txt
  67. <inolen> clb: so, are you actively working on this embind stuff with chad?
Advertisement
Add Comment
Please, Sign In to add comment