Building webgl-port branch

Hello, I’m trying to compile Panda3d to use in browser. I’ve followed steps outlined in this guide but when I run python makepanda/makepanda.py. command it crashes with following message:
[T4] Building Interrogate database embuilt/pandac/input/libp3dtoolbase.in Cannot find interrogate on search path
Can anyone please help me deal with this issue?

Hi, welcome to the community!

You need to have a copy of interrogate on the host system; this is a tool that ships with Panda3D. Simply installing Panda3D on the host system should be sufficient.

Thank you!
That seemed to fix this issue.

@rdb Could you maybe help me with another issue?
I’ve tried compiling example ‘roaming ralph’ on windows 10. Unfortunately compiliation fails with message:
“roaming-ralph.c:115532:10: fatal error: ‘windows.h’ file not found #include <windows.h>”,
Do I miss some cpp libraries?

Are you building from Windows?

I have never tried building the WebGL port from Windows, it’s possible that FreezeTool.py is making some incorrect assumptions based on the current (as opposed to the target) platform. Try adding freezer.platform = "emscripten" and freezer.frozenDllMainCode = "" after the line that creates the Freezer instance.

Yes, I do.
It did help, but command complains about missing libraries: _posixsubprocess, grp, panda3d.core, panda3d.direct.
I had installed panda3d from the website and set my PY_MODULE_DIR to \AppData\Local\Programs\Python\Python38\Lib\site-packages and the PY_STDLIB to AppData\Local\Programs\Python\Python38\Lib, should those libraries be there?
I am definitely missing somthing importat

I think those are warning messages and you can safely ignore them.

Thnak you for help, I’ve made substancial progress, but I’m still running into errors. I did successfully compile (finally !:sweat_smile: ) roaming ralph example. After serving it with default python server (via python -m http.server) javascript throws following error in the console:

Uncaught ReferenceError: _emscripten_stack_get_base is not defined
    at initRuntime (roaming-ralph.js:1:25975)
    at doRun (roaming-ralph.js:1:356451)
    at roaming-ralph.js:1:356713

Which is wierd, since I have emsdk activated, can you please point me in some direction why it wont find reference?

Hmm, sorry, nothing comes to mind. There may be some version or compiler mismatch with emscripten, I guess? I’m afraid I don’t have a specific suggestion to offer here.

yeah, turns out I’d built wrong repo :upside_down_face:
I succesfuly built the example, thanks for your help!