emscripten-core / emscripten-core/emscripten

test_emcc_cache_flag is occasionally flakey

Open
#15,236 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

e.g: https://app.circleci.com/pipelines/github/emscripten-core/emscripten/15947/workflows/3be4c47f-f3cf-4e4b-b7cf-dc01f7af2c06/jobs/461730

```
test_emcc_cache_flag (test_sanity.sanity) ... None
shared:INFO: (Emscripten: Running sanity checks)
cache:INFO: generating system headers: sysroot_install.stamp... (this will be cached in "/tmp/emscripten_test_sanity_92nsr0tq/emscripten_cache/sysroot_install.stamp" for subsequent builds)
cache:INFO: - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libGL.a... (this will be cached in "/tmp/emscripten_test_sanity_92nsr0tq/emscripten_cache/sysroot/lib/wasm32-emscripten/libGL.a" for subsequent builds)
cache:INFO: generating system headers: sysroot_install.stamp... (this will be cached in "/root/cache/sysroot_install.stamp" for subsequent builds)
cache:INFO: generating system headers: sysroot_install.stamp... (this will be cached in "/root/cache/sysroot_install.stamp" for subsequent builds)
cache:INFO: generating system headers: sysroot_install.stamp... (this will be cached in "/root/cache/sysroot_install.stamp" for subsequent builds)
cache:INFO: - ok
/root/project/system/lib/gl/webgl1.c:638:3: error: implicitly declaring library function 'strcmp' with type 'int (const char *, const char *)' [-Werror,-Wimplicit-function-declaration]
RETURN_FN_WITH_SUFFIX(glGenQueries, EXT);
^
/root/project/system/lib/gl/webgl_internal.h:64:58: note: expanded from macro 'RETURN_FN_WITH_SUFFIX'
#define RETURN_FN_WITH_SUFFIX(functionName, suffix) if (!strcmp(name, #functionName)) return emscripten_##functionName##suffix;
^
/root/project/system/lib/gl/webgl1.c:638:3: note: include the header or explicitly provide a declaration for 'strcmp'
/root/project/system/lib/gl/webgl_internal.h:64:58: note: expanded from macro 'RETURN_FN_WITH_SUFFIX'
#define RETURN_FN_WITH_SUFFIX(functionName, suffix) if (!strcmp(name, #functionName)) return emscripten_##functionName##suffix;
^
cache:INFO: - ok
1 error generated.
emcc: error: '/root/emsdk/upstream/bin/clang -target wasm32-unknown-emscripten -DEMSCRIPTEN -fignore-exceptions -fno-inline-functions -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=32 -D_LIBCPP_ABI_VERSION=2 -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL --sysroot=/root/cache/sysroot -Xclang -iwithsysroot/include/compat -Werror -fno-unroll-loops -Oz -g -c /root/project/system/lib/gl/webgl1.c -o /tmp/emscripten_test_sanity_92nsr0tq/emscripten_cache/build/libGL/webgl1.o' failed (returned 1)
cache:INFO: - ok
Traceback (most recent call last):
File "/root/project/emcc.py", line 3823, in
sys.exit(main(sys.argv))
File "/root/project/emcc.py", line 3816, in main
ret = run(args)
File "/root/project/emcc.py", line 1104, in run
phase_calculate_system_libraries(state, linker_arguments, linker_inputs, newargs)
File "/usr/lib/python3.6/contextlib.py", line 52, in inner
return func(*args, **kwds)
File "/root/project/emcc.py", line 2526, in phase_calculate_system_libraries
extra_files_to_link += system_libs.calculate([f for _, f in sorted(linker_inputs)] + extra_files_to_link, forced=state.forced_stdlibs)
File "/root/project/tools/system_libs.py", line 1620, in calculate
add_library('libGL')
File "/root/project/tools/system_libs.py", line 1596, in add_library
libs_to_link.append((lib.get_link_flag(), need_whole_archive))
File "/root/project/tools/system_libs.py", line 299, in get_link_flag
fullpath = self.get_path()
File "/root/project/tools/system_libs.py", line 291, in get_path
return shared.Cache.get_lib(self.get_filename(), self.build)
File "/root/project/tools/cache.py", line 137, in get_lib
return self.get(name, *args, **kwargs)
File "/root/project/tools/cache.py", line 165, in get
creator(cachename)
File "/root/project/tools/system_libs.py", line 371, in build
create_lib(out_filename, self.build_objects(build_dir))
File "/root/project/tools/system_libs.py", line 364, in build_objects
run_build_commands(commands)
File "/root/project/tools/system_libs.py", line 72, in run_build_commands
shared.run_multiple_processes(commands, env=clean_env())
File "/root/project/tools/shared.py", line 207, in run_multiple_processes
raise Exception('Subprocess %d/%d failed (%s)! (cmdline: %s)' % (idx + 1, len(commands), returncode_to_str(finished_process.returncode), shlex_join(commands[idx])))
Exception: Subprocess 2/3 failed (returned 1)! (cmdline: /root/project/emcc -Werror -fno-unroll-loops -Oz -g -c /root/project/system/lib/gl/webgl1.c -o /tmp/emscripten_test_sanity_92nsr0tq/emscripten_cache/build/libGL/webgl1.o)

time: 0.715914249420166
FAIL
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.