<!-- Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-users.lists.kamailio....
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-dev.lists.kamailio.or...
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
Note that an issue report may be closed automatically after about 2 months if there is no interest from developers or community users on pursuing it, being considered expired. In such case, it can be reopened by writing a comment that includes the token `/notexpired`. About two weeks before considered expired, the issue is marked with the label `stale`, trying to notify the submitter and everyone else that might be interested in it. To remove the label `stale`, write a comment that includes the token `/notstale`. Also, any comment postpone the `expire` timeline, being considered that there is interest in pursuing the issue.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment). -->
### Description
Hello, I am trying to setup db_redis with TLS and redis-cluster support, I get the following errors during installation.
### Troubleshooting
#### Reproduction Install hiredis(v1.2.0) and hiredis-cluster(v0.13.0) from source, both with ssl support. Then install kamailio 5.8.1 from source with db_redis module
<!-- If the issue can be reproduced, describe how it can be done. -->
#### Log Messages
<!-- Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site). -->
``` 37.77 CC (gcc) [M db_redis.so] db_redis_mod.o 37.85 CC (gcc) [M db_redis.so] redis_connection.o 37.90 redis_connection.c: In function 'db_redis_connect': 37.90 redis_connection.c:129:9: error: unknown type name 'redisSSLContext'; did you mean 'redisContext'? 37.90 129 | redisSSLContext *ssl = NULL; 37.90 | ^~~~~~~~~~~~~~~ 37.90 | redisContext 37.90 redis_connection.c:166:17: warning: implicit declaration of function 'redisInitOpenSSL' [-Wimplicit-function-declaration] 37.90 166 | redisInitOpenSSL(); 37.90 | ^~~~~~~~~~~~~~~~ 37.90 redis_connection.c:167:23: warning: implicit declaration of function 'redisCreateSSLContext' [-Wimplicit-function-declaration] 37.90 167 | ssl = redisCreateSSLContext( 37.90 | ^~~~~~~~~~~~~~~~~~~~~ 37.90 redis_connection.c:167:21: warning: assignment to 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 37.90 167 | ssl = redisCreateSSLContext( 37.90 | ^ 37.91 redis_connection.c:196:17: warning: implicit declaration of function 'redisClusterSetOptionEnableSSL'; did you mean 'redisClusterSetOptionMaxRetry'? [-Wimplicit-function-declaration] 37.91 196 | redisClusterSetOptionEnableSSL(con->con, ssl); 37.91 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 37.91 | redisClusterSetOptionMaxRetry 37.93 make[2]: *** [../../Makefile.rules:100: redis_connection.o] Error 1 37.93 make[1]: *** [Makefile:508: modules] Error 1 37.93 make[1]: Leaving directory '/root/build/kamailio/src' 37.93 make: *** [Makefile:34: all] Error 2 ```
### Additional Information
* **Kamailio Version**:
``` Kamailio 5.8.1 ```
* **Operating System**:
<!-- Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...; Kernel details (output of `lsb_release -a` and `uname -a`) -->
``` Debian 12 ```
You have to compile the module with `Q=0` to see if the `-DWITH_SSL` compile flag is provided to the compiler:
``` cd src/modules/db_redis make clean make Q=0 ```
The output during compilation should be more verbose, you can paste it here if you want to be analyzed.
Hello, Thank you for looking into this!
I added the above snippet, this is the output:
```
[kam 37/44] RUN make Q=0:
0.219 config.mak included 0.255 config.mak included 0.287 gcc -fPIC -DPIC -g -funroll-loops -Wcast-align -m64 -minline-all-stringops -falign-loops -ftree-vectorize -fno-strict-overflow -mtune=generic -pthread -DKSR_PTHREAD_MUTEX_SHARED -Wall -DNAME='"kamailio"' -DVERSION='"5.8.1"' -DARCH='"x86_64"' -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 12.2.0"' -D__CPU_x86_64 -D__OS_linux -DVERSIONVAL=5008001 -DCFG_DIR='"/usr/local/etc/kamailio/"' -DSHARE_DIR='"/usr/local/share/kamailio/"' -DRUN_DIR='"/var/run/kamailio/"' -DPKG_MALLOC -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLOCKLIST -DUSE_NAPTR -DMEM_JOIN_FREE -DF_MALLOC -DQ_MALLOC -DTLSF_MALLOC -DDBG_SR_MEMORY -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DUSE_SCTP -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER -DHAVE_IP_MREQN -DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT -DSIGINFO64_WORKAROUND -DUSE_FUTEX -DHAVE_SELECT -I/usr/local/include/hiredis -I/usr/local/include -D_FILE_OFFSET_BITS=64 -DWITH_SSL -DWITH_HIREDIS_CLUSTER -I/usr/local/include/hiredis_cluster -D_FILE_OFFSET_BITS=64 -DWITH_SSL -DMOD_NAME='"db_redis"' -DMOD_NAMEID='db_redis' -c db_redis_mod.c -o db_redis_mod.o -MMD -MP 0.361 gcc -fPIC -DPIC -g -funroll-loops -Wcast-align -m64 -minline-all-stringops -falign-loops -ftree-vectorize -fno-strict-overflow -mtune=generic -pthread -DKSR_PTHREAD_MUTEX_SHARED -Wall -DNAME='"kamailio"' -DVERSION='"5.8.1"' -DARCH='"x86_64"' -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 12.2.0"' -D__CPU_x86_64 -D__OS_linux -DVERSIONVAL=5008001 -DCFG_DIR='"/usr/local/etc/kamailio/"' -DSHARE_DIR='"/usr/local/share/kamailio/"' -DRUN_DIR='"/var/run/kamailio/"' -DPKG_MALLOC -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLOCKLIST -DUSE_NAPTR -DMEM_JOIN_FREE -DF_MALLOC -DQ_MALLOC -DTLSF_MALLOC -DDBG_SR_MEMORY -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DUSE_SCTP -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER -DHAVE_IP_MREQN -DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT -DSIGINFO64_WORKAROUND -DUSE_FUTEX -DHAVE_SELECT -I/usr/local/include/hiredis -I/usr/local/include -D_FILE_OFFSET_BITS=64 -DWITH_SSL -DWITH_HIREDIS_CLUSTER -I/usr/local/include/hiredis_cluster -D_FILE_OFFSET_BITS=64 -DWITH_SSL -DMOD_NAME='"db_redis"' -DMOD_NAMEID='db_redis' -c redis_connection.c -o redis_connection.o -MMD -MP 0.413 redis_connection.c: In function 'db_redis_connect': 0.413 redis_connection.c:129:9: error: unknown type name 'redisSSLContext'; did you mean 'redisContext'? 0.413 129 | redisSSLContext *ssl = NULL; 0.413 | ^~~~~~~~~~~~~~~ 0.413 | redisContext 0.415 redis_connection.c:166:17: warning: implicit declaration of function 'redisInitOpenSSL' [-Wimplicit-function-declaration] 0.415 166 | redisInitOpenSSL(); 0.415 | ^~~~~~~~~~~~~~~~ 0.417 redis_connection.c:167:23: warning: implicit declaration of function 'redisCreateSSLContext' [-Wimplicit-function-declaration] 0.417 167 | ssl = redisCreateSSLContext( 0.417 | ^~~~~~~~~~~~~~~~~~~~~ 0.418 redis_connection.c:167:21: warning: assignment to 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 0.418 167 | ssl = redisCreateSSLContext( 0.418 | ^ 0.420 redis_connection.c:196:17: warning: implicit declaration of function 'redisClusterSetOptionEnableSSL'; did you mean 'redisClusterSetOptionMaxRetry'? [-Wimplicit-function-declaration] 0.420 196 | redisClusterSetOptionEnableSSL(con->con, ssl); 0.420 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0.420 | redisClusterSetOptionMaxRetry 0.439 make: *** [../../Makefile.rules:100: redis_connection.o] Error 1 ```
Based on the errors it seemed like `hircluster_ssh.h` was missing, so added that to `redis_connection.h` like below:
``` #ifdef WITH_HIREDIS_CLUSTER #include <hircluster.h> #ifdef WITH_SSL #include <hircluster_ssl.h> #endif #else #ifdef WITH_HIREDIS_PATH #include <hiredis/hiredis.h> #ifdef WITH_SSL #include <hiredis/hiredis_ssl.h> #endif #else #include <hiredis.h> #ifdef WITH_SSL #include <hiredis_ssl.h> #endif #endif #endif ```
This produced a bigger list of issues:
```
[kam 38/45] RUN make Q=0:
0.200 config.mak included 0.237 config.mak included 0.268 gcc -fPIC -DPIC -g -funroll-loops -Wcast-align -m64 -minline-all-stringops -falign-loops -ftree-vectorize -fno-strict-overflow -mtune=generic -pthread -DKSR_PTHREAD_MUTEX_SHARED -Wall -DNAME='"kamailio"' -DVERSION='"5.8.1"' -DARCH='"x86_64"' -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 12.2.0"' -D__CPU_x86_64 -D__OS_linux -DVERSIONVAL=5008001 -DCFG_DIR='"/usr/local/etc/kamailio/"' -DSHARE_DIR='"/usr/local/share/kamailio/"' -DRUN_DIR='"/var/run/kamailio/"' -DPKG_MALLOC -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLOCKLIST -DUSE_NAPTR -DMEM_JOIN_FREE -DF_MALLOC -DQ_MALLOC -DTLSF_MALLOC -DDBG_SR_MEMORY -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DUSE_SCTP -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER -DHAVE_IP_MREQN -DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT -DSIGINFO64_WORKAROUND -DUSE_FUTEX -DHAVE_SELECT -I/usr/local/include/hiredis -I/usr/local/include -D_FILE_OFFSET_BITS=64 -DWITH_SSL -DWITH_HIREDIS_CLUSTER -I/usr/local/include/hiredis_cluster -D_FILE_OFFSET_BITS=64 -DWITH_SSL -DMOD_NAME='"db_redis"' -DMOD_NAMEID='db_redis' -c db_redis_mod.c -o db_redis_mod.o -MMD -MP 0.355 gcc -fPIC -DPIC -g -funroll-loops -Wcast-align -m64 -minline-all-stringops -falign-loops -ftree-vectorize -fno-strict-overflow -mtune=generic -pthread -DKSR_PTHREAD_MUTEX_SHARED -Wall -DNAME='"kamailio"' -DVERSION='"5.8.1"' -DARCH='"x86_64"' -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 12.2.0"' -D__CPU_x86_64 -D__OS_linux -DVERSIONVAL=5008001 -DCFG_DIR='"/usr/local/etc/kamailio/"' -DSHARE_DIR='"/usr/local/share/kamailio/"' -DRUN_DIR='"/var/run/kamailio/"' -DPKG_MALLOC -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLOCKLIST -DUSE_NAPTR -DMEM_JOIN_FREE -DF_MALLOC -DQ_MALLOC -DTLSF_MALLOC -DDBG_SR_MEMORY -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DUSE_SCTP -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER -DHAVE_IP_MREQN -DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT -DSIGINFO64_WORKAROUND -DUSE_FUTEX -DHAVE_SELECT -I/usr/local/include/hiredis -I/usr/local/include -D_FILE_OFFSET_BITS=64 -DWITH_SSL -DWITH_HIREDIS_CLUSTER -I/usr/local/include/hiredis_cluster -D_FILE_OFFSET_BITS=64 -DWITH_SSL -DMOD_NAME='"db_redis"' -DMOD_NAMEID='db_redis' -c redis_connection.c -o redis_connection.o -MMD -MP 0.529 gcc -fPIC -DPIC -g -funroll-loops -Wcast-align -m64 -minline-all-stringops -falign-loops -ftree-vectorize -fno-strict-overflow -mtune=generic -pthread -DKSR_PTHREAD_MUTEX_SHARED -Wall -DNAME='"kamailio"' -DVERSION='"5.8.1"' -DARCH='"x86_64"' -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 12.2.0"' -D__CPU_x86_64 -D__OS_linux -DVERSIONVAL=5008001 -DCFG_DIR='"/usr/local/etc/kamailio/"' -DSHARE_DIR='"/usr/local/share/kamailio/"' -DRUN_DIR='"/var/run/kamailio/"' -DPKG_MALLOC -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLOCKLIST -DUSE_NAPTR -DMEM_JOIN_FREE -DF_MALLOC -DQ_MALLOC -DTLSF_MALLOC -DDBG_SR_MEMORY -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DUSE_SCTP -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER -DHAVE_IP_MREQN -DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT -DSIGINFO64_WORKAROUND -DUSE_FUTEX -DHAVE_SELECT -I/usr/local/include/hiredis -I/usr/local/include -D_FILE_OFFSET_BITS=64 -DWITH_SSL -DWITH_HIREDIS_CLUSTER -I/usr/local/include/hiredis_cluster -D_FILE_OFFSET_BITS=64 -DWITH_SSL -DMOD_NAME='"db_redis"' -DMOD_NAMEID='db_redis' -c redis_dbase.c -o redis_dbase.o -MMD -MP 0.595 In file included from redis_dbase.c:28: 0.595 redis_dbase.c: In function 'db_redis_build_query_keys': 0.595 redis_connection.h:56:40: warning: passing argument 1 of 'redisFree' from incompatible pointer type [-Wincompatible-pointer-types] 0.595 56 | redisFree((con)->con); \ 0.595 redis_dbase.c:734:33: note: in expansion of macro 'db_redis_check_reply' 0.595 734 | db_redis_check_reply(con, reply, err); 0.595 | ^~~~~~~~~~~~~~~~~~~~ 0.595 In file included from /usr/local/include/hiredis/async.h:34, 0.595 from /usr/local/include/hiredis_cluster/hircluster.h:37, 0.595 from redis_connection.h:27: 0.595 /usr/local/include/hiredis/hiredis.h:327:30: note: expected 'redisContext *' but argument is of type 'redisClusterContext *' 0.595 327 | void redisFree(redisContext *c); 0.595 | ~~~~~~~~~~~~~~^ 0.600 redis_dbase.c: In function 'db_redis_scan_query_keys_pattern': 0.600 redis_connection.h:56:40: warning: passing argument 1 of 'redisFree' from incompatible pointer type [-Wincompatible-pointer-types] 0.600 56 | redisFree((con)->con); \ 0.600 redis_dbase.c:911:17: note: in expansion of macro 'db_redis_check_reply' 0.600 911 | db_redis_check_reply(con, reply, err); 0.600 | ^~~~~~~~~~~~~~~~~~~~ 0.600 /usr/local/include/hiredis/hiredis.h:327:30: note: expected 'redisContext *' but argument is of type 'redisClusterContext *' 0.600 327 | void redisFree(redisContext *c); 0.600 | ~~~~~~~~~~~~~~^ 0.603 redis_dbase.c:1000:33: error: label 'err' used but not defined 0.603 1000 | goto err; 0.603 | ^~~~ 0.603 redis_dbase.c:1023:1: warning: no return statement in function returning non-void [-Wreturn-type] 0.603 1023 | } 0.603 | ^ 0.603 redis_dbase.c: At top level: 0.603 redis_dbase.c:1028:1: error: expected identifier or '(' before 'if' 0.603 1028 | if(!*manual_keys) { 0.603 | ^~ 0.603 redis_dbase.c:1041:1: error: expected identifier or '(' before 'if' 0.603 1041 | if(reply) { 0.603 | ^~ 0.603 redis_dbase.c:1045:19: error: expected declaration specifiers or '...' before '&' token 0.603 1045 | db_redis_key_free(&query_v); 0.603 | ^ 0.603 In file included from ../../core/ut.h:43, 0.603 from redis_dbase.c:25: 0.603 ../../core/dprint.h:326:9: error: expected identifier or '(' before 'do' 0.603 326 | do { \ 0.603 | ^~ 0.603 ../../core/dprint.h:382:9: note: in expansion of macro 'LOG_FX' 0.603 382 | LOG_FX(facility, level, lname, prefix, _FUNC_NAME_, fmt, ##args) 0.603 | ^~~~~~ 0.603 ../../core/dprint.h:388:9: note: in expansion of macro 'LOG_FL' 0.603 388 | LOG_FL(facility, level, NULL, prefix, fmt, ##args) 0.603 | ^~~~~~ 0.603 ../../core/dprint.h:391:9: note: in expansion of macro 'LOG_FP' 0.603 391 | LOG_FP(DEFAULT_FACILITY, (level), LOC_INFO, fmt, ##args) 0.603 | ^~~~~~ 0.603 ../../core/dprint.h:453:27: note: in expansion of macro 'LOG' 0.603 453 | #define DBG(fmt, args...) LOG(L_DBG, fmt, ##args) 0.603 | ^~~ 0.603 ../../core/dprint.h:457:29: note: in expansion of macro 'DBG' 0.603 457 | #define DEBUG(fmt, args...) DBG(fmt, ##args) 0.603 | ^~~ 0.603 ../../core/dprint.h:497:16: note: in expansion of macro 'DEBUG' 0.603 497 | #define LM_DBG DEBUG 0.603 | ^~~~~ 0.603 redis_dbase.c:1047:1: note: in expansion of macro 'LM_DBG' 0.603 1047 | LM_DBG("got %lu entries by scan\n", (unsigned long)i); 0.603 | ^~~~~~ 0.603 ../../core/dprint.h:379:11: error: expected identifier or '(' before 'while' 0.603 379 | } while(0) 0.603 | ^~~~~ 0.603 ../../core/dprint.h:382:9: note: in expansion of macro 'LOG_FX' 0.603 382 | LOG_FX(facility, level, lname, prefix, _FUNC_NAME_, fmt, ##args) 0.603 | ^~~~~~ 0.603 ../../core/dprint.h:388:9: note: in expansion of macro 'LOG_FL' 0.603 388 | LOG_FL(facility, level, NULL, prefix, fmt, ##args) 0.603 | ^~~~~~ 0.603 ../../core/dprint.h:391:9: note: in expansion of macro 'LOG_FP' 0.603 391 | LOG_FP(DEFAULT_FACILITY, (level), LOC_INFO, fmt, ##args) 0.603 | ^~~~~~ 0.603 ../../core/dprint.h:453:27: note: in expansion of macro 'LOG' 0.603 453 | #define DBG(fmt, args...) LOG(L_DBG, fmt, ##args) 0.603 | ^~~ 0.603 ../../core/dprint.h:457:29: note: in expansion of macro 'DBG' 0.603 457 | #define DEBUG(fmt, args...) DBG(fmt, ##args) 0.603 | ^~~ 0.603 ../../core/dprint.h:497:16: note: in expansion of macro 'DEBUG' 0.603 497 | #define LM_DBG DEBUG 0.603 | ^~~~~ 0.603 redis_dbase.c:1047:1: note: in expansion of macro 'LM_DBG' 0.603 1047 | LM_DBG("got %lu entries by scan\n", (unsigned long)i); 0.603 | ^~~~~~ 0.603 redis_dbase.c:1048:1: error: expected identifier or '(' before 'return' 0.603 1048 | return 0; 0.603 | ^~~~~~ 0.603 redis_dbase.c:1050:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token 0.603 1050 | err : if(reply) db_redis_free_reply(&reply); 0.603 | ^ 0.604 redis_dbase.c:1051:19: error: expected declaration specifiers or '...' before '&' token 0.604 1051 | db_redis_key_free(&query_v); 0.604 | ^ 0.604 redis_dbase.c:1052:1: warning: data definition has no type or storage class 0.604 1052 | db_redis_key_free(query_keys); 0.604 | ^~~~~~~~~~~~~~~~~ 0.604 redis_dbase.c:1052:1: warning: type defaults to 'int' in declaration of 'db_redis_key_free' [-Wimplicit-int] 0.604 redis_dbase.c:1052:1: warning: parameter names (without types) in function declaration 0.604 redis_dbase.c:1052:1: error: conflicting types for 'db_redis_key_free'; have 'int()' 0.604 In file included from redis_dbase.c:30: 0.604 redis_table.h:67:6: note: previous declaration of 'db_redis_key_free' with type 'void(redis_key_t **)' {aka 'void(struct redis_key **)'} 0.604 67 | void db_redis_key_free(redis_key_t **list); 0.604 | ^~~~~~~~~~~~~~~~~ 0.604 redis_dbase.c:1053:1: warning: data definition has no type or storage class 0.604 1053 | *query_keys_count = 0; 0.604 | ^ 0.604 redis_dbase.c:1053:2: warning: type defaults to 'int' in declaration of 'query_keys_count' [-Wimplicit-int] 0.604 1053 | *query_keys_count = 0; 0.604 | ^~~~~~~~~~~~~~~~ 0.604 redis_dbase.c:1054:1: error: expected identifier or '(' before 'if' 0.604 1054 | if(*manual_keys) { 0.604 | ^~ 0.604 redis_dbase.c:1058:1: error: expected identifier or '(' before 'return' 0.604 1058 | return -1; 0.604 | ^~~~~~ 0.604 redis_dbase.c:1059:1: error: expected identifier or '(' before '}' token 0.604 1059 | } 0.604 | ^ 0.608 redis_dbase.c: In function 'db_redis_scan_query_keys': 0.608 redis_connection.h:56:40: warning: passing argument 1 of 'redisFree' from incompatible pointer type [-Wincompatible-pointer-types] 0.608 56 | redisFree((con)->con); \ 0.608 redis_dbase.c:1260:17: note: in expansion of macro 'db_redis_check_reply' 0.608 1260 | db_redis_check_reply(con, reply, out); 0.608 | ^~~~~~~~~~~~~~~~~~~~ 0.608 /usr/local/include/hiredis/hiredis.h:327:30: note: expected 'redisContext *' but argument is of type 'redisClusterContext *' 0.608 327 | void redisFree(redisContext *c); 0.608 | ~~~~~~~~~~~~~~^ 0.623 redis_dbase.c: In function 'db_redis_perform_query': 0.623 redis_connection.h:56:40: warning: passing argument 1 of 'redisFree' from incompatible pointer type [-Wincompatible-pointer-types] 0.623 56 | redisFree((con)->con); \ 0.623 redis_dbase.c:1741:33: note: in expansion of macro 'db_redis_check_reply' 0.623 1741 | db_redis_check_reply(con, reply, error); 0.623 | ^~~~~~~~~~~~~~~~~~~~ 0.623 /usr/local/include/hiredis/hiredis.h:327:30: note: expected 'redisContext *' but argument is of type 'redisClusterContext *' 0.623 327 | void redisFree(redisContext *c); 0.623 | ~~~~~~~~~~~~~~^ 0.624 redis_connection.h:56:40: warning: passing argument 1 of 'redisFree' from incompatible pointer type [-Wincompatible-pointer-types] 0.624 56 | redisFree((con)->con); \ 0.624 redis_dbase.c:1751:41: note: in expansion of macro 'db_redis_check_reply' 0.624 1751 | db_redis_check_reply(con, reply, error); 0.624 | ^~~~~~~~~~~~~~~~~~~~ 0.624 /usr/local/include/hiredis/hiredis.h:327:30: note: expected 'redisContext *' but argument is of type 'redisClusterContext *' 0.624 327 | void redisFree(redisContext *c); 0.624 | ~~~~~~~~~~~~~~^ 0.625 redis_connection.h:56:40: warning: passing argument 1 of 'redisFree' from incompatible pointer type [-Wincompatible-pointer-types] 0.625 56 | redisFree((con)->con); \ 0.625 redis_dbase.c:1763:33: note: in expansion of macro 'db_redis_check_reply' 0.625 1763 | db_redis_check_reply(con, reply, error); 0.625 | ^~~~~~~~~~~~~~~~~~~~ 0.625 /usr/local/include/hiredis/hiredis.h:327:30: note: expected 'redisContext *' but argument is of type 'redisClusterContext *' 0.625 327 | void redisFree(redisContext *c); 0.625 | ~~~~~~~~~~~~~~^ 0.629 redis_dbase.c: In function 'db_redis_perform_delete': 0.629 redis_connection.h:56:40: warning: passing argument 1 of 'redisFree' from incompatible pointer type [-Wincompatible-pointer-types] 0.629 56 | redisFree((con)->con); \ 0.629 redis_dbase.c:1877:17: note: in expansion of macro 'db_redis_check_reply' 0.629 1877 | db_redis_check_reply(con, reply, error); 0.629 | ^~~~~~~~~~~~~~~~~~~~ 0.629 /usr/local/include/hiredis/hiredis.h:327:30: note: expected 'redisContext *' but argument is of type 'redisClusterContext *' 0.629 327 | void redisFree(redisContext *c); 0.629 | ~~~~~~~~~~~~~~^ 0.631 redis_connection.h:56:40: warning: passing argument 1 of 'redisFree' from incompatible pointer type [-Wincompatible-pointer-types] 0.631 56 | redisFree((con)->con); \ 0.631 redis_dbase.c:1914:17: note: in expansion of macro 'db_redis_check_reply' 0.631 1914 | db_redis_check_reply(con, reply, error); 0.631 | ^~~~~~~~~~~~~~~~~~~~ 0.631 /usr/local/include/hiredis/hiredis.h:327:30: note: expected 'redisContext *' but argument is of type 'redisClusterContext *' 0.631 327 | void redisFree(redisContext *c); 0.631 | ~~~~~~~~~~~~~~^ 0.634 redis_connection.h:56:40: warning: passing argument 1 of 'redisFree' from incompatible pointer type [-Wincompatible-pointer-types] 0.634 56 | redisFree((con)->con); \ 0.634 redis_dbase.c:1998:17: note: in expansion of macro 'db_redis_check_reply' 0.634 1998 | db_redis_check_reply(con, reply, error); 0.634 | ^~~~~~~~~~~~~~~~~~~~ 0.634 /usr/local/include/hiredis/hiredis.h:327:30: note: expected 'redisContext *' but argument is of type 'redisClusterContext *' 0.634 327 | void redisFree(redisContext *c); 0.634 | ~~~~~~~~~~~~~~^ 0.635 redis_connection.h:56:40: warning: passing argument 1 of 'redisFree' from incompatible pointer type [-Wincompatible-pointer-types] 0.635 56 | redisFree((con)->con); \ 0.635 redis_dbase.c:2019:25: note: in expansion of macro 'db_redis_check_reply' 0.635 2019 | db_redis_check_reply(con, reply, error); 0.635 | ^~~~~~~~~~~~~~~~~~~~ 0.635 /usr/local/include/hiredis/hiredis.h:327:30: note: expected 'redisContext *' but argument is of type 'redisClusterContext *' 0.635 327 | void redisFree(redisContext *c); 0.635 | ~~~~~~~~~~~~~~^ 0.636 redis_connection.h:56:40: warning: passing argument 1 of 'redisFree' from incompatible pointer type [-Wincompatible-pointer-types] 0.636 56 | redisFree((con)->con); \ 0.636 redis_dbase.c:2032:25: note: in expansion of macro 'db_redis_check_reply' 0.636 2032 | db_redis_check_reply(con, reply, error); 0.636 | ^~~~~~~~~~~~~~~~~~~~ 0.636 /usr/local/include/hiredis/hiredis.h:327:30: note: expected 'redisContext *' but argument is of type 'redisClusterContext *' 0.636 327 | void redisFree(redisContext *c); 0.636 | ~~~~~~~~~~~~~~^ 0.638 redis_connection.h:56:40: warning: passing argument 1 of 'redisFree' from incompatible pointer type [-Wincompatible-pointer-types] 0.638 56 | redisFree((con)->con); \ 0.638 redis_dbase.c:2053:25: note: in expansion of macro 'db_redis_check_reply' 0.638 2053 | db_redis_check_reply(con, reply, error); 0.638 | ^~~~~~~~~~~~~~~~~~~~ 0.638 /usr/local/include/hiredis/hiredis.h:327:30: note: expected 'redisContext *' but argument is of type 'redisClusterContext *' 0.638 327 | void redisFree(redisContext *c); 0.638 | ~~~~~~~~~~~~~~^ 0.643 redis_dbase.c: In function 'db_redis_perform_update': 0.643 redis_connection.h:56:40: warning: passing argument 1 of 'redisFree' from incompatible pointer type [-Wincompatible-pointer-types] 0.643 56 | redisFree((con)->con); \ 0.643 redis_dbase.c:2263:17: note: in expansion of macro 'db_redis_check_reply' 0.643 2263 | db_redis_check_reply(con, reply, error); 0.643 | ^~~~~~~~~~~~~~~~~~~~ 0.643 /usr/local/include/hiredis/hiredis.h:327:30: note: expected 'redisContext *' but argument is of type 'redisClusterContext *' 0.643 327 | void redisFree(redisContext *c); 0.643 | ~~~~~~~~~~~~~~^ 0.645 redis_connection.h:56:40: warning: passing argument 1 of 'redisFree' from incompatible pointer type [-Wincompatible-pointer-types] 0.645 56 | redisFree((con)->con); \ 0.645 redis_dbase.c:2274:25: note: in expansion of macro 'db_redis_check_reply' 0.645 2274 | db_redis_check_reply(con, reply, error); 0.645 | ^~~~~~~~~~~~~~~~~~~~ 0.645 /usr/local/include/hiredis/hiredis.h:327:30: note: expected 'redisContext *' but argument is of type 'redisClusterContext *' 0.645 327 | void redisFree(redisContext *c); 0.645 | ~~~~~~~~~~~~~~^ 0.646 redis_connection.h:56:40: warning: passing argument 1 of 'redisFree' from incompatible pointer type [-Wincompatible-pointer-types] 0.646 56 | redisFree((con)->con); \ 0.646 redis_dbase.c:2287:17: note: in expansion of macro 'db_redis_check_reply' 0.646 2287 | db_redis_check_reply(con, reply, error); 0.646 | ^~~~~~~~~~~~~~~~~~~~ 0.646 /usr/local/include/hiredis/hiredis.h:327:30: note: expected 'redisContext *' but argument is of type 'redisClusterContext *' 0.646 327 | void redisFree(redisContext *c); 0.646 | ~~~~~~~~~~~~~~^ 0.654 redis_dbase.c:2476:67: warning: passing argument 2 of 'db_redis_key_add_str' from incompatible pointer type [-Wincompatible-pointer-types] 0.654 2476 | if(db_redis_key_add_str(&query_v, key) != 0) { 0.654 | ^~~ 0.654 | | 0.654 | redis_key_t * {aka struct redis_key *} 0.654 redis_table.h:63:57: note: expected 'const str *' {aka 'const struct _str *'} but argument is of type 'redis_key_t *' {aka 'struct redis_key *'} 0.654 63 | int db_redis_key_add_str(redis_key_t **list, const str *entry); 0.654 | ~~~~~~~~~~~^~~~~ 0.655 redis_connection.h:56:40: warning: passing argument 1 of 'redisFree' from incompatible pointer type [-Wincompatible-pointer-types] 0.655 56 | redisFree((con)->con); \ 0.655 redis_dbase.c:2482:33: note: in expansion of macro 'db_redis_check_reply' 0.655 2482 | db_redis_check_reply(con, reply, error); 0.655 | ^~~~~~~~~~~~~~~~~~~~ 0.655 /usr/local/include/hiredis/hiredis.h:327:30: note: expected 'redisContext *' but argument is of type 'redisClusterContext *' 0.655 327 | void redisFree(redisContext *c); 0.655 | ~~~~~~~~~~~~~~^ 0.656 redis_connection.h:56:40: warning: passing argument 1 of 'redisFree' from incompatible pointer type [-Wincompatible-pointer-types] 0.656 56 | redisFree((con)->con); \ 0.656 redis_dbase.c:2496:33: note: in expansion of macro 'db_redis_check_reply' 0.656 2496 | db_redis_check_reply(con, reply, error); 0.656 | ^~~~~~~~~~~~~~~~~~~~ 0.656 /usr/local/include/hiredis/hiredis.h:327:30: note: expected 'redisContext *' but argument is of type 'redisClusterContext *' 0.656 327 | void redisFree(redisContext *c); 0.656 | ~~~~~~~~~~~~~~^ 0.658 redis_connection.h:56:40: warning: passing argument 1 of 'redisFree' from incompatible pointer type [-Wincompatible-pointer-types] 0.658 56 | redisFree((con)->con); \ 0.658 redis_dbase.c:2517:33: note: in expansion of macro 'db_redis_check_reply' 0.658 2517 | db_redis_check_reply(con, reply, error); 0.658 | ^~~~~~~~~~~~~~~~~~~~ 0.658 /usr/local/include/hiredis/hiredis.h:327:30: note: expected 'redisContext *' but argument is of type 'redisClusterContext *' 0.658 327 | void redisFree(redisContext *c); 0.658 | ~~~~~~~~~~~~~~^ 0.659 redis_connection.h:56:40: warning: passing argument 1 of 'redisFree' from incompatible pointer type [-Wincompatible-pointer-types] 0.659 56 | redisFree((con)->con); \ 0.659 redis_dbase.c:2574:17: note: in expansion of macro 'db_redis_check_reply' 0.659 2574 | db_redis_check_reply(con, reply, error); 0.659 | ^~~~~~~~~~~~~~~~~~~~ 0.659 /usr/local/include/hiredis/hiredis.h:327:30: note: expected 'redisContext *' but argument is of type 'redisClusterContext *' 0.659 327 | void redisFree(redisContext *c); 0.659 | ~~~~~~~~~~~~~~^ 0.666 redis_dbase.c: In function 'db_redis_insert': 0.666 redis_connection.h:56:40: warning: passing argument 1 of 'redisFree' from incompatible pointer type [-Wincompatible-pointer-types] 0.666 56 | redisFree((con)->con); \ 0.666 redis_dbase.c:2858:9: note: in expansion of macro 'db_redis_check_reply' 0.666 2858 | db_redis_check_reply(con, reply, error); 0.666 | ^~~~~~~~~~~~~~~~~~~~ 0.667 /usr/local/include/hiredis/hiredis.h:327:30: note: expected 'redisContext *' but argument is of type 'redisClusterContext *' 0.667 327 | void redisFree(redisContext *c); 0.667 | ~~~~~~~~~~~~~~^ 0.668 redis_connection.h:56:40: warning: passing argument 1 of 'redisFree' from incompatible pointer type [-Wincompatible-pointer-types] 0.668 56 | redisFree((con)->con); \ 0.668 redis_dbase.c:2883:17: note: in expansion of macro 'db_redis_check_reply' 0.668 2883 | db_redis_check_reply(con, reply, error); 0.668 | ^~~~~~~~~~~~~~~~~~~~ 0.668 /usr/local/include/hiredis/hiredis.h:327:30: note: expected 'redisContext *' but argument is of type 'redisClusterContext *' 0.668 327 | void redisFree(redisContext *c); 0.668 | ~~~~~~~~~~~~~~^ 0.670 redis_connection.h:56:40: warning: passing argument 1 of 'redisFree' from incompatible pointer type [-Wincompatible-pointer-types] 0.670 56 | redisFree((con)->con); \ 0.670 redis_dbase.c:2901:17: note: in expansion of macro 'db_redis_check_reply' 0.670 2901 | db_redis_check_reply(con, reply, error); 0.670 | ^~~~~~~~~~~~~~~~~~~~ 0.670 /usr/local/include/hiredis/hiredis.h:327:30: note: expected 'redisContext *' but argument is of type 'redisClusterContext *' 0.670 327 | void redisFree(redisContext *c); 0.670 | ~~~~~~~~~~~~~~^ 0.741 make: *** [../../Makefile.rules:100: redis_dbase.o] Error 1 ```
It might be an incompatibility due to more recent version of libhiredis. I have no system where I can try with libshiredis 1.2.0, maybe others can comment or you can try with older versions of hiredis lib, like the one in the debian 12 or ubuntu 22.04.
The package version for libhiredis-dev in Debian 12 is 0.14.1, that version does not have ssl support, so need hiredis >=v1.0.0 for ssl support. I have tried hiredis v1.0.0 through v1.2.0 and some old hiredis-cluster versions as well (0.10.0 through 0.13.0) and having the same compile issue.
This issue is stale because it has been open 6 weeks with no activity. Remove stale label or comment or this will be closed in 2 weeks.
This issue is stale because it has been open 6 weeks with no activity. Remove stale label or comment or this will be closed in 2 weeks.
Closed #3893 as not planned.
Compilation works on ubuntu 24.04:
``` $ lsb_release -a
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 24.04 LTS Release: 24.04 Codename: noble
$ apt-cache show libhiredis-dev
Package: libhiredis-dev Architecture: amd64 Version: 1.2.0-6ubuntu3 Multi-Arch: same Priority: optional Section: universe/libdevel Source: hiredis Origin: Ubuntu Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com Original-Maintainer: Chris Lamb lamby@debian.org Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 338 Depends: libhiredis1.1.0 (= 1.2.0-6ubuntu3) Filename: pool/universe/h/hiredis/libhiredis-dev_1.2.0-6ubuntu3_amd64.deb Size: 78290 MD5sum: 790b50b9b14a145fa162c4aa22735bc2 SHA1: 8907a8d38a519c8da192c1bb3bde903b21c9068b SHA256: 178926b5b14988c86f8f359f61894abd4ea6966e852a00349dbeaf3cccda09a2 SHA512: 1b00b86dc9f6ae3d7bf4227df9865a416eed895aa099833f88a96ebc4da894241a7439414677aa8516bc9d22b2467ab782b0f16206c828e4054a7369efd15d06 Homepage: https://github.com/redis/hiredis Description-en: minimalistic C client library for Redis (development files) Hiredis is a minimalistic C client library for the Redis database. It is minimalistic because it just adds minimal support for the protocol, but at the same time it uses an high level printf-alike API in order to make it much higher level than otherwise suggested by its minimal code base and the lack of explicit bindings for every Redis command. . Apart from supporting sending commands and receiving replies, it comes with a reply parser that is decoupled from the I/O layer. It is a stream parser designed for easy reusability, which can for instance be used in higher level language bindings for efficient reply parsing. . Hiredis only supports the binary-safe Redis protocol, so you can use it with any Redis version >= 1.2.0. . The library comes with multiple APIs. There is the synchronous API, the asynchronous API and the reply parsing API. . This package provides the development files for hiredis. Description-md5: e66ca6207edf03fce2e0fedb4fa9c230
$ ldd db_redis.so
linux-vdso.so.1 (0x00007ffffe2db000) libhiredis.so.1.1.0 => /lib/x86_64-linux-gnu/libhiredis.so.1.1.0 (0x000074daaf038000) libhiredis_ssl.so.1.1.0 => /lib/x86_64-linux-gnu/libhiredis_ssl.so.1.1.0 (0x000074daaf031000) libsrdb1.so.1 => /home/henning/repositories/kamailio/src/lib/srdb1/libsrdb1.so.1 (0x000074daaeff7000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x000074daaec00000) libssl.so.3 => /lib/x86_64-linux-gnu/libssl.so.3 (0x000074daaef4d000) libcrypto.so.3 => /lib/x86_64-linux-gnu/libcrypto.so.3 (0x000074daae600000) /lib64/ld-linux-x86-64.so.2 (0x000074daaf0e8000)
```