Skip to content

sanity test suite failures on OS X. #4416

Closed

Description

@juj

Running on OS X, there's a few failures on the sanity suite:

Jukkas-MacBook-Pro:incoming jjylanki$ emcc --clear-cache
Jukkas-MacBook-Pro:incoming jjylanki$ python tests/runner.py sanity
WARNING:root:use EM_ALL_ENGINES=1 in the env to run against all JS engines, which is slower but provides more coverage

Running sanity checks.
WARNING: This will modify /Users/jjylanki/.emscripten, and in theory can break it although it should be restored properly. A backup will be saved in /Users/jjylanki/.emscripten_backup

test_aaa_normal (test_sanity.sanity) ... ok
test_binaryen (test_sanity.sanity) ... INFO:root:building and verifying binaryen
INFO:root:(Emscripten: Running sanity checks)
WARNING:root:retrieving port: binaryen from https://github.com/WebAssembly/binaryen/archive/version_11.zip
WARNING:root:unpacking port: binaryen
WARNING:root:generating port: binaryen_tag_version_11.txt...
WARNING:root:building port: binaryen
-- The C compiler identification is AppleClang 7.0.0.7000176
-- The CXX compiler identification is AppleClang 7.0.0.7000176
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- Building with -std=c++11
-- Building with -msse2
-- Building with -mfpmath=sse
-- Building with -Wall
-- Building with -Werror
-- Building with -Wextra
-- Building with -Wno-unused-parameter
-- Building with -fno-omit-frame-pointer
-- Building with -fPIC
-- Building with -O2
-- Configuring done
CMake Error in CMakeLists.txt:
  Target "asm2wasm" requires the language dialect "CXX11" (with compiler
  extensions), but CMake does not know the compile flags to use to enable it.


CMake Error in CMakeLists.txt:
  Target "binaryen-shell" requires the language dialect "CXX11" (with
  compiler extensions), but CMake does not know the compile flags to use to
  enable it.


CMake Error in CMakeLists.txt:
  Target "s2wasm" requires the language dialect "CXX11" (with compiler
  extensions), but CMake does not know the compile flags to use to enable it.


CMake Error in CMakeLists.txt:
  Target "wasm-as" requires the language dialect "CXX11" (with compiler
  extensions), but CMake does not know the compile flags to use to enable it.


CMake Error in CMakeLists.txt:
  Target "wasm-dis" requires the language dialect "CXX11" (with compiler
  extensions), but CMake does not know the compile flags to use to enable it.


