Last active
January 3, 2016 00:39
-
-
Save xxuejie/8384185 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ EMCC_FAST_COMPILER=1 ~/develop/opensource/webruby/modules/emscripten/emcc vatest.c | |
| 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 | |
| false && "Unsupported type" | |
| /Users/rafael/develop/opensource/emscripten-fastcomp/lib/Target/JSBackend/JSBackend.cpp : 683 | |
| LLVM ERROR: fail | |
| Traceback (most recent call last): | |
| File "/Users/rafael/develop/opensource/webruby/modules/emscripten/emscripten.py", line 1347, in <module> | |
| _main(environ=os.environ) | |
| File "/Users/rafael/develop/opensource/webruby/modules/emscripten/emscripten.py", line 1335, in _main | |
| temp_files.run_and_clean(lambda: main( | |
| File "/Users/rafael/develop/opensource/webruby/modules/emscripten/tools/tempfiles.py", line 39, in run_and_clean | |
| return func() | |
| File "/Users/rafael/develop/opensource/webruby/modules/emscripten/emscripten.py", line 1343, in <lambda> | |
| DEBUG_CACHE=DEBUG_CACHE, | |
| File "/Users/rafael/develop/opensource/webruby/modules/emscripten/emscripten.py", line 1230, in main | |
| jcache=jcache, temp_files=temp_files, DEBUG=DEBUG, DEBUG_CACHE=DEBUG_CACHE) | |
| File "/Users/rafael/develop/opensource/webruby/modules/emscripten/emscripten.py", line 749, in emscript_fast | |
| backend_output = open(temp_js).read() | |
| IOError: [Errno 2] No such file or directory: '/tmp/tmpeZeJFU.4.js' | |
| Traceback (most recent call last): | |
| File "/Users/rafael/develop/opensource/webruby/modules/emscripten/emcc", line 1791, in <module> | |
| final = shared.Building.emscripten(final, append_ext=False, extra_args=extra_args) | |
| File "/Users/rafael/develop/opensource/webruby/modules/emscripten/tools/shared.py", line 1282, 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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ EMCC_FAST_COMPILER=1 ~/develop/opensource/webruby/modules/emscripten/emcc vatest.c | |
| Value: %10 = va_arg i32* %9, %struct.mrb_value | |
| LLVM ERROR: Unrecognized struct value | |
| Traceback (most recent call last): | |
| File "/Users/rafael/develop/opensource/webruby/modules/emscripten/emcc", line 1758, in <module> | |
| shared.Building.llvm_opt(final, link_opts) | |
| File "/Users/rafael/develop/opensource/webruby/modules/emscripten/tools/shared.py", line 1179, in llvm_opt | |
| assert os.path.exists(target), 'Failed to run llvm optimizations: ' + output | |
| AssertionError: Failed to run llvm optimizations: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ EMCC_FAST_COMPILER=1 ~/develop/opensource/webruby/modules/emscripten/emcc vatest.c | |
| vatest.c:25:17: error: cannot compile this aggregate va_arg expression yet | |
| print_value(va_arg(ap, mrb_value)); | |
| ^~~~~~~~~~~~~~~~~~~~~ | |
| /Users/rafael/develop/opensource/webruby/modules/emscripten/system/include/libc/stdarg.h:15:25: note: expanded from macro 'va_arg' | |
| #define va_arg(v,l) __builtin_va_arg(v,l) | |
| ^~~~~~~~~~~~~~~~~~~~~ | |
| 0 clang 0x000000010ee5c3a8 llvm::sys::PrintStackTrace(__sFILE*) + 40 | |
| 1 clang 0x000000010ee5c894 SignalHandler(int) + 452 | |
| 2 libsystem_platform.dylib 0x00007fff874455aa _sigtramp + 26 | |
| 3 libsystem_platform.dylib 0x0000000012034200 _sigtramp + 2327768176 | |
| 4 clang 0x000000010dde25f5 (anonymous namespace)::AggExprEmitter::EmitCopy(clang::QualType, clang::CodeGen::AggValueSlot const&, clang::CodeGen::AggValueSlot const&) + 213 | |
| 5 clang 0x000000010dde09b6 clang::StmtVisitorBase<clang::make_ptr, (anonymous namespace)::AggExprEmitter, void>::Visit(clang::Stmt*) + 3750 | |
| 6 clang 0x000000010dddfafc clang::CodeGen::CodeGenFunction::EmitAggExpr(clang::Expr const*, clang::CodeGen::AggValueSlot) + 412 | |
| 7 clang 0x000000010ddd0fc7 clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*, clang::CodeGen::AggValueSlot, bool) + 167 | |
| 8 clang 0x000000010dda3783 clang::CodeGen::CodeGenFunction::EmitCallArg(clang::CodeGen::CallArgList&, clang::Expr const*, clang::QualType) + 451 | |
| 9 clang 0x000000010dd8c32d void clang::CodeGen::CodeGenFunction::EmitCallArgs<clang::FunctionProtoType>(clang::CodeGen::CallArgList&, clang::FunctionProtoType const*, clang::ConstExprIterator, clang::ConstExprIterator) + 109 | |
| 10 clang 0x000000010ddde54d clang::CodeGen::CodeGenFunction::EmitCall(clang::QualType, llvm::Value*, clang::CodeGen::ReturnValueSlot, clang::ConstExprIterator, clang::ConstExprIterator, clang::Decl const*) + 173 | |
| 11 clang 0x000000010ddde352 clang::CodeGen::CodeGenFunction::EmitCallExpr(clang::CallExpr const*, clang::CodeGen::ReturnValueSlot) + 578 | |
| 12 clang 0x000000010ddfad13 clang::StmtVisitorBase<clang::make_ptr, (anonymous namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) + 547 | |
| 13 clang 0x000000010ddf5428 clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 72 | |
| 14 clang 0x000000010ddd0fe7 clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*, clang::CodeGen::AggValueSlot, bool) + 199 | |
| 15 clang 0x000000010ddd0f1a clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*) + 58 | |
| 16 clang 0x000000010de44db0 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 256 | |
| 17 clang 0x000000010de49c7b clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) + 91 | |
| 18 clang 0x000000010de495af clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) + 303 | |
| 19 clang 0x000000010de451e9 clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 281 | |
| 20 clang 0x000000010de44cca clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 26 | |
| 21 clang 0x000000010de4626b clang::CodeGen::CodeGenFunction::EmitForStmt(clang::ForStmt const&) + 1019 | |
| 22 clang 0x000000010de44e1f clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 367 | |
| 23 clang 0x000000010de49c7b clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) + 91 | |
| 24 clang 0x000000010de55822 clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) + 962 | |
| 25 clang 0x000000010de5eaa3 clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl) + 595 | |
| 26 clang 0x000000010de5c0ac clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl) + 220 | |
| 27 clang 0x000000010de5df62 clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) + 1362 | |
| 28 clang 0x000000010de606e3 clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 291 | |
| 29 clang 0x000000010de7f1ff (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) + 95 | |
| 30 clang 0x000000010de5207c clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 156 | |
| 31 clang 0x000000010de90683 clang::ParseAST(clang::Sema&, bool, bool) + 419 | |
| 32 clang 0x000000010de512d4 clang::CodeGenAction::ExecuteAction() + 84 | |
| 33 clang 0x000000010dc4fa3c clang::FrontendAction::Execute() + 92 | |
| 34 clang 0x000000010dc2ee5d clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 861 | |
| 35 clang 0x000000010dbfeea0 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4128 | |
| 36 clang 0x000000010dbf73a4 cc1_main(char const**, char const**, char const*, void*) + 676 | |
| 37 clang 0x000000010dbfb4a6 main + 1574 | |
| 38 libdyld.dylib 0x00007fff8df7e5fd start + 1 | |
| 39 libdyld.dylib 0x0000000000000056 start + 1913133658 | |
| Stack dump: | |
| 0. Program arguments: /Users/rafael/develop/opensource/emscripten-fastcomp/build/Release/bin/clang -cc1 -triple le32-unknown-nacl -emit-llvm-bc -disable-free -disable-llvm-verifier -main-file-name vatest.c -mrelocation-model static -mdisable-fp-elim -mconstructor-aliases -target-linker-version 224.1 -coverage-file /tmp/tmp_bvCqC/vatest_0.o -nostdsysteminc -nobuiltininc -resource-dir /Users/rafael/develop/opensource/emscripten-fastcomp/build/Release/bin/../lib/clang/3.3 -D EMSCRIPTEN -D __EMSCRIPTEN__ -U __native_client__ -U __pnacl__ -U __ELF__ -U __i386__ -U __i386 -U i386 -U __STRICT_ANSI__ -D __IEEE_LITTLE_ENDIAN -U __SSE__ -U __SSE_MATH__ -U __SSE2__ -U __SSE2_MATH__ -U __MMX__ -U __APPLE__ -U __linux__ -fno-dwarf-directory-asm -fdebug-compilation-dir /Users/rafael/develop/tmp -ferror-limit 19 -fmessage-length 150 -mstackrealign -fobjc-runtime=gcc -fobjc-default-synthesize-properties -fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops -nobuiltininc -nostdsysteminc -isystem/Users/rafael/develop/opensource/webruby/modules/emscripten/system/local/include -isystem/Users/rafael/develop/opensource/webruby/modules/emscripten/system/include/compat -isystem/Users/rafael/develop/opensource/webruby/modules/emscripten/system/include/libcxx -isystem/Users/rafael/develop/opensource/webruby/modules/emscripten/system/include -isystem/Users/rafael/develop/opensource/webruby/modules/emscripten/system/include/emscripten -isystem/Users/rafael/develop/opensource/webruby/modules/emscripten/system/include/bsd -isystem/Users/rafael/develop/opensource/webruby/modules/emscripten/system/include/libc -isystem/Users/rafael/develop/opensource/webruby/modules/emscripten/system/include/gfx -isystem/Users/rafael/develop/opensource/webruby/modules/emscripten/system/include/net -isystem/Users/rafael/develop/opensource/webruby/modules/emscripten/system/include/SDL -o /tmp/tmp_bvCqC/vatest_0.o -x c vatest.c | |
| 1. vatest.c:29:1: current parser token 'void' | |
| 2. vatest.c:20:6: LLVM IR generation of declaration 'print_list' | |
| 3. vatest.c:20:6: Generating code for declaration 'print_list' | |
| 4. vatest.c:24:27: LLVM IR generation of compound statement ('{}') | |
| clang: error: unable to execute command: Segmentation fault: 11 | |
| clang: error: clang frontend command failed due to signal (use -v to see invocation) | |
| clang version 3.3 (https://chromium.googlesource.com/native_client/pnacl-clang a963b803407c9d1cac644cc425004e0ccd28fa45) (https://github.com/kripken/emscripten-fastcomp 4f6b0c7bbbbc46fb4de7f0a57c7c96b002f3d652) | |
| Target: le32-unknown-nacl | |
| Thread model: posix | |
| clang: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script. | |
| clang: note: diagnostic msg: | |
| ******************** | |
| PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: | |
| Preprocessed source(s) and associated run script(s) are located at: | |
| clang: note: diagnostic msg: /var/folders/zj/fl5q9zsd4s5_v6fkk9brjn200000gn/T/vatest-ioXiJq.c | |
| clang: note: diagnostic msg: /var/folders/zj/fl5q9zsd4s5_v6fkk9brjn200000gn/T/vatest-ioXiJq.sh | |
| clang: note: diagnostic msg: | |
| ******************** | |
| ERROR root: compiler frontend failed to generate LLVM bitcode, halting |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdarg.h> | |
| typedef struct mrb_value { | |
| union { | |
| float f; | |
| void *p; | |
| int i; | |
| short sym; | |
| } value; | |
| unsigned tt; | |
| } mrb_value; | |
| void print_value(mrb_value val) | |
| { | |
| printf("Type is %d\n", val.tt); | |
| printf("Value is %d\n", val.value.i); | |
| } | |
| void print_list(int n, va_list ap) | |
| { | |
| int i; | |
| for (i = 0; i < n; i++) { | |
| print_value(va_arg(ap, mrb_value)); | |
| } | |
| } | |
| void print_variable_length(int n, ...) | |
| { | |
| va_list ap; | |
| va_start(ap, n); | |
| print_list(n, ap); | |
| va_end(ap); | |
| } | |
| int main () | |
| { | |
| mrb_value values[5]; | |
| int i; | |
| for (i = 0; i < 5; i++) { | |
| values[i].tt = i; | |
| values[i].value.i = i * 7 + 5; | |
| } | |
| print_variable_length(5, values[0], values[1], values[2], values[3], values[4]); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment