BitShares Forum
Main => Technical Support => Topic started by: fluxer555 on January 22, 2015, 04:31:21 am
-
I'm getting this error:
/Users/jules/bitshares/libraries/db/include/bts/db/fast_level_map.hpp:117:16: error:
no viable conversion from 'const_iterator' (aka
'__hash_map_const_iterator<typename __table::const_iterator>') to
'decltype(this->_cache.find(key))' (aka '__hash_map_iterator<typename
__table::iterator>')
return _cache.find( key );
^~~~~~~~~~~~~~~~~~
/Users/jules/bitshares/libraries/blockchain/chain_database.cpp:3853:56: note:
in instantiation of member function
'bts::db::fast_level_map<fc::signed_int,
bts::blockchain::account_record>::unordered_find' requested here
const auto iter = my->_account_id_to_record.unordered_find( id );
^
/usr/bin/../lib/c++/v1/unordered_map:546:24: note: candidate constructor (the
implicit copy constructor) not viable: no known conversion from
'const_iterator' (aka '__hash_map_const_iterator<typename
__table::const_iterator>') to 'const
std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::pair<fc::signed_int,
bts::blockchain::account_record>, void *> *> > &' for 1st argument
class _LIBCPP_TYPE_VIS __hash_map_iterator
^
/usr/bin/../lib/c++/v1/unordered_map:546:24: note: candidate constructor (the
implicit move constructor) not viable: no known conversion from
'const_iterator' (aka '__hash_map_const_iterator<typename
__table::const_iterator>') to
'std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::pair<fc::signed_int,
bts::blockchain::account_record>, void *> *> > &&' for 1st argument
class _LIBCPP_TYPE_VIS __hash_map_iterator
^
/usr/bin/../lib/c++/v1/unordered_map:570:5: note: candidate constructor not
viable: no known conversion from 'const_iterator' (aka
'__hash_map_const_iterator<typename __table::const_iterator>') to
'std::__1::__hash_iterator<std::__1::__hash_node<std::__1::pair<fc::signed_int,
bts::blockchain::account_record>, void *> *>' for 1st argument
__hash_map_iterator(_HashIterator __i) _NOEXCEPT : __i_(__i) {}
^
In file included from /Users/jules/bitshares/libraries/blockchain/chain_database.cpp:2:
In file included from /Users/jules/bitshares/libraries/blockchain/include/bts/blockchain/chain_database_impl.hpp:5:
/Users/jules/bitshares/libraries/db/include/bts/db/fast_level_map.hpp:117:16: error:
no viable conversion from 'const_iterator' (aka
'__hash_map_const_iterator<typename __table::const_iterator>') to
'decltype(this->_cache.find(key))' (aka '__hash_map_iterator<typename
__table::iterator>')
return _cache.find( key );
^~~~~~~~~~~~~~~~~~
/Users/jules/bitshares/libraries/blockchain/chain_database.cpp:3860:54: note:
in instantiation of member function
'bts::db::fast_level_map<std::__1::basic_string<char>,
fc::signed_int>::unordered_find' requested here
const auto iter = my->_account_name_to_id.unordered_find( name );
^
/usr/bin/../lib/c++/v1/unordered_map:546:24: note: candidate constructor (the
implicit copy constructor) not viable: no known conversion from
'const_iterator' (aka '__hash_map_const_iterator<typename
__table::const_iterator>') to 'const
std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::pair<std::__1::basic_string<char>,
fc::signed_int>, void *> *> > &' for 1st argument
class _LIBCPP_TYPE_VIS __hash_map_iterator
^
/usr/bin/../lib/c++/v1/unordered_map:546:24: note: candidate constructor (the
implicit move constructor) not viable: no known conversion from
'const_iterator' (aka '__hash_map_const_iterator<typename
__table::const_iterator>') to
'std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::pair<std::__1::basic_string<char>,
fc::signed_int>, void *> *> > &&' for 1st argument
class _LIBCPP_TYPE_VIS __hash_map_iterator
^
/usr/bin/../lib/c++/v1/unordered_map:570:5: note: candidate constructor not
viable: no known conversion from 'const_iterator' (aka
'__hash_map_const_iterator<typename __table::const_iterator>') to
'std::__1::__hash_iterator<std::__1::__hash_node<std::__1::pair<std::__1::basic_string<char>,
fc::signed_int>, void *> *>' for 1st argument
__hash_map_iterator(_HashIterator __i) _NOEXCEPT : __i_(__i) {}
^
In file included from /Users/jules/bitshares/libraries/blockchain/chain_database.cpp:2:
In file included from /Users/jules/bitshares/libraries/blockchain/include/bts/blockchain/chain_database_impl.hpp:5:
/Users/jules/bitshares/libraries/db/include/bts/db/fast_level_map.hpp:117:16: error:
no viable conversion from 'const_iterator' (aka
'__hash_map_const_iterator<typename __table::const_iterator>') to
'decltype(this->_cache.find(key))' (aka '__hash_map_iterator<typename
__table::iterator>')
return _cache.find( key );
^~~~~~~~~~~~~~~~~~
/Users/jules/bitshares/libraries/blockchain/chain_database.cpp:3867:57: note:
in instantiation of member function
'bts::db::fast_level_map<bts::blockchain::address,
fc::signed_int>::unordered_find' requested here
const auto iter = my->_account_address_to_id.unordered_find( addr );
^
/usr/bin/../lib/c++/v1/unordered_map:546:24: note: candidate constructor (the
implicit copy constructor) not viable: no known conversion from
'const_iterator' (aka '__hash_map_const_iterator<typename
__table::const_iterator>') to 'const
std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::pair<bts::blockchain::address,
fc::signed_int>, void *> *> > &' for 1st argument
class _LIBCPP_TYPE_VIS __hash_map_iterator
^
/usr/bin/../lib/c++/v1/unordered_map:546:24: note: candidate constructor (the
implicit move constructor) not viable: no known conversion from
'const_iterator' (aka '__hash_map_const_iterator<typename
__table::const_iterator>') to
'std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::pair<bts::blockchain::address,
fc::signed_int>, void *> *> > &&' for 1st argument
class _LIBCPP_TYPE_VIS __hash_map_iterator
^
/usr/bin/../lib/c++/v1/unordered_map:570:5: note: candidate constructor not
viable: no known conversion from 'const_iterator' (aka
'__hash_map_const_iterator<typename __table::const_iterator>') to
'std::__1::__hash_iterator<std::__1::__hash_node<std::__1::pair<bts::blockchain::address,
fc::signed_int>, void *> *>' for 1st argument
__hash_map_iterator(_HashIterator __i) _NOEXCEPT : __i_(__i) {}
^
In file included from /Users/jules/bitshares/libraries/blockchain/chain_database.cpp:2:
In file included from /Users/jules/bitshares/libraries/blockchain/include/bts/blockchain/chain_database_impl.hpp:5:
/Users/jules/bitshares/libraries/db/include/bts/db/fast_level_map.hpp:117:16: error:
no viable conversion from 'const_iterator' (aka
'__hash_map_const_iterator<typename __table::const_iterator>') to
'decltype(this->_cache.find(key))' (aka '__hash_map_iterator<typename
__table::iterator>')
return _cache.find( key );
^~~~~~~~~~~~~~~~~~
/Users/jules/bitshares/libraries/blockchain/chain_database.cpp:3919:54: note:
in instantiation of member function
'bts::db::fast_level_map<fc::signed_int,
bts::blockchain::asset_record>::unordered_find' requested here
const auto iter = my->_asset_id_to_record.unordered_find( id );
^
/usr/bin/../lib/c++/v1/unordered_map:546:24: note: candidate constructor (the
implicit copy constructor) not viable: no known conversion from
'const_iterator' (aka '__hash_map_const_iterator<typename
__table::const_iterator>') to 'const
std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::pair<fc::signed_int,
bts::blockchain::asset_record>, void *> *> > &' for 1st argument
class _LIBCPP_TYPE_VIS __hash_map_iterator
^
/usr/bin/../lib/c++/v1/unordered_map:546:24: note: candidate constructor (the
implicit move constructor) not viable: no known conversion from
'const_iterator' (aka '__hash_map_const_iterator<typename
__table::const_iterator>') to
'std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::pair<fc::signed_int,
bts::blockchain::asset_record>, void *> *> > &&' for 1st argument
class _LIBCPP_TYPE_VIS __hash_map_iterator
^
/usr/bin/../lib/c++/v1/unordered_map:570:5: note: candidate constructor not
viable: no known conversion from 'const_iterator' (aka
'__hash_map_const_iterator<typename __table::const_iterator>') to
'std::__1::__hash_iterator<std::__1::__hash_node<std::__1::pair<fc::signed_int,
bts::blockchain::asset_record>, void *> *>' for 1st argument
__hash_map_iterator(_HashIterator __i) _NOEXCEPT : __i_(__i) {}
^
In file included from /Users/jules/bitshares/libraries/blockchain/chain_database.cpp:2:
In file included from /Users/jules/bitshares/libraries/blockchain/include/bts/blockchain/chain_database_impl.hpp:5:
/Users/jules/bitshares/libraries/db/include/bts/db/fast_level_map.hpp:117:16: error:
no viable conversion from 'const_iterator' (aka
'__hash_map_const_iterator<typename __table::const_iterator>') to
'decltype(this->_cache.find(key))' (aka '__hash_map_iterator<typename
__table::iterator>')
return _cache.find( key );
^~~~~~~~~~~~~~~~~~
/Users/jules/bitshares/libraries/blockchain/chain_database.cpp:3958:50: note:
in instantiation of member function
'bts::db::fast_level_map<bts::blockchain::address,
bts::blockchain::balance_record>::unordered_find' requested here
auto iter = my->_balance_id_to_record.unordered_find( id );
^
/usr/bin/../lib/c++/v1/unordered_map:546:24: note: candidate constructor (the
implicit copy constructor) not viable: no known conversion from
'const_iterator' (aka '__hash_map_const_iterator<typename
__table::const_iterator>') to 'const
std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::pair<bts::blockchain::address,
bts::blockchain::balance_record>, void *> *> > &' for 1st argument
class _LIBCPP_TYPE_VIS __hash_map_iterator
^
/usr/bin/../lib/c++/v1/unordered_map:546:24: note: candidate constructor (the
implicit move constructor) not viable: no known conversion from
'const_iterator' (aka '__hash_map_const_iterator<typename
__table::const_iterator>') to
'std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::pair<bts::blockchain::address,
bts::blockchain::balance_record>, void *> *> > &&' for 1st argument
class _LIBCPP_TYPE_VIS __hash_map_iterator
^
/usr/bin/../lib/c++/v1/unordered_map:570:5: note: candidate constructor not
viable: no known conversion from 'const_iterator' (aka
'__hash_map_const_iterator<typename __table::const_iterator>') to
'std::__1::__hash_iterator<std::__1::__hash_node<std::__1::pair<bts::blockchain::address,
bts::blockchain::balance_record>, void *> *>' for 1st argument
__hash_map_iterator(_HashIterator __i) _NOEXCEPT : __i_(__i) {}
^
5 errors generated.
make[2]: *** [libraries/blockchain/CMakeFiles/bts_blockchain.dir/chain_database.cpp.o] Error 1
make[1]: *** [libraries/blockchain/CMakeFiles/bts_blockchain.dir/all] Error 2
make: *** [all] Error 2
I installed all dependencies. Can anyone decipher this error as to what went wrong?
-
What compiler version?
-
Please excuse my ignorance, but how do I find this?
-
Please excuse my ignorance, but how do I find this?
Hmm, I think on Mac if you haven't installed anything extra and just do "gcc -v", it will print it.
-
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix
-
That's pretty strange. It's a fairly recent compiler I don't understand why this would be failing. Did this used to work before in an older version?
-
Yes, I was able to compile all 0.4.x versions fine. Any ideas on how to debug? Should I try 0.5.0? I understand there were only GUI differences.
-
I'm having a problem building with OSX as well and currently stuck on block 566049. How can I force a rescan or re-index? Also, anyone know where the files are located so I can clear out old files if necessary?
-
Yes, I was able to compile all 0.4.x versions fine. Any ideas on how to debug? Should I try 0.5.0? I understand there were only GUI differences.
Are you familiar with C++ at all? It seems to be unhappy with what I've done here: https://github.com/BitShares/bitshares/blob/8c908f81510e7103b41323bcf5a5731047c59994/libraries/db/include/bts/db/fast_level_map.hpp#L115-L118
We will likely have to change the way this is written, but it's going to be difficult for me to figure out because mine compiles fine.
-
I'm afraid I'm not familiar at all, I only have experience with Python and JavaScript.Should I try updating my XCode libraries?
Yellowecho, what problems are you running into when compiling? Are they the same as mine? Also, how are you having sync problems when you can't even compile?
-
I'm afraid I'm not familiar at all, I only have experience with Python and JavaScript.Should I try updating my XCode libraries?
See if you can update XCode, if that fixes it then I guess we are okay--this is the only report like this that I have seen.