Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libjieba/jieba/limonp/StdExtension.hpp:7:10: fatal error: 'unordered_map' file not found #7

Closed
lerry opened this issue Aug 3, 2016 · 4 comments

Comments

@lerry
Copy link

lerry commented Aug 3, 2016

user@test ~/Downloads/pg_jieba
master* $ USE_PGXS=1 make                                                                                                                                                                                                                                                                                          [14:15:39]
c++ -Wall -Wpointer-arith -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -mmacosx-version-min=10.7 -I. -I./ -I/Applications/Postgres.app/Contents/Versions/9.5/include/postgresql/server -I/Applications/Postgres.app/Contents/Versions/9.5/include/postgresql/internal -I/Applications/Postgres.app/Contents/Versions/9.5/include/libxml2  -I/Applications/Postgres.app/Contents/Versions/9.5/include -DLOGGER_LEVEL=LL_WARN -o jieba.o -c libjieba/jieba.cpp
In file included from libjieba/jieba.cpp:15:
In file included from libjieba/jieba/MixSegment.hpp:5:
In file included from libjieba/jieba/MPSegment.hpp:8:
In file included from libjieba/jieba/DictTrie.hpp:11:
In file included from libjieba/jieba/limonp/StringUtil.hpp:24:
libjieba/jieba/limonp/StdExtension.hpp:7:10: fatal error: 'unordered_map' file not found
#include <unordered_map>
         ^
1 error generated.
make: *** [jieba.o] Error 1

my os is OS X el capitan

@jaiminpan
Copy link
Owner

It's not tested on macos. The error info shows that the macos got problem when using standard library of 'unordered_map'

@kricen
Copy link

kricen commented Apr 9, 2017

how can fix it ?

@kricen
Copy link

kricen commented Apr 9, 2017

I met this problem too ,is that a verson problem of gcc?

@jaiminpan
Copy link
Owner

manual modified the code may fix this problem

--- a/libjieba/jieba/limonp/StdExtension.hpp
+++ b/libjieba/jieba/limonp/StdExtension.hpp
@@ -3,16 +3,6 @@

#include

-#ifdef APPLE
-#include <unordered_map>
-#include <unordered_set>
-#elif(__cplusplus == 201103L)
-#include <unordered_map>
-#include <unordered_set>
-#elif defined _MSC_VER
-#include <unordered_map>
-#include <unordered_set>
-#else
#include <tr1/unordered_map>
#include <tr1/unordered_set>
namespace std
@@ -20,8 +10,6 @@ using std::tr1::unordered_map;
using std::tr1::unordered_set;
}

-#endif

#include
#include
#include

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants