ошибка установки sphinx - PullRequest
       3

ошибка установки sphinx

1 голос
/ 04 февраля 2011

Я пытался установить Sphinx на MacOSX Snow Leopard 10.6.4. Шаги, которые я выполнил:

. / Configure --prefix = / usr / local --with-mysql = / usr / local / mysql делать sudo make install

При 'make' я получаю следующие ошибки:

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.

Ответы [ 2 ]

6 голосов
/ 20 апреля 2011

Мне показались полезными следующие предложения: 1. добавьте следующий параметр для настройки: не --with-UnixODBC = нет

  1. если вы все еще получаете ошибки, попробуйте установить LDFLAGS в '-arch i386'
1 голос
/ 03 мая 2011

Двоичные файлы Mac OS X доступны для 2.0.1b от http://sphinxsearch.com/downloads/

...