我正在尝试让Sphinx在我的系统上使用mamp但是因为我继续遇到这个问题:
Making all in libstemmer_c
make[1]: Nothing to be done for `all'.
Making all in src
/bin/sh svnxrev.sh ..
make all-am
g++ -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -arch x86_64 -o indexer indexer.o libsphinx.a ../libstemmer_c/libstemmer.a -L/Applications/MAMP/Library/lib -lmysqlclient -lpthread -lz -lodbc -ldl -lz -liconv -lexpat -L/usr/local/lib -lpthread
Undefined symbols for architecture x86_64:
"_iconv_open", referenced from:
xmlUnknownEncoding(void*, char const*, XML_Encoding*)in libsphinx.a(sphinx.o)
"_iconv", referenced from:
xmlUnknownEncoding(void*, char const*, XML_Encoding*)in libsphinx.a(sphinx.o)
"_iconv_close", referenced from:
xmlUnknownEncoding(void*, char const*, XML_Encoding*)in libsphinx.a(sphinx.o)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [indexer] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1
这是我运行安装Sphinx的命令:LDFLAGS="-arch x86_64" ./configure --prefix=/usr/local --with-libstemmer --with-mysql=/Applications/MAMP/Library
其他人遇到过这个问题吗?
答案 0 :(得分:0)
我有同样的问题,重命名MAMP“iconv”解决了这个问题...
gloria:sphinx-2.0.3-release simon$ which iconv
/Applications/MAMP/Library/bin//iconv
所以我改名了:
gloria:sphinx-2.0.3-release simon$ mv /Applications/MAMP/Library/bin//iconv
/Applications/MAMP/Library/bin//iconv2
为了拥有一个好的iconv版本:
gloria:sphinx-2.0.3-release simon$ which iconv
/opt/local/bin/iconv
然后重新编译了Sphinx ......它运作良好。
CFLAGS='-arch x86_64' CCFLAGS='-arch x86_64' CXXFLAGS='-arch x86_64' ./configure
make -j4 install
希望有所帮助