May have something to do with recent two commits.
-- Juha
-----------------------------------------------------------------------
CC (gcc) [M pv.so] pv_trans.o pv_trans.c: In function 'tr_eval_string': pv_trans.c:539:22: warning: pointer targets in passing argument 1 of 'base64url_enc' differ in signedness [-Wpointer-sign] i = base64url_enc((unsigned char *) val->rs.s, val->rs.len, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from pv_trans.c:40: ../../core/basex.h:867:5: note: expected 'char *' but argument is of type 'unsigned char *' int base64url_enc(char *in, int ilen, char *out, int osize); ^~~~~~~~~~~~~ pv_trans.c:540:6: warning: pointer targets in passing argument 3 of 'base64url_enc' differ in signedness [-Wpointer-sign] (unsigned char *) _tr_buffer, TR_BUFFER_SIZE-1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from pv_trans.c:40: ../../core/basex.h:867:5: note: expected 'char *' but argument is of type 'unsigned char *' int base64url_enc(char *in, int ilen, char *out, int osize); ^~~~~~~~~~~~~ pv_trans.c:552:22: warning: pointer targets in passing argument 1 of 'base64url_dec' differ in signedness [-Wpointer-sign] i = base64url_dec((unsigned char *) val->rs.s, val->rs.len, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from pv_trans.c:40: ../../core/basex.h:868:5: note: expected 'char *' but argument is of type 'unsigned char *' int base64url_dec(char *in, int ilen, char *out, int osize); ^~~~~~~~~~~~~ pv_trans.c:553:6: warning: pointer targets in passing argument 3 of 'base64url_dec' differ in signedness [-Wpointer-sign] (unsigned char *) _tr_buffer, TR_BUFFER_SIZE-1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from pv_trans.c:40: ../../core/basex.h:868:5: note: expected 'char *' but argument is of type 'unsigned char *' int base64url_dec(char *in, int ilen, char *out, int osize); ^~~~~~~~~~~~~ pv_trans.c:565:22: warning: pointer targets in passing argument 1 of 'base64url_enc' differ in signedness [-Wpointer-sign] i = base64url_enc((unsigned char *) val->rs.s, val->rs.len, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from pv_trans.c:40: ../../core/basex.h:867:5: note: expected 'char *' but argument is of type 'unsigned char *' int base64url_enc(char *in, int ilen, char *out, int osize); ^~~~~~~~~~~~~ pv_trans.c:566:6: warning: pointer targets in passing argument 3 of 'base64url_enc' differ in signedness [-Wpointer-sign] (unsigned char *) _tr_buffer, TR_BUFFER_SIZE-1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from pv_trans.c:40: ../../core/basex.h:867:5: note: expected 'char *' but argument is of type 'unsigned char *' int base64url_enc(char *in, int ilen, char *out, int osize); ^~~~~~~~~~~~~ pv_trans.c:597:23: warning: pointer targets in passing argument 1 of 'base64url_dec' differ in signedness [-Wpointer-sign] i = base64url_dec((unsigned char *) st.s, st.len, ^~~~~~~~~~~~~~~~~~~~~~ In file included from pv_trans.c:40: ../../core/basex.h:868:5: note: expected 'char *' but argument is of type 'unsigned char *' int base64url_dec(char *in, int ilen, char *out, int osize); ^~~~~~~~~~~~~ pv_trans.c:598:7: warning: pointer targets in passing argument 3 of 'base64url_dec' differ in signedness [-Wpointer-sign] (unsigned char *) _tr_buffer, TR_BUFFER_SIZE-1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from pv_trans.c:40: ../../core/basex.h:868:5: note: expected 'char *' but argument is of type 'unsigned char *' int base64url_dec(char *in, int ilen, char *out, int osize); ^~~~~~~~~~~~~ pv_trans.c:600:23: warning: pointer targets in passing argument 1 of 'base64url_dec' differ in signedness [-Wpointer-sign] i = base64url_dec((unsigned char *) val->rs.s, val->rs.len, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from pv_trans.c:40: ../../core/basex.h:868:5: note: expected 'char *' but argument is of type 'unsigned char *' int base64url_dec(char *in, int ilen, char *out, int osize); ^~~~~~~~~~~~~ pv_trans.c:601:7: warning: pointer targets in passing argument 3 of 'base64url_dec' differ in signedness [-Wpointer-sign] (unsigned char *) _tr_buffer, TR_BUFFER_SIZE-1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from pv_trans.c:40: ../../core/basex.h:868:5: note: expected 'char *' but argument is of type 'unsigned char *' int base64url_dec(char *in, int ilen, char *out, int osize); ^~~~~~~~~~~~~
------------------------------------------------------------------------
Mar 7 00:15:46 char sip-proxy[21381]: 0(21433) ERROR: <core> [core/sr_module.c:512]: load_module(): could not open module </usr/lib/x86_64-linux-gnu/sip-proxy/modules/pv.so>: /usr/lib/x86_64-linux-gnu/sip-proxy/modules/pv.so: undefined symbol: base64url_enc
They were from the previous commits indeed -- clang on mac was not reporting them. I just pushed patches to fix them.
Cheers, Daniel
On 06.03.20 23:22, Juha Heinanen wrote:
May have something to do with recent two commits.
-- Juha
CC (gcc) [M pv.so] pv_trans.o pv_trans.c: In function 'tr_eval_string': pv_trans.c:539:22: warning: pointer targets in passing argument 1 of 'base64url_enc' differ in signedness [-Wpointer-sign] i = base64url_enc((unsigned char *) val->rs.s, val->rs.len, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from pv_trans.c:40: ../../core/basex.h:867:5: note: expected 'char *' but argument is of type 'unsigned char *' int base64url_enc(char *in, int ilen, char *out, int osize); ^~~~~~~~~~~~~ pv_trans.c:540:6: warning: pointer targets in passing argument 3 of 'base64url_enc' differ in signedness [-Wpointer-sign] (unsigned char *) _tr_buffer, TR_BUFFER_SIZE-1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from pv_trans.c:40: ../../core/basex.h:867:5: note: expected 'char *' but argument is of type 'unsigned char *' int base64url_enc(char *in, int ilen, char *out, int osize); ^~~~~~~~~~~~~ pv_trans.c:552:22: warning: pointer targets in passing argument 1 of 'base64url_dec' differ in signedness [-Wpointer-sign] i = base64url_dec((unsigned char *) val->rs.s, val->rs.len, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from pv_trans.c:40: ../../core/basex.h:868:5: note: expected 'char *' but argument is of type 'unsigned char *' int base64url_dec(char *in, int ilen, char *out, int osize); ^~~~~~~~~~~~~ pv_trans.c:553:6: warning: pointer targets in passing argument 3 of 'base64url_dec' differ in signedness [-Wpointer-sign] (unsigned char *) _tr_buffer, TR_BUFFER_SIZE-1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from pv_trans.c:40: ../../core/basex.h:868:5: note: expected 'char *' but argument is of type 'unsigned char *' int base64url_dec(char *in, int ilen, char *out, int osize); ^~~~~~~~~~~~~ pv_trans.c:565:22: warning: pointer targets in passing argument 1 of 'base64url_enc' differ in signedness [-Wpointer-sign] i = base64url_enc((unsigned char *) val->rs.s, val->rs.len, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from pv_trans.c:40: ../../core/basex.h:867:5: note: expected 'char *' but argument is of type 'unsigned char *' int base64url_enc(char *in, int ilen, char *out, int osize); ^~~~~~~~~~~~~ pv_trans.c:566:6: warning: pointer targets in passing argument 3 of 'base64url_enc' differ in signedness [-Wpointer-sign] (unsigned char *) _tr_buffer, TR_BUFFER_SIZE-1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from pv_trans.c:40: ../../core/basex.h:867:5: note: expected 'char *' but argument is of type 'unsigned char *' int base64url_enc(char *in, int ilen, char *out, int osize); ^~~~~~~~~~~~~ pv_trans.c:597:23: warning: pointer targets in passing argument 1 of 'base64url_dec' differ in signedness [-Wpointer-sign] i = base64url_dec((unsigned char *) st.s, st.len, ^~~~~~~~~~~~~~~~~~~~~~ In file included from pv_trans.c:40: ../../core/basex.h:868:5: note: expected 'char *' but argument is of type 'unsigned char *' int base64url_dec(char *in, int ilen, char *out, int osize); ^~~~~~~~~~~~~ pv_trans.c:598:7: warning: pointer targets in passing argument 3 of 'base64url_dec' differ in signedness [-Wpointer-sign] (unsigned char *) _tr_buffer, TR_BUFFER_SIZE-1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from pv_trans.c:40: ../../core/basex.h:868:5: note: expected 'char *' but argument is of type 'unsigned char *' int base64url_dec(char *in, int ilen, char *out, int osize); ^~~~~~~~~~~~~ pv_trans.c:600:23: warning: pointer targets in passing argument 1 of 'base64url_dec' differ in signedness [-Wpointer-sign] i = base64url_dec((unsigned char *) val->rs.s, val->rs.len, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from pv_trans.c:40: ../../core/basex.h:868:5: note: expected 'char *' but argument is of type 'unsigned char *' int base64url_dec(char *in, int ilen, char *out, int osize); ^~~~~~~~~~~~~ pv_trans.c:601:7: warning: pointer targets in passing argument 3 of 'base64url_dec' differ in signedness [-Wpointer-sign] (unsigned char *) _tr_buffer, TR_BUFFER_SIZE-1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from pv_trans.c:40: ../../core/basex.h:868:5: note: expected 'char *' but argument is of type 'unsigned char *' int base64url_dec(char *in, int ilen, char *out, int osize); ^~~~~~~~~~~~~
Mar 7 00:15:46 char sip-proxy[21381]: 0(21433) ERROR: <core> [core/sr_module.c:512]: load_module(): could not open module </usr/lib/x86_64-linux-gnu/sip-proxy/modules/pv.so>: /usr/lib/x86_64-linux-gnu/sip-proxy/modules/pv.so: undefined symbol: base64url_enc
Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Hello,
I tried compiling with *latest master* and get this error upon starting kamailio:
-- Unit kamailio.service has begun starting up. mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: WARNING: tls [tls_mod.c:569]: mod_register(): tls support is disabled (set enable_tls=1 in the config to enable it) mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/sr_module.c:512]: load_module(): could not open module </usr/local/lib64/kamailio/modules/pv.so>: /usr/local/lib64/kamailio/modules/pv.so: mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: CRITICAL: <core> [core/cfg.y:3539]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 98, column 12-15: failed to load module mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "proto" mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [o/111] in [$proto] at [5 (0)] mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "proto" mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [o/111] in [$proto] at [5 (0)] mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "ru" mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [u/117] in [$ru] at [2 (0)] mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "ru" mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [u/117] in [$ru] at [2 (0)] mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "ru" mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [u/117] in [$ru] at [2 (0)] mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "ru" mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [u/117] in [$ru] at [2 (0)] mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "tU" mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [U/85] in [$tU] at [2 (0)] mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "var" mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: bad config file (2 errors) mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [d/100] in [$var(dispatcher_set)] at [5 (5)] mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: CRITICAL: <core> [core/cfg.y:3539]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 466, column 3-22: Can't get from cache: $var(disp mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/ppcfg.c:234]: pp_ifdef_level_error(): different number of preprocessor directives: 1 more #!if[n]def as #!endif mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: loading modules under config path: /usr/local/lib64/kamailio/modules/ mar 09 13:36:36 LXBU-GRPF8S2 systemd[1]: kamailio.service: Control process exited, code=exited status=255 mar 09 13:36:36 LXBU-GRPF8S2 systemd[1]: kamailio.service: Failed with result 'exit-code'. mar 09 13:36:36 LXBU-GRPF8S2 systemd[1]: Failed to start Kamailio (OpenSER) - the Open Source SIP Server. -- Subject: Unit kamailio.service has failed
I traced back the issue to this commit: 1dd8c5784aa58bd48a713661a1f3e4ed7db58c88
My system is Ubuntu 18.04.4 LTS \n \l
gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
On 07.03.2020 03:13, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
They were from the previous commits indeed -- clang on mac was not reporting them. I just pushed patches to fix them.
Thanks, works now, Juha
Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Hello,
is it you source code clone updated today? What is the output of "kamailio -I" (uppercase i)? I was running a few times today the kamailio master and worked fine.
In your logs it is shown another error related to IFDEFs:
09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/ppcfg.c:234]: pp_ifdef_level_error(): different number of preprocessor directives: 1 more #!if[n]def as #!endif
Can you check to be sure is not a side effect of this one?
Cheers, Daniel
On 09.03.20 12:37, Stefan Mititelu wrote:
Hello,
I tried compiling with *latest master* and get this error upon starting kamailio:
-- Unit kamailio.service has begun starting up. mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: WARNING: tls [tls_mod.c:569]: mod_register(): tls support is disabled (set enable_tls=1 in the config to enable it) mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/sr_module.c:512]: load_module(): could not open module </usr/local/lib64/kamailio/modules/pv.so>: /usr/local/lib64/kamailio/modules/pv.so: mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: CRITICAL: <core> [core/cfg.y:3539]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 98, column 12-15: failed to load module mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "proto" mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [o/111] in [$proto] at [5 (0)] mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "proto" mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [o/111] in [$proto] at [5 (0)] mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "ru" mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [u/117] in [$ru] at [2 (0)] mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "ru" mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [u/117] in [$ru] at [2 (0)] mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "ru" mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [u/117] in [$ru] at [2 (0)] mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "ru" mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [u/117] in [$ru] at [2 (0)] mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "tU" mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [U/85] in [$tU] at [2 (0)] mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "var" mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: bad config file (2 errors) mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [d/100] in [$var(dispatcher_set)] at [5 (5)] mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: CRITICAL: <core> [core/cfg.y:3539]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 466, column 3-22: Can't get from cache: $var(disp mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/ppcfg.c:234]: pp_ifdef_level_error(): different number of preprocessor directives: 1 more #!if[n]def as #!endif mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized mar 09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: loading modules under config path: /usr/local/lib64/kamailio/modules/ mar 09 13:36:36 LXBU-GRPF8S2 systemd[1]: kamailio.service: Control process exited, code=exited status=255 mar 09 13:36:36 LXBU-GRPF8S2 systemd[1]: kamailio.service: Failed with result 'exit-code'. mar 09 13:36:36 LXBU-GRPF8S2 systemd[1]: Failed to start Kamailio (OpenSER) - the Open Source SIP Server. -- Subject: Unit kamailio.service has failed
I traced back the issue to this commit: 1dd8c5784aa58bd48a713661a1f3e4ed7db58c88
My system is Ubuntu 18.04.4 LTS \n \l
gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
On 07.03.2020 03:13, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
They were from the previous commits indeed -- clang on mac was not reporting them. I just pushed patches to fix them.
Thanks, works now, Juha
Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Hi Daniel,
Yes, I just tried again with a fresh clone of upstream and build. The output of that command is:
Print out of kamailio internals Version: kamailio 5.4.0-dev3 (x86_64/linux) 92c6f0 Default config: /usr/local/etc/kamailio/kamailio.cfg Default paths to modules: /usr/local/lib64/kamailio/modules Compile flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED MAX_RECV_BUFFER_SIZE=262144 MAX_URI_SIZE=1024 BUF_SIZE=65535 DEFAULT PKG_SIZE=8MB DEFAULT SHM_SIZE=64MB ADAPTIVE_WAIT_LOOPS=1024 TCP poll methods: poll, epoll_lt, epoll_et, sigio_rt, select Source code revision ID: 92c6f0 Compiled with: gcc 7.4.0 Compiled architecture: x86_64 Compiled on: 15:35:29 Mar 9 2020 Thank you for flying kamailio!
After I solved the "if[n]def" config line issue, kamailio still not starting.
On 09.03.2020 14:04, Daniel-Constantin Mierla wrote:
Hello,
is it you source code clone updated today? What is the output of "kamailio -I" (uppercase i)? I was running a few times today the kamailio master and worked fine.
In your logs it is shown another error related to IFDEFs:
09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/ppcfg.c:234]: pp_ifdef_level_error(): different number of preprocessor directives: 1 more #!if[n]def as #!endif
Can you check to be sure is not a side effect of this one?
Cheers, Daniel
-- Daniel-Constantin Mierla --www.asipto.com www.twitter.com/miconda --www.linkedin.com/in/miconda Kamailio Advanced Training - March 9-11, 2020, Berlin -www.asipto.com Kamailio World Conference - April 27-29, 2020, in Berlin --www.kamailioworld.com
I mean, still the same pv errors as before:
-- Unit kamailio.service has begun starting up. mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: WARNING: tls [tls_mod.c:569]: mod_register(): tls support is disabled (set enable_tls=1 in the config to enable it) mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/sr_module.c:512]: load_module(): could not open module </usr/local/lib64/kamailio/modules/pv.so>: /usr/local/lib64/kamailio/modules/pv.so: mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: CRITICAL: <core> [core/cfg.y:3539]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 98, column 12-15: failed to load module mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "proto" mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [o/111] in [$proto] at [5 (0)] mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "proto" mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [o/111] in [$proto] at [5 (0)] mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "ru" mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [u/117] in [$ru] at [2 (0)] mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "ru" mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [u/117] in [$ru] at [2 (0)] mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "ru" mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [u/117] in [$ru] at [2 (0)] mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "ru" mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [u/117] in [$ru] at [2 (0)] mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "tU" mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [U/85] in [$tU] at [2 (0)] mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: bad config file (2 errors) mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "var" mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [d/100] in [$var(dispatcher_set)] at [5 (5)] mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: CRITICAL: <core> [core/cfg.y:3539]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 460, column 3-22: Can't get from cache: $var(dis mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: loading modules under config path: /usr/local/lib64/kamailio/modules/ mar 09 15:37:34 LXBU-GRPF8S2 systemd[1]: kamailio.service: Control process exited, code=exited status=255 mar 09 15:37:34 LXBU-GRPF8S2 systemd[1]: kamailio.service: Failed with result 'exit-code'. mar 09 15:37:34 LXBU-GRPF8S2 systemd[1]: Failed to start Kamailio (OpenSER) - the Open Source SIP Server. -- Subject: Unit kamailio.service has failed
On 09.03.2020 15:39, Stefan Mititelu wrote:
Hi Daniel,
Yes, I just tried again with a fresh clone of upstream and build. The output of that command is:
Print out of kamailio internals Version: kamailio 5.4.0-dev3 (x86_64/linux) 92c6f0 Default config: /usr/local/etc/kamailio/kamailio.cfg Default paths to modules: /usr/local/lib64/kamailio/modules Compile flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED MAX_RECV_BUFFER_SIZE=262144 MAX_URI_SIZE=1024 BUF_SIZE=65535 DEFAULT PKG_SIZE=8MB DEFAULT SHM_SIZE=64MB ADAPTIVE_WAIT_LOOPS=1024 TCP poll methods: poll, epoll_lt, epoll_et, sigio_rt, select Source code revision ID: 92c6f0 Compiled with: gcc 7.4.0 Compiled architecture: x86_64 Compiled on: 15:35:29 Mar 9 2020 Thank you for flying kamailio!
After I solved the "if[n]def" config line issue, kamailio still not starting.
On 09.03.2020 14:04, Daniel-Constantin Mierla wrote:
Hello,
is it you source code clone updated today? What is the output of "kamailio -I" (uppercase i)? I was running a few times today the kamailio master and worked fine.
In your logs it is shown another error related to IFDEFs:
09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/ppcfg.c:234]: pp_ifdef_level_error(): different number of preprocessor directives: 1 more #!if[n]def as #!endif
Can you check to be sure is not a side effect of this one?
Cheers, Daniel
-- Daniel-Constantin Mierla --www.asipto.com www.twitter.com/miconda --www.linkedin.com/in/miconda Kamailio Advanced Training - March 9-11, 2020, Berlin -www.asipto.com Kamailio World Conference - April 27-29, 2020, in Berlin --www.kamailioworld.com
Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
The error message doesn't show the real reason of not being able to load pv.so file, like a missing symbol (which was the case for the initial report in this thread). Maybe it is due to file permissions or file not being at that location for what so ever reason, can you check it?
I just started master again and I ran rpc command for version:
# kamctl srv version
-e list server version { "jsonrpc": "2.0", "result": "kamailio 5.4.0-dev3 (x86_64/darwin) 92c6f0", "id": 17691 }
Loaded modules:
# kamctl rpc core.modules
{ "jsonrpc": "2.0", "result": [ "counters", "acc", "cfg_rpc", "ctl", "sanity", "xlog", "siputils", "textops", "registrar", "usrloc", "maxfwd", "pv", "rr", "sl", "tmx", "tm", "corex", "kex", "jsonrpcs" ], "id": 17722 }
The pv module is there. So should be some other reason for your failure than my code done recently.
Cheers, Daniel
On 09.03.20 14:42, Stefan Mititelu wrote:
I mean, still the same pv errors as before:
-- Unit kamailio.service has begun starting up. mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: WARNING: tls [tls_mod.c:569]: mod_register(): tls support is disabled (set enable_tls=1 in the config to enable it) mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/sr_module.c:512]: load_module(): could not open module </usr/local/lib64/kamailio/modules/pv.so>: /usr/local/lib64/kamailio/modules/pv.so: mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: CRITICAL: <core> [core/cfg.y:3539]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 98, column 12-15: failed to load module mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "proto" mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [o/111] in [$proto] at [5 (0)] mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "proto" mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [o/111] in [$proto] at [5 (0)] mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "ru" mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [u/117] in [$ru] at [2 (0)] mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "ru" mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [u/117] in [$ru] at [2 (0)] mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "ru" mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [u/117] in [$ru] at [2 (0)] mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "ru" mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [u/117] in [$ru] at [2 (0)] mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "tU" mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [U/85] in [$tU] at [2 (0)] mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: bad config file (2 errors) mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:923]: pv_parse_spec2(): error searching pvar "var" mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: ERROR: <core> [core/pvapi.c:1126]: pv_parse_spec2(): wrong char [d/100] in [$var(dispatcher_set)] at [5 (5)] mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: CRITICAL: <core> [core/cfg.y:3539]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 460, column 3-22: Can't get from cache: $var(dis mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized mar 09 15:37:34 LXBU-GRPF8S2 kamailio[18813]: loading modules under config path: /usr/local/lib64/kamailio/modules/ mar 09 15:37:34 LXBU-GRPF8S2 systemd[1]: kamailio.service: Control process exited, code=exited status=255 mar 09 15:37:34 LXBU-GRPF8S2 systemd[1]: kamailio.service: Failed with result 'exit-code'. mar 09 15:37:34 LXBU-GRPF8S2 systemd[1]: Failed to start Kamailio (OpenSER) - the Open Source SIP Server. -- Subject: Unit kamailio.service has failed
On 09.03.2020 15:39, Stefan Mititelu wrote:
Hi Daniel,
Yes, I just tried again with a fresh clone of upstream and build. The output of that command is:
Print out of kamailio internals Version: kamailio 5.4.0-dev3 (x86_64/linux) 92c6f0 Default config: /usr/local/etc/kamailio/kamailio.cfg Default paths to modules: /usr/local/lib64/kamailio/modules Compile flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED MAX_RECV_BUFFER_SIZE=262144 MAX_URI_SIZE=1024 BUF_SIZE=65535 DEFAULT PKG_SIZE=8MB DEFAULT SHM_SIZE=64MB ADAPTIVE_WAIT_LOOPS=1024 TCP poll methods: poll, epoll_lt, epoll_et, sigio_rt, select Source code revision ID: 92c6f0 Compiled with: gcc 7.4.0 Compiled architecture: x86_64 Compiled on: 15:35:29 Mar 9 2020 Thank you for flying kamailio!
After I solved the "if[n]def" config line issue, kamailio still not starting.
On 09.03.2020 14:04, Daniel-Constantin Mierla wrote:
Hello,
is it you source code clone updated today? What is the output of "kamailio -I" (uppercase i)? I was running a few times today the kamailio master and worked fine.
In your logs it is shown another error related to IFDEFs:
09 13:36:36 LXBU-GRPF8S2 kamailio[6562]: ERROR: <core> [core/ppcfg.c:234]: pp_ifdef_level_error(): different number of preprocessor directives: 1 more #!if[n]def as #!endif
Can you check to be sure is not a side effect of this one?
Cheers, Daniel
-- Daniel-Constantin Mierla --www.asipto.com www.twitter.com/miconda --www.linkedin.com/in/miconda Kamailio Advanced Training - March 9-11, 2020, Berlin -www.asipto.com Kamailio World Conference - April 27-29, 2020, in Berlin --www.kamailioworld.com
Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Indeed, "journalctl -xe" truncated the error msg... sorry for not checking that.
Here it is from syslog:
Mar 9 17:13:05 LXBU-GRPF8S2 kamailio: ERROR: <core> [core/sr_module.c:512]: load_module(): could not open module </usr/local/lib64/kamailio/modules/pv.so>: /usr/local/lib64/kamailio/modules/pv.so: *undefined symbol: base64url_dec*
Just as a double check I did:
~/kamailio-upstream$ ls -lah /usr/local/lib64/kamailio/modules/pv.so -rwxr-xr-x 1 root root 1,2M mar 9 17:13 /usr/local/lib64/kamailio/modules/pv.so
~/kamailio-upstream$ sudo cat /etc/systemd/system/kamailio.service
...
ExecStart=/sbin/kamailio -P /var/kamailio.pid -f /etc/kamailio/kamailio.cfg -m 64 -M 128 -u root -g root ...
So the file exists and has proper access rights.
On 09.03.2020 17:01, Daniel-Constantin Mierla wrote:
The error message doesn't show the real reason of not being able to load pv.so file, like a missing symbol (which was the case for the initial report in this thread). Maybe it is due to file permissions or file not being at that location for what so ever reason, can you check it?
Hmm, quite strange, the function exists, defined in src/core/basex.c:
$ ag --cc base64url_dec src/core/basex.h 868:int base64url_dec(char *in, int ilen, char *out, int osize);
src/core/basex.c 465:int base64url_dec(char *in, int ilen, char *out, int osize)
src/modules/pv/pv_trans.c 552: i = base64url_dec(val->rs.s, val->rs.len, 597: i = base64url_dec(st.s, st.len, 600: i = base64url_dec(val->rs.s, val->rs.len,
What operating system are you using and is the version of the c compiler?
Cheers, Daniel
On 09.03.20 16:17, Stefan Mititelu wrote:
Indeed, "journalctl -xe" truncated the error msg... sorry for not checking that.
Here it is from syslog:
Mar 9 17:13:05 LXBU-GRPF8S2 kamailio: ERROR: <core> [core/sr_module.c:512]: load_module(): could not open module </usr/local/lib64/kamailio/modules/pv.so>: /usr/local/lib64/kamailio/modules/pv.so: *undefined symbol: base64url_dec*
Just as a double check I did:
~/kamailio-upstream$ ls -lah /usr/local/lib64/kamailio/modules/pv.so -rwxr-xr-x 1 root root 1,2M mar 9 17:13 /usr/local/lib64/kamailio/modules/pv.so
~/kamailio-upstream$ sudo cat /etc/systemd/system/kamailio.service
...
ExecStart=/sbin/kamailio -P /var/kamailio.pid -f /etc/kamailio/kamailio.cfg -m 64 -M 128 -u root -g root ...
So the file exists and has proper access rights.
On 09.03.2020 17:01, Daniel-Constantin Mierla wrote:
The error message doesn't show the real reason of not being able to load pv.so file, like a missing symbol (which was the case for the initial report in this thread). Maybe it is due to file permissions or file not being at that location for what so ever reason, can you check it?
Sorry, this is totally my bad... :(
I had 2 kamailio binaries installed:
- one from packages, in /sbin/kamailio
- other from sources, in /usr/local/sbin/kamailio
In the systemctl service file, I was using the /sbin/kamailio binary file (the older core code). However, the config file I used, always pointed to the newly compiled modules *.so files.
So, I was using the old core but with new modules. Now it all makes sense!
---
Stefan
On 09.03.2020 18:20, Daniel-Constantin Mierla wrote:
Hmm, quite strange, the function exists, defined in src/core/basex.c:
$ ag --cc base64url_dec src/core/basex.h 868:int base64url_dec(char *in, int ilen, char *out, int osize);
src/core/basex.c 465:int base64url_dec(char *in, int ilen, char *out, int osize)
src/modules/pv/pv_trans.c 552: i = base64url_dec(val->rs.s, val->rs.len, 597: i = base64url_dec(st.s, st.len, 600: i = base64url_dec(val->rs.s, val->rs.len,
What operating system are you using and is the version of the c compiler?
Cheers, Daniel
On 09.03.20 16:17, Stefan Mititelu wrote:
Indeed, "journalctl -xe" truncated the error msg... sorry for not checking that.
Here it is from syslog:
Mar 9 17:13:05 LXBU-GRPF8S2 kamailio: ERROR: <core> [core/sr_module.c:512]: load_module(): could not open module </usr/local/lib64/kamailio/modules/pv.so>: /usr/local/lib64/kamailio/modules/pv.so: *undefined symbol: base64url_dec*
Just as a double check I did:
~/kamailio-upstream$ ls -lah /usr/local/lib64/kamailio/modules/pv.so -rwxr-xr-x 1 root root 1,2M mar 9 17:13 /usr/local/lib64/kamailio/modules/pv.so
~/kamailio-upstream$ sudo cat /etc/systemd/system/kamailio.service
...
ExecStart=/sbin/kamailio -P /var/kamailio.pid -f /etc/kamailio/kamailio.cfg -m 64 -M 128 -u root -g root ...
So the file exists and has proper access rights.
On 09.03.2020 17:01, Daniel-Constantin Mierla wrote:
The error message doesn't show the real reason of not being able to load pv.so file, like a missing symbol (which was the case for the initial report in this thread). Maybe it is due to file permissions or file not being at that location for what so ever reason, can you check it?
-- Daniel-Constantin Mierla --www.asipto.com www.twitter.com/miconda --www.linkedin.com/in/miconda Kamailio Advanced Training - March 9-11, 2020, Berlin -www.asipto.com Kamailio World Conference - April 27-29, 2020, in Berlin --www.kamailioworld.com