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

INT_MAX error when compiling on SunOS / Joyent / Solaris in dbcache.c

XMLWordPrintable

    • Sprint 58 (Nov 2019), Sprint 59 (Dec 2019), Sprint 60 (Jan 2020), Sprint 61 (Feb 2020)
    • 0.125

      I am trying to compile Zabbix server 4.4 on SunOS (a Solaris derivative) and get the following error:

      Config:

      ./configure --enable-server --with-postgresql --with-zlib-lib=/opt/local/lib/ --with-libevent-lib=/opt/local/lib/
      make
      

      Output:

      make[3]: Entering directory '/home/Circle/ZabbixUpgrade/zabbix-4.4.1/src/libs/zbxdbcache'
      cc -DHAVE_CONFIG_H -I. -I../../../include    -I../../../src/zabbix_server/ -I../../../src/libs/zbxalgo  -m64 -g -O2 -I/usr/local/include -MT libzbxdbcache_a-dbcache.o -MD -MP -MF .deps/libzbxdbcache_a-dbcache.Tpo -c -o libzbxdbcache_a-dbcache.o `test -f 'dbcache.c' || echo './'`dbcache.c
      dbcache.c: In function 'zbx_log_sync_history_cache_progress':
      dbcache.c:3120:6: error: 'INT_MAX' undeclared (first use in this function)
        if (INT_MAX == cache->history_progress_ts)
            ^
      dbcache.c:3120:6: note: each undeclared identifier is reported only once for each function it appears in
      Makefile:475: recipe for target 'libzbxdbcache_a-dbcache.o' failed
      make[3]: *** [libzbxdbcache_a-dbcache.o] Error 1
      

      OS is:

      SunOS nobody 5.11 joyent_20190314T022406Z i86pc i386 i86pc
      

      Can you please have a look?
      I saw that in the past INT_MAX already cause troubles on Solaris.

        1. solaris10_fix.patch
          2 kB
          Michael Veksler
        2. ZBX-16926.diff
          1 kB
          Vladislavs Sokurenko

            arimdjonoks Artjoms Rimdjonoks
            Circle Pr2
            Team C
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: