emscripten-core / emscripten

Emscripten: An LLVM-to-WebAssembly Compiler
Other
25.75k stars 3.3k forks source link

Changing to new target triple: le32-unknown-nacl #1056

Closed waywardmonkeys closed 11 years ago

waywardmonkeys commented 11 years ago

I gave this a try and ran tests and got these failures:

======================================================================
ERROR: test_bswap64 (__main__.o1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/runner.py", line 1424, in test_bswap64
    ''')
  File "./tests/runner.py", line 482, in do_run
    self.assertContained(expected_output, js_output.replace('\r\n', '\n'))
  File "./tests/runner.py", line 337, in assertContained
    additional_info
Exception: Expected to find '4914553019779824384
1
2
bbccddeeff3344
4433ffeeddccbb00
4433ffeeddccbb00
Succeeded!
' in '4914553019779824384
1
2
214
214
4433ffeeddccbb00
Failed!
', diff:

--- expected
+++ actual
@@ -1,8 +1,8 @@
 4914553019779824384
 1
 2
-bbccddeeff3344
+214
+214
 4433ffeeddccbb00
-4433ffeeddccbb00
-Succeeded!
+Failed!

======================================================================
ERROR: test_cubescript (__main__.o1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/runner.py", line 7361, in test_cubescript
    self.do_run(path_from_root('tests', 'cubescript'), '*\nTemp is 33\n9\n5\nhello, everyone\n*', main_file='command.cpp')
  File "./tests/runner.py", line 482, in do_run
    self.assertContained(expected_output, js_output.replace('\r\n', '\n'))
  File "./tests/runner.py", line 337, in assertContained
    additional_info
Exception: Expected to find '*
Temp is 33
9
5
hello, everyone
*' in '*
؊P
9
؊P
unknown alias lookup: qPP
蒐
*
', diff:

--- expected
+++ actual
@@ -1,6 +1,8 @@
 *
-Temp is 33
+؊P
 9
-5
-hello, everyone
+؊P
+unknown alias lookup: qPP
+蒐
 *
+

======================================================================
ERROR: test_fasta (__main__.o1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/runner.py", line 7065, in test_fasta
    self.do_run(src, j, [str(i)], lambda x, err: x.replace('\n', '*'), no_build=i>1)
  File "./tests/runner.py", line 482, in do_run
    self.assertContained(expected_output, js_output.replace('\r\n', '\n'))
  File "./tests/runner.py", line 337, in assertContained
    additional_info
Exception: Expected to find 'GG*ctt**tgagc*' in 'GG***', diff:

--- expected
+++ actual
@@ -1 +1 @@
-GG*ctt**tgagc*
+GG***

======================================================================
ERROR: test_iostream (__main__.o1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/runner.py", line 6878, in test_iostream
    self.do_run(src, 'hello world\n77.\n')
  File "./tests/runner.py", line 482, in do_run
    self.assertContained(expected_output, js_output.replace('\r\n', '\n'))
  File "./tests/runner.py", line 337, in assertContained
    additional_info
Exception: Expected to find 'hello world
77.
' in 'hello world
136.
', diff:

--- expected
+++ actual
@@ -1,3 +1,3 @@
 hello world
-77.
+136.

======================================================================
ERROR: test_isdigit_l (__main__.o1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/runner.py", line 2837, in test_isdigit_l
    self.do_run(src, '3.14159')
  File "./tests/runner.py", line 482, in do_run
    self.assertContained(expected_output, js_output.replace('\r\n', '\n'))
  File "./tests/runner.py", line 337, in assertContained
    additional_info
Exception: Expected to find '3.14159' in '0
', diff:

--- expected
+++ actual
@@ -1 +1,2 @@
-3.14159
+0
+

======================================================================
ERROR: test_openjpeg (__main__.o1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/runner.py", line 7608, in test_openjpeg
    make_args=[]) # no -j 2, since parallel builds can fail
  File "./tests/runner.py", line 377, in get_library
    copy_project=True, env_init=env_init, native=native)
  File "/Users/bruce/Development/temp.emscripten/tools/shared.py", line 727, in build_library
    raise Exception('could not build library ' + name)
Exception: could not build library openjpeg

======================================================================
ERROR: test_pystruct (__main__.o1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/runner.py", line 3441, in test_pystruct
    self.do_run(src, '*0,0,0,4,8,12,16,20*\n*1,0,0*\n*0*\n0:1,1\n1:1,1\n2:1,1\n*12,20,20*')
  File "./tests/runner.py", line 482, in do_run
    self.assertContained(expected_output, js_output.replace('\r\n', '\n'))
  File "./tests/runner.py", line 337, in assertContained
    additional_info
Exception: Expected to find '*0,0,0,4,8,12,16,20*
*1,0,0*
*0*
0:1,1
1:1,1
2:1,1
*12,20,20*' in '*0,0,0,4,8,16,20,24*
*1,0,0*
*0*
0:1,1
1:1,1
2:1,1
*16,24,24*
', diff:

--- expected
+++ actual
@@ -1,7 +1,8 @@
-*0,0,0,4,8,12,16,20*
+*0,0,0,4,8,16,20,24*
 *1,0,0*
 *0*
 0:1,1
 1:1,1
 2:1,1
-*12,20,20*
+*16,24,24*
+

======================================================================
ERROR: test_unaligned (__main__.o1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/runner.py", line 1489, in test_unaligned
    self.do_run(src, '*12 : 1 : 12\n328157500735811.0,23,416012775903557.0,99\n')
  File "./tests/runner.py", line 482, in do_run
    self.assertContained(expected_output, js_output.replace('\r\n', '\n'))
  File "./tests/runner.py", line 337, in assertContained
    additional_info
Exception: Expected to find '*12 : 1 : 12
328157500735811.0,23,416012775903557.0,99
' in '*16 : 1 : 16
328157500735811.0,23,416012775903557.0,99
', diff:

--- expected
+++ actual
@@ -1,3 +1,3 @@
-*12 : 1 : 12
+*16 : 1 : 16
 328157500735811.0,23,416012775903557.0,99

======================================================================
ERROR: test_unistd_misc (__main__.o1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/runner.py", line 6558, in test_unistd_misc
    self.do_run(src, expected)
  File "./tests/runner.py", line 482, in do_run
    self.assertContained(expected_output, js_output.replace('\r\n', '\n'))
  File "./tests/runner.py", line 337, in assertContained
    additional_info
Exception: Expected to find 'fsync(good): 0, errno: 0
fsync(bad): -1, errno: 9
fdatasync(good): 0, errno: 0
fdatasync(bad): -1, errno: 9
tcgetpgrp(good): 0, errno: 0
tcgetpgrp(bad): 0, errno: 0
tcsetpgrp(good): -1, errno: 22
tcsetpgrp(bad): -1, errno: 22
link: -1, errno: 31
lockf(good): 0, errno: 0
lockf(bad): -1, errno: 9
nice: 0, errno: 1
pause: -1, errno: 4
pipe(good): -1, errno: 38
pipe(bad): -1, errno: 38
execl: -1, errno: 8
execle: -1, errno: 8
execlp: -1, errno: 8
execv: -1, errno: 8
execve: -1, errno: 8
execvp: -1, errno: 8
chown(good): 0, errno: 0
chown(bad): -1, errno: 2
lchown(good): 0, errno: 0
lchown(bad): -1, errno: 2
fchown(good): 0, errno: 0
fchown(bad): -1, errno: 9
alarm: 0, errno: 0
ualarm: 0, errno: 0
fork: -1, errno: 11
vfork: -1, errno: 11
crypt: 0, errno: 38
encrypt, errno: 38
getgid: 0, errno: 0
getegid: 0, errno: 0
getuid: 0, errno: 0
geteuid: 0, errno: 0
getpgrp: 0, errno: 0
getpid: 0, errno: 0
getppid: 0, errno: 0
getpgid: 0, errno: 0
getsid: 0, errno: 0
setgid: -1, errno: 1
setegid: -1, errno: 1
setuid: -1, errno: 1
seteuid: -1, errno: 1
' in 'fsync(good): 0, errno: 0
fsync(bad): -1, errno: 9
fdatasync(good): 0, errno: 0
fdatasync(bad): -1, errno: 9
tcgetpgrp(good): 0, errno: 0
tcgetpgrp(bad): 0, errno: 0
tcsetpgrp(good): -1, errno: 22
tcsetpgrp(bad): -1, errno: 22
link: -1, errno: 31
lockf(good): 0, errno: 0
lockf(bad): -1, errno: 9
nice: 0, errno: 1
pause: -1, errno: 4
pipe(good): -1, errno: 38
pipe(bad): -1, errno: 38
execl: -1, errno: 8
execle: -1, errno: 8
execlp: -1, errno: 8
execv: -1, errno: 8
execve: -1, errno: 8
execvp: -1, errno: 8
chown(good): 0, errno: 0
chown(bad): -1, errno: 2
lchown(good): 0, errno: 0
lchown(bad): -1, errno: 2
fchown(good): 0, errno: 0
fchown(bad): -1, errno: 9
alarm: 0, errno: 0
ualarm: 0, errno: 0
fork: -1, errno: 11
vfork: -1, errno: 11
crypt: (null), errno: 38
encrypt, errno: 38
getgid: 0, errno: 0
getegid: 0, errno: 0
getuid: 0, errno: 0
geteuid: 0, errno: 0
getpgrp: 0, errno: 0
getpid: 0, errno: 0
getppid: 0, errno: 0
getpgid: 0, errno: 0
getsid: 0, errno: 0
setgid: -1, errno: 1
setegid: -1, errno: 1
setuid: -1, errno: 1
seteuid: -1, errno: 1
setpgrp: -1, errno: 1
setsid: -1, errno: 1
setpgid: -1, errno: 1
setregid: -1, errno: 1
setreuid: -1, errno: 1
getgroups: 1, result: 0, errno: 0
setgroups: -1, errno: 1
', diff:

--- expected
+++ actual
@@ -29,7 +29,7 @@
 ualarm: 0, errno: 0
 fork: -1, errno: 11
 vfork: -1, errno: 11
-crypt: 0, errno: 38
+crypt: (null), errno: 38
 encrypt, errno: 38
 getgid: 0, errno: 0
 getegid: 0, errno: 0
@@ -44,4 +44,11 @@
 setegid: -1, errno: 1
 setuid: -1, errno: 1
 seteuid: -1, errno: 1
+setpgrp: -1, errno: 1
+setsid: -1, errno: 1
+setpgid: -1, errno: 1
+setregid: -1, errno: 1
+setreuid: -1, errno: 1
+getgroups: 1, result: 0, errno: 0
+setgroups: -1, errno: 1

======================================================================
ERROR: test_vprintf (__main__.o1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/runner.py", line 5339, in test_vprintf
    self.do_run(src, re.sub('(^|\n)\s+', '\\1', expected))
  File "./tests/runner.py", line 482, in do_run
    self.assertContained(expected_output, js_output.replace('\r\n', '\n'))
  File "./tests/runner.py", line 337, in assertContained
    additional_info
Exception: Expected to find 'Call with 1 variable argument.
Call with 2 variable arguments.
' in 'Call with 40 variable argument.
Call with 44 variable (null).
', diff:

--- expected
+++ actual
@@ -1,3 +1,3 @@
-Call with 1 variable argument.
-Call with 2 variable arguments.
+Call with 40 variable argument.
+Call with 44 variable (null).

======================================================================
ERROR: test_vsnprintf (__main__.o1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/runner.py", line 5395, in test_vsnprintf
    ''')
  File "./tests/runner.py", line 482, in do_run
    self.assertContained(expected_output, js_output.replace('\r\n', '\n'))
  File "./tests/runner.py", line 337, in assertContained
    additional_info
Exception: Expected to find '0x0_0x400000
0x0_0x0
0x400000_0x0
0x400000_0x400000
0x800000_0x800000000000
0x800_0x12340000000000
0x9182746756_0x192837465631acbd
' in '0x28_0x0
0x38_0x0
0x48_0x0
0x58_0x0
0x68_0x0
0x78_0x0
0x88_0x0
', diff:

--- expected
+++ actual
@@ -1,8 +1,8 @@
-0x0_0x400000
-0x0_0x0
-0x400000_0x0
-0x400000_0x400000
-0x800000_0x800000000000
-0x800_0x12340000000000
-0x9182746756_0x192837465631acbd
+0x28_0x0
+0x38_0x0
+0x48_0x0
+0x58_0x0
+0x68_0x0
+0x78_0x0
+0x88_0x0

======================================================================
FAIL: test_dlfcn_varargs (__main__.o1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/runner.py", line 5091, in test_dlfcn_varargs
    post_build=add_pre_run_and_checks)
  File "./tests/runner.py", line 471, in do_run
    build_ll_hook=build_ll_hook, extra_emscripten_args=extra_emscripten_args, post_build=post_build)
  File "./tests/runner.py", line 264, in build
    self.ll_to_js(filename, extra_emscripten_args, post_build)
  File "./tests/runner.py", line 203, in ll_to_js
    Building.emcc(filename + '.o.ll', Settings.serialize() + self.emcc_args + transform_args + Building.COMPILER_TEST_OPTS, filename + '.o.js')
  File "/Users/bruce/Development/temp.emscripten/tools/shared.py", line 927, in emcc
    assert os.path.exists(output_filename), 'emcc could not create output file: ' + output_filename
