I was trying to compile Redis 2.6.4 on CentOS 5.8 but I was getting the following error after running make
zmalloc.o: In function
zmalloc_used_memory':__sync_add_and_fetch_4′ collect2: ld returned 1 exit status make[1]:
/root/redis-2.6.4/src/zmalloc.c:223: undefined reference to
* [redis-server] Error 1 make[1]: Leaving directory `/root/redis-2.6.4/src’ make: * [all] Error 2
I also tried CFLAGS= -march=i686 in the src/Makefile but did not work. Actually, I don’t know where to put it. I put at the top of the file.
Ok, I got it done. I run the following command which seems worked correctly (though later I need to install tcl8.5).