EOSIO / eosio.contracts

Smart contracts that provide some of the basic functions of the EOSIO blockchain
https://eosio.github.io/eosio.contracts/latest
MIT License
325 stars 574 forks source link

current eosio.contracts is not incompatible with eos v2.0.5 ? #487

Closed gzliudan closed 4 years ago

gzliudan commented 4 years ago

After upgrade and compile eos source to v2.0.5, I run below command: ./build.sh -t -c /usr/opt/eosio.cdt/1.7.0 -e ${EOS_DIR} to compile eosio.contracts. It fails with many errors like below:

contracts/tests/eosio.system_tester.hpp:46:37: error: no viable conversion from 'const fc::microseconds' to 'const eosio::chain::abi_serializer::yield_function_t' (aka 'const optional_delegate<void (unsigned long)>') token_abi_ser.set_abi(abi, abi_serializer_max_time);

contracts/tests/eosio.system_tester.hpp:276:29: error: no matching member function for call to 'variant_to_binary' act.data = abi_ser.variant_to_binary( action_type_name, data, abi_serializer_max_time );

MrToph commented 4 years ago

I tried to fix it with #488 and it compiles but the linker has issues now. Not sure if this is related to this issue. I'm on Mac.

Using EOSIO.CDT installation at: /usr/opt/eosio.cdt/1.7.0
Using EOSIO installation at: /Users/me/Code/eos/build
    =========== Building eosio.contracts ===========

-- Setting up Eosio Wasm Toolchain 1.7.0 at //usr/local
-- Building eosio.contracts v1.9.1
-- Using eosio.cdt version 1.7.0
-- Building unit tests.
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/me/Code/eosio.contracts/build
[ 11%] Performing build step for 'contracts_project'
[ 11%] Performing build step for 'contracts_unit_tests'
[ 33%] Built target rex.results
[ 44%] Built target eosio.token
[ 44%] Built target eosio.wrap
[ 44%] Built target eosio.msig
[ 77%] Built target eosio.bios
[100%] Built target eosio.system
[ 16%] No install step for 'contracts_project'
[ 22%] No test step for 'contracts_project'
[ 27%] Completed 'contracts_project'
[ 55%] Built target contracts_project
[ 16%] Linking CXX executable unit_test
Undefined symbols for architecture x86_64:
  "boost::filesystem::detail::recur_dir_itr_imp::pop(boost::system::error_code*)", referenced from:
      fc::recursive_directory_iterator::pop() in libfc.a(filesystem.cpp.o)
  "boost::filesystem::detail::recur_dir_itr_imp::increment(boost::system::error_code*)", referenced from:
      fc::recursive_directory_iterator::operator++(int) in libfc.a(filesystem.cpp.o)
      fc::recursive_directory_iterator::operator++() in libfc.a(filesystem.cpp.o)
  "boost::filesystem::detail::directory_iterator_construct(boost::filesystem::directory_iterator&, boost::filesystem::path const&, boost::system::error_code*)", referenced from:
      boost::filesystem::directory_iterator::directory_iterator(boost::filesystem::path const&) in libfc.a(filesystem.cpp.o)
ld: symbol(s) not found for architecture x86_64
clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
make[5]: *** [unit_test] Error 1
make[4]: *** [CMakeFiles/unit_test.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [contracts_unit_tests-prefix/src/contracts_unit_tests-stamp/contracts_unit_tests-build] Error 2
make[1]: *** [CMakeFiles/contracts_unit_tests.dir/all] Error 2
make: *** [all] Error 2