编译redis2.6.2报zmalloc.c:223: undefined reference to__sync_add_and_fetch_4′解决方法
在vps上面编译redis 2.6 由于系统有点老,以至于编不过,报错undefined reference to__sync_add_and_fetch_4′,google了下,发现好多人遇到我同样的问题,zmalloc.o: In function zmalloc_used_memory':/home/xx/redis-2.6.2/src/zmalloc.c:223: undefine
在vps上面编译redis 2.6 由于系统有点老,以至于编不过,报错undefined reference to
__sync_add_and_fetch_4′,google了下,发现好多人遇到我同样的问题,
zmalloc.o: In function zmalloc_used_memory':
__sync_add_and_fetch_4′
/home/xx/redis-2.6.2/src/zmalloc.c:223: undefined reference to
collect2: ld 返回 1
make[1]: *** [redis-server] 错误 1
make[1]: Leaving directory `/home/xx/redis-2.6.2/src’
make: *** [all] 错误 2
github上面一兄弟在src/Makefile开头加 CFLAGS= -march=i686解决了,但是我试了。继续google,发现google group里有个兄弟编辑了下src/.make_settings里的OPT,改为OPT=-O2 -march=i686。
make过了,但是接下来make test又过不了。报错如下
You need ‘tclsh8.5′ in order to run the Redis test
查了下资料,说是要最新的tcl,那就给你装个最新的吧http://www.linuxfromscratch.org/blfs/view/cvs/general/tcl.html
安装完后,总算可以了
参考资料:
https://github.com/antirez/redis/issues/736
https://groups.google.com/forum/#!msg/redis-db/NI_d00he39o/7GLi8uwZ1HEJ
更多推荐
所有评论(0)