From b09a6b6a5d7c7c2de81325b3c1ab687536059009 Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 18 May 2016 17:48:06 +0200 Subject: [PATCH 1/2] Fix modules compilation when libc malloc is used. Compiling Redis worked as a side effect of jemalloc target specifying -ldl as needed linker options, otherwise it is not provided during linking and dlopen() API will remain unresolved symbols. --- src/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index c390d3f2..d73f381b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -55,7 +55,7 @@ endif FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) -I../deps/geohash-int FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) -FINAL_LIBS=-lm +FINAL_LIBS=-lm -ldl DEBUG=-g -ggdb ifeq ($(uname_S),SunOS) @@ -95,7 +95,7 @@ endif ifeq ($(MALLOC),jemalloc) DEPENDENCY_TARGETS+= jemalloc FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include - FINAL_LIBS+= ../deps/jemalloc/lib/libjemalloc.a -ldl + FINAL_LIBS+= ../deps/jemalloc/lib/libjemalloc.a endif REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS) From 892565f924c53ead19f90afc5f652d20ca6e69c8 Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Sat, 21 May 2016 13:50:01 +0200 Subject: [PATCH 2/2] Remove debug printing --- src/redis-cli.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/redis-cli.c b/src/redis-cli.c index cf939c8c..027a2658 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -284,7 +284,6 @@ static void cliIntegrateHelp(void) { break; } if (i != helpEntriesLen) continue; - printf("%s\n", cmdname); helpEntriesLen++; helpEntries = zrealloc(helpEntries,sizeof(helpEntry)*helpEntriesLen); @@ -314,8 +313,6 @@ static void cliIntegrateHelp(void) { new->org = ch; } freeReplyObject(reply); - - printf("%s\n", helpEntries[80].full); } /* Output command help to stdout. */