您的位置:首页 > 数据库 > Redis

编译redis2.6.7报zmalloc.c:223: undefined reference to__sync_add_and_fetch_4'解决方法

2012-12-11 09:55 567 查看
部分转载于http://blog.csdn.net/hmc20071120015/article/details/8142454,以变日后查阅。

zmalloc.o: In function `zmalloc_used_memory':

/root/redis-2.6.7/src/zmalloc.c:223: undefined reference to `__sync_add_and_fetch_4'

collect2: ld returned 1 exit status

make[1]: *** [redis-server] Error 1

make[1]: Leaving directory `/root/redis-2.6.7/src'

make: *** [all] Error 2

编辑了下src/.make_settings里的OPT,改为OPT=-O2 -march=i686。

make test

You need 'tclsh8.5' in order to run the Redis test

make: *** [test] Error 1

安装最新的tcl8.5.12解决。

安装过程:

./configure --prefix=/root/tcl --enable-shared

make

sed -e "s@^\(TCL_SRC_DIR='\).*@\1/usr/include'@" \ -e "/TCL_B/s@='\(-L\)\?.*unix@='\1/usr/lib@" \ -i tclConfig.sh

make install

cp /root/tcl/lib/libtcl8.5.so /usr/lib/

cp /root/tcl/bin/tclsh8.5 /usr/bin/

chmod -v 755 /usr/lib/libtcl8.5.so

ldconfig

 ldconfig -p | grep tcl

        libtcl8.5.so (libc6) => /usr/lib/libtcl8.5.so

        libtcl8.4.so (libc6) => /usr/lib/libtcl8.4.so
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