Thanks, I was able to make a testcase for that in llvm IR - no idea how to
do it in C ;)

This should be fixed on latest fastcomp, please let me know.

- Alon



On Wed, Feb 5, 2014 at 12:06 PM, Xiang Li <[email protected]> wrote:

> Hi
> With the latest fastcomp code base, I added fprintf  in
>
> lib/Target/JSBackend/JSBackend.cpp : around line 829
>
>
> Here is what I got:
>
> raw c_str double 0x7FEFFFFFFFFFFFFF
>
> raw length 16
>
> raw 7FEFFFFFFFFFFFFF
>
> raw c_str double 0x370000000000000
>
> raw length 15
>
> raw 370000000000000
>
> Linking then fails because the length is an odd number
>   assert((len&1)
>
>
> I am not sure how to make sense of this and relate to my code. What else
> should I do to get the actual c++ code that triggers the error?
>
> I thought sending you our bitcode but it's a lot of files scattered in a
> bunch of folders in CMAKE build folder....
>
> Thanks
> --Xiang
>
>
> On Thu, Jan 30, 2014 at 9:13 AM, Xiang Li <[email protected]> wrote:
>
>> I got the permission so I will send the bitcode to you later. I am on
>> Mac. Do I need to generate the bitcode on Linux for you to investigate? I
>> am not sure if the bitcode from different platforms will be exactly same...
>>
>> Now for the static linking, I wonder if  you can determine what went
>> wrong by just looking at the bitcode? If so that would be great and I then
>> can also send the bitcode generated using LLVM_3.2...
>>
>> Best regards
>>
>> --Xiang
>>
>>
>> On Tue, Jan 28, 2014 at 5:59 PM, Alon Zakai <[email protected]> wrote:
>>
>>> If you can attach the bitcode file that would be easiest to reproduce
>>> the problem with. Otherwise you can see where it happens by adding some
>>> debug printouts in the code and rebuilding fastcomp. In this case,
>>> puts(raw) right before that assert should help.
>>>
>>> - Alon
>>>
>>>
>>>
>>> On Tue, Jan 28, 2014 at 9:37 AM, Xiang Li <[email protected]>wrote:
>>>
>>>> I tried using fastcomp to compile my project, I got the following error.
>>>>
>>>> I used emcc 'incoming' branch and the last llvm backend. How do I know
>>>> which part of my code triggers the error?
>>>>
>>>>
>>>>
>>>> Warning: Variable __init_array_start not referenced
>>>> Warning: Variable __init_array_end not referenced
>>>> Warning: Variable __fini_array_start not referenced
>>>> Warning: Variable __fini_array_end not referenced
>>>> (len&1) == 0
>>>> /Users/xiangl/Build_cmake_assignment/fastcomp/emscripten-fastcomp/lib/Target/JSBackend/JSBackend.cpp
>>>> : 769
>>>> LLVM ERROR: fail
>>>> Traceback (most recent call last):
>>>>   File "/opt/emscripten-incoming/emscripten.py", line 1352, in <module>
>>>>     _main(environ=os.environ)
>>>>   File "/opt/emscripten-incoming/emscripten.py", line 1340, in _main
>>>>     temp_files.run_and_clean(lambda: main(
>>>>   File "/opt/emscripten-incoming/tools/tempfiles.py", line 39, in
>>>> run_and_clean
>>>>     return func()
>>>>   File "/opt/emscripten-incoming/emscripten.py", line 1348, in <lambda>
>>>>     DEBUG_CACHE=DEBUG_CACHE,
>>>>   File "/opt/emscripten-incoming/emscripten.py", line 1235, in main
>>>>     jcache=jcache, temp_files=temp_files, DEBUG=DEBUG,
>>>> DEBUG_CACHE=DEBUG_CACHE)
>>>>   File "/opt/emscripten-incoming/emscripten.py", line 749, in
>>>> emscript_fast
>>>>     backend_output = open(temp_js).read()
>>>> IOError: [Errno 2] No such file or directory: '/tmp/tmpcZyQuB.4.js'
>>>> Traceback (most recent call last):
>>>>   File "/opt/emscripten-incoming/emcc", line 1863, in <module>
>>>>     final = shared.Building.emscripten(final, append_ext=False,
>>>> extra_args=extra_args)
>>>>   File "/opt/emscripten-incoming/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:
>>>> make[2]: *** [MCore/test/MCoreTest.html] Error 1
>>>> make[1]: *** [MCore/test/CMakeFiles/MCoreTest.dir/all] Error 2
>>>> make: *** [all] Error 2
>>>>
>>>>
>>>>
>>>> -Xiang Li
>>>>
>>>>  --
>>>> 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 [email protected].
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>
>>>  --
>>> 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 [email protected].
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>
>  --
> 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 [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to