RediSearch / RSCoordinator

RediSearch coordinator
Other
24 stars 10 forks source link

Update hiredis #267

Closed MeirShpilraien closed 2 years ago

xiaohei31 commented 2 years ago
  1. OS version  CentOS Linux release 7.2.1511 (Core)

  2. gcc version 10.2.1 20210130 (Red Hat 10.2.1-11) (GCC)

  3. RSCoordinator web url: https://github.com/RediSearch/RSCoordinator.git

4.build steps:

1) git clone --recursive https://github.com/RediSearch/RSCoordinator.git

2) cd RSCoordinator

3) mkdir build

4) python configure.py

5) cd build

6) make (1) error occured /root/software/download/redis/RSCoordinator/src/dep/rmr/conn.c:445:38: error: ‘REDIS_OPT_NOAUTOFREEREPLIES’ undeclared (first use in this function); did you mean ‘REDIS_OPT_NOAUTOFREE’?   445 |                           .options = REDIS_OPT_NOAUTOFREEREPLIES,       |                                      ^~~~~~~       |                                      REDIS_OPT_NOAUTOFREE

(2)  the reason is codes below missed in ~/RSCoordinator/src/dep/rmr/hiredis/hiredis.h /*   Don't automatically free replies  */

define REDIS_OPT_NOAUTOFREEREPLIES 0x10

(3) After I added the above missed codes, I make again. Then another error occured: /opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: CMakeFiles/hiredis-test.dir/test.c.o: in function push_handler': /root/software/download/redis/RSCoordinator/src/dep/rmr/hiredis/test.c:683: undefined reference tofreeReplyObject' /opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: CMakeFiles/hiredis-test.dir/test.c.o: in function disconnect': /root/software/download/redis/RSCoordinator/src/dep/rmr/hiredis/test.c:168: undefined reference toredisCommand' /opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: /root/software/download/redis/RSCoordinator/src/dep/rmr/hiredis/test.c:170: undefined reference to `freeReplyObject'

...

(4) I didn't fix the error above, because the RSCoordinator module-oss.so is generated. I have tried to clear codes in test.c(testing codes, maybe useless), and the error below is rounded. But another error occured, I gave it up...

@.*** build]# ll total 26020 -rw-r--r--. 1 root root   23149 Jan 11 22:40 CMakeCache.txt drwxr-xr-x. 8 root root    4096 Jan 11 22:50 CMakeFiles -rw-r--r--. 1 root root    2496 Jan 11 22:40 cmake_install.cmake -rw-r--r--. 1 root root     498 Jan 11 22:40 CTestTestfile.cmake -rw-r--r--. 1 root root 3425756 Jan 11 22:51 libtestdeps.a drwxr-xr-x. 4 root root      30 Jan 11 22:40 libuv-Linux-3.10.0-327.el7.x86_64-x86_64-with-centos-7.2.1511-Core -rw-r--r--. 1 root root   23507 Jan 11 22:40 Makefile -rwxr-xr-x. 1 root root 3971720 Jan 11 22:51 module-enterprise.so -rwxr-xr-x. 1 root root 7599376 Jan 11 22:51 module-enterprise.so.debug -rwxr-xr-x. 1 root root 3971712 Jan 11 22:50 module-oss.so -rwxr-xr-x. 1 root root 7598976 Jan 11 22:50 module-oss.so.debug drwxr-xr-x. 4 root root     100 Jan 11 22:40 src drwxr-xr-x. 3 root root      90 Jan 11 22:40 test drwxr-xr-x. 6 root root    4096 Jan 11 22:40 UV_BUILD

  1. Loading module-oss.so to Redis occured error : loadmodule /path/to/oss-module.so

  2. I found it : ldd -r ../module-oss.so

@.*** build]# ldd -r module-oss.so undefined symbol: hiredisAllocFns       (/root/software/download/redis/RSCoordinator/build/src/dep/rmr/hiredis/libhiredis_ssl.so.1.0.0) undefined symbol: redisBufferWrite      (/root/software/download/redis/RSCoordinator/build/src/dep/rmr/hiredis/libhiredis_ssl.so.1.0.0) undefined symbol: redisBufferRead       (/root/software/download/redis/RSCoordinator/build/src/dep/rmr/hiredis/libhiredis_ssl.so.1.0.0) undefined symbol: redisSetError       (/root/software/download/redis/RSCoordinator/build/src/dep/rmr/hiredis/libhiredis_ssl.so.1.0.0) undefined symbol: redisProcessCallbacks (/root/software/download/redis/RSCoordinator/build/src/dep/rmr/hiredis/libhiredis_ssl.so.1.0.0) undefined symbol: redisAsyncDisconnect        (/root/software/download/redis/RSCoordinator/build/src/dep/rmr/hiredis/libhiredis_ssl.so.1.0.0) undefined symbol: hiredisAllocFns       (./module-oss.so) undefined symbol: redisAsyncHandleRead  (./module-oss.so) undefined symbol: redisAsyncHandleWrite (./module-oss.so) undefined symbol: freeReplyObject       (./module-oss.so) undefined symbol: redisSSLContextGetError       (./module-oss.so) undefined symbol: redisAsyncDisconnect  (./module-oss.so) undefined symbol: redisCreateSSLContext (./module-oss.so) undefined symbol: redisAsyncCommand     (./module-oss.so) undefined symbol: redisAsyncSetConnectCallback  (./module-oss.so) undefined symbol: hiredisSetAllocators  (./module-oss.so) undefined symbol: redisAsyncFree        (./module-oss.so) undefined symbol: redisAsyncConnectWithOptions  (./module-oss.so) undefined symbol: redisFormatSdsCommandArgv     (./module-oss.so) undefined symbol: redisAsyncFormattedCommand    (./module-oss.so) undefined symbol: redisAsyncSetDisconnectCallback       (./module-oss.so) undefined symbol: redisInitiateSSLWithContext   (./module-oss.so)

  1. I guess: 1) the department of hiredis on "https://github.com/RediSearch/RSCoordinator.git" is not latest 2) the makefile misses some linked lib, or link order is wrong.