zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory
zmalloc.h:55:2: error: #error “Newer version of jemalloc required”
make[1]: *** [adlist.o] Error 1
make[1]: Leaving directory `/data0/src/redis-2.6.2/src’
make: *** [all] Error 2
解决办法是:
make MALLOC=libc
zmalloc.o: In function `zmalloc_used_memory’:
/root/redis/redis-2.6.13/src/zmalloc.c:223: undefined reference to `__sync_add_and_fetch_4′
collect2: ld 返回 1
make[1]: *** [redis-server] 错误 1
make[1]: Leaving directory `/root/redis/redis-2.6.13/src’
make: *** [all] 错误 2
之后再做 2 件事:
① 在src/Makefile开头加 CFLAGS= -march=i686
② 编辑src/.make-settings里的OPT,改为OPT=-O2 -march=i686