EOSIO / eos

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

make error!! #23

Closed name55 closed 7 years ago

name55 commented 7 years ago

`[ 86%] Building CXX object plugins/producer_plugin/CMakeFiles/producer_plugin.dir/producer_plugin.cpp.o In file included from /home/ubuntu/eos/plugins/chain_plugin/include/eos/chain_plugin/chain_plugin.hpp:3:0, from /home/ubuntu/eos/plugins/producer_plugin/include/eos/producer_plugin/producer_plugin.hpp:26, from /home/ubuntu/eos/plugins/producer_plugin/producer_plugin.cpp:24: /home/ubuntu/eos/libraries/chain/include/eos/chain/chain_controller.hpp:122:2: warning: #warning QUESTION Should we be setting o.base_scope here? [-Wcpp]

warning QUESTION Should we be setting o.base_scope here?

^ /home/ubuntu/eos/plugins/producer_plugin/producer_plugin.cpp: In member function ?𻱶irtual void eos::producer_plugin::set_program_options(boost::program_options::options_description&, boost::program_options::options_description&?𼀺 /home/ubuntu/eos/plugins/producer_plugin/producer_plugin.cpp:101:38: error: reference to ?𻱢po?𼀠is ambiguous ("enable-stale-production", bpo::bool_switch()->notifier([this](bool e){my->_production_enabled = e;}), " ^ /home/ubuntu/eos/plugins/producer_plugin/producer_plugin.cpp:41:39: note: candidates are: namespace bpo = boost::boost::program_options; namespace bpo = boost::program_options; ^ In file included from /home/ubuntu/eos/plugins/chain_plugin/include/eos/chain_plugin/chain_plugin.hpp:2:0, from /home/ubuntu/eos/plugins/producer_plugin/include/eos/producer_plugin/producer_plugin.hpp:26, from /home/ubuntu/eos/plugins/producer_plugin/producer_plugin.cpp:24: /home/ubuntu/eos/libraries/appbase/include/appbase/application.hpp:8:42: note: namespace appbase::bpo = boost::boost::program_options; namespace bpo = boost::program_options; ^ /home/ubuntu/eos/plugins/producer_plugin/producer_plugin.cpp:102:37: error: reference to ?𻱢po?𼀠is ambiguous ("required-participation", bpo::bool_switch()->notifier([this](int e){my->_required_producer_participatio ^ /home/ubuntu/eos/plugins/producer_plugin/producer_plugin.cpp:41:39: note: candidates are: namespace bpo = boost::boost::program_options; namespace bpo = boost::program_options; ^ In file included from /home/ubuntu/eos/plugins/chain_plugin/include/eos/chain_plugin/chain_plugin.hpp:2:0, from /home/ubuntu/eos/plugins/producer_plugin/include/eos/producer_plugin/producer_plugin.hpp:26, from /home/ubuntu/eos/plugins/producer_plugin/producer_plugin.cpp:24: /home/ubuntu/eos/libraries/appbase/include/appbase/application.hpp:8:42: note: namespace appbase::bpo = boost::boost::program_options; namespace bpo = boost::program_options; ^ /home/ubuntu/eos/plugins/producer_plugin/producer_plugin.cpp:103:28: error: reference to ?𻱢po?𼀠is ambiguous ("producer-id,w", bpo::value<vector>()->composing()->multitoken(), ^ /home/ubuntu/eos/plugins/producer_plugin/producer_plugin.cpp:41:39: note: candidates are: namespace bpo = boost::boost::program_options; namespace bpo = boost::program_options; ^ In file included from /home/ubuntu/eos/plugins/chain_plugin/include/eos/chain_plugin/chain_plugin.hpp:2:0, from /home/ubuntu/eos/plugins/producer_plugin/include/eos/producer_plugin/producer_plugin.hpp:26, from /home/ubuntu/eos/plugins/producer_plugin/producer_plugin.cpp:24: /home/ubuntu/eos/libraries/appbase/include/appbase/application.hpp:8:42: note: namespace appbase::bpo = boost::boost::program_options; namespace bpo = boost::program_options; ^ /home/ubuntu/eos/plugins/producer_plugin/producer_plugin.cpp:103:52: error: expected primary-expression before ?.?𼀠token ("producer-id,w", bpo::value<vector>()->composing()->multitoken(), ^ /home/ubuntu/eos/plugins/producer_plugin/producer_plugin.cpp:103:55: error: expected primary-expression before ?.?𼀠token ("producer-id,w", bpo::value<vector>()->composing()->multitoken(), ^ /home/ubuntu/eos/plugins/producer_plugin/producer_plugin.cpp:105:26: error: reference to ?𻱢po?𼀠is ambiguous ("private-key", bpo::value<vector>()->composing()->multitoken()->default_value({fc::json::to_stri ^ /home/ubuntu/eos/plugins/producer_plugin/producer_plugin.cpp:41:39: note: candidates are: namespace bpo = boost::boost::program_options; namespace bpo = boost::program_options; ^ In file included from /home/ubuntu/eos/plugins/chain_plugin/include/eos/chain_plugin/chain_plugin.hpp:2:0, from /home/ubuntu/eos/plugins/producer_plugin/include/eos/producer_plugin/producer_plugin.hpp:26, from /home/ubuntu/eos/plugins/producer_plugin/producer_plugin.cpp:24: /home/ubuntu/eos/libraries/appbase/include/appbase/application.hpp:8:42: note: namespace appbase::bpo = boost::boost::program_options; namespace bpo = boost::program_options; ^ /home/ubuntu/eos/plugins/producer_plugin/producer_plugin.cpp:105:50: error: expected primary-expression before ?.?𼀠token ("private-key", bpo::value<vector>()->composing()->multitoken()->default_value({fc::json::to_stri ^ /home/ubuntu/eos/plugins/producer_plugin/producer_plugin.cpp:105:53: error: expected primary-expression before ?.?𼀠token ("private-key", bpo::value<vector>()->composing()->multitoken()->default_value({fc::json::to_stri ^ plugins/producer_plugin/CMakeFiles/producer_plugin.dir/build.make:62: recipe for target 'plugins/producer_plugin/CMakeFiles/producer_plugin.dir/producer_plugin.cpp.o' failed make[2]: [plugins/producer_plugin/CMakeFiles/producer_plugin.dir/producer_plugin.cpp.o] Error 1 CMakeFiles/Makefile2:1337: recipe for target 'plugins/producer_plugin/CMakeFiles/producer_plugin.dir/all' failed make[1]: [plugins/producer_plugin/CMakeFiles/producer_plugin.dir/all] Error 2 Makefile:127: recipe for target 'all' failed `

