Jump to content

Recommended Posts

Hey guys, I'm trying compile game core with clang, but i have error in boost lib and I'm not sure how can i resolve this problem

i tried 3 version of boost 1.43;1.66;1.67 and i got 2 different error.

 

Boost 1.43:
 

Spoiler

compile BattleArena.cpp
In file included from BattleArena.cpp:6:
In file included from ./char.h:4:
In file included from /usr/include/boost/unordered_map.hpp:16:
In file included from /usr/include/boost/unordered/unordered_map.hpp:17:
In file included from /usr/include/boost/functional/hash.hpp:6:
In file included from /usr/include/boost/functional/hash/hash.hpp:494:
/usr/include/boost/functional/hash/extensions.hpp:34:33: error: reference to
      'pair' is ambiguous
    std::size_t hash_value(std::pair<A, B> const&);
                           ~~~~~^
/usr/include/c++/v1/utility:309:29: note: candidate found by name lookup is
      'std::__1::pair'
struct _LIBCPP_TEMPLATE_VIS pair
                            ^
/usr/include/boost/detail/container_fwd.hpp:92:42: note: candidate found by name
      lookup is 'std::pair'
    template <class T1, class T2> struct pair;
                                         ^
In file included from BattleArena.cpp:6:
In file included from ./char.h:4:
In file included from /usr/include/boost/unordered_map.hpp:16:
In file included from /usr/include/boost/unordered/unordered_map.hpp:17:
In file included from /usr/include/boost/functional/hash.hpp:6:
In file included from /usr/include/boost/functional/hash/hash.hpp:494:
/usr/include/boost/functional/hash/extensions.hpp:34:33: error: no template
      named 'pair' in namespace 'std'
    std::size_t hash_value(std::pair<A, B> const&);
                           ~~~~~^
/usr/include/boost/functional/hash/extensions.hpp:34:44: error: expected ')'
    std::size_t hash_value(std::pair<A, B> const&);
                                           ^
/usr/include/boost/functional/hash/extensions.hpp:34:27: note: to match this '('
    std::size_t hash_value(std::pair<A, B> const&);
                          ^
/usr/include/boost/functional/hash/extensions.hpp:36:33: error: reference to
      'vector' is ambiguous
    std::size_t hash_value(std::vector<T, A> const&);
                           ~~~~~^
/usr/include/c++/v1/vector:450:28: note: candidate found by name lookup is
      'std::__1::vector'
class _LIBCPP_TEMPLATE_VIS vector
                           ^
/usr/include/boost/detail/container_fwd.hpp:82:47: note: candidate found by name
      lookup is 'std::vector'
    template <class T, class Allocator> class vector;
                                              ^
In file included from BattleArena.cpp:6:
In file included from ./char.h:4:
In file included from /usr/include/boost/unordered_map.hpp:16:
In file included from /usr/include/boost/unordered/unordered_map.hpp:17:
In file included from /usr/include/boost/functional/hash.hpp:6:
In file included from /usr/include/boost/functional/hash/hash.hpp:494:
/usr/include/boost/functional/hash/extensions.hpp:36:33: error: no template
      named 'vector' in namespace 'std'
    std::size_t hash_value(std::vector<T, A> const&);
                           ~~~~~^
/usr/include/boost/functional/hash/extensions.hpp:36:46: error: expected ')'
    std::size_t hash_value(std::vector<T, A> const&);
                                             ^
/usr/include/boost/functional/hash/extensions.hpp:36:27: note: to match this '('
    std::size_t hash_value(std::vector<T, A> const&);
                          ^
/usr/include/boost/functional/hash/extensions.hpp:38:33: error: reference to
      'list' is ambiguous
    std::size_t hash_value(std::list<T, A> const& v);
                           ~~~~~^
/usr/include/c++/v1/list:803:28: note: candidate found by name lookup is
      'std::__1::list'
class _LIBCPP_TEMPLATE_VIS list
                           ^
/usr/include/boost/detail/container_fwd.hpp:81:47: note: candidate found by name
      lookup is 'std::list'
    template <class T, class Allocator> class list;
                                              ^
In file included from BattleArena.cpp:6:
In file included from ./char.h:4:
In file included from /usr/include/boost/unordered_map.hpp:16:
In file included from /usr/include/boost/unordered/unordered_map.hpp:17:
In file included from /usr/include/boost/functional/hash.hpp:6:
In file included from /usr/include/boost/functional/hash/hash.hpp:494:
/usr/include/boost/functional/hash/extensions.hpp:38:33: error: no template
      named 'list' in namespace 'std'
    std::size_t hash_value(std::list<T, A> const& v);
                           ~~~~~^
/usr/include/boost/functional/hash/extensions.hpp:38:44: error: expected ')'
    std::size_t hash_value(std::list<T, A> const& v);
                                           ^
/usr/include/boost/functional/hash/extensions.hpp:38:27: note: to match this '('
    std::size_t hash_value(std::list<T, A> const& v);
                          ^
/usr/include/boost/functional/hash/extensions.hpp:40:33: error: reference to
      'deque' is ambiguous
    std::size_t hash_value(std::deque<T, A> const& v);
                           ~~~~~^
/usr/include/c++/v1/deque:1186:28: note: candidate found by name lookup is
      'std::__1::deque'
class _LIBCPP_TEMPLATE_VIS deque
                           ^
/usr/include/boost/detail/container_fwd.hpp:78:47: note: candidate found by name
      lookup is 'std::deque'
    template <class T, class Allocator> class deque;
                                              ^
In file included from BattleArena.cpp:6:
In file included from ./char.h:4:
In file included from /usr/include/boost/unordered_map.hpp:16:
In file included from /usr/include/boost/unordered/unordered_map.hpp:17:
In file included from /usr/include/boost/functional/hash.hpp:6:
In file included from /usr/include/boost/functional/hash/hash.hpp:494:
/usr/include/boost/functional/hash/extensions.hpp:40:33: error: no template
      named 'deque' in namespace 'std'
    std::size_t hash_value(std::deque<T, A> const& v);
                           ~~~~~^
/usr/include/boost/functional/hash/extensions.hpp:40:45: error: expected ')'
    std::size_t hash_value(std::deque<T, A> const& v);
                                            ^
/usr/include/boost/functional/hash/extensions.hpp:40:27: note: to match this '('
    std::size_t hash_value(std::deque<T, A> const& v);
                          ^
/usr/include/boost/functional/hash/extensions.hpp:42:33: error: reference to
      'set' is ambiguous
    std::size_t hash_value(std::set<K, C, A> const& v);
                           ~~~~~^
/usr/include/c++/v1/set:400:28: note: candidate found by name lookup is
      'std::__1::set'
class _LIBCPP_TEMPLATE_VIS set
                           ^
/usr/include/boost/detail/container_fwd.hpp:86:64: note: candidate found by name
      lookup is 'std::set'
    template <class Key, class Compare, class Allocator> class set;
                                                               ^
In file included from BattleArena.cpp:6:
In file included from ./char.h:4:
In file included from /usr/include/boost/unordered_map.hpp:16:
In file included from /usr/include/boost/unordered/unordered_map.hpp:17:
In file included from /usr/include/boost/functional/hash.hpp:6:
In file included from /usr/include/boost/functional/hash/hash.hpp:494:
/usr/include/boost/functional/hash/extensions.hpp:42:33: error: no template
      named 'set' in namespace 'std'
    std::size_t hash_value(std::set<K, C, A> const& v);
                           ~~~~~^
/usr/include/boost/functional/hash/extensions.hpp:42:46: error: expected ')'
    std::size_t hash_value(std::set<K, C, A> const& v);
                                             ^
/usr/include/boost/functional/hash/extensions.hpp:42:27: note: to match this '('
    std::size_t hash_value(std::set<K, C, A> const& v);
                          ^
/usr/include/boost/functional/hash/extensions.hpp:44:33: error: reference to
      'multiset' is ambiguous
    std::size_t hash_value(std::multiset<K, C, A> const& v);
                           ~~~~~^
/usr/include/c++/v1/set:813:28: note: candidate found by name lookup is
      'std::__1::multiset'
class _LIBCPP_TEMPLATE_VIS multiset
                           ^
/usr/include/boost/detail/container_fwd.hpp:87:64: note: candidate found by name
      lookup is 'std::multiset'
    template <class Key, class Compare, class Allocator> class multiset;
                                                               ^
In file included from BattleArena.cpp:6:
In file included from ./char.h:4:
In file included from /usr/include/boost/unordered_map.hpp:16:
In file included from /usr/include/boost/unordered/unordered_map.hpp:17:
In file included from /usr/include/boost/functional/hash.hpp:6:
In file included from /usr/include/boost/functional/hash/hash.hpp:494:
/usr/include/boost/functional/hash/extensions.hpp:44:33: error: no template
      named 'multiset' in namespace 'std'
    std::size_t hash_value(std::multiset<K, C, A> const& v);
                           ~~~~~^
/usr/include/boost/functional/hash/extensions.hpp:44:51: error: expected ')'
    std::size_t hash_value(std::multiset<K, C, A> const& v);
                                                  ^
/usr/include/boost/functional/hash/extensions.hpp:44:27: note: to match this '('
    std::size_t hash_value(std::multiset<K, C, A> const& v);
                          ^
/usr/include/boost/functional/hash/extensions.hpp:46:33: error: reference to
      'map' is ambiguous
    std::size_t hash_value(std::map<K, T, C, A> const& v);
                           ~~~~~^
/usr/include/c++/v1/__tree:1465:77: note: candidate found by name lookup is
      'std::__1::map'
    template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS map;
                                                                            ^
/usr/include/boost/detail/container_fwd.hpp:83:73: note: candidate found by name
      lookup is 'std::map'
    template <class Key, class T, class Compare, class Allocator> class map;
                                                                        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
gmake: *** [Makefile:108: OBJDIR/BattleArena.o] Error 1
 


Boost 1.66 and 1.67:
 

Spoiler

    compile char_skill.cpp
char_skill.cpp:2489:50: warning: '&&' within '||' [-Wlogical-op-parentheses]
  ...if (IsAffectFlag(AFF_TANHWAN_DASH) || pkVictim && pkVictim != this)
                                        ~~ ~~~~~~~~~^~~~~~~~~~~~~~~~~~~
char_skill.cpp:2489:50: note: place parentheses around the '&&' expression to
      silence this warning
  ...if (IsAffectFlag(AFF_TANHWAN_DASH) || pkVictim && pkVictim != this)
                                                    ^
                                           (                           )
char_skill.cpp:2595:96: warning: '&&' within '||' [-Wlogical-op-parentheses]
  ...|| pkSk->IsChargeSkill() && !IsAffectFlag(AFF_TANHWAN_DASH) && !pkVictim)
     ~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
char_skill.cpp:2595:96: note: place parentheses around the '&&' expression to
      silence this warning
  ...pkSk->IsChargeSkill() && !IsAffectFlag(AFF_TANHWAN_DASH) && !pkVictim)
                                                              ^
     (                                                                    )
char_skill.cpp:2608:87: warning: implicit conversion of NULL constant to 'DWORD'
      (aka 'unsigned int') [-Wnull-conversion]
  ...&& SKILL_HORSE_WILDATTACK != dwVnum) ? pkVictim->GetVID() : NULL,
                                                                 ^~~~
                                                                 0
In file included from char_skill.cpp:7:
In file included from ./char.h:4:
In file included from /usr/include/boost/unordered_map.hpp:17:
In file included from /usr/include/boost/unordered/unordered_map.hpp:18:
In file included from /usr/include/boost/functional/hash.hpp:6:
In file included from /usr/include/boost/container_hash/hash.hpp:760:
/usr/include/boost/container_hash/extensions.hpp:358:20: error: no matching
      function for call to 'hash_value'
            return hash_value(val);
                   ^~~~~~~~~~
/usr/include/boost/unordered/detail/implementation.hpp:2599:18: note: in
      instantiation of member function 'boost::hash<VID>::operator()' requested
      here
          return hf(x);
                 ^
/usr/include/boost/unordered/detail/implementation.hpp:3569:26: note: in
      instantiation of function template specialization
      'boost::unordered::detail::prime_policy<unsigned
      int>::apply_hash<boost::hash<VID>, VID>' requested here
          return policy::apply_hash(this->hash_function(), k);
                         ^
/usr/include/boost/unordered/detail/implementation.hpp:3581:39: note: in
      instantiation of member function
      'boost::unordered::detail::table<boost::unordered::detail::map<std::__1::allocator<std::__1::pair<const
      VID, unsigned int> >, VID, unsigned int, boost::hash<VID>,
      std::__1::equal_to<VID> > >::hash' requested here
          return this->find_node_impl(hash(k), k, this->key_eq());
                                      ^
/usr/include/boost/unordered/unordered_map.hpp:1804:30: note: in instantiation
      of member function
      'boost::unordered::detail::table<boost::unordered::detail::map<std::__1::allocator<std::__1::pair<const
      VID, unsigned int> >, VID, unsigned int, boost::hash<VID>,
      std::__1::equal_to<VID> > >::find_node' requested here
      return iterator(table_.find_node(k));
                             ^
char_skill.cpp:3559:89: note: in instantiation of member function
      'boost::unordered::unordered_map<VID, unsigned int, boost::hash<VID>,
      std::__1::equal_to<VID>, std::__1::allocator<std::__1::pair<const VID,
      unsigned int> > >::find' requested here
  ...size_t>::iterator iterTargetMap = rSkillUseInfo.TargetVIDMap.find(Target...
                                                                  ^
/usr/include/boost/container_hash/hash.hpp:535:24: note: candidate function not
      viable: no known conversion from 'const VID' to 'std::type_index' for 1st
      argument
    inline std::size_t hash_value(std::type_index v)
                       ^
/usr/include/boost/container_hash/hash.hpp:542:24: note: candidate function not
      viable: no known conversion from 'const VID' to 'const std::error_code'
      for 1st argument
    inline std::size_t hash_value(std::error_code const& v) {
                       ^
/usr/include/boost/container_hash/hash.hpp:549:24: note: candidate function not
      viable: no known conversion from 'const VID' to 'const
      std::error_condition' for 1st argument
    inline std::size_t hash_value(std::error_condition const& v) {
                       ^
/usr/include/boost/smart_ptr/intrusive_ptr.hpp:354:33: note: candidate template
      ignored: could not match 'intrusive_ptr<type-parameter-0-0>' against
      'const VID'
template< class T > std::size_t hash_value( boost::intrusive_ptr<T> cons...
                                ^
/usr/include/boost/container_hash/extensions.hpp:66:17: note: candidate template
      ignored: could not match 'pair<type-parameter-0-0, type-parameter-0-1>'
      against 'const VID'
    std::size_t hash_value(std::pair<A, B> const& v)
                ^
/usr/include/boost/container_hash/extensions.hpp:125:17: note: candidate
      template ignored: could not match 'vector<type-parameter-0-0,
      type-parameter-0-1>' against 'const VID'
    std::size_t hash_value(std::vector<T, A> const& v)
                ^
/usr/include/boost/container_hash/extensions.hpp:131:17: note: candidate
      template ignored: could not match 'list<type-parameter-0-0,
      type-parameter-0-1>' against 'const VID'
    std::size_t hash_value(std::list<T, A> const& v)
                ^
/usr/include/boost/container_hash/extensions.hpp:137:17: note: candidate
      template ignored: could not match 'deque<type-parameter-0-0,
      type-parameter-0-1>' against 'const VID'
    std::size_t hash_value(std::deque<T, A> const& v)
                ^
/usr/include/boost/container_hash/extensions.hpp:143:17: note: candidate
      template ignored: could not match 'set<type-parameter-0-0,
      type-parameter-0-1, type-parameter-0-2>' against 'const VID'
    std::size_t hash_value(std::set<K, C, A> const& v)
                ^
/usr/include/boost/container_hash/extensions.hpp:149:17: note: candidate
      template ignored: could not match 'multiset<type-parameter-0-0,
      type-parameter-0-1, type-parameter-0-2>' against 'const VID'
    std::size_t hash_value(std::multiset<K, C, A> const& v)
                ^
/usr/include/boost/container_hash/extensions.hpp:155:17: note: candidate
      template ignored: could not match 'map<type-parameter-0-0,
      type-parameter-0-1, type-parameter-0-2, type-parameter-0-3>' against
      'const VID'
    std::size_t hash_value(std::map<K, T, C, A> const& v)
                ^
/usr/include/boost/container_hash/extensions.hpp:161:17: note: candidate
      template ignored: could not match 'multimap<type-parameter-0-0,
      type-parameter-0-1, type-parameter-0-2, type-parameter-0-3>' against
      'const VID'
    std::size_t hash_value(std::multimap<K, T, C, A> const& v)
                ^
/usr/include/boost/container_hash/extensions.hpp:167:17: note: candidate
      template ignored: could not match 'complex<type-parameter-0-0>' against
      'const VID'
    std::size_t hash_value(std::complex<T> const& v)
                ^
/usr/include/boost/container_hash/extensions.hpp:177:17: note: candidate
      template ignored: could not match 'array<type-parameter-0-0, _Size>'
      against 'const VID'
    std::size_t hash_value(std::array<T, N> const& v)
                ^
/usr/include/boost/container_hash/extensions.hpp:212:24: note: candidate
      template ignored: could not match 'tuple<type-parameter-0-0...>' against
      'const VID'
    inline std::size_t hash_value(std::tuple<T...> const& v)
                       ^
/usr/include/boost/container_hash/extensions.hpp:289:24: note: candidate
      template ignored: could not match 'shared_ptr<type-parameter-0-0>' against
      'const VID'
    inline std::size_t hash_value(std::shared_ptr<T> const& x) {
                       ^
/usr/include/boost/container_hash/extensions.hpp:294:24: note: candidate
      template ignored: could not match 'unique_ptr<type-parameter-0-0,
      type-parameter-0-1>' against 'const VID'
    inline std::size_t hash_value(std::unique_ptr<T, Deleter> const& x) {
                       ^
/usr/include/boost/container_hash/hash.hpp:358:57: note: candidate template
      ignored: substitution failure [with T = VID]: no type named 'type' in
      'boost::hash_detail::basic_numbers<VID>'
    typename boost::hash_detail::basic_numbers<T>::type hash_value(T v)
                                                   ~~~~ ^
/usr/include/boost/container_hash/hash.hpp:364:56: note: candidate template
      ignored: substitution failure [with T = VID]: no type named 'type' in
      'boost::hash_detail::long_numbers<VID>'
    typename boost::hash_detail::long_numbers<T>::type hash_value(T v)
                                                  ~~~~ ^
/usr/include/boost/container_hash/hash.hpp:370:57: note: candidate template
      ignored: substitution failure [with T = VID]: no type named 'type' in
      'boost::hash_detail::ulong_numbers<VID>'
    typename boost::hash_detail::ulong_numbers<T>::type hash_value(T v)
                                                   ~~~~ ^
/usr/include/boost/container_hash/hash.hpp:376:31: note: candidate template
      ignored: disabled by 'enable_if' [with T = VID]
    typename boost::enable_if<boost::is_enum<T>, std::size_t>::type
                              ^
/usr/include/boost/container_hash/hash.hpp:384:36: note: candidate template
      ignored: could not match 'T *const' against 'const VID'
    template <class T> std::size_t hash_value(T* const& v)
                                   ^
/usr/include/boost/container_hash/hash.hpp:472:24: note: candidate template
      ignored: could not match 'const T [N]' against 'const VID'
    inline std::size_t hash_value(const T (&x)[N])
                       ^
/usr/include/boost/container_hash/hash.hpp:478:24: note: candidate template
      ignored: could not match 'T [N]' against 'const VID'
    inline std::size_t hash_value(T (&x)[N])
                       ^
/usr/include/boost/container_hash/hash.hpp:485:24: note: candidate template
      ignored: could not match 'basic_string<type-parameter-0-0,
      char_traits<type-parameter-0-0>, type-parameter-0-1>' against 'const VID'
    inline std::size_t hash_value(
                       ^
/usr/include/boost/container_hash/hash.hpp:501:57: note: candidate template
      ignored: substitution failure [with T = VID]: no type named 'type' in
      'boost::hash_detail::float_numbers<VID>'
    typename boost::hash_detail::float_numbers<T>::type hash_value(T v)
                                                   ~~~~ ^
3 warnings and 1 error generated.

    

Can someone help me with this error? Maybe i have to install another one version of boost?

Link to comment
https://metin2.dev/topic/18912-compile-game-boost-lib-error/
Share on other sites

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

  • Premium

/usr/include/boost/functional/hash/extensions.hpp:34:33: error

 

Are you using the right extern of your source?? 

Is this the first time that you compile it, or it happened after you did changes?

18 minut temu, WeedHex napisał:

/usr/include/boost/functional/hash/extensions.hpp:34:33: error

 

Are you using the right extern of your source?? 

Is this the first time that you compile it, or it happened after you did changes?

I decided to build source on Freebsd 11.1 so I installed all needed ports (clang too). Source is basic mainline_released from kraizy pack. Only what I changed is a Makefile to compile it with clang. I tried use a boost from Extern (mainline) but result is same cuz it's 1.43.

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.