Install coreseek according to official documents:
Http://www.coreseek.cn/products-install/install_on_macosx/
(1) The following error message is reported during the make operation during mmseg installation:
n file included from css/ThesaurusDict.cpp:6:../src/css/ThesaurusDict.h:12:17: error: expected namespace nameusing namespace __gnu_cxx;^css/ThesaurusDict.cpp:79:15: warning: result of comparison against a stringliteral is unspecified (use strncmp instead) [-Wstring-compare]if (filename == "-") {^ ~~~css/ThesaurusDict.cpp:116:15: warning: result of comparison against a stringliteral is unspecified (use strncmp instead) [-Wstring-compare]if (filename != "-") {^ ~~~2 warnings and 1 error generated.make[2] : *** [ThesaurusDict.lo] Error 1make[1]: *** [install-recursive] Error 1
After searching for information, I finally learned that the compiler version was too high, so I didn't want to downgrade the compiler version. By modifying the source code, I solved the problem:
Go to the source code package Directory: that is, the coreseek-3.2.14 directory, CD mmseg-3.2.14/src/CSS, find the file: thesaurusdict. h
Find in the header:# Include <string>
Add a line of code below:# Include <EXT/hash_map>
Return to the mmseg-3.2.14 directory, execute make compilation operations, successful completion, and finally you can then execute the installation operation.
(2) OK. The mmseg Chinese Word Segmentation is completed. then install sphplugin. During the compilation process, you may encounter the following problems:
phinxexpr.cpp:1047:11: error: use of undeclared identifier ‘ExprEval‘ T val = ExprEval ( this->m_pArg, tMatch ); // ‘this‘ fixes gcc ...
During compilation, there were countless errors about this function: expreval (this-> m_parg, tmatch), go to the: CD csft-3.2.14/src directory, find the source code: sphinxexpr. cpp file,
Search: expreval (this-> m_parg, tmatch) this function, which calls all the files about this function expreval (this-> m_parg, tmatch, add this-> object to the front of the object, that is, replace it:
this->ExprEval ( this->m_pArg, tMatch );
Then execute the make compilation operation. After the compilation is completed successfully, you can execute the make install installation operation.
This problem is also caused by the GCC compiler version.
Then, combine the official coreseek documents to complete the test.
(3) during testing,
$ /usr/local/coreseek/bin/indexer -c etc/csft.conf --all
Error:
dyld: Library not loaded: libmysqlclient.18.dylib Referenced from: /usr/local/coreseek/bin/indexer Reason: image not foundTrace/BPT trap: 5
Solution:
$ sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib