[ZBX-2511] Compilation on FreeBSD error: 'FD_SETSIZE' undeclared here (not in a function) Created: 2010 Jun 06  Updated: 2017 May 30  Resolved: 2010 Jun 07

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Installation (I)
Affects Version/s: 1.8.3
Fix Version/s: 1.8.3, 1.9.0 (alpha)

Type: Incident report Priority: Major
Reporter: Oleksii Zagorskyi Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

FreeBSD 8.0-RELEASE-p2
Zabbix started from revision 12470



 Description   

After merge "ZBXNEXT-138 our daemons can now listen on multiple IPs" on revision 12470 compilation on FreeBSD end with this error:

gcc -DHAVE_CONFIG_H -I. -I../../../include -g -O2 -I/usr/local/include/mysql -pipe -fno-strict-aliasing -I/usr/local/include -I/usr/local/lib/perl5/5.8.9/mach/CORE -I/usr/local/include -I. -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -MT nodehistory.o -MD -MP -MF .deps/nodehistory.Tpo -c -o nodehistory.o nodehistory.c
In file included from nodehistory.h:24,
from nodehistory.c:24:
../../../include/comms.h:46: error: 'FD_SETSIZE' undeclared here (not in a function)
In file included from /usr/local/include/net-snmp/mib_api.h:76,
from /usr/local/include/net-snmp/library/mib.h:37,
from /usr/local/include/net-snmp/varbind_api.h:80,
from /usr/local/include/net-snmp/library/snmp_api.h:28,
from /usr/local/include/net-snmp/types.h:387,
from /usr/local/include/net-snmp/definitions.h:22,
from /usr/local/include/net-snmp/net-snmp-includes.h:75,
from ../../../include/sysinc.h:385,
from ../../../include/common.h:23,
from nodehistory.c:25:
/usr/local/include/net-snmp/library/parse.h:35:1: warning: "MAXLABEL" redefined
In file included from /usr/include/arpa/nameser.h:580,
from ../../../include/sysinc.h:120,
from ../../../include/common.h:23,
from nodehistory.c:25:
/usr/include/arpa/nameser_compat.h:104:1: warning: this is the location of the previous definition

      • Error code 1


 Comments   
Comment by Oleksii Zagorskyi [ 2010 Jun 06 ]

I found some information on my FreeBSD 8.0, maybe it will be useful:

/usr/include/sys/types.h contain this part:
/*

  • The following are all things that really shouldn't exist in this header,
  • since its purpose is to provide typedefs, not miscellaneous doodads.
    */
    #if __BSD_VISIBLE

#include <sys/select.h>

/usr/include/sys/select.h contain this part:
/*

  • Select uses bit masks of file descriptors in longs. These macros
  • manipulate such bit fields (the filesystem macros use chars).
  • FD_SETSIZE may be defined by the user, but the default here should
  • be enough for most uses.
    */
    #ifndef FD_SETSIZE
    #define FD_SETSIZE 1024U
    #endif
Comment by Oleksii Zagorskyi [ 2010 Jun 07 ]

tested branches/dev/zbx-2511-fd-setsize -r 12594
now on FreeBSD8.0 compiled without error.

Comment by Aleksandrs Saveljevs [ 2010 Jun 07 ]

Thanks!

Comment by Konstantin Agafontsev [ 2010 Jun 08 ]

what about the older versions of freebsd

Comment by Aleksandrs Saveljevs [ 2010 Jun 08 ]

Fixed in pre-1.8.3 in r12603.

Comment by Aleksandrs Saveljevs [ 2010 Jun 08 ]

Konstantin, if the latest revision of 1.8 fails to compile with other versions of FreeBSD, feel free to reopen.

Generated at Fri Mar 29 14:02:11 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.