2011-02-04 27 views
1

我试图在MacOSX雪豹10.6.4上安装Sphinx。我遵循的步骤是:狮身人面像安装错误

的./configure --prefix =在/ usr /本地--with-mysql的=在/ usr /本地/ MySQL的 使 须藤使安装

虽然 '制作',我得到出现以下错误:

Making all in src 
if test -d ../.svn; then svn info .. --xml | perl svnxrev.pl; fi; 
make all-am 
g++ -DHAVE_CONFIG_H -I. -I../config -DSYSCONFDIR="\"/usr/local/etc\"" -I/usr/local/include -I/usr/local/mysql/include -Os -g -fno-common -fno-strict-aliasing -arch i386 -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 /usr/include/sql.h:92, 
       from /usr/include/sqlext.h:82, 
       from sphinx.h:69, 
       from sphinx.cpp:14: 
/usr/include/iodbcunix.h:128: error: conflicting declaration ‘typedef unsigned int DWORD’ 
sphinxstd.h:90: error: ‘DWORD’ has a previous declaration as ‘typedef long unsigned int DWORD’ 
sphinx.cpp: In function ‘char* sphStrMacro(const char*, const char*, SphDocID_t)’: 
sphinx.cpp:1912: warning: format ‘%u’ expects type ‘unsigned int’, but argument 4 has type ‘SphDocID_t’ 
sphinx.cpp: In function ‘CSphString sphDumpAttr(const CSphColumnInfo&)’: 
sphinx.cpp:4784: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long unsigned int’ 
sphinx.cpp: In member function ‘virtual void CSphIndex_VLN::DebugDumpHeader(FILE*, const char*)’: 
sphinx.cpp:14563: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘DWORD’ 
sphinx.cpp:14592: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long unsigned int’ 
sphinx.cpp:14631: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘DWORD’ 
sphinx.cpp: In member function ‘virtual void CSphIndex_VLN::DebugDumpDocids(FILE*)’: 
sphinx.cpp:14647: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long unsigned int’ 
sphinx.cpp:14648: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘DWORD’ 
sphinx.cpp:14655: warning: format ‘%u’ expects type ‘unsigned int’, but argument 2 has type ‘long unsigned int’ 
sphinx.cpp:14655: warning: format ‘%u’ expects type ‘unsigned int’, but argument 3 has type ‘SphDocID_t’ 
sphinx.cpp: In member function ‘virtual void CSphIndex_VLN::DebugDumpHitlist(FILE*, const char*)’: 
sphinx.cpp:14710: warning: format ‘%u’ expects type ‘unsigned int’, but argument 3 has type ‘SphDocID_t’ 
sphinx.cpp:14710: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 4 has type ‘DWORD’ 
sphinx.cpp: In member function ‘bool CSphSource_SQL::RunQueryStep(const char*, CSphString&)’: 
sphinx.cpp:18346: warning: format ‘%u’ expects type ‘unsigned int’, but argument 4 has type ‘SphDocID_t’ 
sphinx.cpp:18347: warning: format ‘%u’ expects type ‘unsigned int’, but argument 4 has type ‘SphDocID_t’ 
sphinx.cpp: In member function ‘const char* CSphSource_XMLPipe2::DecorateMessageVA(const char*, char*)’: 
sphinx.cpp:20238: warning: format ‘%u’ expects type ‘unsigned int’, but argument 6 has type ‘SphDocID_t’ 
sphinx.cpp: In member function ‘virtual bool CSphSource_ODBC::SqlQuery(const char*)’: 
sphinx.cpp:21288: warning: comparison between signed and unsigned integer expressions 
sphinx.cpp: At global scope: 
sphinx.cpp:1741: warning: ‘g_tmInitTimer’ defined but not used 
make[2]: *** [sphinx.o] Error 1 
make[1]: *** [all] Error 2 
make: *** [all-recursive] Error 1 

我检查了MySQL的目录是否正确。

+0

您可能会发现更容易安装的MacPorts从py27 - 狮身人面像 - 我有很好的效果。 – 2011-02-04 09:57:43

+0

谢谢。我会尝试〜 – lkahtz 2011-02-04 10:10:15

回答

6

我发现了以下建议帮助:1. 添加以下参数配置: --with-unixODBC数据=无

  1. ,如果你仍然得到错误,请尝试将 '-arch i386的' LDFLAGS到
+0

感谢这个〜 – lkahtz 2011-04-20 13:03:19