Ad Widget

Collapse

make error on AIX6 and AIX7

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dave_t
    Junior Member
    • Apr 2007
    • 28

    #1

    make error on AIX6 and AIX7

    After successfully implementing zabbix 1.8 server on AIX6, I'm now facing issues trying to compile version 2.0.1

    My configure command:

    ./configure --enable-server --with-mysql

    produces the following output:



    Configuration:

    Detected OS: aix7.1.0.0
    Install path: /usr/local
    Compilation arch: aix

    Compiler: xlc
    Compiler flags: -g -I/usr/local/include

    Enable server: yes
    Server details:
    With database: MySQL
    WEB Monitoring via: no
    Native Jabber: no
    SNMP: no
    IPMI: no
    SSH: no
    Linker flags: -L/usr/local/lib
    Libraries: -lm -lperfstat -liconv -lmysqlclient

    Enable proxy: no

    Enable agent: no

    Enable Java gateway: no

    LDAP support: no
    IPv6 support: no

    ************************************************** *********
    * Now run 'make install' *
    * *
    * Thank you for using Zabbix! *
    * <http://www.zabbix.com> *
    ************************************************** *********



    For completeness, the output from "mysql_config" is...

    PROMPT> mysql_config
    Copyright 2009 Sun Microsystems, Inc.
    This software comes with ABSOLUTELY NO WARRANTY. This is free software,
    and you are welcome to modify and redistribute it under the GPL license

    Get compiler flags for using the MySQL client library.
    Usage: mysql_config [OPTIONS]
    --cflags [-I/usr/local/include]
    -?, --help Display this help and exit.
    --include [-I/usr/local/include]
    --libs [-L/usr/local/lib -lmysql -lpthread]
    --libs_r [-L/usr/local/lib -lmysql -lpthread]
    --version [6.0.2]
    PROMPT>





    when I try to make the binary, it all looks good until nodehistory.c gets compiled, where I get this message:



    source='nodehistory.c' object='nodehistory.o' libtool=no DEPDIR=.deps depmode=aix /bin/sh ../../../depcomp xlc -DHAVE_CONFIG_H -I. -I../../../include -g -I/usr/local/include -c nodehistory.c
    "/usr/include/unistd.h", line 198.17: 1506-343 (S) Redeclaration of lseek64 differs from previous declaration on line 196 of "/usr/include/unistd.h".
    "/usr/include/unistd.h", line 198.17: 1506-050 (I) Return type "long long" in redeclaration is not compatible with the previous return type "long".
    "/usr/include/unistd.h", line 198.17: 1506-377 (I) The type "long long" of parameter 2 differs from the previous type "long".
    "/usr/include/sys/lockf.h", line 64.20: 1506-343 (S) Redeclaration of lockf64 differs from previous declaration on line 62 of "/usr/include/sys/lockf.h".
    "/usr/include/sys/lockf.h", line 64.20: 1506-377 (I) The type "long long" of parameter 3 differs from the previous type "long".
    "/usr/include/unistd.h", line 899.33: 1506-343 (S) Redeclaration of ftruncate64 differs from previous declaration on line 897 of "/usr/include/unistd.h".
    "/usr/include/unistd.h", line 899.33: 1506-377 (I) The type "long long" of parameter 2 differs from the previous type "long".
    "/usr/include/unistd.h", line 956.33: 1506-343 (S) Redeclaration of truncate64 differs from previous declaration on line 954 of "/usr/include/unistd.h".
    "/usr/include/unistd.h", line 956.33: 1506-377 (I) The type "long long" of parameter 2 differs from the previous type "long".
    "/usr/include/unistd.h", line 975.33: 1506-343 (S) Redeclaration of pread64 differs from previous declaration on line 972 of "/usr/include/unistd.h".
    "/usr/include/unistd.h", line 975.33: 1506-377 (I) The type "long long" of parameter 4 differs from the previous type "long".
    "/usr/include/unistd.h", line 976.33: 1506-343 (S) Redeclaration of pwrite64 differs from previous declaration on line 973 of "/usr/include/unistd.h".
    "/usr/include/unistd.h", line 976.33: 1506-377 (I) The type "long long" of parameter 4 differs from the previous type "long".
    "/usr/include/unistd.h", line 1061.25: 1506-343 (S) Redeclaration of fclear64 differs from previous declaration on line 1058 of "/usr/include/unistd.h".
    "/usr/include/unistd.h", line 1061.25: 1506-050 (I) Return type "long long" in redeclaration is not compatible with the previous return type "long".
    "/usr/include/unistd.h", line 1061.25: 1506-377 (I) The type "long long" of parameter 2 differs from the previous type "long".
    "/usr/include/unistd.h", line 1062.25: 1506-343 (S) Redeclaration of fsync_range64 differs from previous declaration on line 1059 of "/usr/include/unistd.h".
    "/usr/include/unistd.h", line 1062.25: 1506-377 (I) The type "long long" of parameter 3 differs from the previous type "long".
    "/usr/include/syms.h", line 293.9: 1506-236 (W) Macro name T_NULL has been redefined.
    "/usr/include/syms.h", line 293.9: 1506-358 (I) "T_NULL" is defined on line 150 of /usr/include/arpa/onameser_compat.h.
    make: The error code from the last command is 1.


    Stop.


    I've also tried to use the gcc compiler, and configured against a different version of the mysql client library.

    i.e.

    PROMPT> export CC=gcc && ./configure --enable-server --with-mysql=/opt/pware/bin/mysql_config && make

    Configuration:

    Detected OS: aix7.1.0.0
    Install path: /usr/local
    Compilation arch: aix

    Compiler: gcc
    Compiler flags: -g -O2 -I/opt/pware/include/mysql -felide-constructors -fno-exceptions -fno-rtti -Wl,-blibpath:/opt/pware/lib:/usr/lib:/lib,-brtl -DUNIV_AIX -DUNIV_AIX

    Enable server: yes
    Server details:
    With database: MySQL
    WEB Monitoring via: no
    Native Jabber: no
    SNMP: no
    IPMI: no
    SSH: no
    Linker flags: -L/opt/pware/lib/mysql -L/opt/pware/lib
    Libraries: -lm -lperfstat -liconv -lmysqlclient

    Enable proxy: no

    Enable agent: no

    Enable Java gateway: no

    LDAP support: no
    IPv6 support: no

    ************************************************** *********
    * Now run 'make install' *
    * *
    * Thank you for using Zabbix! *
    * <http://www.zabbix.com> *
    ************************************************** *********


    ...and the result is:



    Making all in src
    Making all in libs
    Making all in zbxcrypto
    gcc -DHAVE_CONFIG_H -I. -I../../../include -g -O2 -I/opt/pware/include/mysql -felide-constructors -fno-exceptions -fno-rtti -Wl,-blibpath:/opt/pware/lib:/usr/lib:/lib,-brtl -DUNIV_AIX -DUNIV_AIX -MT md5.o -MD -MP -MF .deps/md5.Tpo -c -o md5.o md5.c
    cc1: warning: command line option "-felide-constructors" is valid for C++/ObjC++ but not for C
    cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
    In file included from /usr/include/netdb.h:50,
    from ../../../include/sysinc.h:186,
    from ../../../include/common.h:23,
    from md5.c:54:
    /usr/include/netinet/in.h:98: error: two or more data types in declaration specifiers
    In file included from /usr/include/sys/cred.h:52,
    from /usr/include/sys/thread.h:42,
    from /usr/include/sys/ptrace.h:28,
    from /usr/include/sys/proc.h:42,
    from /usr/include/sys/pri.h:43,
    from /usr/include/sys/sched.h:38,
    from /usr/include/sys/corral.h:25,
    from /usr/include/libperfstat.h:28,
    from ../../../include/sysinc.h:292,
    from ../../../include/common.h:23,
    from md5.c:54:
    /usr/include/sys/secattr.h:53: error: expected specifier-qualifier-list before 'rid_t'
    /usr/include/sys/secattr.h:73: error: expected specifier-qualifier-list before 'authnum_t'
    In file included from /usr/include/sys/thread.h:42,
    from /usr/include/sys/ptrace.h:28,
    from /usr/include/sys/proc.h:42,
    from /usr/include/sys/pri.h:43,
    from /usr/include/sys/sched.h:38,
    from /usr/include/sys/corral.h:25,
    from /usr/include/libperfstat.h:28,
    from ../../../include/sysinc.h:292,
    from ../../../include/common.h:23,
    from md5.c:54:
    /usr/include/sys/cred.h:338: error: expected specifier-qualifier-list before 'rid_t'
    In file included from /usr/include/net/if.h:148,
    from /usr/include/sys/corral.h:27,
    from /usr/include/libperfstat.h:28,
    from ../../../include/sysinc.h:292,
    from ../../../include/common.h:23,
    from md5.c:54:
    /usr/include/net/route.h:310: error: expected specifier-qualifier-list before 'eye_catch8b_t'
    make: The error code from the last command is 1.


    Stop.





    I'm more inclined to try to work through the second failure, with GCC but was wondering if anyone could offer any clues as to where this error is being generated?

    Do I need to provide additional "include" paths, or flags, and if so where


    If there are any gems of wisdom that anyone is willing to offer, I'd be really grateful...

    Thanks,

    Dave
    Last edited by dave_t; 27-07-2012, 16:34.
  • Stefan_D
    Junior Member
    • Sep 2015
    • 18

    #2
    Hi,

    sorry to revive this old thread but I have just managed to solve this.

    I was able to compile zabbix_proxy with xlc version 13.1 on AIX 6.1.

    I had run into the same error like you and after some digging in the header files I found

    something like
    #ifdef _LARGE_FILE_API
    I added --disable-largefile and make finished without any errors...

    ./configure --prefix=/opt/zabbix --with-sqlite3=/usr/local --enable-agent --enable-proxy --disable-largefile


    Cheers

    Stefan

    Comment

    Working...