EOSIO / eos

An open source smart contract platform
https://developers.eos.io/manuals/eos
MIT License
11.27k stars 3.6k forks source link

linking error when WASM_INTERPRETER_DEBUG flag is set #3974

Closed CharlesJu1 closed 5 years ago

CharlesJu1 commented 6 years ago

When WASM_INTERPRETER_DEBUG flag is set in CXX_FLAGS there are two linking errors. One from eosio-s2wasm and the other one from nodeos. The WASM_INTERPRETER_DEBUG flag is set in my local environment by adding a line set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWASM_INTERPRETER_DEBUG=1" ) in CMakeLists.txt in eos root dir.

[100%] Linking CXX executable bin/eosio-s2wasm
cd /Users/easypayx/eos-dawn-5-31/eos/build/externals/binaryen && /usr/local/Cellar/cmake/3.11.1/bin/cmake -E cmake_link_script CMakeFiles/eosio-s2wasm.dir/link.txt --verbose=1
/usr/local/bin/clang++   -Wall -Wno-deprecated-declarations -DWASM_INTERPRETER_DEBUG=1 -std=c++11 -Wall -Werror -Wextra -Wno-unused-parameter -fno-omit-frame-pointer -fPIC -g -O0 -g3 -Wl,-search_paths_first -Wl,-headerpad_max_install_names  CMakeFiles/eosio-s2wasm.dir/src/tools/s2wasm.cpp.o CMakeFiles/eosio-s2wasm.dir/src/wasm-emscripten.cpp.o CMakeFiles/eosio-s2wasm.dir/src/wasm-linker.cpp.o  -o bin/eosio-s2wasm lib/libpasses.a lib/libwasm.a lib/libasmjs.a lib/libast.a lib/libcfg.a lib/libsupport.a
Undefined symbols for architecture x86_64:
  "wasm::Indenter::print()", referenced from:
      wasm::ExpressionRunner<wasm::StandaloneExpressionRunner>::visitBlock(wasm::Block*) in libpasses.a(Precompute.cpp.o)
      wasm::ExpressionRunner<wasm::StandaloneExpressionRunner>::visitIf(wasm::If*) in libpasses.a(Precompute.cpp.o)
      wasm::ExpressionRunner<wasm::StandaloneExpressionRunner>::visitBreak(wasm::Break*) in libpasses.a(Precompute.cpp.o)
      wasm::ExpressionRunner<wasm::StandaloneExpressionRunner>::visitSwitch(wasm::Switch*) in libpasses.a(Precompute.cpp.o)
      wasm::ExpressionRunner<wasm::StandaloneExpressionRunner>::visitConst(wasm::Const*) in libpasses.a(Precompute.cpp.o)
      wasm::ExpressionRunner<wasm::StandaloneExpressionRunner>::visitUnary(wasm::Unary*) in libpasses.a(Precompute.cpp.o)
      wasm::ExpressionRunner<wasm::StandaloneExpressionRunner>::visitBinary(wasm::Binary*) in libpasses.a(Precompute.cpp.o)
jgiszczak commented 5 years ago

OBE. eosio-s2wasm is no longer part of this repository. WASM compilation tasks are now performed by eosio.cdt.