I'm attempting to compile kyoto cabinet from this source, on OSX 10.9:
http://fallabs.com/kyotocabinet/pkg/kyotocabinet-1.2.76.tar.gz
But it's failing with this:
In file included from kcutil.cc:16:
In file included from ./kcutil.h:19:
./kccommon.h:92:10: fatal error: 'tr1/unordered_map' file not found
#include <tr1/unordered_map>
^
2 warnings and 1 error generated.
make: *** [kcutil.o] Error 1
It is my understanding that the C++ libraries have changed in OSX 10.9, but I am not sure how to navigate my way to a solution. Any help would be appreciated.
I got some help from a coworker. You need to fix the includes to not use TR1, it appears that Mavericks doesn't have the TR1 specification anymore
In kccommon.h
, find this code:
#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(_MSC_VER)
#include <unordered_map>
#include <unordered_set>
#else
#include <tr1/unordered_map>
#include <tr1/unordered_set>
namespace std {
using tr1::hash;
using tr1::unordered_map;
using tr1::unordered_set;
}
#endif
Remove the if else statement so that you are left with:
#include <unordered_map>
#include <unordered_set>
Try compiling again, it worked for me.