Excuse my ignorance,
but I explored MAME and emscripten in the last weeks a bit, and stumbled over a minor showstopper.
The Documentation at
Compile MAME Chapter emscriptenstates Emscripten 2.0.25 and later, and I couldn't get any MAME version from 0.234 and up to compile anything successfully on current debian.
Thanks to some friendly person on github I got pointed to the version Emscripten 3.1.28 (later versions break on the aio stuff currently!).
So in my opinion it would make sense to update that chapter in this regard.
Another minor side note, but it might have been some emscripten cache issue locally here, at first compile I had some missing functions errors at compile, but rerunning the emmake process fixed that one.