While compiling Kamailio 4.3 on Debian Jessie, I got this:
CC (gcc) [M xmlrpc.so] xmlrpc.o xmlrpc.c: In function 'set_fault': xmlrpc.c:886:2: warning: implicit declaration of function 'vsnprintf' [-Wimplicit-function-declaration] vsnprintf(buf, REASON_BUF_LEN, fmt, ap); ^ xmlrpc.c: In function 'print_value': xmlrpc.c:1015:3: warning: implicit declaration of function 'snprintf' [-Wimplicit-function-declaration] body.len = snprintf(buf, 256, "%f", va_arg(*ap, double)); ^ xmlrpc.c:1015:14: warning: incompatible implicit declaration of built-in function 'snprintf' body.len = snprintf(buf, 256, "%f", va_arg(*ap, double)); ^
Sounds pretty serious.
-- Juha
Looks like cause of the warnings is this commit done 5 days ago:
https://github.com/kamailio/kamailio/commit/efe5903cd17de9c5d94610e2345254e3...
So I'm in big trouble: due to tls incompatibility, Kamailio 4.3 does not start without rebuild and I clean rebuild is not possible due to xmlrpc module issue.
-- Juha
If redeclaration of snprintf and vsnprintf causes trouble for clang, then they should be removed only when compiler is clang.
-- Juha
Hi Juha,
are you giving special parameters to gcc version?
I just tested on debian jessie and all seems ok:
# make modules modules=modules/xmlrpc Makefile:56: modules.lst: No such file or directory saving modules list... CC (gcc) [M xmlrpc.so] xmlrpc.o CC (gcc) [M xmlrpc.so] http.o LD (gcc) [M xmlrpc.so] xmlrpc.so
# uname -a Linux srv 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) i686 GNU/Linux
# cat /etc/debian_version 8.5
Cheers, Daniel
On 08/06/16 08:37, Juha Heinanen wrote:
If redeclaration of snprintf and vsnprintf causes trouble for clang, then they should be removed only when compiler is clang.
-- Juha
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
First I tried with master branch and no warning, but then I tried with 4.4 and indeed the warning was there.
A commit from master needed to be backported. Try again and see if works ok now.
Cheers, Daniel
On 08/06/16 09:20, Daniel-Constantin Mierla wrote:
Hi Juha,
are you giving special parameters to gcc version?
I just tested on debian jessie and all seems ok:
# make modules modules=modules/xmlrpc Makefile:56: modules.lst: No such file or directory saving modules list... CC (gcc) [M xmlrpc.so] xmlrpc.o CC (gcc) [M xmlrpc.so] http.o LD (gcc) [M xmlrpc.so] xmlrpc.so
# uname -a Linux srv 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) i686 GNU/Linux
# cat /etc/debian_version 8.5
Cheers, Daniel
On 08/06/16 08:37, Juha Heinanen wrote:
If redeclaration of snprintf and vsnprintf causes trouble for clang, then they should be removed only when compiler is clang.
-- Juha
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
-- Daniel-Constantin Mierla http://www.asipto.com - http://www.kamailio.org http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Daniel-Constantin Mierla writes:
are you giving special parameters to gcc version?
Nothing special.
I just tested on debian jessie and all seems ok:
# make modules modules=modules/xmlrpc Makefile:56: modules.lst: No such file or directory saving modules list... CC (gcc) [M xmlrpc.so] xmlrpc.o CC (gcc) [M xmlrpc.so] http.o LD (gcc) [M xmlrpc.so] xmlrpc.so
# uname -a Linux srv 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) i686 GNU/Linux
Here is what I get:
$ make modules modules=modules/xmlrpc CC (gcc) [M xmlrpc.so] xmlrpc.o xmlrpc.c: In function ‘set_fault’: xmlrpc.c:886:2: warning: implicit declaration of function ‘vsnprintf’ [-Wimplicit-function-declaration] vsnprintf(buf, REASON_BUF_LEN, fmt, ap); ^ xmlrpc.c: In function ‘print_value’: xmlrpc.c:1015:3: warning: implicit declaration of function ‘snprintf’ [-Wimplicit-function-declaration] body.len = snprintf(buf, 256, "%f", va_arg(*ap, double)); ^ xmlrpc.c:1015:14: warning: incompatible implicit declaration of built-in function ‘snprintf’ body.len = snprintf(buf, 256, "%f", va_arg(*ap, double));
$ uname -a Linux box 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u3 (2016-01-17) x86_64 GNU/Linux
Difference is that you have 686 arch and I have amd64.
And if I add the lines removed 5 days ago, xmlrpc module compiles fine.
-- Juha