Error when Make CLucene

别说谁变了你拦得住时间么 提交于 2019-12-24 08:55:12

问题


I'm using a MBP OSX(10.9) and is new to CLucene and I'm having problem installing it. Despite following the installation guide closely, I still hit these errors while making the file

[  0%] Building CXX object src/shared/CMakeFiles/clucene-shared.dir/CLucene/SharedHeader.o
In file included from /Users/youhock/Downloads/clucene-core-2.3.3.4/src/shared/CLucene/SharedHeader.cpp:8:
In file included from /Users/youhock/Downloads/clucene-core-2.3.3.4/src/shared/CLucene/_SharedHeader.h:13:
In file included from /Users/youhock/Downloads/clucene-core-2.3.3.4/src/shared/CLucene/SharedHeader.h:201:
In file included from /Users/youhock/Downloads/clucene-core-2.3.3.4/src/core/CLucene/debug/lucenebase.h:10:
/Users/youhock/Downloads/clucene-core-2.3.3.4/src/shared/CLucene/LuceneThreads.h:56:19: error: 
      unknown type name 'pthread_t'
                static _LUCENE_THREADID_TYPE _GetCurrentThreadId();
                       ^
/Users/youhock/Downloads/clucene-core-2.3.3.4/src/shared/CLucene/LuceneThreads.h:40:41: note: 
      expanded from macro '_LUCENE_THREADID_TYPE'
          #define _LUCENE_THREADID_TYPE pthread_t
                                        ^
/Users/youhock/Downloads/clucene-core-2.3.3.4/src/shared/CLucene/LuceneThreads.h:57:18: error: 
      unknown type name 'pthread_t'
                        static _LUCENE_THREADID_TYPE CreateThread(lucene...
                               ^
/Users/youhock/Downloads/clucene-core-2.3.3.4/src/shared/CLucene/LuceneThreads.h:40:41: note: 
      expanded from macro '_LUCENE_THREADID_TYPE'
          #define _LUCENE_THREADID_TYPE pthread_t
                                        ^
/Users/youhock/Downloads/clucene-core-2.3.3.4/src/shared/CLucene/LuceneThreads.h:58:34: error: 
      unknown type name 'pthread_t'
                        static void JoinThread(_LUCENE_THREADID_TYPE id);
                                               ^
/Users/youhock/Downloads/clucene-core-2.3.3.4/src/shared/CLucene/LuceneThreads.h:40:41: note: 
      expanded from macro '_LUCENE_THREADID_TYPE'
          #define _LUCENE_THREADID_TYPE pthread_t
                                        ^
3 errors generated.
make[2]: *** [src/shared/CMakeFiles/clucene-shared.dir/CLucene/SharedHeader.o] Error 1
make[1]: *** [src/shared/CMakeFiles/clucene-shared.dir/all] Error 2
make: *** [all] Error 2

Appreciate if anyone could help me with this? Thanks in advance


回答1:


Have a look at my other answer.

Bascially you have to patch

  • src/shared/CLucene/LuceneThreads.h

  • src/shared/CLucene/config/repl_tchar.h

The other post contains the links as well.



来源:https://stackoverflow.com/questions/21706727/error-when-make-clucene

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!