nathanielhourt commented 7 years ago

Excerpt from your error: /home/ubuntu/eos/libraries/appbase/include/appbase/application.hpp:8:42: note: namespace appbase::bpo = boost::boost::program_options;

application.hpp:8 says: namespace bpo = boost::program_options; Does your copy actually say boost::boost::program_options? That would be really weird.

nathanielhourt commented 7 years ago

Also, what compiler and version are you using?

nathanielhourt commented 7 years ago

OK, I see this error with an old version of g++ on Ubuntu (Ubuntu only has old versions of anything). Supporting old compilers is nice, and I'd love to do it eventually, but in the meantime I recommend building with Clang 4.0.0, which I know works.

jemekite commented 7 years ago

My build also fail after last commit, error: no matching function for call to 'memcpy'

Build environtment:

Error log:

[ 79%] Built target types_test
[ 79%] Building CXX object libraries/chain/CMakeFiles/eos_chain.dir/chain_administration_interface.cpp.o
In file included from /home/give/eos/libraries/chain/chain_controller.cpp:25:
/home/give/eos/libraries/chain/include/eos/chain/chain_controller.hpp:84:2: warning: QUESTION Should we be setting o.base_scope here? [-W#warnings]
#warning QUESTION Should we be setting o.base_scope here?
 ^
/home/give/eos/libraries/chain/wasm_interface.cpp:84:2: warning: TODO: wasm memcpy has undefined behavior if memory ranges overlap [-W#warnings]
#warning TODO: wasm memcpy has undefined behavior if memory ranges overlap
 ^
/home/give/eos/libraries/chain/wasm_interface.cpp:82:16: warning: unused variable 'src_end' [-Wunused-variable]
   const char* src_end = &memoryRef<const char>( mem, srcp+uint32_t(len) );
               ^
/home/give/eos/libraries/chain/wasm_interface.cpp:81:10: warning: unused variable 'dst_end' [-Wunused-variable]
   char* dst_end       = &memoryRef<char>( mem, dstp+uint32_t(len));
         ^
/home/give/eos/libraries/chain/block.cpp:88:2: warning: TODO The merkle root needs to be over all transactions, but this is currently hashing all threads merkle roots
      which will make proofs O(N) rather than O( LOG(N) ) [-W#warnings]
#warning TODO  The merkle root needs to be over all transactions, but this is currently hashing all threads merkle roots which will make proofs O(N) rather than O...
 ^
/home/give/eos/libraries/chain/block.cpp:93:2: warning: TODO Add global incremental block header merkle https://github.com/EOSIO/eos/issues/8 [-W#warnings]
#warning TODO  Add global incremental block header merkle   https://github.com/EOSIO/eos/issues/8
 ^
/home/give/eos/libraries/chain/wasm_interface.cpp:199:15: warning: unused variable 'end' [-Wunused-variable]
  const char* end = &Runtime::memoryRef<const char>( Runtime::getDefaultMemory(wasm_interface::get().current_module), charptr+size);
              ^
/home/give/eos/libraries/chain/wasm_interface.cpp:213:10: warning: unused variable 'c' [-Wunused-variable]
   char& c = Runtime::memoryRef<char>( Runtime::getDefaultMemory(wasm_interface::get().current_module), charptr );
         ^
/home/give/eos/libraries/chain/wasm_interface.cpp:355:2: warning: TODO: free existing module if the code has been updated, currently leak memory [-W#warnings]
#warning TODO: free existing module if the code has been updated, currently leak memory
 ^
In file included from /home/give/eos/libraries/chain/chain_controller.cpp:40:
/home/give/eos/libraries/utilities/include/eos/utilities/randutils.hpp:456:28: warning: unused variable 'compile_stamp' [-Wunused-variable]
        constexpr uint32_t compile_stamp =
                           ^
/home/give/eos/libraries/chain/chain_controller.cpp:368:2: warning: TODO: Populate generated blocks with generated transactions [-W#warnings]
#warning TODO: Populate generated blocks with generated transactions
 ^
/home/give/eos/libraries/chain/chain_controller.cpp:470:2: warning: TODO: Process generated transaction [-W#warnings]
#warning TODO: Process generated transaction
 ^
/home/give/eos/libraries/chain/chain_controller.cpp:469:26: warning: unused variable 'trx' [-Wunused-variable]
         for(const auto& trx : thread.generated_input ) {
                         ^
/home/give/eos/libraries/chain/chain_controller.cpp:452:13: warning: unused variable 'next_block_num' [-Wunused-variable]
   uint32_t next_block_num = next_block.block_num();
            ^
/home/give/eos/libraries/chain/wasm_interface.cpp:44:10: error: no matching function for call to 'memcpy'
         memcpy( o.value.data(), value, valuelen );
         ^~~~~~
/opt/boost160/include/boost/multi_index_container.hpp:813:5: note: in instantiation of function template specialization
      'eos::chain::storenonei32i32i32i32(NativeTypes::i32, NativeTypes::i32, NativeTypes::i32, NativeTypes::i32)::(anonymous
      class)::operator()<eos::chain::key_value_object>' requested here
    mod(const_cast<value_type&>(x->value()));
    ^
/opt/boost160/include/boost/multi_index/detail/index_base.hpp:276:21: note: in instantiation of function template specialization
      'boost::multi_index::multi_index_container<eos::chain::key_value_object,
      boost::multi_index::indexed_by<boost::multi_index::ordered_unique<boost::multi_index::tag<by_id, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
      mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>,
      boost::multi_index::member<eos::chain::key_value_object, chainbase::oid<eos::chain::key_value_object>, &eos::chain::key_value_object::id>, mpl_::na>,
      boost::multi_index::ordered_unique<boost::multi_index::tag<eos::chain::by_scope_key, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
      mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>,
      boost::multi_index::composite_key<eos::chain::key_value_object, boost::multi_index::member<eos::chain::key_value_object, fc::fixed_string<fc::array<unsigned long, 4>
      >, &eos::chain::key_value_object::scope>, boost::multi_index::member<eos::chain::key_value_object, boost::container::basic_string<char, std::char_traits<char>,
      boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family,
      boost::interprocess::offset_ptr<void, long, unsigned long, 0>, 0>, iset_index> > >, &eos::chain::key_value_object::key>, boost::tuples::null_type,
      boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
      boost::tuples::null_type>, boost::multi_index::composite_key_compare<std::less<fc::fixed_string<fc::array<unsigned long, 4> > >, chainbase::strcmp_less,
      boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
      boost::tuples::null_type, boost::tuples::null_type> >, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
      mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::interprocess::allocator<eos::chain::key_value_object,
      boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long,
      unsigned long, 0>, 0>, iset_index> > >::modify_<(lambda at /home/give/eos/libraries/chain/wasm_interface.cpp:42:24)>' requested here
    {return final().modify_(mod,x);}
                    ^
/opt/boost160/include/boost/multi_index/detail/ord_index_impl.hpp:418:18: note: in instantiation of function template specialization
      'boost::multi_index::detail::index_base<eos::chain::key_value_object,
      boost::multi_index::indexed_by<boost::multi_index::ordered_unique<boost::multi_index::tag<by_id, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
      mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>,
      boost::multi_index::member<eos::chain::key_value_object, chainbase::oid<eos::chain::key_value_object>, &eos::chain::key_value_object::id>, mpl_::na>,
      boost::multi_index::ordered_unique<boost::multi_index::tag<eos::chain::by_scope_key, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
      mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>,
      boost::multi_index::composite_key<eos::chain::key_value_object, boost::multi_index::member<eos::chain::key_value_object, fc::fixed_string<fc::array<unsigned long, 4>
      >, &eos::chain::key_value_object::scope>, boost::multi_index::member<eos::chain::key_value_object, boost::container::basic_string<char, std::char_traits<char>,
      boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family,
      boost::interprocess::offset_ptr<void, long, unsigned long, 0>, 0>, iset_index> > >, &eos::chain::key_value_object::key>, boost::tuples::null_type,
      boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
      boost::tuples::null_type>, boost::multi_index::composite_key_compare<std::less<fc::fixed_string<fc::array<unsigned long, 4> > >, chainbase::strcmp_less,
      boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
      boost::tuples::null_type, boost::tuples::null_type> >, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
      mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::interprocess::allocator<eos::chain::key_value_object,
      boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long,
      unsigned long, 0>, 0>, iset_index> > >::final_modify_<(lambda at /home/give/eos/libraries/chain/wasm_interface.cpp:42:24)>' requested here
    return this->final_modify_(
                 ^
/home/give/eos/libraries/chainbase/include/chainbase/chainbase.hpp:227:32: note: in instantiation of function template specialization
      'boost::multi_index::detail::ordered_index_impl<boost::multi_index::member<eos::chain::key_value_object, chainbase::oid<eos::chain::key_value_object>,
      &eos::chain::key_value_object::id>, std::less<chainbase::oid<eos::chain::key_value_object> >, boost::multi_index::detail::nth_layer<1, eos::chain::key_value_object,
      boost::multi_index::indexed_by<boost::multi_index::ordered_unique<boost::multi_index::tag<by_id, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
      mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>,
      boost::multi_index::member<eos::chain::key_value_object, chainbase::oid<eos::chain::key_value_object>, &eos::chain::key_value_object::id>, mpl_::na>,
      boost::multi_index::ordered_unique<boost::multi_index::tag<eos::chain::by_scope_key, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
      mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>,
      boost::multi_index::composite_key<eos::chain::key_value_object, boost::multi_index::member<eos::chain::key_value_object, fc::fixed_string<fc::array<unsigned long, 4>
      >, &eos::chain::key_value_object::scope>, boost::multi_index::member<eos::chain::key_value_object, boost::container::basic_string<char, std::char_traits<char>,
      boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family,
      boost::interprocess::offset_ptr<void, long, unsigned long, 0>, 0>, iset_index> > >, &eos::chain::key_value_object::key>, boost::tuples::null_type,
      boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
      boost::tuples::null_type>, boost::multi_index::composite_key_compare<std::less<fc::fixed_string<fc::array<unsigned long, 4> > >, chainbase::strcmp_less,
      boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
      boost::tuples::null_type, boost::tuples::null_type> >, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
      mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::interprocess::allocator<eos::chain::key_value_object,
      boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long,
      unsigned long, 0>, 0>, iset_index> > >, boost::mpl::v_item<by_id, boost::mpl::vector0<mpl_::na>, 0>, boost::multi_index::detail::ordered_unique_tag,
      boost::multi_index::detail::null_augment_policy>::modify<(lambda at /home/give/eos/libraries/chain/wasm_interface.cpp:42:24)>' requested here
            auto ok = _indices.modify( _indices.iterator_to( obj ), m );
                               ^
/home/give/eos/libraries/chainbase/include/chainbase/chainbase.hpp:861:46: note: in instantiation of function template specialization
      'chainbase::generic_index<boost::multi_index::multi_index_container<eos::chain::key_value_object,
      boost::multi_index::indexed_by<boost::multi_index::ordered_unique<boost::multi_index::tag<by_id, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
      mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>,
      boost::multi_index::member<eos::chain::key_value_object, chainbase::oid<eos::chain::key_value_object>, &eos::chain::key_value_object::id>, mpl_::na>,
      boost::multi_index::ordered_unique<boost::multi_index::tag<eos::chain::by_scope_key, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
      mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>,
      boost::multi_index::composite_key<eos::chain::key_value_object, boost::multi_index::member<eos::chain::key_value_object, fc::fixed_string<fc::array<unsigned long, 4>
      >, &eos::chain::key_value_object::scope>, boost::multi_index::member<eos::chain::key_value_object, boost::container::basic_string<char, std::char_traits<char>,
      boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family,
      boost::interprocess::offset_ptr<void, long, unsigned long, 0>, 0>, iset_index> > >, &eos::chain::key_value_object::key>, boost::tuples::null_type,
      boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
      boost::tuples::null_type>, boost::multi_index::composite_key_compare<std::less<fc::fixed_string<fc::array<unsigned long, 4> > >, chainbase::strcmp_less,
      boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
      boost::tuples::null_type, boost::tuples::null_type> >, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
      mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::interprocess::allocator<eos::chain::key_value_object,
      boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long,
      unsigned long, 0>, 0>, iset_index> > > >::modify<(lambda at /home/give/eos/libraries/chain/wasm_interface.cpp:42:24) &>' requested here
             get_mutable_index<index_type>().modify( obj, m );
                                             ^
/home/give/eos/libraries/chain/wasm_interface.cpp:42:10: note: in instantiation of function template specialization
      'chainbase::database::modify<eos::chain::key_value_object, (lambda at /home/give/eos/libraries/chain/wasm_interface.cpp:42:24)>' requested here
      db.modify( *obj, [&]( auto& o ) {
         ^
/usr/include/string.h:46:14: note: candidate function not viable: no known conversion from 'const char *' to 'void *__restrict' for 1st argument
extern void *memcpy (void *__restrict __dest, const void *__restrict __src,
             ^
6 warnings and 1 error generated.
libraries/chain/CMakeFiles/eos_chain.dir/build.make:86: recipe for target 'libraries/chain/CMakeFiles/eos_chain.dir/wasm_interface.cpp.o' failed
make[2]: *** [libraries/chain/CMakeFiles/eos_chain.dir/wasm_interface.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
2 warnings generated.
6 warnings generated.
CMakeFiles/Makefile2:1279: recipe for target 'libraries/chain/CMakeFiles/eos_chain.dir/all' failed
make[1]: *** [libraries/chain/CMakeFiles/eos_chain.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
give@debian:~/eos/build$

Any advice?

nathanielhourt commented 7 years ago

@jemekite Someone else has seen that error too; try replacing the memcpy line with this: o.value.replace (0, valuelen, value); Let me know if that solves it for you.

jemekite commented 7 years ago

Thanks @nathanhourt, Build passed after changing that line, but I have 4 error when running chain_test,

Log:

/home/give/eos/tests/tests/database_tests.cpp(210): error: in "producer_voting": check boost::find(gpo.active_producers, "joe") != gpo.active_producers.end() has failed
/home/give/eos/tests/tests/misc_tests.cpp(52): error: in "misc_tests/deterministic_randomness": check fc::json::to_string(words) == fc::json::to_string(vector<string>{"potters","hal9000","memorizes","infamy","invests","estimated"}) has failed [["infamy","hal9000","invests","estimated","memorizes","potters"] != ["potters","hal9000","memorizes","infamy","invests","estimated"]]
/home/give/eos/tests/tests/misc_tests.cpp(55): error: in "misc_tests/deterministic_randomness": check fc::json::to_string(words) == fc::json::to_string(vector<string>{"memorizes","hal9000","infamy","invests","estimated","potters"}) has failed [["infamy","hal9000","memorizes","estimated","potters","invests"] != ["memorizes","hal9000","infamy","invests","estimated","potters"]]
976106ms thread-0   block_log.cpp:88              open                 ] Opening block log at /tmp/8aa4-c24a-8a31-2447/blocklog/blocks.log
976137ms thread-0   block_log.cpp:88              open                 ] Opening block log at /tmp/617f-a511-2cb7-eebe/blocklog/blocks.log
976169ms thread-0   block_log.cpp:88              open                 ] Opening block log at /tmp/426d-2bc8-62e0-7b0a/blocklog/blocks.log
struct Foo
bar String
976198ms thread-0   TypeParser.cpp:72             parse                ] line_tokens: ["bar","String"]
baz Int8
976198ms thread-0   TypeParser.cpp:72             parse                ] line_tokens: ["baz","Int8"]
struct Bar
foo Int32
976198ms thread-0   TypeParser.cpp:72             parse                ] line_tokens: ["foo","Int32"]
baz Signature
976198ms thread-0   TypeParser.cpp:72             parse                ] line_tokens: ["baz","Signature"]
typedef Bar Baz
typedef Baz Qux

*** 4 failures are detected (1 failure is expected) in the test module "Master Test Suite"

complete logs is here: https://pastebin.com/cZzTYwdT Is this Okay?

nathanielhourt commented 7 years ago

Uh oh, those errors in deterministic_randomness are disconcerting... But I'm dead in the water right now, as long as I can't build, I can't do much with these errors.

nathanielhourt commented 7 years ago

OK, I'm building again! :)

@jemekite Please make a new issue for the deterministic_randomness test failures, and include in that issue a description of your environment including OS, compiler, and version. Please include the output of chain_test -t misc_tests/deterministic_randomness on this issue.

The producer_voting error is the expected failure, so we don't need to worry about that right now.

You've got one more that seems to be happening in another test. Please create an issue for that as well, and include the output of chain_test -t block_tests/create_script.

jemekite commented 7 years ago

Here you go ;) https://github.com/EOSIO/eos/issues/34

bitcoiners commented 7 years ago

I too have a make problem. Trying to build on Ubuntu 64 bit.

$ make [ 26%] Built target fc [ 27%] Built target chainbase [ 28%] Built target chainbase_test [ 29%] Built target Platform [ 30%] Built target Logging [ 33%] Built target IR [ 40%] Built target Runtime [ 41%] Built target Emscripten [ 42%] Built target WASM [ 48%] Built target WAST [ 49%] Built target Disassemble [ 50%] Built target Test [ 51%] Built target Assemble [ 52%] Built target wavm [ 57%] Built target wren [ 59%] Built target wrenbase [ 60%] Built target test [ 63%] Built target eos_utilities [ 66%] Built target type_generator [ 69%] Built target eos_types [ 70%] Built target types_test [ 71%] Building CXX object libraries/chain/CMakeFiles/eos_chain.dir/chain_controller.cpp.o In file included from /home/slava/dev/eos/libraries/chain/chain_controller.cpp:25:0: /home/slava/dev/eos/libraries/chain/include/eos/chain/chain_controller.hpp:84:2: warning: #warning QUESTION Should we be setting o.base_scope here? [-Wcpp]

warning QUESTION Should we be setting o.base_scope here?

^~~ /home/slava/dev/eos/libraries/chain/chain_controller.cpp:368:2: warning: #warning TODO: Populate generated blocks with generated transactions [-Wcpp]

warning TODO: Populate generated blocks with generated transactions

^~~ /home/slava/dev/eos/libraries/chain/chain_controller.cpp:470:2: warning: #warning TODO: Process generated transaction [-Wcpp]

warning TODO: Process generated transaction

^~~ /home/slava/dev/eos/libraries/chain/chain_controller.cpp: In member function ‘void eos::chain::chain_controller::_apply_block(const eos::chain::signed_block&)’: /home/slava/dev/eos/libraries/chain/chain_controller.cpp:469:26: warning: unused variable ‘trx’ [-Wunused-variable] for(const auto& trx : thread.generated_input ) { ^~~ /home/slava/dev/eos/libraries/chain/chain_controller.cpp:452:13: warning: unused variable ‘next_block_num’ [-Wunused-variable] uint32_t next_block_num = next_block.block_num(); ^~~~~~ /home/slava/dev/eos/libraries/chain/chain_controller.cpp: In member function ‘void eos::chain::chain_controller::update_last_irreversible_block()’: /home/slava/dev/eos/libraries/chain/chain_controller.cpp:1032:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (last_block_on_disk < new_last_irreversible_block_num)


/home/slava/dev/eos/libraries/chain/chain_controller.cpp:1034:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
block_to_write <= new_last_irreversible_block_num;
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/slava/dev/eos/libraries/chain/chain_controller.cpp: In instantiation of ‘eos::chain::chain_controller::initialize_chain(eos::chain::chain_initializer_interface&)::<lambda()>::<lambda(const auto:3&)> [with auto:3 = eos::chain::Message]’:
/usr/include/c++/6/bits/stl_algo.h:3769:5:   required from ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = __gnu_cxx::__normal_iterator<eos::chain::Message*, std::vector<eos::chain::Message> >; _Funct = eos::chain::chain_controller::initialize_chain(eos::chain::chain_initializer_interface&)::<lambda()>::<lambda(const auto:3&)>]’
/home/slava/dev/eos/libraries/chain/chain_controller.cpp:829:103:   required from here
/home/slava/dev/eos/libraries/chain/chain_controller.cpp:829:82: error: cannot call member function ‘void eos::chain::chain_controller::process_message(eos::chain::Message)’ without object
std::for_each(messages.begin(), messages.end(), [this](const auto& m) { process_message(m); });
^~~~~~~~~~~~~~~
libraries/chain/CMakeFiles/eos_chain.dir/build.make:62: recipe for target 'libraries/chain/CMakeFiles/eos_chain.dir/chain_controller.cpp.o' failed
make[2]: *** [libraries/chain/CMakeFiles/eos_chain.dir/chain_controller.cpp.o] Error 1
CMakeFiles/Makefile2:1279: recipe for target 'libraries/chain/CMakeFiles/eos_chain.dir/all' failed
make[1]: *** [libraries/chain/CMakeFiles/eos_chain.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
nathanielhourt commented 7 years ago

@bitcoiners What compiler/version?

bitcoiners commented 7 years ago

Ubuntu 17.04 gcc --version gcc (Ubuntu/Linaro 6.3.0-18ubuntu2) 6.3.0 20170519 clang -v clang version 4.0.1-+rc3-1 (tags/RELEASE_401/rc3) Target: x86_64-pc-linux-gnu

peterwillcn commented 7 years ago
ubuntu 16.04
clang -v
clang version 4.0.1-svn305187-1~exp1 (branches/release_40)
Target: x86_64-pc-linux-gnu
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)
.......
[ 73%] Building CXX object libraries/chain/CMakeFiles/eos_chain.dir/wasm_interface.cpp.o
 /home/eos/libraries/chain/wasm_interface.cpp:43:10: error: no matching function for call to 'memcpy'
         memcpy( o.value.data(), value, valuelen );
         ^~~~~~
/usr/include/boost/multi_index_container.hpp:813:5: note: in instantiation of function template specialization 'eos::chain::storenonei32i32i32i32(NativeTypes::i32,
      NativeTypes::i32, NativeTypes::i32, NativeTypes::i32)::(anonymous class)::operator()<eos::chain::key_value_object>' requested here
    mod(const_cast<value_type&>(x->value()));
    ^
.....
 in instantiation of function template specialization
      'chainbase::database::modify<eos::chain::key_value_object, (lambda at /home/eos/libraries/chain/wasm_interface.cpp:41:24)>' requested here
      db.modify( *obj, [&]( auto& o ) {
         ^
/usr/include/string.h:42:14: note: candidate function not viable: no known conversion from 'const char *' to 'void *__restrict' for 1st argument
extern void *memcpy (void *__restrict __dest, const void *__restrict __src,
             ^
6 warnings and 1 error generated.
libraries/chain/CMakeFiles/eos_chain.dir/build.make:86: recipe for target 'libraries/chain/CMakeFiles/eos_chain.dir/wasm_interface.cpp.o' failed
make[2]: *** [libraries/chain/CMakeFiles/eos_chain.dir/wasm_interface.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
6 warnings generated.
CMakeFiles/Makefile2:1121: recipe for target 'libraries/chain/CMakeFiles/eos_chain.dir/all' failed
make[1]: *** [libraries/chain/CMakeFiles/eos_chain.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
nathanielhourt commented 7 years ago

@bitcoiners Which compiler are you using? If g++, try with clang by passing -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang to cmake.

@peterwillcn That should be fixed now; let me know if you still have trouble

bitcoiners commented 7 years ago

passing -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang to clang

now getting new error

Scanning dependencies of target eos_chain [ 67%] Building CXX object libraries/chain/CMakeFiles/eos_chain.dir/chain_controller.cpp.o In file included from /home/slava/dev/eos/libraries/chain/chain_controller.cpp:25: /home/slava/dev/eos/libraries/chain/include/eos/chain/chain_controller.hpp:84:2: warning: QUESTION Should we be setting o.base_scope here? [-W#warnings]

warning QUESTION Should we be setting o.base_scope here?

^ In file included from /home/slava/dev/eos/libraries/chain/chain_controller.cpp:40: /home/slava/dev/eos/libraries/utilities/include/eos/utilities/randutils.hpp:456:28: warning: unused variable 'compile_stamp' [-Wunused-variable] constexpr uint32_t compile_stamp = ^ /home/slava/dev/eos/libraries/chain/chain_controller.cpp:370:2: warning: TODO: Populate generated blocks with generated transactions [-W#warnings]

warning TODO: Populate generated blocks with generated transactions

^ /home/slava/dev/eos/libraries/chain/chain_controller.cpp:478:2: warning: TODO: Process generated transaction [-W#warnings]

warning TODO: Process generated transaction

^ /home/slava/dev/eos/libraries/chain/chain_controller.cpp:477:26: warning: unused variable 'trx' [-Wunused-variable] for(const auto& trx : thread.generated_input ) { ^ /home/slava/dev/eos/libraries/chain/chain_controller.cpp:460:13: warning: unused variable 'next_block_num' [-Wunused-variable] uint32_t next_block_num = next_block.block_num(); ^ 6 warnings generated. [ 68%] Building CXX object libraries/chain/CMakeFiles/eos_chain.dir/wasm_interface.cpp.o /home/slava/dev/eos/libraries/chain/wasm_interface.cpp:83:2: warning: TODO: wasm memcpy has undefined behavior if memory ranges overlap [-W#warnings]

warning TODO: wasm memcpy has undefined behavior if memory ranges overlap

^ /home/slava/dev/eos/libraries/chain/wasm_interface.cpp:80:10: warning: unused variable 'dst_end' [-Wunused-variable] char dst_end = &memoryRef( mem, dstp+uint32_t(len)); ^ /home/slava/dev/eos/libraries/chain/wasm_interface.cpp:81:16: warning: unused variable 'src_end' [-Wunused-variable] const char src_end = &memoryRef( mem, srcp+uint32_t(len) ); ^ /home/slava/dev/eos/libraries/chain/wasm_interface.cpp:200:15: warning: unused variable 'end' [-Wunused-variable] const char* end = &Runtime::memoryRef( Runtime::getDefaultMemory(wasm_interface::get().current_module), charptr+size); ^ /home/slava/dev/eos/libraries/chain/wasm_interface.cpp:214:10: warning: unused variable 'c' [-Wunused-variable] char& c = Runtime::memoryRef( Runtime::getDefaultMemory(wasm_interface::get().current_module), charptr ); ^ /home/slava/dev/eos/libraries/chain/wasm_interface.cpp:356:2: warning: TODO: free existing module if the code has been updated, currently leak memory [-W#warnings]

warning TODO: free existing module if the code has been updated, currently leak memory

^ /home/slava/dev/eos/libraries/chain/wasm_interface.cpp:43:10: error: no matching function for call to 'memcpy' memcpy( o.value.data(), value, valuelen ); ^~ /usr/include/boost/multi_index_container.hpp:813:5: note: in instantiation of function template specialization 'eos::chain::storenonei32i32i32i32(NativeTypes::i32, NativeTypes::i32, NativeTypes::i32, NativeTypes::i32)::(anonymous class)::operator()' requested here mod(const_cast<value_type&>(x->value())); ^ /usr/include/boost/multi_index/detail/index_base.hpp:276:21: note: in instantiation of function template specialization 'boost::multi_index::multi_index_container<eos::chain::key_value_object, boost::multi_index::indexed_by<boost::multi_index::ordered_unique<boost::multi_index::tag<byid, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na>, boost::multi_index::member<eos::chain::key_value_object, chainbase::oid, &eos::chain::key_valueobject::id>, mpl::na>, boost::multi_index::ordered_unique<boost::multi_index::tag<eos::chain::by_scopekey, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na>, boost::multi_index::composite_key<eos::chain::key_value_object, boost::multi_index::member<eos::chain::key_value_object, fc::fixed_string<fc::array<unsigned long, 4> >, &eos::chain::key_value_object::scope>, boost::multi_index::member<eos::chain::key_value_object, boost::container::basic_string<char, std::char_traits, boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0>, 0>, iset_index> > >, &eos::chain::key_value_object::key>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::multi_index::composite_key_compare<std::less<fc::fixed_string<fc::array<unsigned long, 4> > >, chainbase::strcmp_less, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::nulltype> >, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl_::na>, boost::interprocess::allocator<eos::chain::key_value_object, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0>, 0>, isetindex> > >::modify<(lambda at /home/slava/dev/eos/libraries/chain/wasminterface.cpp:41:24)>' requested here {return final().modify(mod,x);} ^ /usr/include/boost/multi_index/detail/ord_index_impl.hpp:418:18: note: in instantiation of function template specialization 'boost::multi_index::detail::index_base<eos::chain::key_value_object, boost::multi_index::indexed_by<boost::multi_index::ordered_unique<boost::multi_index::tag<byid, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na>, boost::multi_index::member<eos::chain::key_value_object, chainbase::oid, &eos::chain::key_valueobject::id>, mpl::na>, boost::multi_index::ordered_unique<boost::multi_index::tag<eos::chain::by_scopekey, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na>, boost::multi_index::composite_key<eos::chain::key_value_object, boost::multi_index::member<eos::chain::key_value_object, fc::fixed_string<fc::array<unsigned long, 4> >, &eos::chain::key_value_object::scope>, boost::multi_index::member<eos::chain::key_value_object, boost::container::basic_string<char, std::char_traits, boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0>, 0>, iset_index> > >, &eos::chain::key_value_object::key>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::multi_index::composite_key_compare<std::less<fc::fixed_string<fc::array<unsigned long, 4> > >, chainbase::strcmp_less, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::nulltype> >, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl_::na>, boost::interprocess::allocator<eos::chain::key_value_object, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0>, 0>, iset_index> > >::finalmodify<(lambda at /home/slava/dev/eos/libraries/chain/wasm_interface.cpp:41:24)>' requested here return this->finalmodify( ^ /home/slava/dev/eos/libraries/chainbase/include/chainbase/chainbase.hpp:227:32: note: in instantiation of function template specialization 'boost::multi_index::detail::ordered_index_impl<boost::multi_index::member<eos::chain::key_value_object, chainbase::oid, &eos::chain::key_value_object::id>, std::less<chainbase::oid >, boost::multi_index::detail::nth_layer<1, eos::chain::key_value_object, boost::multi_index::indexed_by<boost::multi_index::ordered_unique<boost::multi_index::tag<byid, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na>, boost::multi_index::member<eos::chain::key_value_object, chainbase::oid, &eos::chain::key_valueobject::id>, mpl::na>, boost::multi_index::ordered_unique<boost::multi_index::tag<eos::chain::by_scopekey, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na>, boost::multi_index::composite_key<eos::chain::key_value_object, boost::multi_index::member<eos::chain::key_value_object, fc::fixed_string<fc::array<unsigned long, 4> >, &eos::chain::key_value_object::scope>, boost::multi_index::member<eos::chain::key_value_object, boost::container::basic_string<char, std::char_traits, boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0>, 0>, iset_index> > >, &eos::chain::key_value_object::key>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::multi_index::composite_key_compare<std::less<fc::fixed_string<fc::array<unsigned long, 4> > >, chainbase::strcmp_less, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::nulltype> >, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl_::na>, boost::interprocess::allocator<eos::chain::key_value_object, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0>, 0>, iset_index> > >, boost::mpl::v_item<byid, boost::mpl::vector0<mpl::na>, 0>, boost::multi_index::detail::ordered_unique_tag, boost::multi_index::detail::null_augment_policy>::modify<(lambda at /home/slava/dev/eos/libraries/chain/wasm_interface.cpp:41:24)>' requested here auto ok = _indices.modify( _indices.iterator_to( obj ), m ); ^ /home/slava/dev/eos/libraries/chainbase/include/chainbase/chainbase.hpp:861:46: note: in instantiation of function template specialization 'chainbase::generic_index<boost::multi_index::multi_index_container<eos::chain::key_value_object, boost::multi_index::indexed_by<boost::multi_index::ordered_unique<boost::multi_index::tag<byid, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na>, boost::multi_index::member<eos::chain::key_value_object, chainbase::oid, &eos::chain::key_valueobject::id>, mpl::na>, boost::multi_index::ordered_unique<boost::multi_index::tag<eos::chain::by_scopekey, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na>, boost::multi_index::composite_key<eos::chain::key_value_object, boost::multi_index::member<eos::chain::key_value_object, fc::fixed_string<fc::array<unsigned long, 4> >, &eos::chain::key_value_object::scope>, boost::multi_index::member<eos::chain::key_value_object, boost::container::basic_string<char, std::char_traits, boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0>, 0>, iset_index> > >, &eos::chain::key_value_object::key>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::multi_index::composite_key_compare<std::less<fc::fixed_string<fc::array<unsigned long, 4> > >, chainbase::strcmp_less, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::nulltype> >, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl::na, mpl_::na>, boost::interprocess::allocator<eos::chain::key_value_object, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0>, 0>, iset_index> > > >::modify<(lambda at /home/slava/dev/eos/libraries/chain/wasm_interface.cpp:41:24) &>' requested here get_mutable_index().modify( obj, m ); ^ /home/slava/dev/eos/libraries/chain/wasm_interface.cpp:41:10: note: in instantiation of function template specialization 'chainbase::database::modify<eos::chain::key_value_object, (lambda at /home/slava/dev/eos/libraries/chain/wasm_interface.cpp:41:24)>' requested here db.modify( obj, [&]( auto& o ) { ^ /usr/include/string.h:42:14: note: candidate function not viable: no known conversion from 'const char ' to 'void __restrict' for 1st argument extern void memcpy (void restrict dest, const void restrict src, ^ 6 warnings and 1 error generated. libraries/chain/CMakeFiles/eos_chain.dir/build.make:86: recipe for target 'libraries/chain/CMakeFiles/eos_chain.dir/wasm_interface.cpp.o' failed make[2]: [libraries/chain/CMakeFiles/eos_chain.dir/wasm_interface.cpp.o] Error 1 CMakeFiles/Makefile2:1121: recipe for target 'libraries/chain/CMakeFiles/eos_chain.dir/all' failed make[1]: [libraries/chain/CMakeFiles/eos_chain.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2 `

pmesnier commented 7 years ago

Hi, are you using boost 1.64? We upped the required version since at least the String classes did not supply a non-const data() accessor until 1.64. Perhaps that's the case with other containers too.

nathanielhourt commented 7 years ago

@peterwillcn You don't include the error in that log, so I have no idea what's going wrong. :P

@bitcoiners Pull the latest and try again; that error should be fixed.

And yes, everybody make sure you're on boost 1.64 :)

bitcoiners commented 7 years ago

thanks, pulling latest helped, build works now.

dmf7z commented 7 years ago

Same experience here. Compiles ok with clang but not g++.

One of many reasons project does not compile with g++ is because this bug in the compiler: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67274

That is why this line fails: eos/libraries/chain/chain_controller.cpp:829

std::for_each(messages.begin(), messages.end(), [this](const auto& m) { process_message(m); });

More info here: https://stackoverflow.com/questions/32097759/calling-this-member-function-from-generic-lambda-clang-vs-gcc

Changing it to

std::for_each(messages.begin(), messages.end(), [this](const Message& m) { process_message(m); });

fixes it, but there is still more work to do to make it compile with g++

dmf7z commented 7 years ago

Created PR to make it compile with g++: https://github.com/EOSIO/eos/pull/41 Tried with version 5.4

peterwillcn commented 7 years ago
[ 61%] Building CXX object libraries/wasm-jit/Source/Programs/CMakeFiles/Disassemble.dir/Disassemble.cpp.o
/tmp/eos/plugins/database_plugin/database_plugin.cpp:52:13: error: no matching constructor for initialization of 'chainbase::database'
   my->db = chainbase::database(my->shared_memory_dir,
            ^                   ~~~~~~~~~~~~~~~~~~~~~~
/tmp/eos/libraries/chainbase/include/chainbase/chainbase.hpp:651:10: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 3 were provided
   class database
         ^
/tmp/eos/libraries/chainbase/include/chainbase/chainbase.hpp:651:10: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 3 were provided
/tmp/eos/libraries/chainbase/include/chainbase/chainbase.hpp:651:10: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 3 were provided
1 error generated.
plugins/database_plugin/CMakeFiles/database_plugin.dir/build.make:62: recipe for target 'plugins/database_plugin/CMakeFiles/database_plugin.dir/database_plugin.cpp.o' failed
make[2]: *** [plugins/database_plugin/CMakeFiles/database_plugin.dir/database_plugin.cpp.o] Error 1
make[1]: *** [plugins/database_plugin/CMakeFiles/database_plugin.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
pmesnier commented 7 years ago

Hi @peterwillcn, how do you update your repository from github? Do you do a git pull or do you do git fetch / git rebase? I do the latter and I see that oddly the rebase ends up re-applying a May 28 patch by @nathanhourt which defines the ctor you lack. Even stranger, this patch isn't included in EOSIO/chainbase history for chainbase.hpp. Here's the description for the missing commit:

commit d54f69a81ad3597785aa6e2f84f5ae905f203047 Author: Nathan Hourt nat.hourt@gmail.com Date: Sun May 28 20:48:09 2017 -0500

Refactor database for RAII compliance

Make chainbase::database implement RAII by having the constructor open and the destructor close.
As long as the database is constructed, it should be properly open and ready to use.

Nathan, does that ring a bell? I sure don't remember where I fetched that from. But that it is not in the github chain for chainbase.hpp explains why my local git reapplies it after a rebase.

peterwillcn commented 7 years ago

@nathanhourt @pmesnier Fix it, see https://github.com/EOSIO/chainbase/pull/1/files

nathanielhourt commented 7 years ago

I'm not sure what happened here... but I merged the preq. Is everything in order now?

peterwillcn commented 7 years ago

@nathanhourt Great, everything works now.

nathanielhourt commented 7 years ago

Great! I'm closing this issue since it's been home to several errors which may or may not be fixed. Create a new issue if something is still broken.

sionnow0 commented 7 years ago

./build.sh ubuntu full

…………

-- Installing: /root/opt/wasm/lib/cmake/llvm/./HandleLLVMOptions.cmake -- Installing: /root/opt/wasm/lib/cmake/llvm/./LLVMInstallSymlink.cmake -- Installing: /root/opt/wasm/lib/cmake/llvm/./TableGen.cmake -- Installing: /root/opt/wasm/lib/cmake/llvm/./CheckCompilerVersion.cmake -- Installing: /root/opt/wasm/lib/cmake/llvm/./HandleLLVMStdlib.cmake -- Installing: /root/opt/wasm/lib/cmake/llvm/./CheckLinkerFlag.cmake -- Installing: /root/opt/wasm/lib/cmake/llvm/./CrossCompile.cmake -- Installing: /root/opt/wasm/lib/cmake/llvm/./GetSVN.cmake -- Installing: /root/opt/wasm/lib/cmake/llvm/./AddLLVM.cmake -- Installing: /root/opt/wasm/lib/cmake/llvm/./AddOCaml.cmake -- Installing: /root/opt/wasm/lib/cmake/llvm/./LLVMExternalProjectUtils.cmake -- The CXX compiler identification is unknown CMake Error at CMakeLists.txt:2 (project): The CMAKE_CXX_COMPILER:

clang++-4.0

is not a full path and was not found in the PATH.

Tell CMake where to find the compiler by setting either the environment variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred! See also "/home/eos_new/eos/build/CMakeFiles/CMakeOutput.log". See also "/home/eos_new/eos/build/CMakeFiles/CMakeError.log". make: *** No targets specified and no makefile found. Stop.

============================ Ubuntu 14.04.5 LTS gcc --version gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4 clang -v clang version 4.0.0 (tags/RELEASE_400/final) Target: x86_64-unknown-linux-gnu cmake --version cmake version 3.9.0

can you help me ?