Howdy, I run the following command to install redis,but faild in make: git://github.com/antirez/redis.git cd redis git fetch git reset --hard HEAD git checkout v1.3.9

redis@newapp0:~/redis$ make clean rm -rf redis-server redis-benchmark redis-cli redis-check-dump .o .gcda .gcno .gcov redis@newapp0:~/redis$ make cc -c -std=c99 -pedantic -O2 -Wall -W -g -rdynamic -ggdb adlist.c cc -c -std=c99 -pedantic -O2 -Wall -W -g -rdynamic -ggdb ae.c cc -c -std=c99 -pedantic -O2 -Wall -W -g -rdynamic -ggdb anet.c cc -c -std=c99 -pedantic -O2 -Wall -W -g -rdynamic -ggdb dict.c cc -c -std=c99 -pedantic -O2 -Wall -W -g -rdynamic -ggdb redis.c redis.c: In function ‘appendCommand’: redis.c:4085:9: warning: variable ‘retval’ set but not used [-Wunused-but-set-variable] redis.c: In function ‘genRedisInfoString’: redis.c:6925:5: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 21 has type ‘size_t’ [-Wformat] redis.c:6925:5: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 22 has type ‘size_t’ [-Wformat] cc -c -std=c99 -pedantic -O2 -Wall -W -g -rdynamic -ggdb sds.c cc -c -std=c99 -pedantic -O2 -Wall -W -g -rdynamic -ggdb zmalloc.c cc -c -std=c99 -pedantic -O2 -Wall -W -g -rdynamic -ggdb lzf_c.c cc -c -std=c99 -pedantic -O2 -Wall -W -g -rdynamic -ggdb lzf_d.c cc -c -std=c99 -pedantic -O2 -Wall -W -g -rdynamic -ggdb pqsort.c cc -c -std=c99 -pedantic -O2 -Wall -W -g -rdynamic -ggdb zipmap.c cc -o redis-server -std=c99 -pedantic -O2 -Wall -W -lm -pthread -g -rdynamic -ggdb adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o redis.o: In function computeObjectSwappability': /home/redis/redis/redis.c:8748: undefined reference tolog' collect2: ld returned 1 exit status make: * [redis-server] Error 1 redis@newapp0:~/redis$

Can you please help me? I can find anyway to fix the issue. I try to install tclsh8.5, but it still can not work. Thank you advance.

Comment From: badboy

Why are you checkout v1.3.9? That code is about 3 years old. Use the 2.6/2.8/unstable branch or checkout a more recent tag (2.6.x)

Comment From: JHChan314

I use Zend Framework ,so I need this version. Is here anyway to solve the problem?

Comment From: badboy

Why exactly does the Zend Framework need 3 year old software?

Comment From: JHChan314

I am not sure Zend Framework 1.10.2 if need specific version of redis .I ask it somewhere.

Comment From: Fenex

I tried to build redis 2.2.5 on ubuntu 16.04 and got same error during compile too. Сause of the problem: https://stackoverflow.com/questions/9145264/undefined-reference-to-log

Thus, when compile throws this error, you need change directory to src, and run the failed compile command with -lm key at the end of the line, then continue compile by make

Comment From: NitroCao

This comment may be late for this question, here is my solution:

diff --git a/Makefile b/Makefile
index 12ed41dc5..a40f2900e 100644
--- a/Makefile
+++ b/Makefile
@@ -56,7 +56,7 @@ zipmap.o: zipmap.c zmalloc.h
 zmalloc.o: zmalloc.c config.h

 redis-server: $(OBJ)
-       $(CC) -o $(PRGNAME) $(CCOPT) $(DEBUG) $(OBJ)
+       $(CC) -o $(PRGNAME) $(DEBUG) $(OBJ) $(CCOPT)
        @echo ""
        @echo "Hint: To run the test-redis.tcl script is a good idea."
        @echo "Launch the redis server with ./redis-server, then in another"

Redis version: 2.0.0 GCC version: Ubuntu 7.5.0-3ubuntu1~18.04 System: buster/sid (Ubuntu 18.04)