CMake Warning (dev):
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake
  --help-policy CMP0042" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  MACOSX_RPATH is not specified for the following targets:

   binaryen

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /Users/jjylanki/.emscripten_ports/binaryen/binaryen-version_11
Traceback (most recent call last):
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/emcc", line 13, in <module>
    emcc.run()
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/emcc.py", line 1272, in run
    compile_source_file(i, input_file)
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/emcc.py", line 1261, in compile_source_file
    args = get_bitcode_args([input_file]) + ['-emit-llvm', '-c', '-o', output_file]
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/emcc.py", line 1244, in get_bitcode_args
    args = system_libs.process_args(args, shared.Settings)
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tools/system_libs.py", line 640, in process_args
    args = port.process_args(Ports, args, settings, shared)
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tools/ports/binaryen.py", line 34, in process_args
    get(ports, settings, shared)
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tools/ports/binaryen.py", line 29, in get
    return [shared.Cache.get('binaryen_tag_' + TAG, create, what='port', extension='.txt')]
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tools/cache.py", line 46, in get
    temp = creator()
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tools/ports/binaryen.py", line 24, in create
    ports.build_native(os.path.join(ports.get_dir(), 'binaryen', 'binaryen-' + TAG))
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tools/system_libs.py", line 599, in build_native
    subprocess.check_call(['cmake', '-DCMAKE_BUILD_TYPE=' + cmake_build_type, '.'])
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '-DCMAKE_BUILD_TYPE=Release', '.']' returned non-zero exit status 1
Traceback (most recent call last):
  File "embuilder.py", line 175, in <module>
    build_port('binaryen', None, ['-s', 'BINARYEN=1'])
  File "embuilder.py", line 78, in build_port
    ''', [os.path.join('ports-builds', port_name, lib_name)] if lib_name else None, params)
  File "embuilder.py", line 69, in build
    shared.Building.emcc(temp, args, output_filename=temp_js)
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tools/shared.py", line 1662, in emcc
    assert os.path.exists(output_filename), 'emcc could not create output file: ' + output_filename
AssertionError: emcc could not create output file: /var/folders/hr/8s_0kh7j58j9jx9gqfjr82z00000gn/T/tmpEr4Qpt.js
ERROR
test_closure_compiler (test_sanity.sanity) ... FAIL
test_d8_path (test_sanity.sanity)
Test that running JS commands works for node, d8, and jsc and is not path dependent ... WARNING: Not testing engine d8, not configured.
WARNING: Not testing engine d8_g, not configured.
js /Users/jjylanki/spidermonkey-2016-06-19/js
node /Users/jjylanki/emsdk_git/node/4.1.1_64bit/bin/node
nodejs /Users/jjylanki/emsdk_git/node/4.1.1_64bit/bin/node
ok
test_embuilder (test_sanity.sanity) ... ['/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python', 'embuilder.py']
    seek Emscripten System Builder Tool
    seek build libc
    seek native_optimizer
['/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python', 'embuilder.py', 'build', 'waka']
    seek ERROR
['/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python', 'embuilder.py', 'build', 'libc']
FAIL
test_emcc (test_sanity.sanity) ... ERROR
test_emcc_caching (test_sanity.sanity) ... /Users/jjylanki/emsdk_git/emscripten/incoming/emcc
hello_libcxx.cpp libcxx 0
hello_libcxx.cpp libcxx 1
hello_libcxx.cpp libcxx 2
/Users/jjylanki/emsdk_git/emscripten/incoming/em++
hello_libcxx.cpp libcxx 0
hello_libcxx.cpp libcxx 1
hello_libcxx.cpp libcxx 2
FAIL
test_emcc_ports (test_sanity.sanity) ... /Users/jjylanki/emsdk_git/emscripten/incoming/emcc
0
1
/Users/jjylanki/emsdk_git/emscripten/incoming/em++
0
1
ok
test_emconfig (test_sanity.sanity) ... ok
test_firstrun (test_sanity.sanity) ... ERROR
test_llvm (test_sanity.sanity) ... ok
test_llvm_fastcomp (test_sanity.sanity) ... ok
test_native_optimizer (test_sanity.sanity) ... phase 1, part None
FAIL
test_node (test_sanity.sanity) ... ok
test_nostdincxx (test_sanity.sanity) ... /Users/jjylanki/emsdk_git/emscripten/incoming/emcc
/Users/jjylanki/emsdk_git/emscripten/incoming/em++
ok
test_struct_info (test_sanity.sanity) ... ok
test_vanilla (test_sanity.sanity) ... ERROR
test_wacky_env (test_sanity.sanity) ... normal build
wacky env vars, these should not mess our bootstrapping
ok

======================================================================
ERROR: test_binaryen (test_sanity.sanity)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tests/test_sanity.py", line 964, in test_binaryen
    subprocess.check_call([PYTHON, 'embuilder.py', 'build', 'binaryen'])
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python', 'embuilder.py', 'build', 'binaryen']' returned non-zero exit status 1

======================================================================
ERROR: test_emcc (test_sanity.sanity)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tests/test_sanity.py", line 353, in test_emcc
    self.assertNotContained(SANITY_MESSAGE, output)
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tests/runner.py", line 470, in assertNotContained
    limit_size(''.join([a.rstrip()+'\n' for a in difflib.unified_diff(value.split('\n'), string.split('\n'), fromfile='expected', tofile='actual')]))
Exception: Expected to NOT find 'Emscripten: Running sanity checks' in 'WARNING:root:(Emscripten: settings file has changed, clearing cache)
INFO:root:(Emscripten: Running sanity checks)
WARNING:root:no input files
', diff:

--- expected
+++ actual
@@ -1 +1,4 @@
-Emscripten: Running sanity checks
+WARNING:root:(Emscripten: settings file has changed, clearing cache)
+INFO:root:(Emscripten: Running sanity checks)
+WARNING:root:no input files
+


======================================================================
ERROR: test_firstrun (test_sanity.sanity)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tests/test_sanity.py", line 92, in test_firstrun
    self.assertContained('Welcome to Emscripten!', output)
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tests/runner.py", line 461, in assertContained
    additional_info
Exception: Expected to find 'Welcome to Emscripten!' in 'Traceback (most recent call last):
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/emcc", line 11, in <module>
    import emcc
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/emcc.py", line 28, in <module>
    from tools import shared, jsrun, system_libs
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tools/shared.py", line 206, in <module>
    raise Exception('File ' + EM_CONFIG + ' passed to --em-config does not exist!')
Exception: File /Users/jjylanki/.emscripten passed to --em-config does not exist!
', diff:

--- expected
+++ actual
@@ -1 +1,9 @@
-Welcome to Emscripten!
+Traceback (most recent call last):
+  File "/Users/jjylanki/emsdk_git/emscripten/incoming/emcc", line 11, in <module>
+    import emcc
+  File "/Users/jjylanki/emsdk_git/emscripten/incoming/emcc.py", line 28, in <module>
+    from tools import shared, jsrun, system_libs
+  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tools/shared.py", line 206, in <module>
+    raise Exception('File ' + EM_CONFIG + ' passed to --em-config does not exist!')
+Exception: File /Users/jjylanki/.emscripten passed to --em-config does not exist!
+



======================================================================
ERROR: test_vanilla (test_sanity.sanity)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tests/test_sanity.py", line 894, in test_vanilla
    test_with_fake('got wasm32 backend! WebAssembly 32-bit',                  'check tells us to use wasm backend')
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tests/test_sanity.py", line 888, in test_with_fake
    output = self.check_working([EMCC, 'tests/hello_world.c', '-c'], expected)
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tests/test_sanity.py", line 63, in check_working
    self.assertContained(expected, output)
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tests/runner.py", line 461, in assertContained
    additional_info
Exception: Expected to find 'check tells us to use wasm backend' in 'DEBUG:root:PYTHON not defined in /Users/jjylanki/.emscripten, using "/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python"
DEBUG:root:JAVA not defined in /Users/jjylanki/.emscripten, using "java"
DEBUG:root:check tells us to use asm.js backend
WARNING:root:invocation: /Users/jjylanki/emsdk_git/emscripten/incoming/emcc tests/hello_world.c -c  (in /Users/jjylanki/emsdk_git/emscripten/incoming)
WARNING:root:Could not verify LLVM version: [Errno 2] No such file or directory
CRITICAL:root:fastcomp in use, but LLVM has not been built with the JavaScript backend as a target, llc reports:
===========================================================================

got wasm32 backend! WebAssembly 32-bit

===========================================================================
CRITICAL:root:you can fall back to the older (pre-fastcomp) compiler core, although that is not recommended, see http://kripken.github.io/emscripten-site/docs/building_from_source/LLVM-Backend.html
INFO:root:(Emscripten: Running sanity checks)
CRITICAL:root:Cannot find /Users/jjylanki/emsdk_git/emscripten/incoming/tests/fake/bin/clang++, check the paths in /Users/jjylanki/.emscripten
', diff:

--- expected
+++ actual
@@ -1 +1,15 @@
-check tells us to use wasm backend
+DEBUG:root:PYTHON not defined in /Users/jjylanki/.emscripten, using "/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python"
+DEBUG:root:JAVA not defined in /Users/jjylanki/.emscripten, using "java"
+DEBUG:root:check tells us to use asm.js backend
+WARNING:root:invocation: /Users/jjylanki/emsdk_git/emscripten/incoming/emcc tests/hello_world.c -c  (in /Users/jjylanki/emsdk_git/emscripten/incoming)
+WARNING:root:Could not verify LLVM version: [Errno 2] No such file or directory
+CRITICAL:root:fastcomp in use, but LLVM has not been built with the JavaScript backend as a target, llc reports:
+===========================================================================
+
+got wasm32 backend! WebAssembly 32-bit
+
+===========================================================================
+CRITICAL:root:you can fall back to the older (pre-fastcomp) compiler core, although that is not recommended, see http://kripken.github.io/emscripten-site/docs/building_from_source/LLVM-Backend.html
+INFO:root:(Emscripten: Running sanity checks)
+CRITICAL:root:Cannot find /Users/jjylanki/emsdk_git/emscripten/incoming/tests/fake/bin/clang++, check the paths in /Users/jjylanki/.emscripten
+



======================================================================
FAIL: test_closure_compiler (test_sanity.sanity)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tests/test_sanity.py", line 162, in test_closure_compiler
    assert os.path.exists('a.out.js'), output
AssertionError: WARNING:root:generating system asset: is_vanilla.txt...
WARNING:root:                                          ok
WARNING:root:(Emscripten: settings file has changed, clearing cache)
INFO:root:(Emscripten: Running sanity checks)
clang-3.9: warning: argument unused during compilation: '-s'
WARNING:root:generating system library: libc.bc...
Traceback (most recent call last):
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/emcc", line 13, in <module>
    emcc.run()
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/emcc.py", line 1365, in run
    extra_files_to_link += system_libs.calculate([f for _, f in sorted(temp_files)] + extra_files_to_link, in_temp, stdout, stderr, forced=forced_stdlibs)
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tools/system_libs.py", line 410, in calculate
    libfile = shared.Cache.get(name, do_create, extension=suffix)
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tools/cache.py", line 48, in get
    shutil.copyfile(temp, cachename)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 2] No such file or directory: '/Users/jjylanki/.emscripten_cache/asmjs/libc.bc'


======================================================================
FAIL: test_embuilder (test_sanity.sanity)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tests/test_sanity.py", line 728, in test_embuilder
    assert (proc.returncode == 0) == success, out
AssertionError: INFO:root:building and verifying libc
INFO:root:(Emscripten: Running sanity checks)
WARNING:root:generating system library: libc.bc...
Traceback (most recent call last):
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/emcc", line 13, in <module>
    emcc.run()
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/emcc.py", line 1365, in run
    extra_files_to_link += system_libs.calculate([f for _, f in sorted(temp_files)] + extra_files_to_link, in_temp, stdout, stderr, forced=forced_stdlibs)
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tools/system_libs.py", line 410, in calculate
    libfile = shared.Cache.get(name, do_create, extension=suffix)
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tools/cache.py", line 48, in get
    shutil.copyfile(temp, cachename)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 2] No such file or directory: '/Users/jjylanki/.emscripten_cache/asmjs/libc.bc'
Traceback (most recent call last):
  File "embuilder.py", line 101, in <module>
    ''', ['libc.bc', 'dlmalloc.bc'])
  File "embuilder.py", line 69, in build
    shared.Building.emcc(temp, args, output_filename=temp_js)
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tools/shared.py", line 1662, in emcc
    assert os.path.exists(output_filename), 'emcc could not create output file: ' + output_filename
