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

Trunk does not compile with the latest stable libevent

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 3.4.0rc1
    • 3.4.0rc1
    • Proxy (P), Server (S)
    • None
    • Debian GNU/Linux testing
    • Team A
    • Sprint 14
    • 1

      Trunk r70975 compiles with libevent-2.0.22-stable (released 2014-01-05), but does not compile with libevent-2.1.8-stable (released 2017-01-22) used on Debian testing:

      $ ./configure --enable-server --enable-proxy --enable-agent --enable-ipv6 --with-net-snmp --with-unixodbc --with-libxml2 --with-libcurl --with-openipmi --with-postgresql --with-openssl --with-ldap --with-libevent=/home/zabbix34/libevent-2.1.8-install --prefix=`pwd`
      $ make install
      --------------------------------------------------
      ...
      In file included from /home/zabbix34/libevent-2.1.8-install/include/evutil.h:37:0,
                       from /home/zabbix34/libevent-2.1.8-install/include/event.h:57,
                       from ../../../include/sysinc.h:381,
                       from ../../../include/common.h:23,
                       from ipcservice.c:1:
      /home/zabbix34/libevent-2.1.8-install/include/event2/util.h:312:25: error: two or more data types in declaration specifiers
       #define evutil_socket_t int
                               ^
      ipcservice.c:60:13: note: in expansion of macro ‘evutil_socket_t’
       typedef int evutil_socket_t;
                   ^~~~~~~~~~~~~~~
      ipcservice.c:60:1: warning: useless type name in empty declaration
       typedef int evutil_socket_t;
       ^~~~~~~
      ipcservice.c:62:22: error: static declaration of ‘event_new’ follows non-static declaration
       static struct event *event_new(struct event_base *ev, evutil_socket_t fd, short what,
                            ^~~~~~~~~
      In file included from /home/zabbix34/libevent-2.1.8-install/include/event.h:69:0,
                       from ../../../include/sysinc.h:381,
                       from ../../../include/common.h:23,
                       from ipcservice.c:1:
      /home/zabbix34/libevent-2.1.8-install/include/event2/event.h:1080:15: note: previous declaration of ‘event_new’ was here
       struct event *event_new(struct event_base *, evutil_socket_t, short, event_callback_fn, void *);
                     ^~~~~~~~~
      ...	       
      ipcservice.c: At top level:
      ipcservice.c:74:13: error: static declaration of ‘event_free’ follows non-static declaration
       static void event_free(struct event *event)
                   ^~~~~~~~~~
      In file included from /home/zabbix34/libevent-2.1.8-install/include/event.h:69:0,
                       from ../../../include/sysinc.h:381,
                       from ../../../include/common.h:23,
                       from ipcservice.c:1:
      /home/zabbix34/libevent-2.1.8-install/include/event2/event.h:1131:6: note: previous declaration of ‘event_free’ was here
       void event_free(struct event *);
            ^~~~~~~~~~
      --------------------------------------------------
      

      It should compile according to libevent-2.1.8-stable/whatsnew-2.1.txt:

      0.3. Compatibility
      
        Our source-compatibility policy is that correct code (that is to say,
        code that uses public interfaces of Libevent and relies only on their
        documented behavior) should have forward source compatibility: any
        such code that worked with a previous version of Libevent should work
        with this version too.
      

            Unassigned Unassigned
            andris Andris Mednis
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: