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

Compilation on NetBSD fails

XMLWordPrintable

    • Sprint 99 (Apr 2023)
    • 1

      I discovered during compilation of Zabbix server from master on NetBSD 9.3 that compilation fails.
      The issue lies that the strings.h on NetBSD defines popcount64 function and we define it as well in src/zabbix_server/lld/lld_host.c.

      This change was introduced in ZBX-19813.

      Here is the error message:

      --- libzbxlld_a-lld_host.o ---
      lld_host.c:3908:21: error: conflicting types for 'popcount64'
       static zbx_uint64_t popcount64(zbx_uint64_t mask)
                           ^~~~~~~~~~
      In file included from /usr/include/string.h:98:0,
                       from ../../../include/common/zbxsysinc.h:118,
                       from ../../../include/zbxcommon.h:23,
                       from lld.h:23,
                       from lld_host.c:20:
      /usr/include/strings.h:61:14: note: previous declaration of 'popcount64' was here
       unsigned int popcount64(__uint64_t) __constfunc;
                    ^~~~~~~~~~
      *** [libzbxlld_a-lld_host.o] Error code 1

            kprutkovs Konstantins Prutkovs (Inactive)
            kprutkovs Konstantins Prutkovs (Inactive)
            Team C
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: