emscripten-core / emscripten

Emscripten: An LLVM-to-WebAssembly Compiler
Other
25.84k stars 3.31k forks source link

emscript: llvm to js have some wrong #1183

Closed sjjcarrie closed 11 years ago

sjjcarrie commented 11 years ago

I have installed clang-3.2,llvm -3.2,compler-rt-3.2 ,Python2.7.4, cmake-2.8.10.2, node-v0.10.5-linux-x86,emscripten 2.0, emscripten-qt, but complie the Qt pro will produce these problems. I don't know which is version produce ?or install step ? Stack: Error at asserTrue (eval at globalEval(/home/rjzx/demo/emscripten/emscripten/src/complier js:105:8),:59:26) at Object. (/home/rjzx/demo/emscripten/emscripten/src/complier.js:184:42) at Module._complie (module.js:456:26) at Object. Module. _extensions..js (module.js:474:10) at Module .load (Module. js:356:32) at Function. Module._load(module.js :312:12) at Function. Module.runMain (module.js:497:10) a at startup (node.js:119:16) at node.js:901:3 undefined:60 throw msg; Assertion failed:asm.js heap must be power of 2 Traceback (most recent call last): File "/home/rjzx/demo/emscripten/emscripten/emscripten.py",line 800, in _main(environ=os.environ) File "/home/rjzx/demo/emscripten/emscripten/emscripten.py",line 788, in_main temp_files .run_and_clean(lambda:main()) File "/home/rjzx/demo/emscripten/emscripten/tools/tempfile.py" , line 38, in run_and_clean return func() File "/home/rjzx/demo/emscripten/emscripten/emscripten.py", line 796, in DEBUG_CACHE=DEBUG_CACHE, File "/home/rjzx/demo/emscripten/emscripten/emscripten.py",line 683, in main jcache=jcache , temp_files=temp_files, DEBUG=DEBUG, DEBUG_CACHE=DEBUG_CACHE) File "/home/rjzx/demo/emscripten/emscripten/emscripten.py", line 176, inemscript assert '//FORWARDED_DATA:' in out, 'Did not receive forwarded data in pre output- process failed?' AssertionError: Did not receive forwarded data in pre output - process failed? Traceback (most recent call last): File "../../emscripten/emcc",line 1435, in final =shared. Building. emscripten(final, append_ext=False, extra_args=extra_args) File "/home/rjzx/demo/emscripten/emscripten/tools/shared.py" , line 985, in emscripten assert os. path .exists(filename+ '.o.js') and len(pen (filename + '.o.js', 'r').read()) >0, 'Emscripten failed to generate .js;' + str(complier_output) AssertionError : Emscripten failed to generate.js;

sjjcarrie commented 11 years ago

@kripken Dear kripken, I have no experience of emscripten and I don't know how to deal with it

kripken commented 11 years ago

It says Assertion failed:asm.js heap must be power of 2 - need to compile with power of 2 heap (-s TOTAL_HEAP=N where N is a power of 2).

sjjcarrie commented 11 years ago

@kripken Dear kripken, with you support,our demos have running successfully. Thanks a lot! But now we met some others difficults, we want to realize that how to interaction with QT program in HTML? For example,QT program have some TEXT controls, we hope it can fill in some content with keyboards. I don't how to realize

sjjcarrie commented 11 years ago

Supplement:we don't unstander how to deal with QT application's input and output work

mnaamani commented 11 years ago

Did you checkout: http://badassjs.com/post/43158184752/qt-gui-toolkit-ported-to-javascript-via-emscripten

kripken commented 11 years ago

Worth talking to @ssj-gz who has ported Qt.