redis-cluster-proxy icon indicating copy to clipboard operation
redis-cluster-proxy copied to clipboard

Installation Error

Open slv-306 opened this issue 2 years ago • 2 comments

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.

slv-306 avatar Sep 30 '22 09:09 slv-306

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.

Dup4 avatar Oct 10 '22 13:10 Dup4

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

rbarbadillo avatar Aug 07 '23 14:08 rbarbadillo