RedisLabs / redis-cluster-proxy

A proxy for Redis clusters.
GNU Affero General Public License v3.0
990 stars 129 forks source link

Installation Error #109

Open slv-306 opened 1 year ago

slv-306 commented 1 year ago

Hi Team I'm installing redis-cluster-proxy from unstable branch and facing the below issue

/usr/bin/ld: logger.o:/home/lahari.velagapudi/redis-cluster-proxy/src/sds.h:37: multiple definition of `SDS_NOINIT'; config.o:/home/lahari.velagapudi/redis-cluster-proxy/src/sds.h:37: first defined here
/usr/bin/ld: reply_order.o:/home/lahari.velagapudi/redis-cluster-proxy/src/sds.h:37: multiple definition of `SDS_NOINIT'; config.o:/home/lahari.velagapudi/redis-cluster-proxy/src/sds.h:37: first defined here
/usr/bin/ld: sds.o:/home/lahari.velagapudi/redis-cluster-proxy/src/sds.h:37: multiple definition of `SDS_NOINIT'; config.o:/home/lahari.velagapudi/redis-cluster-proxy/src/sds.h:37: first defined here
/usr/bin/ld: util.o:/home/lahari.velagapudi/redis-cluster-proxy/src/sds.h:37: multiple definition of `SDS_NOINIT'; config.o:/home/lahari.velagapudi/redis-cluster-proxy/src/sds.h:37: first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:179: redis-cluster-proxy] Error 1
make[1]: Leaving directory '/home/lahari.velagapudi/redis-cluster-proxy/src'
make: *** [Makefile:7: install] Error 2

OS- Details PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" NAME="Debian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"

GCC Version gcc (Debian 10.2.1-6) 10.2.1 20210110 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Dup4 commented 1 year ago
diff --git a/src/sds.h b/src/sds.h
index 1bdb60d..adcc12c 100644
--- a/src/sds.h
+++ b/src/sds.h
@@ -34,7 +34,7 @@
 #define __SDS_H

 #define SDS_MAX_PREALLOC (1024*1024)
-const char *SDS_NOINIT;
+extern const char *SDS_NOINIT;

 #include <sys/types.h>
 #include <stdarg.h>

Maybe apply this patch will be ok.

rbarbadillo commented 11 months ago

I run into the same problem while trying to start up redis 5.0.5 and the patch worked! Ran the tests and it all seemed ok. Thanks @Dup4