AssertionError: emcc could not create output file: /var/folders/hr/8s_0kh7j58j9jx9gqfjr82z00000gn/T/tmpVak8mQ.js


======================================================================
FAIL: test_emcc_caching (test_sanity.sanity)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tests/test_sanity.py", line 487, in test_emcc_caching
    assert ERASING_MESSAGE in output
AssertionError

======================================================================
FAIL: test_native_optimizer (test_sanity.sanity)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jjylanki/emsdk_git/emscripten/incoming/tests/test_sanity.py", line 631, in test_native_optimizer
    assert 'building native optimizer' in output
AssertionError

----------------------------------------------------------------------
Ran 18 tests in 767.406s

FAILED (failures=4, errors=4)

@kripken: anything that looks obvious fixes to you? I'll try to find a moment to dig in to debug, and also add the sanity suite to be run on the bots, they don't do that right now.

Activity

  1. kripken commented on Jun 28, 2016

    @kripken
    Member

    None of those look obvious to me. But, I would not spend serious time on them - those tests have only ever been run on linux by me, I think. They are probably ok to remain that way, unless there are easy fixes somehow.

  2. jdm commented on Aug 7, 2016

    @jdm

    I fixed the IOError: [Errno 2] No such file or directory errors locally by running mkdir ~/.emscripten_cache, since the directory didn't exist.

  3. marcosscriven commented on Aug 11, 2016

    @marcosscriven

    I got the error listed above and came here looking to find or report it:

     File "/Users/jjylanki/emsdk_git/emscripten/incoming/tools/shared.py", line 206, in <module>
        raise Exception('File ' + EM_CONFIG + ' passed to --em-config does not exist!')
    

    The reasons it's failing is because in the setup instructions for OS X it lists this:

    https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html#windows-osx-and-linux-installing-the-portable-sdk

    Linux and Mac OS X only: Call source ./emsdk_env.sh after activate to set the system path to the active version of Emscripten:
    

    Which sets an EM_CONFIG env var, meaning the code here assumes the config is already available, despite being the first run: https://github.com/kripken/emscripten/blob/master/tools/shared.py#L201

    Running EM_CONFIG= emcc (I.e. clearing the env var), correctly sets up the config files the first time.

  4. Fishrock123 commented on Mar 1, 2017

    @Fishrock123

    I get something similar upon running emcc -v, perhaps related?

    Traceback (most recent call last):
      File "/Users/Jeremiah/Downloads/emsdk_portable/emscripten/incoming/emcc", line 12, in <module>
        import emcc
      File "/Users/Jeremiah/Downloads/emsdk_portable/emscripten/incoming/emcc.py", line 32, in <module>
        from tools import shared, jsrun, system_libs
      File "/Users/Jeremiah/Downloads/emsdk_portable/emscripten/incoming/tools/shared.py", line 207, in <module>
        raise Exception('File ' + EM_CONFIG + ' passed to --em-config does not exist!')
    Exception: File /Users/Jeremiah/.emscripten passed to --em-config does not exist!
    

    Edit: I am running macOS 10.10.5 (64bit)

  5. stale commented on Aug 30, 2019

    @stale

    This issue has been automatically marked as stale because there has been no activity in the past 2 years. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.

  6. stale commented on Aug 29, 2020

    @stale

    This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 30 days. Feel free to re-open at any time if this issue is still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions