Compiling webkit with emscripten issues

216 views
Skip to first unread message

Trevor Linton

unread,
Mar 5, 2014, 2:44:33 PM3/5/14
to emscripte...@googlegroups.com
So that was a loaded subject line. I'm creating a port of webkit called webkit.js (http://github.com/trevorlinton/webkit.js).  So far i've been fairly successful at compiling in both Release / Debug modes.  I've been able to incorporate all of webkit's dependencies (freetype/fontconfig/cairo/etc..) and for months haven't had many issues (at least, not with emscripten).  But as of recent i've began working in Debug mode because of its lovely stack traces that are incredibly helpful.  I went to do a recompile in Release mode and have been experiencing some weird errors, if I remove -O2 from the command everything works fine, add it back in, and I get these errors:

Traceback (most recent call last):

  File "/Users/tlinton/Library/Emscripten/emscripten/1.12.0/emscripten.py", line 1405, in <module>

    _main(environ=os.environ)

  File "/Users/tlinton/Library/Emscripten/emscripten/1.12.0/emscripten.py", line 1393, in _main

    temp_files.run_and_clean(lambda: main(

  File "/Users/tlinton/Library/Emscripten/emscripten/1.12.0/tools/tempfiles.py", line 39, in run_and_clean

    return func()

  File "/Users/tlinton/Library/Emscripten/emscripten/1.12.0/emscripten.py", line 1401, in <lambda>

    DEBUG_CACHE=DEBUG_CACHE,

  File "/Users/tlinton/Library/Emscripten/emscripten/1.12.0/emscripten.py", line 1288, in main

    jcache=jcache, temp_files=temp_files, DEBUG=DEBUG, DEBUG_CACHE=DEBUG_CACHE)

  File "/Users/tlinton/Library/Emscripten/emscripten/1.12.0/emscripten.py", line 292, in emscript

    assert len(output) == 2, 'Did not receive forwarded data in an output - process failed? We only got: ' + output[0][-3000:]

AssertionError: Did not receive forwarded data in an output - process failed? We only got:  

[ Very long dump of code ]

Traceback (most recent call last):

  File "/Users/tlinton/Library/Emscripten/emscripten/1.12.0/emcc", line 1525, in <module>

    final = shared.Building.emscripten(final, append_ext=False, extra_args=extra_args)

  File "/Users/tlinton/Library/Emscripten/emscripten/1.12.0/tools/shared.py", line 1276, in emscripten

    assert os.path.exists(filename + '.o.js') and len(open(filename + '.o.js', 'r').read()) > 0, 'Emscripten failed to generate .js: ' + str(compiler_output)

AssertionError: Emscripten failed to generate .js: 


You can view the full build log here:

http://pastebin.com/LfJSrvRX

Does anyone know off hand what might be the issue? Is there any hugely concerning issues with the build log (other than some missing/unresolved symbols)?  I should note that in Debug mode it compiles and runs (well there are issues, but unrelated to emscripten).

Trevor Linton

unread,
Mar 5, 2014, 3:23:27 PM3/5/14
to emscripte...@googlegroups.com
Specifically I seem to be getting this up in the build log that seems concerning:

aborting from js compiler due to exception: unhandleable illegal icmp: ugt | undefined


Alon Zakai

unread,
Mar 5, 2014, 4:35:48 PM3/5/14
to emscripte...@googlegroups.com
This might be a limitation of the old compiler, hopefully it works in the new one,

https://github.com/kripken/emscripten/wiki/LLVM-Backend

The old compiler is deprecated so unless there is a very serious need we should focus on making sure things run ok in the newer one.

- Alon



On Wed, Mar 5, 2014 at 12:23 PM, Trevor Linton <trevor...@gmail.com> wrote:
Specifically I seem to be getting this up in the build log that seems concerning:

aborting from js compiler due to exception: unhandleable illegal icmp: ugt | undefined


--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Trevor Linton

unread,
Mar 10, 2014, 6:08:51 PM3/10/14
to emscripte...@googlegroups.com
Worked perfectly, thanks!  Also, the compile speed up is huge. 

Off hand (and off topic), any knowledge of emscripten_async_call() runs a C function once the main loop thread begins? In the case of webkitjs the main loop at the end loops using emscripten_main_loop with a delay set to 60 fps, i'm noticing a large amount of the async calls are happening after the main loop begins;  I guess what i'm asking is does emscripten_async_call completely ignore the current running context and interject with the c call after X amount of milliseconds or X amount of milliseconds once the current javascript frame has completed?

-t


On Wednesday, March 5, 2014 3:35:48 PM UTC-6, Alon Zakai wrote:
This might be a limitation of the old compiler, hopefully it works in the new one,

https://github.com/kripken/emscripten/wiki/LLVM-Backend

The old compiler is deprecated so unless there is a very serious need we should focus on making sure things run ok in the newer one.

- Alon

On Wed, Mar 5, 2014 at 12:23 PM, Trevor Linton <trevor...@gmail.com> wrote:
Specifically I seem to be getting this up in the build log that seems concerning:

aborting from js compiler due to exception: unhandleable illegal icmp: ugt | undefined


--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.

Alon Zakai

unread,
Mar 10, 2014, 6:36:28 PM3/10/14
to emscripte...@googlegroups.com
I'm not sure what you mean by "ignore the current running context and interject with the c call"? All emscripten_set_main_loop does is something equivalent to setInterval (but might use requestAnimationFrame or setTimeout called multiple times). Those end up being event callbacks. You can have other event callbacks and they all interleave on the browser's main thread etc.

If the main() function runs for a while before exiting, then the main thread is busy and the first callback for the main loop will be delayed. The same is true for any iteration of the main loop, if it runs longer then subsequent callbacks can only happen later, so they will be late.

- Alon



To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages