I tried to install ns2 on 4.9.68-1-MANJARO but got this error
mdart/mdart_adp.cc:396:21: error: reference to ‘hash’ is ambiguous
nsaddr_t dstAdd_ = hash(mdart_->id_);
^~~~
In file included from ./mdart/mdart.h:52:0,
from ./mdart/mdart_adp.h:51,
from mdart/mdart_adp.cc:47:
./mdart/mdart_function.h:230:17: note: candidates are: nsaddr_t hash(nsaddr_t)
inline nsaddr_t hash(nsaddr_t id) {
^~~~
In file included from /usr/include/c++/7.2.1/bits/basic_string.h:6575:0,
from /usr/include/c++/7.2.1/string:52,
from /usr/include/c++/7.2.1/bitset:47,
from ./mdart/mdart_function.h:62,
from ./mdart/mdart.h:52,
from ./mdart/mdart_adp.h:51,
from mdart/mdart_adp.cc:47:
/usr/include/c++/7.2.1/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
make: *** [Makefile:94: mdart/mdart_adp.o] Error 1
Ns make failed!
I changed line 137 from
void eraseAll() {erase(baseMap::begin(), baseMap::end()); }
to
void eraseAll() { baseMap::erase(baseMap::begin(), baseMap::end()); }
but, still got the same error. Please help me.