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

make fails on AIX when compiling sms.c / nodehistory.c and "all in Trapper" missing

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 1.8.17, 2.1.5

      configure script:

      when compiling the zabbix_server, it is necessary to comment out the following line in "src/libs/zbxmedia/sms.c"

      /* options.c_cflag = old_options.c_cflag | CRTSCTS | CS8 | CLOCAL | CREAD; */

      make then continues to next error :

      ==============================
      Making all in trapper
      make[3]: Entering directory `/home/dave.tomkins/zabbix-2.1.5/zabbix-2.1.5/src/zabbix_server/trapper'
      gcc -DHAVE_CONFIG_H -I. -I../../../include -g -O2 -I/opt/freeware/include/mysql/mysql -I/opt/freeware/include -I/usr/include -DUNIV_AIX -DUNIV_AIX -I/opt/freeware/include -I. -I/usr/local/include -I/usr/include -I/usr/local/include -MT active.o -MD -MP -MF .deps/active.Tpo -c -o active.o active.c
      mv -f .deps/active.Tpo .deps/active.Po
      gcc -DHAVE_CONFIG_H -I. -I../../../include -g -O2 -I/opt/freeware/include/mysql/mysql -I/opt/freeware/include -I/usr/include -DUNIV_AIX -DUNIV_AIX -I/opt/freeware/include -I. -I/usr/local/include -I/usr/include -I/usr/local/include -MT trapper.o -MD -MP -MF .deps/trapper.Tpo -c -o trapper.o trapper.c
      mv -f .deps/trapper.Tpo .deps/trapper.Po
      gcc -DHAVE_CONFIG_H -I. -I../../../include -g -O2 -I/opt/freeware/include/mysql/mysql -I/opt/freeware/include -I/usr/include -DUNIV_AIX -DUNIV_AIX -I/opt/freeware/include -I. -I/usr/local/include -I/usr/include -I/usr/local/include -MT nodesync.o -MD -MP -MF .deps/nodesync.Tpo -c -o nodesync.o nodesync.c
      mv -f .deps/nodesync.Tpo .deps/nodesync.Po
      gcc -DHAVE_CONFIG_H -I. -I../../../include -g -O2 -I/opt/freeware/include/mysql/mysql -I/opt/freeware/include -I/usr/include -DUNIV_AIX -DUNIV_AIX -I/opt/freeware/include -I. -I/usr/local/include -I/usr/include -I/usr/local/include -MT nodehistory.o -MD -MP -MF .deps/nodehistory.Tpo -c -o nodehistory.o nodehistory.c
      In file included from /usr/include/fcntl.h:219:0,
      from ../../../include/sysinc.h:153,
      from ../../../include/common.h:23,
      from nodehistory.c:24:
      /usr/include/unistd.h:198:16: error: conflicting types for 'lseek64'
      /usr/include/unistd.h:196:14: note: previous declaration of 'lseek64' was here
      In file included from /usr/include/unistd.h:826:0,
      from /usr/include/fcntl.h:219,
      from ../../../include/sysinc.h:153,
      from ../../../include/common.h:23,
      from nodehistory.c:24:
      /usr/include/sys/lockf.h:64:13: error: conflicting types for 'lockf64'
      /usr/include/sys/lockf.h:62:13: note: previous declaration of 'lockf64' was here
      In file included from /usr/include/fcntl.h:219:0,
      from ../../../include/sysinc.h:153,
      from ../../../include/common.h:23,
      from nodehistory.c:24:
      /usr/include/unistd.h:899:14: error: conflicting types for 'ftruncate64'
      /usr/include/unistd.h:897:14: note: previous declaration of 'ftruncate64' was here
      /usr/include/unistd.h:956:14: error: conflicting types for 'truncate64'
      /usr/include/unistd.h:954:14: note: previous declaration of 'truncate64' was here
      /usr/include/unistd.h:975:18: error: conflicting types for 'pread64'
      /usr/include/unistd.h:972:18: note: previous declaration of 'pread64' was here
      /usr/include/unistd.h:976:18: error: conflicting types for 'pwrite64'
      /usr/include/unistd.h:973:18: note: previous declaration of 'pwrite64' was here
      /usr/include/unistd.h:1061:17: error: conflicting types for 'fclear64'
      /usr/include/unistd.h:1058:15: note: previous declaration of 'fclear64' was here
      /usr/include/unistd.h:1062:13: error: conflicting types for 'fsync_range64'
      /usr/include/unistd.h:1059:13: note: previous declaration of 'fsync_range64' was here
      make[3]: *** [nodehistory.o] Error 1
      make[3]: Leaving directory `/home/dave.tomkins/zabbix-2.1.5/zabbix-2.1.5/src/zabbix_server/trapper'
      make[2]: *** [all-recursive] Error 1
      make[2]: Leaving directory `/home/dave.tomkins/zabbix-2.1.5/zabbix-2.1.5/src/zabbix_server'
      make[1]: *** [all-recursive] Error 1
      make[1]: Leaving directory `/home/dave.tomkins/zabbix-2.1.5/zabbix-2.1.5/src'
      make: *** [all-recursive] Error 1

      ==============================

      Work-around was to change the "#ifdef HAVE_LIBPERFSTAT" section of include/sysinc.h as follows:

      #ifdef HAVE_LIBPERFSTAT

      1. include <libperfstat.h>
      2. include <sys/protosw.h>
        #endif

      The compile then proceeds to nex error:

      ==============================

      Making all in trapper
      make[3]: Entering directory `/home/dave.tomkins/zabbix-2.1.5/zabbix-2.1.5/src/zabbix_server/trapper'
      gcc -DHAVE_CONFIG_H -I. -I../../../include -g -O2 -I/opt/freeware/include/mysql/mysql -I/opt/freeware/include -I/usr/include -DUNIV_AIX -DUNIV_AIX -I/opt/freeware/include -I. -I/usr/local/include -I/usr/include -I/usr/local/include -MT nodehistory.o -MD -MP -MF .deps/nodehistory.Tpo -c -o nodehistory.o nodehistory.c
      In file included from /usr/include/fcntl.h:219:0,
      from ../../../include/sysinc.h:153,
      from ../../../include/common.h:23,
      from nodehistory.c:24:
      /usr/include/unistd.h:198:16: error: conflicting types for 'lseek64'
      /usr/include/unistd.h:196:14: note: previous declaration of 'lseek64' was here
      In file included from /usr/include/unistd.h:826:0,
      from /usr/include/fcntl.h:219,
      from ../../../include/sysinc.h:153,
      from ../../../include/common.h:23,
      from nodehistory.c:24:
      /usr/include/sys/lockf.h:64:13: error: conflicting types for 'lockf64'
      /usr/include/sys/lockf.h:62:13: note: previous declaration of 'lockf64' was here
      In file included from /usr/include/fcntl.h:219:0,
      from ../../../include/sysinc.h:153,
      from ../../../include/common.h:23,
      from nodehistory.c:24:
      /usr/include/unistd.h:899:14: error: conflicting types for 'ftruncate64'
      /usr/include/unistd.h:897:14: note: previous declaration of 'ftruncate64' was here
      /usr/include/unistd.h:956:14: error: conflicting types for 'truncate64'
      /usr/include/unistd.h:954:14: note: previous declaration of 'truncate64' was here
      /usr/include/unistd.h:975:18: error: conflicting types for 'pread64'
      /usr/include/unistd.h:972:18: note: previous declaration of 'pread64' was here
      /usr/include/unistd.h:976:18: error: conflicting types for 'pwrite64'
      /usr/include/unistd.h:973:18: note: previous declaration of 'pwrite64' was here
      /usr/include/unistd.h:1061:17: error: conflicting types for 'fclear64'
      /usr/include/unistd.h:1058:15: note: previous declaration of 'fclear64' was here
      /usr/include/unistd.h:1062:13: error: conflicting types for 'fsync_range64'
      /usr/include/unistd.h:1059:13: note: previous declaration of 'fsync_range64' was here
      make[3]: *** [nodehistory.o] Error 1
      make[3]: Leaving directory `/home/dave.tomkins/zabbix-2.1.5/zabbix-2.1.5/src/zabbix_server/trapper'
      make[2]: *** [all-recursive] Error 1
      make[2]: Leaving directory `/home/dave.tomkins/zabbix-2.1.5/zabbix-2.1.5/src/zabbix_server'
      make[1]: *** [all-recursive] Error 1
      make[1]: Leaving directory `/home/dave.tomkins/zabbix-2.1.5/zabbix-2.1.5/src'
      make: *** [all-recursive] Error 1

      ==============================

      Solution

      add the following line to "nodehistory.c"

      #include "unistd.h"

      config.log of final successful "make" attached

        1. config.log
          289 kB
          david tomkins

            Unassigned Unassigned
            d_tomkins david tomkins
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: