hightman / scws

开源免费的简易中文分词系统,PHP分词的上乘之选!
http://www.xunsearch.com/scws/
Other
1.65k stars 348 forks source link

FreeBSD10下编译出错 #17

Closed idreamsoft closed 8 years ago

idreamsoft commented 8 years ago

/bin/sh /usr/src/scws-1.2.2/phpext/libtool --mode=link cc -DPHP_ATOM_INC -I/usr/src/scws-1.2.2/phpext/include -I/usr/src/scws-1.2.2/phpext/main -I/usr/src/scws-1.2.2/phpext -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include/scws -DHAVE_CONFIG_H -g -O2 -o ./scws.la -export-dynamic -avoid-version -prefer-pic -module -rpath /usr/src/scws-1.2.2/phpext/modules php_scws.lo -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lscws cc -shared .libs/php_scws.o -L/usr/local/lib /usr/local/lib/libscws.a -Wl,-rpath -Wl,/usr/local/lib -Wl,-soname -Wl,scws.so -o ./.libs/scws.so /usr/bin/ld: /usr/local/lib/libscws.a(scws.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libscws.a: could not read symbols: Bad value cc: error: linker command failed with exit code 1 (use -v to see invocation) *\ Error code 1

Stop. make: stopped in /usr/src/scws-1.2.2/phpext

环境FreeBSD 10.1 PHP5.6

idreamsoft commented 8 years ago

搞定了 setenv CC gcc48 setenv CFLAGS -fPIC 安装前设置环境