AssertionError: emcc could not create output file: /tmp/emscripten_test_o1_oACJ_A/src.cpp.o.js

======================================================================
FAIL: test_inlinejs (__main__.o1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/runner.py", line 3549, in test_inlinejs
    self.do_run(src, 'Inline JS is very cool\n3.64')
  File "./tests/runner.py", line 471, in do_run
    build_ll_hook=build_ll_hook, extra_emscripten_args=extra_emscripten_args, post_build=post_build)
  File "./tests/runner.py", line 249, in build
    assert os.path.exists(f + '.o'), 'Source compilation error: ' + output
AssertionError: Source compilation error: clang: warning: argument unused during compilation: '-nostdinc++'
/tmp/emscripten_test_o1_inbzSR/src.cpp:6:41: error: invalid output constraint '=a' in asm
            __asm __volatile__("12/3.3":"=a"(ret));
                                        ^
1 error generated.

======================================================================
FAIL: test_poppler (__main__.o1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/runner.py", line 7571, in test_poppler
    post_build=post)
  File "./tests/runner.py", line 499, in do_ll_run
    self.ll_to_js(filename, extra_emscripten_args, post_build)
  File "./tests/runner.py", line 203, in ll_to_js
    Building.emcc(filename + '.o.ll', Settings.serialize() + self.emcc_args + transform_args + Building.COMPILER_TEST_OPTS, filename + '.o.js')
  File "/Users/bruce/Development/temp.emscripten/tools/shared.py", line 927, in emcc
    assert os.path.exists(output_filename), 'emcc could not create output file: ' + output_filename
AssertionError: emcc could not create output file: /tmp/emscripten_test_o1_6630KC/src.cpp.o.js

======================================================================
FAIL: test_sqlite (__main__.o1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/runner.py", line 7482, in test_sqlite
    force_c=True)
  File "./tests/runner.py", line 471, in do_run
    build_ll_hook=build_ll_hook, extra_emscripten_args=extra_emscripten_args, post_build=post_build)
  File "./tests/runner.py", line 264, in build
    self.ll_to_js(filename, extra_emscripten_args, post_build)
  File "./tests/runner.py", line 203, in ll_to_js
    Building.emcc(filename + '.o.ll', Settings.serialize() + self.emcc_args + transform_args + Building.COMPILER_TEST_OPTS, filename + '.o.js')
  File "/Users/bruce/Development/temp.emscripten/tools/shared.py", line 927, in emcc
    assert os.path.exists(output_filename), 'emcc could not create output file: ' + output_filename
AssertionError: emcc could not create output file: /tmp/emscripten_test_o1_MOKtfd/src.c.o.js

======================================================================
FAIL: test_varargs (__main__.o1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/runner.py", line 3859, in test_varargs
    self.do_run(src, '*cheez: 0+24*\n*cheez: 0+24*\n*albeit*\n*albeit*\nQ85*\nmaxxi:21*\nmaxxD:22.10*\n*vfp:22,199*\n*vfp:22,199*\n')
  File "./tests/runner.py", line 471, in do_run
    build_ll_hook=build_ll_hook, extra_emscripten_args=extra_emscripten_args, post_build=post_build)
  File "./tests/runner.py", line 264, in build
    self.ll_to_js(filename, extra_emscripten_args, post_build)
  File "./tests/runner.py", line 203, in ll_to_js
    Building.emcc(filename + '.o.ll', Settings.serialize() + self.emcc_args + transform_args + Building.COMPILER_TEST_OPTS, filename + '.o.js')
  File "/Users/bruce/Development/temp.emscripten/tools/shared.py", line 927, in emcc
    assert os.path.exists(output_filename), 'emcc could not create output file: ' + output_filename
AssertionError: emcc could not create output file: /tmp/emscripten_test_o1_SlKefJ/src.cpp.o.js

======================================================================
FAIL: test_varargs_byval (__main__.o1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/runner.py", line 3931, in test_varargs_byval
    ''')
  File "./tests/runner.py", line 471, in do_run
    build_ll_hook=build_ll_hook, extra_emscripten_args=extra_emscripten_args, post_build=post_build)
  File "./tests/runner.py", line 249, in build
    assert os.path.exists(f + '.o'), 'Source compilation error: ' + output
AssertionError: Source compilation error: clang: warning: argument unused during compilation: '-nostdinc++'
/tmp/emscripten_test_o1_LZ8vXf/src.cpp:47:15: error: cannot compile this aggregate va_arg expression yet
          a = va_arg(ap, type_a);
              ^~~~~~~~~~~~~~~~~~
/Users/bruce/Development/temp.emscripten/system/include/libc/stdarg.h:35:29: note: expanded from macro 'va_arg'
#define va_arg(ap, type)    __builtin_va_arg(ap, type)
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

----------------------------------------------------------------------
Ran 245 tests in 992.371s

FAILED (failures=6, errors=11)
waywardmonkeys commented 11 years ago

For ones that failed without an obvious error, it was due to stuff like this:

undefined:372
        throw 'Invalid token, cannot triage: ' + dump(item);
                                               ^
Invalid token, cannot triage: // {
//   "tokens": [
//     {
//       "text": "va_arg"
//     },
//     {
//       "text": "i32*"
//     },
//     {
//       "text": "%arraydecay"
//     },
//     {
//       "text": ","
//     },
//     {
//       "text": "i32"
//     }
//   ],
//   "indent": 2,
//   "lineNum": 6453,
//   "__uid__": 1250,
//   "assignTo": "$0"
// }
kripken commented 11 years ago

Thanks!

Closing this, let's continue the discussion in issue #806