probably can be considered to be a regression, was added in rev 19998 :
ZBXNEXT-799 added support of SRV records to net.tcp.dns.query[]
ZBX-1029 added lookup of Jabber SRV records to Jabber notifications
|
Could you please try to compile with each of these patches to help determine the bottom issue and get back with the results? Thanks!
|
V1 compiles OK, while V2 ends with the following error:
gcc -DHAVE_CONFIG_H -I. -I../../../../include -g -O2 -MT net.o -MD -MP -MF .deps/net.Tpo -c -o net.o net.c
In file included from net.c:28:
/usr/include/arpa/nameser_compat.h:99: error: conflicting types for ‘HEADER’
/usr/include/arpa/nameser8_compat.h:304: error: previous declaration of ‘HEADER’ was here
net.c: In function ‘decode_type’:
net.c:182: error: ‘ns_t_a’ undeclared (first use in this function)
net.c:182: error: (Each undeclared identifier is reported only once
net.c:182: error: for each function it appears in.)
net.c:183: error: ‘ns_t_ns’ undeclared (first use in this function)
net.c:184: error: ‘ns_t_md’ undeclared (first use in this function)
net.c:185: error: ‘ns_t_mf’ undeclared (first use in this function)
net.c:186: error: ‘ns_t_cname’ undeclared (first use in this function)
net.c:187: error: ‘ns_t_soa’ undeclared (first use in this function)
net.c:188: error: ‘ns_t_mb’ undeclared (first use in this function)
net.c:189: error: ‘ns_t_mg’ undeclared (first use in this function)
net.c:190: error: ‘ns_t_mr’ undeclared (first use in this function)
net.c:191: error: ‘ns_t_null’ undeclared (first use in this function)
net.c:192: error: ‘ns_t_wks’ undeclared (first use in this function)
net.c:193: error: ‘ns_t_ptr’ undeclared (first use in this function)
net.c:194: error: ‘ns_t_hinfo’ undeclared (first use in this function)
net.c:195: error: ‘ns_t_minfo’ undeclared (first use in this function)
net.c:196: error: ‘ns_t_mx’ undeclared (first use in this function)
net.c:197: error: ‘ns_t_txt’ undeclared (first use in this function)
net.c:198: error: ‘ns_t_srv’ undeclared (first use in this function)
net.c: In function ‘NET_TCP_DNS’:
net.c:231: error: ‘NS_PACKETSZ’ undeclared (first use in this function)
net.c:272: error: ‘ns_c_in’ undeclared (first use in this function)
net.c:272: error: ‘ns_t_soa’ undeclared (first use in this function)
net.c: In function ‘NET_TCP_DNS_QUERY’:
net.c:295: error: ‘ns_t_any’ undeclared (first use in this function)
net.c:296: error: ‘ns_t_a’ undeclared (first use in this function)
net.c:297: error: ‘ns_t_ns’ undeclared (first use in this function)
net.c:298: error: ‘ns_t_md’ undeclared (first use in this function)
net.c:299: error: ‘ns_t_mf’ undeclared (first use in this function)
net.c:300: error: ‘ns_t_cname’ undeclared (first use in this function)
net.c:301: error: ‘ns_t_soa’ undeclared (first use in this function)
net.c:302: error: ‘ns_t_mb’ undeclared (first use in this function)
net.c:303: error: ‘ns_t_mg’ undeclared (first use in this function)
net.c:304: error: ‘ns_t_mr’ undeclared (first use in this function)
net.c:305: error: ‘ns_t_null’ undeclared (first use in this function)
net.c:306: error: ‘ns_t_wks’ undeclared (first use in this function)
net.c:307: error: ‘ns_t_ptr’ undeclared (first use in this function)
net.c:308: error: ‘ns_t_hinfo’ undeclared (first use in this function)
net.c:309: error: ‘ns_t_minfo’ undeclared (first use in this function)
net.c:310: error: ‘ns_t_mx’ undeclared (first use in this function)
net.c:311: error: ‘ns_t_txt’ undeclared (first use in this function)
net.c:312: error: ‘ns_t_srv’ undeclared (first use in this function)
net.c:321: error: ‘NS_PACKETSZ’ undeclared (first use in this function)
net.c:369: error: ‘ns_c_in’ undeclared (first use in this function)
net.c:369: warning: passing argument 2 of ‘res_query’ makes integer from pointer without a cast
net.c:369: warning: passing argument 4 of ‘res_query’ from incompatible pointer type
net.c:369: warning: passing argument 5 of ‘res_query’ makes integer from pointer without a cast
net.c:375: warning: assignment from incompatible pointer type
net.c:380: error: ‘NS_HFIXEDSZ’ undeclared (first use in this function)
net.c:380: error: invalid operands to binary +
net.c:385: error: ‘NS_QFIXEDSZ’ undeclared (first use in this function)
net.c:385: error: invalid operands to binary +
net.c:385: warning: assignment from incompatible pointer type
net.c:389: warning: passing argument 1 of ‘get_name’ from incompatible pointer type
net.c:396: error: ‘NS_INT32SZ’ undeclared (first use in this function)
net.c:401: warning: case label value exceeds maximum value for type
net.c:404: warning: case label value exceeds maximum value for type
net.c:405: error: ‘ns_c_hs’ undeclared (first use in this function)
net.c:405: warning: case label value exceeds maximum value for type
net.c:406: error: ‘NS_INADDRSZ’ undeclared (first use in this function)
net.c:406: warning: passing argument 3 of ‘bcopy’ makes integer from pointer without a cast
net.c:414: warning: case label value exceeds maximum value for type
net.c:415: warning: case label value exceeds maximum value for type
net.c:416: warning: case label value exceeds maximum value for type
net.c:417: warning: case label value exceeds maximum value for type
net.c:418: warning: case label value exceeds maximum value for type
net.c:419: warning: case label value exceeds maximum value for type
net.c:420: warning: passing argument 1 of ‘get_name’ from incompatible pointer type
net.c:424: warning: case label value exceeds maximum value for type
net.c:425: warning: case label value exceeds maximum value for type
net.c:426: warning: case label value exceeds maximum value for type
net.c:430: warning: passing argument 1 of ‘get_name’ from incompatible pointer type
net.c:434: warning: case label value exceeds maximum value for type
net.c:437: warning: passing argument 1 of ‘get_name’ from incompatible pointer type
net.c:441: warning: passing argument 1 of ‘get_name’ from incompatible pointer type
net.c:460: warning: case label value exceeds maximum value for type
net.c:464: warning: case label value exceeds maximum value for type
net.c:465: warning: comparison between pointer and integer
net.c:470: warning: passing argument 3 of ‘bcopy’ makes integer from pointer without a cast
net.c:499: warning: case label value exceeds maximum value for type
net.c:521: warning: case label value exceeds maximum value for type
net.c:522: warning: passing argument 1 of ‘get_name’ from incompatible pointer type
net.c:526: warning: passing argument 1 of ‘get_name’ from incompatible pointer type
net.c:530: warning: case label value exceeds maximum value for type
net.c:541: warning: case label value exceeds maximum value for type
net.c:553: warning: passing argument 1 of ‘get_name’ from incompatible pointer type
make[4]: *** [net.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
|
Sorry for the late response. Interesting result, could you please try requesting "net.tcp.dns.query[,_xmpp-client._tcp.codingteam.net,SRV]" with V1 and paste the result (to make sure V1 works)?
Could you also search *.h files in your include directory for "ns_t_srv"?
This is rather poorly documented - either a header is missing in our #include statements (and that could potentially lead to other problems) or we simply need to defined the constants in Zabbix code as it is already done in 1.9.* branch.
|
This looks weird. Can you please look at your config.log file and look for lines like:
configure:4487: checking arpa/nameser.h usability
configure:4487: gcc -c -Wall -Wuninitialized -Wtype-limits conftest.c >&5
configure:4487: $? = 0
configure:4487: result: yes
The idea is that <arpa/nameser.h> should be included and thus ns_t_srv should be defined: configurator first checks whether the header exists (that is what you should find in config.log) and then the header is included in sysinc.h->common.h->net.c.
|
I have those lines, and also I have
#define HAVE_ARPA_NAMESER_H 1
in include/config.h
I think the problem is the following ifdef in sysinc.h:
#ifdef MAC_OS_X
- define BIND_8_COMPAT 1
#endif
which causes nameser.h to only load arpa/nameser8_compat.h and no the useful ns_t_srv definition.
|
I had the same thought, could you check it by looking at nameser.h (or maybe attach it)? I checked on the only Mac we have at the office and that define just brought in another file:
#ifdef BIND_8_COMPAT
#include <arpa/nameser_compat.h>
#endif
Maybe you can play around with nameser.h - e.g. add a custom #define statement at the top, e.g.:
#define MY_CUSTOM_DEFINE_ST 1
and add to the top of net.c something like:
int test = MY_CUSTOM_DEFINE_ST;
and see if it compiles?
|
The same happens on my Mac, but the alternative file is named arpa/nameser8_compat.h
Maybe you can include in configure a check for ns_t_srv and if it fails remove the define BIND_8_COMPAT
I tried removing the 3 lines and the error changes:
gcc -DHAVE_CONFIG_H -I. -I../../../../include -g -O2 -I/rnd/apps/servers/mysql-5.0.67/include -g -Os -arch x86_64 -fno-common -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -MT net.o -MD -MP -MF .deps/net.Tpo -c -o net.o net.c
net.c: In function ‘NET_TCP_DNS_QUERY’:
net.c:316: error: syntax error before ‘HEADER’
net.c:316: warning: no semicolon at end of struct or union
net.c: At top level:
net.c:324: warning: data definition has no type or storage class
net.c:331: error: syntax error before ‘answer’
net.c:331: warning: data definition has no type or storage class
net.c:336: error: syntax error before ‘if’
net.c:349: error: syntax error before ‘.’ token
net.c:362: warning: data definition has no type or storage class
net.c:364: error: conflicting types for ‘buffer’
net.c:327: error: previous declaration of ‘buffer’ was here
net.c:364: warning: data definition has no type or storage class
net.c:365: warning: data definition has no type or storage class
net.c:368: error: syntax error before ‘if’
net.c:374: error: conflicting types for ‘msg_end’
net.c:328: error: previous declaration of ‘msg_end’ was here
net.c:374: error: request for member ‘buffer’ in something not a structure or union
net.c:374: warning: data definition has no type or storage class
net.c:376: error: request for member ‘h’ in something not a structure or union
net.c:376: error: request for member ‘h’ in something not a structure or union
net.c:376: error: request for member ‘h’ in something not a structure or union
net.c:376: error: request for member ‘h’ in something not a structure or union
net.c:376: warning: data definition has no type or storage class
net.c:377: error: request for member ‘h’ in something not a structure or union
net.c:377: error: request for member ‘h’ in something not a structure or union
net.c:377: error: request for member ‘h’ in something not a structure or union
net.c:377: error: request for member ‘h’ in something not a structure or union
net.c:377: warning: data definition has no type or storage class
net.c:379: error: conflicting types for ‘msg_ptr’
net.c:328: error: previous declaration of ‘msg_ptr’ was here
net.c:379: error: request for member ‘buffer’ in something not a structure or union
net.c:379: error: ‘HFIXEDSZ’ undeclared here (not in a function)
net.c:379: warning: data definition has no type or storage class
net.c:383: error: syntax error before ‘for’
net.c:393: warning: parameter names (without types) in function declaration
net.c:393: warning: data definition has no type or storage class
net.c:394: warning: parameter names (without types) in function declaration
net.c:394: warning: data definition has no type or storage class
net.c:395: error: syntax error before ‘+=’ token
net.c:396: warning: parameter names (without types) in function declaration
net.c:396: warning: data definition has no type or storage class
net.c:398: error: syntax error before ‘switch’
net.c:444: warning: parameter names (without types) in function declaration
net.c:444: warning: data definition has no type or storage class
net.c:445: error: syntax error before ‘+=’ token
net.c:447: warning: parameter names (without types) in function declaration
net.c:447: warning: data definition has no type or storage class
net.c:448: error: syntax error before ‘+=’ token
net.c:450: warning: parameter names (without types) in function declaration
net.c:450: warning: data definition has no type or storage class
net.c:451: error: syntax error before ‘+=’ token
net.c:453: warning: parameter names (without types) in function declaration
net.c:453: warning: data definition has no type or storage class
net.c:454: error: syntax error before ‘+=’ token
net.c:456: warning: parameter names (without types) in function declaration
net.c:456: warning: data definition has no type or storage class
net.c:457: error: syntax error before ‘+=’ token
net.c:467: error: conflicting types for ‘p’
net.c:328: error: previous declaration of ‘p’ was here
net.c:467: error: initializer element is not constant
net.c:467: warning: data definition has no type or storage class
net.c:469: error: syntax error before ‘&’ token
net.c:469: error: conflicting types for ‘bcopy’
net.c:469: warning: data definition has no type or storage class
net.c:470: error: syntax error before ‘+=’ token
net.c:480: warning: data definition has no type or storage class
net.c:482: error: syntax error before ‘while’
net.c:501: error: conflicting types for ‘p’
net.c:328: error: previous declaration of ‘p’ was here
net.c:501: error: initializer element is not constant
net.c:501: warning: data definition has no type or storage class
net.c:502: error: invalid type argument of ‘unary *’
net.c:502: warning: data definition has no type or storage class
net.c:504: error: syntax error before ‘if’
net.c:532: error: conflicting types for ‘p’
net.c:328: error: previous declaration of ‘p’ was here
net.c:532: error: initializer element is not constant
net.c:532: warning: data definition has no type or storage class
net.c:533: error: syntax error before ‘while’
net.c:543: warning: parameter names (without types) in function declaration
net.c:543: warning: data definition has no type or storage class
net.c:544: error: syntax error before ‘+=’ token
net.c:546: warning: parameter names (without types) in function declaration
net.c:546: warning: data definition has no type or storage class
net.c:547: error: syntax error before ‘+=’ token
net.c:549: warning: parameter names (without types) in function declaration
net.c:549: warning: data definition has no type or storage class
net.c:550: error: syntax error before ‘+=’ token
net.c:564: error: syntax error before ‘->’ token
make[4]: *** [net.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
|
That error shows that "#include <arpa/nameser_compat.h>" is needed - it defines "HEADER" structure which is used in net.c.
Did I understand correctly that you removed the 3 lines from "nameser.h"? If so, I really have no clue why you are missing "ns_t_srv" since the header where it is defined is clearly included Could you maybe attach the header (nameser.h) to see if there is any significant difference from what I've seen so far?
|
I removed 3 lines from sysinc.h, so I don't have BIND_8_COMPAT defined (and thus nameser8_compat.h is not included anymore)
If I modify
#ifdef MAC_OS_X
- define BIND_8_COMPAT 1
#endif
in
#ifdef MAC_OS_X
- define BIND_8_COMPAT 1
- define T_SRV 33
#endif
it compiles correctly, but I think it's not the way to go.
I don't think Apple's copyright allows me to post the header, I'm sorry.
|
I might be mistaken, but there should be a license statement at the beginning of the file allowing redistribution - it is not copyrighted by Apple.
But I start to doubt we will find a cause there, I've reread the nameser.h I found in one Mac and it does not explain such behaviour in any way. Could you please test if the header is really included:
1) add a custom #define statement at the top of nameser.h:
#define MY_CUSTOM_DEFINE_ST 1
2) add to the top of net.c something like:
int test = MY_CUSTOM_DEFINE_ST;
3) try to compile and see whether it compiles about net.c - if it does, the problem is that the header file is not included. If it compiles successfully, try moving the #define statement closer to "ns_t_srv" definition. Simply defining T_SRV will not fix the cause (though the values are defined in Zabbix 2.0 code), it will make the problem disappear
Since no other user has complained about such issue, the problem most likely is either the setup or unrelated to the specific header and thus it should not be fixed by defining the value before the cause is found, though that can be used as a work-able patch until the true cause is determined.
|
Thanks, Nicola! The problem indeed exists in nameser.h, you have there:
#ifdef BIND_8_COMPAT
#include <arpa/nameser8_compat.h>
#else
which means the rest of the file is not compiled Will research the problem some more and discuss with colleagues what would be the best approach.
|
Discussed with Sasha - BIND_8_COMPAT was defined to fix a bug with Leopard though he does not recall the exact bug
Since this is only Leopard specific, decided to manually define all the values as in 1.9.* branch since we do not want to create a workaround.
<richlv> this might be a good reason to add comments as for what bugs different extra stuff is supposed to fix
|
Fixed/available in dev branch: svn://svn.zabbix.com/branches/ZBX-4085
|
Fixed in pre-1.8.9 r21967.
|
Generated at Fri Mar 29 10:34:29 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.