在Mac下安装Coreseek全文搜索

2013年8月1日 分类: Mac, Mysql, PHP (3,117 个脚步)

看着全文搜索挺火的,所以就在Mac下安装了一下~

前提:有gcc基础编译环境,安装XCode就具备

1. 设置环境,升级/安装系统基础依赖包

sudo bash
su -

设置路径和中文环境:

export PATH=/usr/local/bin:$PATH
export LC_ALL=zh_CN.UTF-8
export LANG=zh_CN.UTF-8

下载并安装系统基础依赖包

curl -O -L http://ftp.gnu.org/gnu/m4/m4-1.4.16.tar.gz
tar -xzvf m4-1.4.16.tar.gz
cd m4-1.4.16
./configure --prefix=/usr/local
make && make install
cd ..

curl -O -L http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
tar -xzvf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure --prefix=/usr/local
make && make install
cd ..

curl -O -L http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz
tar xzvf automake-1.14.tar.gz
cd automake-1.14
./configure --prefix=/usr/local
make && make install
cd ..

curl -O -L http://ftp.gnu.org/gnu/libtool/libtool-2.4.2.tar.gz
tar xzvf libtool-2.4.2.tar.gz
cd libtool-2.4.2
./configure --prefix=/usr/local
make && make install
cd ..

2. 安装MySQL,提供MySQL数据源支持

1). 如果已经安装过mysql,直接跳过
2). 通过MySQL 二进制版本(binary,dmg安装包)安装
    a. 从http://www.mysql.com/downloads/mysql/下载当前系统对应的DMG Archive
    b. 挂载DMG,安装MySQL

3. 安装coreseek

curl -O -L http://www.coreseek.cn/uploads/csft/3.2/coreseek-3.2.14.tar.gz
tar xzvf coreseek-3.2.14.tar.gz
cd coreseek-3.2.14

安装mmseg

cd mmseg-3.2.14
./bootstrap
./configure --prefix=/usr/local/mmseg3
make && make install
cd ..

安装coreseek

cd csft-3.2.14
sh buildconf.sh
./configure --prefix=/usr/local/coreseek  --without-unixodbc --with-mmseg --with-mmseg-includes=/usr/local/mmseg3/include/mmseg/ --with-mmseg-libs=/usr/local/mmseg3/lib/ --with-mysql-includes=/usr/local/mysql/include/ --with-mysql-libs=/usr/local/mysql/lib
make && make install
cd ..

测试mmseg分词,coreseek搜索(需要预先设置好字符集为zh_CN.UTF-8,确保正确显示中文)

cd testpack
cat var/test/test.xml    #此时应该正确显示中文
/usr/local/mmseg3/bin/mmseg -d /usr/local/mmseg3/etc var/test/test.xml
/usr/local/coreseek/bin/indexer -c etc/csft.conf --all
/usr/local/coreseek/bin/search -c etc/csft.conf 网络搜索

如果提示 dyld: Library not loaded: libmysqlclient.18.dylib
则需要运行一下

sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib

至此,安装coreseek已经全部完成了。

在Mac下安装Coreseek全文搜索 【声明】本文 在Mac下安装Coreseek全文搜索 为柠之漠然原创文章,转载请注明出自 枫之落叶
并保留本文有效链接:https://blog.shiniv.com/2013/08/mac-install-coreseek-full-text-search/ , 转载请保留本声明!

标签:
17 条评论
  • searchd就是起动不起来?你的咱个又得行呢

  • 路过看一下!

  • 感谢大神的回答解决了我的问题!

  • 无比诚挚的感谢一下大牛~~被 coreseek 4.1 坑死了 = =

  • 我安装的就是最新4.1bata版本的。方便给个联系QQ吗?

  • 这次修改后可以是可以了,但是make&make install的时候出现如下错误:

    csft-4.1 root# make && make install
    Making all in src
    /bin/sh svnxrev.sh ..
    /Applications/Xcode.app/Contents/Developer/usr/bin/make all-am
    g++ -DHAVE_CONFIG_H -I. -I../config -DSYSCONFDIR=""/usr/local/coreseek/etc"" -DDATADIR=""/usr/local/coreseek/var/data"" -I/usr/local/include -I/usr/local/mysql/include -I/usr/local/mmseg3/include/mmseg/ -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -MT sphinx.o -MD -MP -MF .deps/sphinx.Tpo -c -o sphinx.o sphinx.cpp
    In file included from sphinx.cpp:22:
    ./sphinxint.h:1144:22: warning: ‘CSphDictStar::GetWordID’ hides overloaded virtual
    function [-Woverloaded-virtual]
    virtual SphWordID_t GetWordID ( BYTE * pWord );
    ^
    ./sphinxint.h:1123:22: note: hidden overloaded virtual function
    ‘CSphDictTraits::GetWordID’ declared here
    virtual SphWordID_t GetWordID ( const BYTE * pWord, int iLen, bool bF…
    ^
    ./sphinxint.h:1168:22: warning: ‘CSphDictExact::GetWordID’ hides overloaded virtual
    function [-Woverloaded-virtual]
    virtual SphWordID_t GetWordID ( BYTE * pWord );
    ^
    ./sphinxint.h:1123:22: note: hidden overloaded virtual function
    ‘CSphDictTraits::GetWordID’ declared here
    virtual SphWordID_t GetWordID ( const BYTE * pWord, int iLen, bool bF…
    ^
    In file included from sphinx.cpp:2173:
    In file included from ./tokenizer_zhcn.h:26:
    In file included from /usr/local/mmseg3/include/mmseg/SegmenterManager.h:32:
    In file included from /usr/local/mmseg3/include/mmseg/ThesaurusDict.h:6:
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/ext/hash_map:209:2: warning:
    Use of the header <ext/hash_map> is deprecated. Migrate to <unordered_map>
    [-W#warnings]
    #warning Use of the header <ext/hash_map> is deprecated. Migrate to <unordered_map>
    ^
    sphinx.cpp:5409:36: warning: array subscript is of type ‘char’ [-Wchar-subscripts]
    unsigned char pu1 = p1.key.cstr() ;
    ^~
    sphinx.cpp:5410:36: warning: array subscript is of type ‘char’ [-Wchar-subscripts]
    unsigned char pu2 = p2.key.cstr() ;
    ^~
    sphinx.cpp:6346:3: warning: cannot delete expression with pointer-to-‘void’ type ‘void *’
    SafeDeleteArray ( m_dStorage2Free );
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ./sphinxstd.h:297:41: note: expanded from macro ‘SafeDeleteArray’
    #define SafeDeleteArray(_x) { if (_x) { delete [] (_x); (_x) = NULL; } }
    ^ ~~~~
    sphinx.cpp:13427:20: warning: comparison of unsigned expression < 0 is always false
    [-Wtautological-compare]
    if ( iDocinfoSize<0 )
    ~~~~~~~~~~~~^~
    sphinx.cpp:15311:32: warning: format specifies type ‘long long’ but the argument has type
    ‘int’ [-Wformat]
    (int64_t)iDictPos, sWord, iDocs, iHits ));
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
    sphinx.cpp:15167:11: note: expanded from macro ‘LOC_FAIL’
    fprintf _args;
    ^
    sphinx.cpp:15311:39: warning: format specifies type ‘long long’ but the argument has type
    ‘int’ [-Wformat]
    (int64_t)iDictPos, sWord, iDocs, iHits ));
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
    sphinx.cpp:15167:11: note: expanded from macro ‘LOC_FAIL’
    fprintf _args;
    ^
    sphinx.cpp:15333:47: warning: format specifies type ‘long long’ but the argument has type
    ‘int’ [-Wformat]
    (int64_t)iDictPos, (uint64_t)uNewWordid, iDocs, iHits ));
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
    sphinx.cpp:15167:11: note: expanded from macro ‘LOC_FAIL’
    fprintf _args;
    ^
    sphinx.cpp:15333:54: warning: format specifies type ‘long long’ but the argument has type
    ‘int’ [-Wformat]
    (int64_t)iDictPos, (uint64_t)uNewWordid, iDocs, iHits ));
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
    sphinx.cpp:15167:11: note: expanded from macro ‘LOC_FAIL’
    fprintf _args;
    ^
    sphinx.cpp:15832:77: warning: format specifies type ‘unsigned int’ but the argument has
    type ‘uint64_t’ (aka ‘unsigned long long’) [-Wformat]
    …iItem, uLastID, uMvaID, ( iItem>=iMva64 ? uVal-2 : uVal-1 ), uPrev, uVal, uCur ));
    ^~~~~
    sphinx.cpp:15167:11: note: expanded from macro ‘LOC_FAIL’
    fprintf _args;
    ^
    sphinx.cpp:15832:90: warning: format specifies type ‘unsigned int’ but the argument has
    type ‘uint64_t’ (aka ‘unsigned long long’) [-Wformat]
    …uLastID, uMvaID, ( iItem>=iMva64 ? uVal-2 : uVal-1 ), uPrev, uVal, uCur ));
    ^~~~
    sphinx.cpp:15167:11: note: expanded from macro ‘LOC_FAIL’
    fprintf _args;
    ^
    sphinx.cpp:3446:10: warning: initialization of pointer of type ‘BYTE *’
    (aka ‘unsigned char *’) to null from a constant boolean expression
    [-Wbool-conversion]
    return false;
    ^~~~~
    sphinx.cpp:4269:16: note: in instantiation of member function
    ‘CSphTokenizerTraits<false>::GetBlendedVariant’ requested here
    BYTE * pVar = GetBlendedVariant ();
    ^
    sphinx.cpp:3446:10: warning: initialization of pointer of type ‘BYTE *’
    (aka ‘unsigned char *’) to null from a constant boolean expression
    [-Wbool-conversion]
    return false;
    ^~~~~
    sphinx.cpp:4515:16: note: in instantiation of member function
    ‘CSphTokenizerTraits<true>::GetBlendedVariant’ requested here
    BYTE * pVar = GetBlendedVariant ();
    ^
    In file included from sphinx.cpp:16:
    ./sphinx.h:2009:10: warning: private field ‘m_eTag’ is not used [-Wunused-private-field]
    Tag_e m_eTag; ///< what’s our c…
    ^
    In file included from sphinx.cpp:22:
    ./sphinxint.h:1158:10: warning: private field ‘m_bPrefixes’ is not used
    [-Wunused-private-field]
    bool m_bPrefixes;
    ^
    17 warnings generated.
    mv -f .deps/sphinx.Tpo .deps/sphinx.Po
    g++ -DHAVE_CONFIG_H -I. -I../config -DSYSCONFDIR=""/usr/local/coreseek/etc"" -DDATADIR=""/usr/local/coreseek/var/data"" -I/usr/local/include -I/usr/local/mysql/include -I/usr/local/mmseg3/include/mmseg/ -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -MT sphinxexcerpt.o -MD -MP -MF .deps/sphinxexcerpt.Tpo -c -o sphinxexcerpt.o sphinxexcerpt.cpp
    In file included from sphinxexcerpt.cpp:21:
    ./sphinxint.h:1144:22: warning: ‘CSphDictStar::GetWordID’ hides overloaded virtual
    function [-Woverloaded-virtual]
    virtual SphWordID_t GetWordID ( BYTE * pWord );
    ^
    ./sphinxint.h:1123:22: note: hidden overloaded virtual function
    ‘CSphDictTraits::GetWordID’ declared here
    virtual SphWordID_t GetWordID ( const BYTE * pWord, int iLen, bool bF…
    ^
    ./sphinxint.h:1168:22: warning: ‘CSphDictExact::GetWordID’ hides overloaded virtual
    function [-Woverloaded-virtual]
    virtual SphWordID_t GetWordID ( BYTE * pWord );
    ^
    ./sphinxint.h:1123:22: note: hidden overloaded virtual function
    ‘CSphDictTraits::GetWordID’ declared here
    virtual SphWordID_t GetWordID ( const BYTE * pWord, int iLen, bool bF…
    ^
    2 warnings generated.
    mv -f .deps/sphinxexcerpt.Tpo .deps/sphinxexcerpt.Po
    g++ -DHAVE_CONFIG_H -I. -I../config -DSYSCONFDIR=""/usr/local/coreseek/etc"" -DDATADIR=""/usr/local/coreseek/var/data"" -I/usr/local/include -I/usr/local/mysql/include -I/usr/local/mmseg3/include/mmseg/ -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -MT sphinxquery.o -MD -MP -MF .deps/sphinxquery.Tpo -c -o sphinxquery.o sphinxquery.cpp
    mv -f .deps/sphinxquery.Tpo .deps/sphinxquery.Po
    g++ -DHAVE_CONFIG_H -I. -I../config -DSYSCONFDIR=""/usr/local/coreseek/etc"" -DDATADIR=""/usr/local/coreseek/var/data"" -I/usr/local/include -I/usr/local/mysql/include -I/usr/local/mmseg3/include/mmseg/ -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -MT sphinxsoundex.o -MD -MP -MF .deps/sphinxsoundex.Tpo -c -o sphinxsoundex.o sphinxsoundex.cpp
    mv -f .deps/sphinxsoundex.Tpo .deps/sphinxsoundex.Po
    g++ -DHAVE_CONFIG_H -I. -I../config -DSYSCONFDIR=""/usr/local/coreseek/etc"" -DDATADIR=""/usr/local/coreseek/var/data"" -I/usr/local/include -I/usr/local/mysql/include -I/usr/local/mmseg3/include/mmseg/ -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -MT sphinxmetaphone.o -MD -MP -MF .deps/sphinxmetaphone.Tpo -c -o sphinxmetaphone.o sphinxmetaphone.cpp
    In file included from sphinxmetaphone.cpp:17:
    ./sphinxint.h:1144:22: warning: ‘CSphDictStar::GetWordID’ hides overloaded virtual
    function [-Woverloaded-virtual]
    virtual SphWordID_t GetWordID ( BYTE * pWord );
    ^
    ./sphinxint.h:1123:22: note: hidden overloaded virtual function
    ‘CSphDictTraits::GetWordID’ declared here
    virtual SphWordID_t GetWordID ( const BYTE * pWord, int iLen, bool bF…
    ^
    ./sphinxint.h:1168:22: warning: ‘CSphDictExact::GetWordID’ hides overloaded virtual
    function [-Woverloaded-virtual]
    virtual SphWordID_t GetWordID ( BYTE * pWord );
    ^
    ./sphinxint.h:1123:22: note: hidden overloaded virtual function
    ‘CSphDictTraits::GetWordID’ declared here
    virtual SphWordID_t GetWordID ( const BYTE * pWord, int iLen, bool bF…
    ^
    2 warnings generated.
    mv -f .deps/sphinxmetaphone.Tpo .deps/sphinxmetaphone.Po
    g++ -DHAVE_CONFIG_H -I. -I../config -DSYSCONFDIR=""/usr/local/coreseek/etc"" -DDATADIR=""/usr/local/coreseek/var/data"" -I/usr/local/include -I/usr/local/mysql/include -I/usr/local/mmseg3/include/mmseg/ -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -MT sphinxstemen.o -MD -MP -MF .deps/sphinxstemen.Tpo -c -o sphinxstemen.o sphinxstemen.cpp
    mv -f .deps/sphinxstemen.Tpo .deps/sphinxstemen.Po
    g++ -DHAVE_CONFIG_H -I. -I../config -DSYSCONFDIR=""/usr/local/coreseek/etc"" -DDATADIR=""/usr/local/coreseek/var/data"" -I/usr/local/include -I/usr/local/mysql/include -I/usr/local/mmseg3/include/mmseg/ -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -MT sphinxstemru.o -MD -MP -MF .deps/sphinxstemru.Tpo -c -o sphinxstemru.o sphinxstemru.cpp
    mv -f .deps/sphinxstemru.Tpo .deps/sphinxstemru.Po
    g++ -DHAVE_CONFIG_H -I. -I../config -DSYSCONFDIR=""/usr/local/coreseek/etc"" -DDATADIR=""/usr/local/coreseek/var/data"" -I/usr/local/include -I/usr/local/mysql/include -I/usr/local/mmseg3/include/mmseg/ -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -MT sphinxstemcz.o -MD -MP -MF .deps/sphinxstemcz.Tpo -c -o sphinxstemcz.o sphinxstemcz.cpp
    mv -f .deps/sphinxstemcz.Tpo .deps/sphinxstemcz.Po
    g++ -DHAVE_CONFIG_H -I. -I../config -DSYSCONFDIR=""/usr/local/coreseek/etc"" -DDATADIR=""/usr/local/coreseek/var/data"" -I/usr/local/include -I/usr/local/mysql/include -I/usr/local/mmseg3/include/mmseg/ -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -MT sphinxutils.o -MD -MP -MF .deps/sphinxutils.Tpo -c -o sphinxutils.o sphinxutils.cpp
    mv -f .deps/sphinxutils.Tpo .deps/sphinxutils.Po
    g++ -DHAVE_CONFIG_H -I. -I../config -DSYSCONFDIR=""/usr/local/coreseek/etc"" -DDATADIR=""/usr/local/coreseek/var/data"" -I/usr/local/include -I/usr/local/mysql/include -I/usr/local/mmseg3/include/mmseg/ -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -MT md5.o -MD -MP -MF .deps/md5.Tpo -c -o md5.o md5.cpp
    mv -f .deps/md5.Tpo .deps/md5.Po
    g++ -DHAVE_CONFIG_H -I. -I../config -DSYSCONFDIR=""/usr/local/coreseek/etc"" -DDATADIR=""/usr/local/coreseek/var/data"" -I/usr/local/include -I/usr/local/mysql/include -I/usr/local/mmseg3/include/mmseg/ -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -MT sphinxstd.o -MD -MP -MF .deps/sphinxstd.Tpo -c -o sphinxstd.o sphinxstd.cpp
    In file included from sphinxstd.cpp:17:
    ./sphinxint.h:1144:22: warning: ‘CSphDictStar::GetWordID’ hides overloaded virtual
    function [-Woverloaded-virtual]
    virtual SphWordID_t GetWordID ( BYTE * pWord );
    ^
    ./sphinxint.h:1123:22: note: hidden overloaded virtual function
    ‘CSphDictTraits::GetWordID’ declared here
    virtual SphWordID_t GetWordID ( const BYTE * pWord, int iLen, bool bF…
    ^
    ./sphinxint.h:1168:22: warning: ‘CSphDictExact::GetWordID’ hides overloaded virtual
    function [-Woverloaded-virtual]
    virtual SphWordID_t GetWordID ( BYTE * pWord );
    ^
    ./sphinxint.h:1123:22: note: hidden overloaded virtual function
    ‘CSphDictTraits::GetWordID’ declared here
    virtual SphWordID_t GetWordID ( const BYTE * pWord, int iLen, bool bF…
    ^
    sphinxstd.cpp:591:8: warning: ‘operator new’ is missing exception specification
    ‘throw(std::bad_alloc)’
    void * operator new ( size_t iSize )
    ^
    throw(std::bad_alloc)
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/new:93:24: note:
    previous declaration is here
    _LIBCPP_FUNC_VIS void* operator new(std::size_t __sz)
    ^
    sphinxstd.cpp:600:8: warning: ‘operator new[]’ is missing exception specification
    ‘throw(std::bad_alloc)’
    void * operator new [] ( size_t iSize )
    ^
    throw(std::bad_alloc)
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/new:102:24: note:
    previous declaration is here
    _LIBCPP_FUNC_VIS void* operator new[](std::size_t __sz)
    ^
    4 warnings generated.
    mv -f .deps/sphinxstd.Tpo .deps/sphinxstd.Po
    g++ -DHAVE_CONFIG_H -I. -I../config -DSYSCONFDIR=""/usr/local/coreseek/etc"" -DDATADIR=""/usr/local/coreseek/var/data"" -I/usr/local/include -I/usr/local/mysql/include -I/usr/local/mmseg3/include/mmseg/ -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -MT sphinxsort.o -MD -MP -MF .deps/sphinxsort.Tpo -c -o sphinxsort.o sphinxsort.cpp
    In file included from sphinxsort.cpp:17:
    ./sphinxint.h:1144:22: warning: ‘CSphDictStar::GetWordID’ hides overloaded virtual
    function [-Woverloaded-virtual]
    virtual SphWordID_t GetWordID ( BYTE * pWord );
    ^
    ./sphinxint.h:1123:22: note: hidden overloaded virtual function
    ‘CSphDictTraits::GetWordID’ declared here
    virtual SphWordID_t GetWordID ( const BYTE * pWord, int iLen, bool bF…
    ^
    ./sphinxint.h:1168:22: warning: ‘CSphDictExact::GetWordID’ hides overloaded virtual
    function [-Woverloaded-virtual]
    virtual SphWordID_t GetWordID ( BYTE * pWord );
    ^
    ./sphinxint.h:1123:22: note: hidden overloaded virtual function
    ‘CSphDictTraits::GetWordID’ declared here
    virtual SphWordID_t GetWordID ( const BYTE * pWord, int iLen, bool bF…
    ^
    sphinxsort.cpp:2833:3: warning: initialization of pointer of type ‘ISphMatchSorter *’ to
    null from a constant boolean expression [-Wbool-conversion]
    …LOC_CHECK ( tSettings.m_tLocGroupby.m_bDynamic, "@groupby must be dynamic" );
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    sphinxsort.cpp:2826:88: note: expanded from macro ‘LOC_CHECK’
    …if (!(_cond)) { sError = "invalid schema: " _msg; return false; }
    ^~~~~
    sphinxsort.cpp:2836:3: warning: initialization of pointer of type ‘ISphMatchSorter *’ to
    null from a constant boolean expression [-Wbool-conversion]
    LOC_CHECK ( iCount>=0, "missing @count" );
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    sphinxsort.cpp:2826:88: note: expanded from macro ‘LOC_CHECK’
    …if (!(_cond)) { sError = "invalid schema: " _msg; return false; }
    ^~~~~
    sphinxsort.cpp:2839:3: warning: initialization of pointer of type ‘ISphMatchSorter *’ to
    null from a constant boolean expression [-Wbool-conversion]
    LOC_CHECK ( tSettings.m_tLocCount.m_bDynamic, "@count must be dynamic" );
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    sphinxsort.cpp:2826:88: note: expanded from macro ‘LOC_CHECK’
    …if (!(_cond)) { sError = "invalid schema: " _msg; return false; }
    ^~~~~
    sphinxsort.cpp:2844:4: warning: initialization of pointer of type ‘ISphMatchSorter *’ to
    null from a constant boolean expression [-Wbool-conversion]
    LOC_CHECK ( iDistinct>=0, "missing @distinct" );
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    sphinxsort.cpp:2826:88: note: expanded from macro ‘LOC_CHECK’
    …if (!(_cond)) { sError = "invalid schema: " _msg; return false; }
    ^~~~~
    sphinxsort.cpp:2846:4: warning: initialization of pointer of type ‘ISphMatchSorter *’ to
    null from a constant boolean expression [-Wbool-conversion]
    …LOC_CHECK ( tSettings.m_tLocDistinct.m_bDynamic, "@distinct must be dynamic" );
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    sphinxsort.cpp:2826:88: note: expanded from macro ‘LOC_CHECK’
    …if (!(_cond)) { sError = "invalid schema: " _msg; return false; }
    ^~~~~
    sphinxsort.cpp:2849:4: warning: initialization of pointer of type ‘ISphMatchSorter *’ to
    null from a constant boolean expression [-Wbool-conversion]
    LOC_CHECK ( iDistinct<=0, "unexpected @distinct" );
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    sphinxsort.cpp:2826:88: note: expanded from macro ‘LOC_CHECK’
    …if (!(_cond)) { sError = "invalid schema: " _msg; return false; }
    ^~~~~
    sphinxsort.cpp:2855:3: warning: initialization of pointer of type ‘ISphMatchSorter *’ to
    null from a constant boolean expression [-Wbool-conversion]
    …LOC_CHECK ( tSorterSchema.GetAttrIndex ( "@count" )>=0, "Count(*) or @count is queried, but not available in the schema" );
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    sphinxsort.cpp:2826:88: note: expanded from macro ‘LOC_CHECK’
    …if (!(_cond)) { sError = "invalid schema: " _msg; return false; }
    ^~~~~
    sphinxsort.cpp:1215:15: warning: ‘CSphKBufferMVAGroupSorter<MatchGeneric2_fn,
    true>::IsGroupby’ hides overloaded virtual function [-Woverloaded-virtual]
    virtual bool IsGroupby ()
    ^
    sphinxsort.cpp:1829:15: note: in instantiation of template class
    ‘CSphKBufferMVAGroupSorter<MatchGeneric2_fn, true>’ requested here
    return new CSphKBufferMVAGroupSorter < COMPGROUP, true > …
    ^
    sphinxsort.cpp:1846:31: note: in instantiation of function template specialization
    ‘sphCreateSorter3rd<MatchGeneric2_fn>’ requested here
    case FUNC_GENERIC2: return sphCreateSorter3rd<MatchGe…
    ^
    sphinxsort.cpp:940:15: note: hidden overloaded virtual function
    ‘CSphKBufferGroupSorter<MatchGeneric2_fn, true>::IsGroupby’ declared here
    virtual bool IsGroupby () const
    ^
    sphinxsort.cpp:1215:15: warning: ‘CSphKBufferMVAGroupSorter<MatchGeneric2_fn,
    false>::IsGroupby’ hides overloaded virtual function [-Woverloaded-virtual]
    virtual bool IsGroupby ()
    ^
    sphinxsort.cpp:1831:15: note: in instantiation of template class
    ‘CSphKBufferMVAGroupSorter<MatchGeneric2_fn, false>’ requested here
    return new CSphKBufferMVAGroupSorter < COMPGROUP, false …
    ^
    sphinxsort.cpp:1846:31: note: in instantiation of function template specialization
    ‘sphCreateSorter3rd<MatchGeneric2_fn>’ requested here
    case FUNC_GENERIC2: return sphCreateSorter3rd<MatchGe…
    ^
    sphinxsort.cpp:940:15: note: hidden overloaded virtual function
    ‘CSphKBufferGroupSorter<MatchGeneric2_fn, false>::IsGroupby’ declared here
    virtual bool IsGroupby () const
    ^
    sphinxsort.cpp:1215:15: warning: ‘CSphKBufferMVAGroupSorter<MatchGeneric3_fn,
    true>::IsGroupby’ hides overloaded virtual function [-Woverloaded-virtual]
    virtual bool IsGroupby ()
    ^
    sphinxsort.cpp:1829:15: note: in instantiation of template class
    ‘CSphKBufferMVAGroupSorter<MatchGeneric3_fn, true>’ requested here
    return new CSphKBufferMVAGroupSorter < COMPGROUP, true > …
    ^
    sphinxsort.cpp:1847:31: note: in instantiation of function template specialization
    ‘sphCreateSorter3rd<MatchGeneric3_fn>’ requested here
    case FUNC_GENERIC3: return sphCreateSorter3rd<MatchGe…
    ^
    sphinxsort.cpp:940:15: note: hidden overloaded virtual function
    ‘CSphKBufferGroupSorter<MatchGeneric3_fn, true>::IsGroupby’ declared here
    virtual bool IsGroupby () const
    ^
    sphinxsort.cpp:1215:15: warning: ‘CSphKBufferMVAGroupSorter<MatchGeneric3_fn,
    false>::IsGroupby’ hides overloaded virtual function [-Woverloaded-virtual]
    virtual bool IsGroupby ()
    ^
    sphinxsort.cpp:1831:15: note: in instantiation of template class
    ‘CSphKBufferMVAGroupSorter<MatchGeneric3_fn, false>’ requested here
    return new CSphKBufferMVAGroupSorter < COMPGROUP, false …
    ^
    sphinxsort.cpp:1847:31: note: in instantiation of function template specialization
    ‘sphCreateSorter3rd<MatchGeneric3_fn>’ requested here
    case FUNC_GENERIC3: return sphCreateSorter3rd<MatchGe…
    ^
    sphinxsort.cpp:940:15: note: hidden overloaded virtual function
    ‘CSphKBufferGroupSorter<MatchGeneric3_fn, false>::IsGroupby’ declared here
    virtual bool IsGroupby () const
    ^
    sphinxsort.cpp:1215:15: warning: ‘CSphKBufferMVAGroupSorter<MatchGeneric4_fn,
    true>::IsGroupby’ hides overloaded virtual function [-Woverloaded-virtual]
    virtual bool IsGroupby ()
    ^
    sphinxsort.cpp:1829:15: note: in instantiation of template class
    ‘CSphKBufferMVAGroupSorter<MatchGeneric4_fn, true>’ requested here
    return new CSphKBufferMVAGroupSorter < COMPGROUP, true > …
    ^
    sphinxsort.cpp:1848:31: note: in instantiation of function template specialization
    ‘sphCreateSorter3rd<MatchGeneric4_fn>’ requested here
    case FUNC_GENERIC4: return sphCreateSorter3rd<MatchGe…
    ^
    sphinxsort.cpp:940:15: note: hidden overloaded virtual function
    ‘CSphKBufferGroupSorter<MatchGeneric4_fn, true>::IsGroupby’ declared here
    virtual bool IsGroupby () const
    ^
    sphinxsort.cpp:1215:15: warning: ‘CSphKBufferMVAGroupSorter<MatchGeneric4_fn,
    false>::IsGroupby’ hides overloaded virtual function [-Woverloaded-virtual]
    virtual bool IsGroupby ()
    ^
    sphinxsort.cpp:1831:15: note: in instantiation of template class
    ‘CSphKBufferMVAGroupSorter<MatchGeneric4_fn, false>’ requested here
    return new CSphKBufferMVAGroupSorter < COMPGROUP, false …
    ^
    sphinxsort.cpp:1848:31: note: in instantiation of function template specialization
    ‘sphCreateSorter3rd<MatchGeneric4_fn>’ requested here
    case FUNC_GENERIC4: return sphCreateSorter3rd<MatchGe…
    ^
    sphinxsort.cpp:940:15: note: hidden overloaded virtual function
    ‘CSphKBufferGroupSorter<MatchGeneric4_fn, false>::IsGroupby’ declared here
    virtual bool IsGroupby () const
    ^
    sphinxsort.cpp:1215:15: warning: ‘CSphKBufferMVAGroupSorter<MatchGeneric5_fn,
    true>::IsGroupby’ hides overloaded virtual function [-Woverloaded-virtual]
    virtual bool IsGroupby ()
    ^
    sphinxsort.cpp:1829:15: note: in instantiation of template class
    ‘CSphKBufferMVAGroupSorter<MatchGeneric5_fn, true>’ requested here
    return new CSphKBufferMVAGroupSorter < COMPGROUP, true > …
    ^
    sphinxsort.cpp:1849:31: note: in instantiation of function template specialization
    ‘sphCreateSorter3rd<MatchGeneric5_fn>’ requested here
    case FUNC_GENERIC5: return sphCreateSorter3rd<MatchGe…
    ^
    sphinxsort.cpp:940:15: note: hidden overloaded virtual function
    ‘CSphKBufferGroupSorter<MatchGeneric5_fn, true>::IsGroupby’ declared here
    virtual bool IsGroupby () const
    ^
    sphinxsort.cpp:1215:15: warning: ‘CSphKBufferMVAGroupSorter<MatchGeneric5_fn,
    false>::IsGroupby’ hides overloaded virtual function [-Woverloaded-virtual]
    virtual bool IsGroupby ()
    ^
    sphinxsort.cpp:1831:15: note: in instantiation of template class
    ‘CSphKBufferMVAGroupSorter<MatchGeneric5_fn, false>’ requested here
    return new CSphKBufferMVAGroupSorter < COMPGROUP, false …
    ^
    sphinxsort.cpp:1849:31: note: in instantiation of function template specialization
    ‘sphCreateSorter3rd<MatchGeneric5_fn>’ requested here
    case FUNC_GENERIC5: return sphCreateSorter3rd<MatchGe…
    ^
    sphinxsort.cpp:940:15: note: hidden overloaded virtual function
    ‘CSphKBufferGroupSorter<MatchGeneric5_fn, false>::IsGroupby’ declared here
    virtual bool IsGroupby () const
    ^
    sphinxsort.cpp:1215:15: warning: ‘CSphKBufferMVAGroupSorter<MatchCustom_fn,
    true>::IsGroupby’ hides overloaded virtual function [-Woverloaded-virtual]
    virtual bool IsGroupby ()
    ^
    sphinxsort.cpp:1829:15: note: in instantiation of template class
    ‘CSphKBufferMVAGroupSorter<MatchCustom_fn, true>’ requested here
    return new CSphKBufferMVAGroupSorter < COMPGROUP, true > …
    ^
    sphinxsort.cpp:1850:29: note: in instantiation of function template specialization
    ‘sphCreateSorter3rd<MatchCustom_fn>’ requested here
    case FUNC_CUSTOM: return sphCreateSorter3rd<MatchCu…
    ^
    sphinxsort.cpp:940:15: note: hidden overloaded virtual function
    ‘CSphKBufferGroupSorter<MatchCustom_fn, true>::IsGroupby’ declared here
    virtual bool IsGroupby () const
    ^
    sphinxsort.cpp:1215:15: warning: ‘CSphKBufferMVAGroupSorter<MatchCustom_fn,
    false>::IsGroupby’ hides overloaded virtual function [-Woverloaded-virtual]
    virtual bool IsGroupby ()
    ^
    sphinxsort.cpp:1831:15: note: in instantiation of template class
    ‘CSphKBufferMVAGroupSorter<MatchCustom_fn, false>’ requested here
    return new CSphKBufferMVAGroupSorter < COMPGROUP, false …
    ^
    sphinxsort.cpp:1850:29: note: in instantiation of function template specialization
    ‘sphCreateSorter3rd<MatchCustom_fn>’ requested here
    case FUNC_CUSTOM: return sphCreateSorter3rd<MatchCu…
    ^
    sphinxsort.cpp:940:15: note: hidden overloaded virtual function
    ‘CSphKBufferGroupSorter<MatchCustom_fn, false>::IsGroupby’ declared here
    virtual bool IsGroupby () const
    ^
    sphinxsort.cpp:1215:15: warning: ‘CSphKBufferMVAGroupSorter<MatchExpr_fn,
    true>::IsGroupby’ hides overloaded virtual function [-Woverloaded-virtual]
    virtual bool IsGroupby ()
    ^
    sphinxsort.cpp:1829:15: note: in instantiation of template class
    ‘CSphKBufferMVAGroupSorter<MatchExpr_fn, true>’ requested here
    return new CSphKBufferMVAGroupSorter < COMPGROUP, true > …
    ^
    sphinxsort.cpp:1851:28: note: in instantiation of function template specialization
    ‘sphCreateSorter3rd<MatchExpr_fn>’ requested here
    case FUNC_EXPR: return sphCreateSorter3rd<MatchEx…
    ^
    sphinxsort.cpp:940:15: note: hidden overloaded virtual function
    ‘CSphKBufferGroupSorter<MatchExpr_fn, true>::IsGroupby’ declared here
    virtual bool IsGroupby () const
    ^
    sphinxsort.cpp:1215:15: warning: ‘CSphKBufferMVAGroupSorter<MatchExpr_fn,
    false>::IsGroupby’ hides overloaded virtual function [-Woverloaded-virtual]
    virtual bool IsGroupby ()
    ^
    sphinxsort.cpp:1831:15: note: in instantiation of template class
    ‘CSphKBufferMVAGroupSorter<MatchExpr_fn, false>’ requested here
    return new CSphKBufferMVAGroupSorter < COMPGROUP, false …
    ^
    sphinxsort.cpp:1851:28: note: in instantiation of function template specialization
    ‘sphCreateSorter3rd<MatchExpr_fn>’ requested here
    case FUNC_EXPR: return sphCreateSorter3rd<MatchEx…
    ^
    sphinxsort.cpp:940:15: note: hidden overloaded virtual function
    ‘CSphKBufferGroupSorter<MatchExpr_fn, false>::IsGroupby’ declared here
    virtual bool IsGroupby () const
    ^
    21 warnings generated.
    mv -f .deps/sphinxsort.Tpo .deps/sphinxsort.Po
    g++ -DHAVE_CONFIG_H -I. -I../config -DSYSCONFDIR=""/usr/local/coreseek/etc"" -DDATADIR=""/usr/local/coreseek/var/data"" -I/usr/local/include -I/usr/local/mysql/include -I/usr/local/mmseg3/include/mmseg/ -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -MT sphinxexpr.o -MD -MP -MF .deps/sphinxexpr.Tpo -c -o sphinxexpr.o sphinxexpr.cpp
    In file included from sphinxexpr.cpp:20:
    ./sphinxint.h:1144:22: warning: ‘CSphDictStar::GetWordID’ hides overloaded virtual
    function [-Woverloaded-virtual]
    virtual SphWordID_t GetWordID ( BYTE * pWord );
    ^
    ./sphinxint.h:1123:22: note: hidden overloaded virtual function
    ‘CSphDictTraits::GetWordID’ declared here
    virtual SphWordID_t GetWordID ( const BYTE * pWord, int iLen, bool bF…
    ^
    ./sphinxint.h:1168:22: warning: ‘CSphDictExact::GetWordID’ hides overloaded virtual
    function [-Woverloaded-virtual]
    virtual SphWordID_t GetWordID ( BYTE * pWord );
    ^
    ./sphinxint.h:1123:22: note: hidden overloaded virtual function
    ‘CSphDictTraits::GetWordID’ declared here
    virtual SphWordID_t GetWordID ( const BYTE * pWord, int iLen, bool bF…
    ^
    sphinxexpr.cpp:347:96: warning: variable ‘pStr’ is uninitialized when used here
    [-Wuninitialized]
    …& tMatch ) const { const BYTE * pStr; return sphCRC32 ( pStr, m_pFirst->StringEva…
    ^~~~
    sphinxexpr.cpp:347:76: note: initialize the variable ‘pStr’ to silence this warning
    …( const CSphMatch & tMatch ) const { const BYTE * pStr; return sphCRC32 ( pStr, m…
    ^
    = NULL
    sphinxexpr.cpp:699:5: warning: field ‘m_pExtra’ will be initialized after field ‘m_pHook’
    [-Wreorder]
    : m_pExtra ( pExtra )
    ^
    sphinxexpr.cpp:1778:3: error: use of undeclared identifier ‘s’
    s->m_pArg, tMatchARRAY_FOREACH ( i, m_dTurnPoints )
    ^
    sphinxexpr.cpp:1778:36: error: use of undeclared identifier ‘i’
    s->m_pArg, tMatchARRAY_FOREACH ( i, m_dTurnPoints )
    ^
    sphinxexpr.cpp:1848:6: warning: ‘Expr_MVAIn_c<false>::MvaEval’ hides overloaded virtual
    function [-Woverloaded-virtual]
    int MvaEval ( const DWORD * pMva ) const;
    ^
    sphinxexpr.cpp:1878:5: note: in instantiation of template class ‘Expr_MVAIn_c<false>’
    requested here
    int Expr_MVAIn_c<false>::MvaEval ( const DWORD * pMva ) const
    ^
    ./sphinxexpr.h:61:24: note: hidden overloaded virtual function ‘ISphExpr::MvaEval’
    declared here
    virtual const DWORD * MvaEval ( const CSphMatch & ) const { assert ( 0 )…
    ^
    sphinxexpr.cpp:1848:6: warning: ‘Expr_MVAIn_c<true>::MvaEval’ hides overloaded virtual
    function [-Woverloaded-virtual]
    int MvaEval ( const DWORD * pMva ) const;
    ^
    sphinxexpr.cpp:1909:5: note: in instantiation of template class ‘Expr_MVAIn_c<true>’
    requested here
    int Expr_MVAIn_c<true>::MvaEval ( const DWORD * pMva ) const
    ^
    ./sphinxexpr.h:61:24: note: hidden overloaded virtual function ‘ISphExpr::MvaEval’
    declared here
    virtual const DWORD * MvaEval ( const CSphMatch & ) const { assert ( 0 )…
    ^
    sphinxexpr.cpp:1777:5: warning: unused variable ‘val’ [-Wunused-variable]
    T val = this->ExprEval ( this->m_pArg, tMatch ); // ‘this’ fixes …
    ^
    sphinxexpr.cpp:2217:38: note: in instantiation of member function
    ‘Expr_Interval_c<int>::IntEval’ requested here
    case SPH_ATTR_INTEGER: return new Expr_Interval_c<int> …
    ^
    sphinxexpr.cpp:1777:5: warning: unused variable ‘val’ [-Wunused-variable]
    T val = this->ExprEval ( this->m_pArg, tMatch ); // ‘this’ fixes …
    ^
    sphinxexpr.cpp:2218:37: note: in instantiation of member function ‘Expr_Interval_c<long
    long>::IntEval’ requested here
    case SPH_ATTR_BIGINT: return new Expr_Interval_c<int64_…
    ^
    sphinxexpr.cpp:1777:5: warning: unused variable ‘val’ [-Wunused-variable]
    T val = this->ExprEval ( this->m_pArg, tMatch ); // ‘this’ fixes …
    ^
    sphinxexpr.cpp:2219:27: note: in instantiation of member function
    ‘Expr_Interval_c<float>::IntEval’ requested here
    default: return new Expr_I…
    ^
    9 warnings and 2 errors generated.
    make : *** [sphinxexpr.o] Error 1
    make : *** [all] Error 2
    make: *** [all-recursive] Error 1
    csft-4.1 root#

  • 神,我安装csft-4.1遇到如下问题:
    root# sh buildconf.sh
    configure.ac:66: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
    ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from…
    ../../lib/autoconf/general.m4:2590: _AC_COMPILE_IFELSE is expanded from…
    ../../lib/autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from…
    configure.ac:66: the top level
    configure.ac:208: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
    ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from…
    ../../lib/autoconf/general.m4:2590: _AC_COMPILE_IFELSE is expanded from…
    ../../lib/autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from…
    configure.ac:178: PTHREADS_TRY_RUNCOMPILE is expanded from…
    ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from…
    ../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from…
    ../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from…
    configure.ac:208: the top level
    configure.ac:230: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
    ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from…
    ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from…
    ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from…
    configure.ac:193: PTHREADS_TRY_RUNLINK is expanded from…
    ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from…
    ../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from…
    ../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from…
    configure.ac:230: the top level
    configure.ac:66: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
    ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from…
    ../../lib/autoconf/general.m4:2590: _AC_COMPILE_IFELSE is expanded from…
    ../../lib/autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from…
    configure.ac:66: the top level
    configure.ac:208: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
    ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from…
    ../../lib/autoconf/general.m4:2590: _AC_COMPILE_IFELSE is expanded from…
    ../../lib/autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from…
    configure.ac:178: PTHREADS_TRY_RUNCOMPILE is expanded from…
    ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from…
    ../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from…
    ../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from…
    configure.ac:208: the top level
    configure.ac:230: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
    ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from…
    ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from…
    ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from…
    configure.ac:193: PTHREADS_TRY_RUNLINK is expanded from…
    ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from…
    ../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from…
    ../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from…
    configure.ac:230: the top level
    configure.ac:66: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
    ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from…
    ../../lib/autoconf/general.m4:2590: _AC_COMPILE_IFELSE is expanded from…
    ../../lib/autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from…
    configure.ac:66: the top level
    configure.ac:208: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
    ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from…
    ../../lib/autoconf/general.m4:2590: _AC_COMPILE_IFELSE is expanded from…
    ../../lib/autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from…
    configure.ac:178: PTHREADS_TRY_RUNCOMPILE is expanded from…
    ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from…
    ../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from…
    ../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from…
    configure.ac:208: the top level
    configure.ac:230: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
    ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from…
    ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from…
    ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from…
    configure.ac:193: PTHREADS_TRY_RUNLINK is expanded from…
    ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from…
    ../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from…
    ../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from…
    configure.ac:230: the top level
    configure.ac:59: error: required file ‘config/compile’ not found
    configure.ac:59: ‘automake –add-missing’ can install ‘compile’
    automake: warnings are treated as errors
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_ISO_8859_1_danish.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    automake: warning: possible forward-incompatibility.
    automake: At least a source file is in a subdirectory, but the ‘subdir-objects’
    automake: automake option hasn’t been enabled. For now, the corresponding output
    automake: object file(s) will be placed in the top-level directory. However,
    automake: this behaviour will change in future Automake versions: they will
    automake: unconditionally cause object files to be placed in the same subdirectory
    automake: of the corresponding sources.
    automake: You are advised to start using ‘subdir-objects’ option throughout your
    automake: project, to avoid future incompatibilities.
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_UTF_8_danish.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_ISO_8859_1_dutch.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_UTF_8_dutch.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_ISO_8859_1_english.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_UTF_8_english.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_ISO_8859_1_finnish.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_UTF_8_finnish.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_ISO_8859_1_french.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_UTF_8_french.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_ISO_8859_1_german.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_UTF_8_german.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_ISO_8859_1_hungarian.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_UTF_8_hungarian.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_ISO_8859_1_italian.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_UTF_8_italian.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_ISO_8859_1_norwegian.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_UTF_8_norwegian.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_ISO_8859_1_porter.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_UTF_8_porter.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_ISO_8859_1_portuguese.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_UTF_8_portuguese.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_ISO_8859_2_romanian.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_UTF_8_romanian.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_KOI8_R_russian.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_UTF_8_russian.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_ISO_8859_1_spanish.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_UTF_8_spanish.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_ISO_8859_1_swedish.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_UTF_8_swedish.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘src_c/stem_UTF_8_turkish.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘runtime/api.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘runtime/utilities.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    libstemmer_c/mkinc.mak:10: warning: source file ‘libstemmer/libstemmer.c’ is in a subdirectory,
    libstemmer_c/mkinc.mak:10: but option ‘subdir-objects’ is disabled
    libstemmer_c/Makefile.am:3: ‘libstemmer_c/mkinc.mak’ included from here
    /usr/local/share/automake-1.14/am/library.am: warning: ‘libstemmer.a’: linking libraries using a non-POSIX
    /usr/local/share/automake-1.14/am/library.am: archiver requires ‘AM_PROG_AR’ in ‘configure.ac’
    libstemmer_c/Makefile.am:2: while processing library ‘libstemmer.a’
    /usr/local/share/automake-1.14/am/library.am: warning: ‘libsphinx.a’: linking libraries using a non-POSIX
    /usr/local/share/automake-1.14/am/library.am: archiver requires ‘AM_PROG_AR’ in ‘configure.ac’
    src/Makefile.am:14: while processing library ‘libsphinx.a’

    大神求解决。。

    • 你试试这样改看能不能编译
      csft-4.1/buildconf.sh
      查找
      && aclocal
      后加上
      && automake –add-missing

      csft-4.1/configure.ac
      查找
      AM_INIT_AUTOMAKE([-Wall -Werror foreign])
      改为
      AM_INIT_AUTOMAKE([-Wall foreign])

      查找
      AC_PROG_RANLIB
      后面加上
      AM_PROG_AR

      csft-4.1/src/sphinxexpr.cpp
      替换所有
      T val = ExprEval ( this->m_pArg, tMatch );

      T val = this->ExprEval ( this->m_pArg, tMatch );

    • 把automake版本降低为1.11,就可以了。

      $ curl -O -L http://mirrors.kernel.org/gnu/automake/automake-1.11.tar.gz
      $ tar xzvf automake-1.11.tar.gz
      $ cd automake-1.11
      $ ./configure –prefix=/usr/local
      $ make && make install

  • sphinxexpr.cpp:1746:11: error: use of undeclared identifier ‘ExprEval’
    T val = ExprEval ( this->m_pArg, tMatch ); // ‘this’ fixes gcc brain damage

    第一条error好像是这里

    • 因为新版本编译器的原因,都出现各种错误~~
      打开csft-3.2.14/src/sphinxexpr.cpp
      查找 T val = ExprEval ( this->m_pArg, tMatch );
      替换成 T val = this->ExprEval ( this->m_pArg, tMatch );
      all done

      PS 我将你上面的那条回复删了点文字~~

      • 你为何如此厉害。 非常感谢,纠结了几天的问题终于解决了。 那条很长的回复也可以删掉了嘛,后面写了error信息了。

  • 你好。
    请问下博主,我按照文章中的过程在make mmseg的时候报错如下,能帮忙分析下错误原因和解决方法吗?谢谢。

    In file included from css/ThesaurusDict.cpp:6:
    ../src/css/ThesaurusDict.h:12:17: error: expected namespace name
    using namespace __gnu_cxx;
    ^
    css/ThesaurusDict.cpp:79:15: warning: result of comparison against a string
    literal is unspecified (use strncmp instead) [-Wstring-compare]
    if (filename == "-") {
    ^ ~~~
    css/ThesaurusDict.cpp:116:15: warning: result of comparison against a string
    literal is unspecified (use strncmp instead) [-Wstring-compare]
    if (filename != "-") {
    ^ ~~~
    2 warnings and 1 error generated.
    make : *** [ThesaurusDict.lo] Error 1
    make: *** [install-recursive] Error 1

    • 你试着在src/css/ThesaurusDict.h文件的
      #include <string> 后面加入一句
      #include <ext/hash_map>
      应该就能编译完成了

你必须要启用 Javascript