take-cheeze / mruby-marshal

mruby implementation of cruby marshaling.
12 stars 9 forks source link

linker issues #24

Closed yannick closed 6 years ago

yannick commented 6 years ago

tried to include it into h2o, but its not linking (anymore), probably due to mruby upgrade

Undefined symbols for architecture x86_64:
  "typeinfo for long long", referenced from:
      _mrb_exc_raise in libmruby_core.a(error.cxx.o)
      _mrb_funcall_with_block in libmruby_core.a(vm.cxx.o)
      _mrb_vm_exec in libmruby_core.a(vm.cxx.o)
      GCC_except_table3 in libmruby_core.a(vm.cxx.o)
      GCC_except_table17 in libmruby_core.a(vm.cxx.o)
      _mrb_generate_code in libmruby_core.a(codegen.cxx.o)
      codegen_error(scope*, char const*) in libmruby_core.a(codegen.cxx.o)
      ...
  "___cxa_allocate_exception", referenced from:
      _mrb_exc_raise in libmruby_core.a(error.cxx.o)
      _mrb_funcall_with_block in libmruby_core.a(vm.cxx.o)
      _mrb_vm_exec in libmruby_core.a(vm.cxx.o)
      _mrb_generate_code in libmruby_core.a(codegen.cxx.o)
      codegen_error(scope*, char const*) in libmruby_core.a(codegen.cxx.o)
  "___cxa_begin_catch", referenced from:
      _mrb_funcall_with_block in libmruby_core.a(vm.cxx.o)
      _mrb_vm_exec in libmruby_core.a(vm.cxx.o)
      _mrb_generate_code in libmruby_core.a(codegen.cxx.o)
  "___cxa_end_catch", referenced from:
      _mrb_funcall_with_block in libmruby_core.a(vm.cxx.o)
      _mrb_vm_exec in libmruby_core.a(vm.cxx.o)
      _mrb_generate_code in libmruby_core.a(codegen.cxx.o)
  "___cxa_guard_acquire", referenced from:
      _mrb_generate_code in libmruby_core.a(codegen.cxx.o)
      scope_new(mrb_state*, scope*, mrb_ast_node*) in libmruby_core.a(codegen.cxx.o)
  "___cxa_guard_release", referenced from:
      _mrb_generate_code in libmruby_core.a(codegen.cxx.o)
      scope_new(mrb_state*, scope*, mrb_ast_node*) in libmruby_core.a(codegen.cxx.o)
  "___cxa_throw", referenced from:
      _mrb_exc_raise in libmruby_core.a(error.cxx.o)
      _mrb_funcall_with_block in libmruby_core.a(vm.cxx.o)
      _mrb_vm_exec in libmruby_core.a(vm.cxx.o)
      _mrb_generate_code in libmruby_core.a(codegen.cxx.o)
      codegen_error(scope*, char const*) in libmruby_core.a(codegen.cxx.o)
  "___gxx_personality_v0", referenced from:
      _mrb_funcall_with_block in libmruby_core.a(vm.cxx.o)
      _mrb_vm_exec in libmruby_core.a(vm.cxx.o)
      Dwarf Exception Unwind Info (__eh_frame) in libmruby_core.a(vm.cxx.o)
      _mrb_generate_code in libmruby_core.a(codegen.cxx.o)
      Dwarf Exception Unwind Info (__eh_frame) in libmruby_core.a(codegen.cxx.o)
ld: symbol(s) not found for architecture x86_64
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
Undefined symbols for architecture x86_64:
  "typeinfo for long long", referenced from:
      _mrb_exc_raise in libmruby_core.a(error.cxx.o)
      _mrb_funcall_with_block in libmruby_core.a(vm.cxx.o)
      _mrb_vm_exec in libmruby_core.a(vm.cxx.o)
      GCC_except_table3 in libmruby_core.a(vm.cxx.o)
      GCC_except_table17 in libmruby_core.a(vm.cxx.o)
      _mrb_generate_code in libmruby_core.a(codegen.cxx.o)
      codegen_error(scope*, char const*) in libmruby_core.a(codegen.cxx.o)
      ...
  "___cxa_allocate_exception", referenced from:
      _mrb_exc_raise in libmruby_core.a(error.cxx.o)
      _mrb_funcall_with_block in libmruby_core.a(vm.cxx.o)
      _mrb_vm_exec in libmruby_core.a(vm.cxx.o)
      _mrb_generate_code in libmruby_core.a(codegen.cxx.o)
      codegen_error(scope*, char const*) in libmruby_core.a(codegen.cxx.o)
  "___cxa_begin_catch", referenced from:
      _mrb_funcall_with_block in libmruby_core.a(vm.cxx.o)
      _mrb_vm_exec in libmruby_core.a(vm.cxx.o)
      _mrb_generate_code in libmruby_core.a(codegen.cxx.o)
  "___cxa_end_catch", referenced from:
      _mrb_funcall_with_block in libmruby_core.a(vm.cxx.o)
      _mrb_vm_exec in libmruby_core.a(vm.cxx.o)
      _mrb_generate_code in libmruby_core.a(codegen.cxx.o)
  "___cxa_guard_acquire", referenced from:
      _mrb_generate_code in libmruby_core.a(codegen.cxx.o)
      scope_new(mrb_state*, scope*, mrb_ast_node*) in libmruby_core.a(codegen.cxx.o)
  "___cxa_guard_release", referenced from:
      _mrb_generate_code in libmruby_core.a(codegen.cxx.o)
      scope_new(mrb_state*, scope*, mrb_ast_node*) in libmruby_core.a(codegen.cxx.o)
  "___cxa_throw", referenced from:
      _mrb_exc_raise in libmruby_core.a(error.cxx.o)
      _mrb_funcall_with_block in libmruby_core.a(vm.cxx.o)
      _mrb_vm_exec in libmruby_core.a(vm.cxx.o)
      _mrb_generate_code in libmruby_core.a(codegen.cxx.o)
      codegen_error(scope*, char const*) in libmruby_core.a(codegen.cxx.o)
  "___gxx_personality_v0", referenced from:
      _mrb_funcall_with_block in libmruby_core.a(vm.cxx.o)
      _mrb_vm_exec in libmruby_core.a(vm.cxx.o)
      Dwarf Exception Unwind Info (__eh_frame) in libmruby_core.a(vm.cxx.o)
      _mrb_generate_code in libmruby_core.a(codegen.cxx.o)
      Dwarf Exception Unwind Info (__eh_frame) in libmruby_core.a(codegen.cxx.o)
ld: symbol(s) not found for architecture x86_64
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
rake aborted!
Command Failed: [clang  -o "/Volumes/data/yannick/code/c/h2o-yannick/build-dist/mruby/host/bin/mrbc" "/Volumes/data/yannick/code/c/h2o-yannick/build-dist/mruby/host/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.o" "/Volumes/data/yannick/code/c/h2o-yannick/build-dist/mruby/host/lib/libmruby_core.a"  -lm ]

make[2]: *** [CMakeFiles/mruby] Error 1
make[1]: *** [CMakeFiles/mruby.dir/all] Error 2
make: *** [all] Error 2
take-cheeze commented 6 years ago

Just use the C++ compiler driver(clang++) as linker instead.

take-cheeze commented 6 years ago

And don't use an unstable compiler for issue reporting unless it relates to the issue cause.