Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-22778

Failed to build on Debian bookworm

XMLWordPrintable

    • Sprint 100 (May 2023)

      Steps to reproduce:

      1. Clone current master / release 6.4
      2. ./configure --enable-server --with-mysql --enable-ipv6 --with-libcurl --with-libxml2 --with-openssl


      3. make dbschema

      4. make install

      Result:

      Errors are shown when building src/libs/zbxcomms/comms.c
      
      *comms.c:* In function '{*}socket_poll_error{*}':
      
      *comms.c:373:29:* *error:* '{*}POLLERR{*}' undeclared (first use in this function); did you mean '{*}POLL_ERR{*}'?
      
        373 |         if (0 != (revents & {*}POLLERR{*}))
      
            |                             *^~~~~~~*
      
            |                             POLL_ERR
      
      *comms.c:373:29:* *note:* each undeclared identifier is reported only once for each function it appears in
      
      *comms.c:379:29:* *error:* '{*}POLLHUP{*}' undeclared (first use in this function); did you mean '{*}POLL_HUP{*}'?
      
        379 |         if (0 != (revents & {*}POLLHUP{*}))
      
            |                             *^~~~~~~*
      
            |                             POLL_HUP
      
      *comms.c:385:29:* *error:* '{*}POLLNVAL{*}' undeclared (first use in this function)
      
        385 |         if (0 != (revents & {*}POLLNVAL{*}))
      
            |                             *^~~~~~~~*
      
      *comms.c:* In function '{*}zbx_socket_connect{*}':
      
      *comms.c:414:25:* *error:* storage size of '{*}pd{*}' isn't known
      
        414 |         zbx_pollfd_t    {*}pd{*};
      
            |                         *^~*
      
      *comms.c:424:21:* *error:* '{*}POLLOUT{*}' undeclared (first use in this function); did you mean '{*}POLL_OUT{*}'?
      
        424 |         pd.events = {*}POLLOUT{*};
      
            |                     *^~~~~~~*
      
            |                     POLL_OUT
      
      In file included from {*}comms.c:21{*}:
      
      *comms.h:47:49:* *warning:* implicit declaration of function '{*}poll{*}'; did you mean '{*}powl{*}'? [{*}-Wimplicit-function-declaration{*}]
      
         47 | #       define zbx_socket_poll(x, y, z)         {*}poll{*}(x, y, z)
      
            |                                                 *^~~~*
      
      *comms.c:426:27:* *note:* in expansion of macro '{*}zbx_socket_poll{*}'
      
        426 |         while (0 >= (rc = {*}zbx_socket_poll{*}(&pd, 1, ZBX_SOCKET_POLL_TIMEOUT)))
      
            |                           *^~~~~~~~~~~~~~~*
      
      *comms.c:441:49:* *error:* '{*}POLLERR{*}' undeclared (first use in this function); did you mean '{*}POLL_ERR{*}'?
      
        441 |         if (POLLOUT != (pd.revents & (POLLOUT | *POLLERR* | POLLHUP | POLLNVAL)))
      
            |                                                 *^~~~~~~*
      
            |                                                 POLL_ERR
      
      *comms.c:441:59:* *error:* '{*}POLLHUP{*}' undeclared (first use in this function); did you mean '{*}POLL_HUP{*}'?
      
        441 |         if (POLLOUT != (pd.revents & (POLLOUT | POLLERR | *POLLHUP* | POLLNVAL)))
      
            |                                                           *^~~~~~~*
      
            |                                                           POLL_HUP
      
      *comms.c:441:69:* *error:* '{*}POLLNVAL{*}' undeclared (first use in this function)
      
        441 |         if (POLLOUT != (pd.revents & (POLLOUT | POLLERR | POLLHUP | {*}POLLNVAL{*})))
      
            |                                                                     *^~~~~~~~*
      
      *comms.c:* In function '{*}zbx_tcp_write{*}':
      
      *comms.c:614:25:* *error:* storage size of '{*}pd{*}' isn't known
      
        614 |         zbx_pollfd_t    {*}pd{*};
      
            |                         *^~*
      
      *comms.c:636:21:* *error:* '{*}POLLOUT{*}' undeclared (first use in this function); did you mean '{*}POLL_OUT{*}'?
      
        636 |         pd.events = {*}POLLOUT{*};
      
            |                     *^~~~~~~*
      
            |                     POLL_OUT
      
      *comms.c:* In function '{*}tcp_peek{*}':
      
      *comms.c:1058:25:* *error:* storage size of '{*}pd{*}' isn't known
      
       1058 |         zbx_pollfd_t    {*}pd{*};
      
            |                         *^~*
      
      *comms.c:1067:21:* *error:* '{*}POLLIN{*}' undeclared (first use in this function); did you mean '{*}POLL_IN{*}'?
      
       1067 |         pd.events = {*}POLLIN{*};
      
            |                     *^~~~~~*
      
            |                     POLL_IN
      
      *comms.c:* In function '{*}tcp_read{*}':
      
      *comms.c:1108:25:* *error:* storage size of '{*}pd{*}' isn't known
      
       1108 |         zbx_pollfd_t    {*}pd{*};
      
            |                         *^~*
      
      *comms.c:1121:21:* *error:* '{*}POLLIN{*}' undeclared (first use in this function); did you mean '{*}POLL_IN{*}'?
      
       1121 |         pd.events = {*}POLLIN{*};
      
            |                     *^~~~~~*
      
            |                     POLL_IN
      
      In file included from {*}../../../include/zbxnum.h:23{*},
      
                       from {*}../../../include/zbxalgo.h:23{*},
      
                       from {*}../../../include/zbxcomms.h:23{*},
      
                       from {*}comms.c:20{*}:
      
      *comms.c:* In function '{*}zbx_tcp_accept{*}':
      
      *comms.c:1439:55:* *error:* invalid application of '{*}sizeof{*}' to incomplete type '{*}zbx_pollfd_t{*}' {aka '{*}struct pollfd{*}'}
      
       1439 |         pds = (zbx_pollfd_t *)zbx_malloc(NULL, sizeof({*}zbx_pollfd_t{*}) * (size_t)s->num_socks);
      
            |                                                       *^~~~~~~~~~~~*
      
      *../../../include/zbxcommon.h:398:78:* *note:* in definition of macro '{*}zbx_malloc{*}'
      
        398 | #define zbx_malloc(old, size)           zbx_malloc2(__FILE__, __LINE__, old, {*}size{*})
      
            |                                                                              *^~~~*
      
      *comms.c:1443:20:* *error:* invalid use of undefined type '{*}struct pollfd{*}'
      
       1443 |                 pds{*}[{*}i].fd = s->sockets[i];
      
            |                    *^*
      
      *comms.c:1443:23:* *error:* invalid use of incomplete typedef '{*}zbx_pollfd_t{*}' {aka '{*}struct pollfd{*}'}
      
       1443 |                 pds[i]{*}.{*}fd = s->sockets[i];
      
            |                       *^*
      
      *comms.c:1444:20:* *error:* invalid use of undefined type '{*}struct pollfd{*}'
      
       1444 |                 pds{*}[{*}i].events = POLLIN;
      
            |                    *^*
      
      *comms.c:1444:23:* *error:* invalid use of incomplete typedef '{*}zbx_pollfd_t{*}' {aka '{*}struct pollfd{*}'}
      
       1444 |                 pds[i]{*}.{*}events = POLLIN;
      
            |                       *^*
      
      *comms.c:1444:33:* *error:* '{*}POLLIN{*}' undeclared (first use in this function); did you mean '{*}POLL_IN{*}'?
      
       1444 |                 pds[i].events = {*}POLLIN{*};
      
            |                                 *^~~~~~*
      
            |                                 POLL_IN
      
      *comms.c:1465:30:* *error:* invalid use of undefined type '{*}struct pollfd{*}'
      
       1465 |                 if (0 != (pds{*}[{*}i].revents & POLLIN))
      
            |                              *^*
      
      *comms.c:1465:33:* *error:* invalid use of incomplete typedef '{*}zbx_pollfd_t{*}' {aka '{*}struct pollfd{*}'}
      
       1465 |                 if (0 != (pds[i]{*}.{*}revents & POLLIN))
      
            |                                 *^*
      
      *comms.c:* In function '{*}zbx_udp_send{*}':
      
      *comms.c:2429:25:* *error:* storage size of '{*}pd{*}' isn't known
      
       2429 |         zbx_pollfd_t    {*}pd{*};
      
            |                         *^~*
      
      *comms.c:2434:21:* *error:* '{*}POLLOUT{*}' undeclared (first use in this function); did you mean '{*}POLL_OUT{*}'?
      
       2434 |         pd.events = {*}POLLOUT{*};
      
            |                     *^~~~~~~*
      
            |                     POLL_OUT
      
      *comms.c:* In function '{*}zbx_udp_recv{*}':
      
      *comms.c:2492:25:* *error:* storage size of '{*}pd{*}' isn't known
      
       2492 |         zbx_pollfd_t    {*}pd{*};
      
            |                         *^~*
      
      *comms.c:2497:21:* *error:* '{*}POLLIN{*}' undeclared (first use in this function); did you mean '{*}POLL_IN{*}'?
      
       2497 |         pd.events = {*}POLLIN{*};
      
            |                     *^~~~~~*
      
            |                     POLL_IN
      

        1. conf.log
          19 kB
        2. configure.log
          19 kB

            dgoloscapov Dmitrijs Goloscapovs
            fbett Fabian Bett
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: