Comments (5)
To fix that error, the error message suggests this, which should work:
warning: To disable errors for undefined symbols use `-s ERROR_ON_UNDEFINED_SYMBOLS=0`
What you suggest about just running WebAssembly.instantiateStreaming would work for pure wasm, but not for the JS that works with it. In some cases you can get close to not having any JS, see here, but until wasm has access to JS objects it will depend on JS heavily for a lot of things.
from box2d.js.
Hey, thanks for getting back to me! I'll give that a try. I didn't initially because disable errors
sounds a little like suppress errors
and I was hoping there would be an obvious way to actually fix them?
Anyway, I'll give that a try and do a bit more reading about how importObject
and JS/WASM interop works.
from box2d.js.
Yeah, fixing the errors would be better, if you or someone has time to look into them. (Maybe a file isn't linked in, for example?) But that option would get us to the same behavior emscripten had before, so it's not making things worse.
from box2d.js.
Okay, I forked this and created a branch that you can see in this comparison. I broke the LINK_OPTS
out to multiple lines so they'd be a little easier to read and added the -s ERROR_ON_UNDEFINED_SYMBOLS=0
like you suggested.
Running $ /Users/matt/Sites/juj/emsdk/emscripten/1.38.16/emmake make VERSION=latest
does generate a new build/Box2D_v2.3.1_min.wasm
file, but that's it … the output ends with:
11 error(s), 5 warning(s)
ERROR:root:closure compiler failed (rc: 11)
make: *** [box2d.js] Error 1
There are several giant blocks of what looks like minified JavaScript with what look like more specific error messages in there … they look like this:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/tmpma5o38/Box2D_v2.3.1_min.bc.o.js.pp.js.mem.js.jso.js.jso.js.jso.js:1: ERROR - variable _emscripten_bind_b2Vec3_b2Vec3_2 is undeclared
… but there's several thousand lines between them and my grep
juju is failing me right now.
As far as actually fixing the errors I'd be happy to try and figure this out, but any pointers as to where they'd need to be linked in? This whole set up is new to me and between the Python and the C++ and the generated files and the IDLs and the make scripts … I'm kinda lost. I am fully willing to accept that I may be trying to bite off more than i can chew.
from box2d.js.
Closure compiler issues like that are tricky to debug in my experience. But you can build without closure and look for why that function isn't defined - it should be emitted from the webidl binder emitter, I think, so it's not a linking problem.
It's possible this isn't a bug here, but in the upstream webidl binder emitter - if you can get a standalone testcase showing the issue that could prove that.
However, another option is to set -s IGNORE_CLOSURE_COMPILER_ERRORS=1
to ignore those.
from box2d.js.
Related Issues (20)
- b2Vec2 won't free HOT 2
- High Gravity jitter HOT 1
- missing runtime methods for allocating arrays HOT 4
- box2d.wasm.html test faild with [email protected] build HOT 2
- is there typescript declaration file (d.ts) for this project? HOT 2
- Box2d 2.4.0
- Box2D 2.4.0 HOT 8
- Node server side implementation
- How does this work with webpack? HOT 1
- May I ask why the calculation results are different on the ios and android platforms HOT 2
- vue how to use it
- vue hao to use it
- why is not show?
- why now show debugdraw
- could i have more simple demos about the box2djs ,and where can i see the API about box2djs
- How to build? I want to build the debug version of javascript file
- Position not getting what is set
- Uncaught (in promise) cannot construct a b2Draw, no constructor in IDL
- Cannot SetTarget of b2MouseJoint
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from box2d.js.