NagiosEnterprises / ndoutils

NDOUtils - Database Output for Nagios Core
GNU General Public License v2.0
48 stars 21 forks source link

Mac OS X: Symbol not found: ___nagios_object_structure_version #36

Closed box293 closed 4 years ago

box293 commented 7 years ago

Tried installing NDOUtils on Mac OS X and Nagios Core (4.3.1) fails to start with the following error:

Johns-iMac:ndoutils-ndoutils-2.1.3 john$ tail /usr/local/nagios/var/nagios.log
[1494237729] wproc: Registry request: name=Core Worker 3712;pid=3712
[1494237729] wproc: Registry request: name=Core Worker 3713;pid=3713
[1494237729] wproc: Registry request: name=Core Worker 3715;pid=3715
[1494237729] wproc: Registry request: name=Core Worker 3716;pid=3716
[1494237729] Error: Could not load module '/usr/local/nagios/bin/ndomod.o' -> dlopen(/usr/local/nagios/bin/ndomod.o, 10): Symbol not found: ___nagios_object_structure_version
  Referenced from: /usr/local/nagios/bin/ndomod.o
  Expected in: flat namespace
 in /usr/local/nagios/bin/ndomod.o
[1494237729] Error: Failed to load module '/usr/local/nagios/bin/ndomod.o'.
[1494237729] Error: Module loading failed. Aborting.

Johns-iMac:ndoutils-ndoutils-2.1.3 john$ ps -ef | grep ndo
    0    82     1   0  4:42am ??         0:00.01 /opt/local/bin/daemondo --label=apache2 --start-cmd /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper start ; --stop-cmd /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper stop ; --restart-cmd /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper restart ; --pid=none
  501    93     1   0  4:42am ??         0:00.51 /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow console
   88   205     1   0  4:42am ??         0:03.22 /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Resources/WindowServer -daemon
  503  3661     1   0  5:01am ??         0:00.01 ndo2db -c /usr/local/nagios/etc/ndo2db.cfg -f
  501  3726   415   0  5:03am ttys000    0:00.00 grep ndo

Full install details as follows:

Johns-iMac:~ john$ sudo port install mysql56-server
Password:
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
--->  Computing dependencies for mysql56-server
The following dependencies will be installed: 
 mysql56
 mysql_select
 tcp_wrappers
Continue? [Y/n]: y
--->  Fetching archive for mysql_select
--->  Attempting to fetch mysql_select-0.1.2_3.darwin_15.noarch.tbz2 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/mysql_select
--->  Attempting to fetch mysql_select-0.1.2_3.darwin_15.noarch.tbz2.rmd160 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/mysql_select
--->  Installing mysql_select @0.1.2_3
--->  Activating mysql_select @0.1.2_3
--->  Cleaning mysql_select
--->  Fetching archive for tcp_wrappers
--->  Attempting to fetch tcp_wrappers-20_2.darwin_15.x86_64.tbz2 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/tcp_wrappers
--->  Attempting to fetch tcp_wrappers-20_2.darwin_15.x86_64.tbz2.rmd160 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/tcp_wrappers
--->  Installing tcp_wrappers @20_2
--->  Activating tcp_wrappers @20_2
--->  Cleaning tcp_wrappers
--->  Fetching archive for mysql56
--->  Attempting to fetch mysql56-5.6.34_0.darwin_15.x86_64.tbz2 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/mysql56
--->  Attempting to fetch mysql56-5.6.34_0.darwin_15.x86_64.tbz2.rmd160 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/mysql56
--->  Installing mysql56 @5.6.34_0
The mysql56 client has been installed.
To install the mysql56 server, install the mysql56-server port.
--->  Activating mysql56 @5.6.34_0
--->  Cleaning mysql56
--->  Fetching archive for mysql56-server
--->  Attempting to fetch mysql56-server-5.6.34_0.darwin_15.noarch.tbz2 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/mysql56-server
--->  Attempting to fetch mysql56-server-5.6.34_0.darwin_15.noarch.tbz2.rmd160 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/mysql56-server
--->  Installing mysql56-server @5.6.34_0
--->  Activating mysql56-server @5.6.34_0
--->  Cleaning mysql56-server
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.
--->  Some of the ports you installed have notes:
  mysql56 has the following notes:
    On activation if no /opt/local/etc/mysql56/my.cnf file exists one
    will be created which loads
    /opt/local/etc/mysql56/macports-default.cnf.

    If a /opt/local/etc/mysql56/my.cnf file exists MacPorts does not
    touch it and any changes you make to /opt/local/etc/mysql56/my.cnf
    will be preserved (e.g., during port upgrades, deactivations or
    activations). /opt/local/etc/mysql56/my.cnf is a good place to
    customize your mysql56 installation.

    Any changes made to /opt/local/etc/mysql56/macports-default.cnf
    will be lost during port upgrades, deactivations or activations so you
    are advised to not make changes here. Currently
    /opt/local/etc/mysql56/macports-default.cnf contains only one
    directive; to disable networking. With disabled networking it is
    possible to install and have running all the MacPorts mysql ports
    simultaneously.
  mysql56-server has the following notes:
    If this is a new install you might want to run:

    $ sudo -u _mysql /opt/local/lib/mysql56/bin/mysql_install_db
Johns-iMac:~ john$ sudo port select mysql mysql56
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
Selecting 'mysql56' for 'mysql' succeeded. 'mysql56' is now active.
Johns-iMac:~ john$ sudo port install p5-dbd-mysql
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
--->  Computing dependencies for p5-dbd-mysql
The following dependencies will be installed: 
 p5.24-dbd-mysql
 p5.24-dbi
Continue? [Y/n]: 
--->  Fetching archive for p5.24-dbi
--->  Attempting to fetch p5.24-dbi-1.636.0_0.darwin_15.x86_64.tbz2 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/p5.24-dbi
--->  Attempting to fetch p5.24-dbi-1.636.0_0.darwin_15.x86_64.tbz2.rmd160 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/p5.24-dbi
--->  Installing p5.24-dbi @1.636.0_0
--->  Activating p5.24-dbi @1.636.0_0
--->  Cleaning p5.24-dbi
--->  Fetching archive for p5.24-dbd-mysql
--->  Attempting to fetch p5.24-dbd-mysql-4.42.0_0+mysql56.darwin_15.x86_64.tbz2 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/p5.24-dbd-mysql
--->  Attempting to fetch p5.24-dbd-mysql-4.42.0_0+mysql56.darwin_15.x86_64.tbz2.rmd160 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/p5.24-dbd-mysql
--->  Installing p5.24-dbd-mysql @4.42.0_0+mysql56
--->  Activating p5.24-dbd-mysql @4.42.0_0+mysql56
--->  Cleaning p5.24-dbd-mysql
--->  Fetching archive for p5-dbd-mysql
--->  Attempting to fetch p5-dbd-mysql-4.42.0_0.darwin_15.noarch.tbz2 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/p5-dbd-mysql
--->  Attempting to fetch p5-dbd-mysql-4.42.0_0.darwin_15.noarch.tbz2.rmd160 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/p5-dbd-mysql
--->  Installing p5-dbd-mysql @4.42.0_0
--->  Activating p5-dbd-mysql @4.42.0_0
--->  Cleaning p5-dbd-mysql
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.
Johns-iMac:~ john$ sudo -u _mysql mysql_install_db
WARNING: Could not write to config file /opt/local/etc/mysql56/my-new.cnf: Permission denied

Installing MySQL system tables...2017-05-08 04:50:54 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-05-08 04:50:54 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2017-05-08 04:50:54 0 [Note] /opt/local/lib/mysql56/bin/mysqld (mysqld 5.6.34) starting as process 557 ...
2017-05-08 04:50:54 557 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-05-08 04:50:54 557 [Note] InnoDB: The InnoDB memory heap is disabled
2017-05-08 04:50:54 557 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-05-08 04:50:54 557 [Note] InnoDB: Memory barrier is not used
2017-05-08 04:50:54 557 [Note] InnoDB: Compressed tables use zlib 1.2.8
2017-05-08 04:50:54 557 [Note] InnoDB: Using CPU crc32 instructions
2017-05-08 04:50:54 557 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2017-05-08 04:50:54 557 [Note] InnoDB: Completed initialization of buffer pool
2017-05-08 04:50:54 557 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2017-05-08 04:50:54 557 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2017-05-08 04:50:54 557 [Note] InnoDB: Database physically writes the file full: wait...
2017-05-08 04:50:55 557 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2017-05-08 04:50:56 557 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2017-05-08 04:50:58 557 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2017-05-08 04:50:58 557 [Warning] InnoDB: New log files created, LSN=45781
2017-05-08 04:50:58 557 [Note] InnoDB: Doublewrite buffer not found: creating new
2017-05-08 04:50:58 557 [Note] InnoDB: Doublewrite buffer created
2017-05-08 04:50:58 557 [Note] InnoDB: 128 rollback segment(s) are active.
2017-05-08 04:50:58 557 [Warning] InnoDB: Creating foreign key constraint system tables.
2017-05-08 04:50:58 557 [Note] InnoDB: Foreign key constraint system tables created
2017-05-08 04:50:58 557 [Note] InnoDB: Creating tablespace and datafile system tables.
2017-05-08 04:50:58 557 [Note] InnoDB: Tablespace and datafile system tables created.
2017-05-08 04:50:58 557 [Note] InnoDB: Waiting for purge to start
2017-05-08 04:50:58 557 [Note] InnoDB: 5.6.34 started; log sequence number 0
2017-05-08 04:50:58 557 [Note] Binlog end
2017-05-08 04:50:58 557 [Note] InnoDB: FTS optimize thread exiting.
2017-05-08 04:50:58 557 [Note] InnoDB: Starting shutdown...
2017-05-08 04:50:59 557 [Note] InnoDB: Shutdown completed; log sequence number 1625977
OK

Filling help tables...2017-05-08 04:50:59 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-05-08 04:50:59 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2017-05-08 04:50:59 0 [Note] /opt/local/lib/mysql56/bin/mysqld (mysqld 5.6.34) starting as process 559 ...
2017-05-08 04:50:59 559 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-05-08 04:50:59 559 [Note] InnoDB: The InnoDB memory heap is disabled
2017-05-08 04:50:59 559 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-05-08 04:50:59 559 [Note] InnoDB: Memory barrier is not used
2017-05-08 04:50:59 559 [Note] InnoDB: Compressed tables use zlib 1.2.8
2017-05-08 04:50:59 559 [Note] InnoDB: Using CPU crc32 instructions
2017-05-08 04:50:59 559 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2017-05-08 04:50:59 559 [Note] InnoDB: Completed initialization of buffer pool
2017-05-08 04:50:59 559 [Note] InnoDB: Highest supported file format is Barracuda.
2017-05-08 04:50:59 559 [Note] InnoDB: 128 rollback segment(s) are active.
2017-05-08 04:50:59 559 [Note] InnoDB: Waiting for purge to start
2017-05-08 04:50:59 559 [Note] InnoDB: 5.6.34 started; log sequence number 1625977
2017-05-08 04:50:59 559 [Note] Binlog end
2017-05-08 04:50:59 559 [Note] InnoDB: FTS optimize thread exiting.
2017-05-08 04:50:59 559 [Note] InnoDB: Starting shutdown...
2017-05-08 04:51:01 559 [Note] InnoDB: Shutdown completed; log sequence number 1625987
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

  /opt/local/lib/mysql56/bin/mysqladmin -u root password 'new-password'
  /opt/local/lib/mysql56/bin/mysqladmin -u root -h Johns-iMac.local password 'new-password'

Alternatively you can run:

  /opt/local/lib/mysql56/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:

  cd /opt/local ; /opt/local/lib/mysql56/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

  cd mysql-test ; perl mysql-test-run.pl

Please report any problems at http://bugs.mysql.com/

The latest information about MySQL is available on the web at

  http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

WARNING: Could not copy config file template /opt/local/share/mysql56/support-files/my-default.cnf to
/opt/local/etc/mysql56/my-new.cnf, may not have access rights to do so.
You may want to copy the file manually, or create your own,
it will then be used by default by the server when you start it.

Johns-iMac:~ john$ sudo chown -R _mysql:_mysql /opt/local/var/db/mysql56/
Johns-iMac:~ john$ sudo chown -R _mysql:_mysql /opt/local/var/run/mysql56/
Johns-iMac:~ john$ sudo chown -R _mysql:_mysql /opt/local/var/log/mysql56/
Johns-iMac:~ john$ sudo port load mysql56-server
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
Johns-iMac:~ john$ 
Johns-iMac:~ john$ ps -ax | grep mysql | grep -v grep
  573 ??         0:00.51 /opt/local/lib/mysql56/bin/mysqld
Johns-iMac:~ john$ 
Johns-iMac:~ john$ /opt/local/bin/mysqladmin -u root password 'mypassword'
Warning: Using a password on the command line interface can be insecure.
Johns-iMac:~ john$ mysql -u root -p'mypassword'
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.34 Source distribution

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE DATABASE nagios DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
Query OK, 1 row affected (0.00 sec)

mysql> CREATE USER 'ndoutils'@'localhost' IDENTIFIED BY 'ndoutils_password';
Query OK, 0 rows affected (0.00 sec)

mysql> 
mysql> GRANT USAGE ON *.* TO 'ndoutils'@'localhost' IDENTIFIED BY 'ndoutils_password' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ; 
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON nagios.* TO 'ndoutils'@'localhost' WITH GRANT OPTION ; 
Query OK, 0 rows affected (0.00 sec)

mysql> \q
Bye
Johns-iMac:~ john$ echo 'show databases;' | mysql -u ndoutils -p'ndoutils_password' -h localhost
Warning: Using a password on the command line interface can be insecure.
Database
information_schema
nagios
test
Johns-iMac:~ john$ cd /tmp
Johns-iMac:tmp john$ curl -L -o ndoutils.tar.gz https://github.com/NagiosEnterprises/ndoutils/archive/ndoutils-2.1.3.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   142    0   142    0     0     46      0 --:--:--  0:00:03 --:--:--    46
100 2131k    0 2131k    0     0   236k      0 --:--:--  0:00:09 --:--:--  509k
Johns-iMac:tmp john$ tar xzf ndoutils.tar.gz
Johns-iMac:tmp john$ cd /tmp/ndoutils-ndoutils-2.1.3/
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking for perl... /opt/local/bin/perl
checking build system type... i386-apple-darwin15.6.0
checking host system type... i386-apple-darwin15.6.0
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking what the operating system is ... osx
checking what the distribution type is ... osx
checking what init system is being used ... launchd
checking what inetd is being used ... launchd
checking for which paths to use ... default
checking for which init file to use ... mac-init.plist
checking for which inetd files to use ... mac-inetd.plist
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking ltdl.h usability... no
checking ltdl.h presence... no
checking for ltdl.h... no
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking socket.h usability... no
checking socket.h presence... no
checking for socket.h... no
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking for stdint.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/msg.h usability... yes
checking sys/msg.h presence... yes
checking for sys/msg.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/sendfile.h usability... no
checking sys/sendfile.h presence... no
checking for sys/sendfile.h... no
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for sys/stat.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking for sys/types.h... (cached) yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking for sys/wait.h... (cached) yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking tcpd.h usability... no
checking tcpd.h presence... no
checking for tcpd.h... no
checking for unistd.h... (cached) yes
checking values.h usability... no
checking values.h presence... no
checking for values.h... no
checking for an ANSI C-conforming const... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking return type of signal handlers... void
checking for uid_t in sys/types.h... yes
checking type of array argument to getgroups... gid_t
checking size of int... 4
checking size of short... 2
checking size of long... 8
checking for uint32_t... yes
checking for u_int32_t... yes
checking for int32_t... yes
checking for main in -lnsl... no
checking for socket in -lsocket... no
checking for main in -lwrap... no
checking for getopt_long... yes
checking for strdup... yes
checking for strstr... yes
checking for strtoul... yes
checking for initgroups... yes
checking for strtof... yes
checking for nanosleep... yes
checking for va_copy... yes
checking for snprintf... yes
checking for asprintf... yes
checking for type of socket size... size_t
checking for linker flags for loadable modules... -bundle -flat_namespace -undefined suppress
checking for mysql_config... /opt/local/bin/mysql_config
checking for mysql_init in -lmysqlclient... yes
MySQL library and include file(s) were found!
checking for library containing sd_listen_fds... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config/ndo2db.cfg-sample
config.status: creating config/ndomod.cfg-sample
config.status: creating config/nagios.cfg
config.status: creating config/misccommands.cfg
config.status: creating docs/docbook/en-en/Makefile
config.status: creating include/io.h
config.status: creating include/common.h
config.status: creating startup/bsd-init
config.status: creating startup/debian-init
config.status: creating startup/default-init
config.status: creating startup/default-inetd
config.status: creating startup/default-service
config.status: creating startup/default-socket
config.status: creating startup/default-socket-svc
config.status: creating startup/default-xinetd
config.status: creating startup/mac-init.plist
config.status: creating startup/mac-inetd.plist
config.status: creating startup/newbsd-init
config.status: creating startup/openbsd-init
config.status: creating startup/openrc-conf
config.status: creating startup/openrc-init
config.status: creating startup/solaris-init.xml
config.status: creating startup/solaris-inetd.xml
config.status: creating startup/tmpfile.conf
config.status: creating startup/upstart-init
config.status: creating startup/rh-upstart-init
config.status: creating include/config.h

*** Configuration summary for ndoutils 2.1.3 2017-04-13 ***:

 General Options:
 -------------------------
 NDO2DB user:      nagios
 NDO2DB group:     nagios
 NDO2DB tcp port:  5668

Review the options above for accuracy.  If they look
okay, type 'make all' to compile the NDO utilities,
or type 'make' to get a list of make options.

Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo make all
cd ./src && /Applications/Xcode.app/Contents/Developer/usr/bin/make
gcc -fno-common -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H  -c -o io.o io.c
gcc -fno-common -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H  -c -o utils.o utils.c
gcc -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H  -o file2sock file2sock.c io.o utils.o   -lm  
gcc -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H  -o log2ndo log2ndo.c io.o utils.o   -lm  
/Applications/Xcode.app/Contents/Developer/usr/bin/make ndo2db-2x
gcc -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H  -c -o db.o db.c
gcc -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H  -D BUILD_NAGIOS_2X -c -o dbhandlers-2x.o dbhandlers.c
dbhandlers.c:640:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:795:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:822:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:848:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:888:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:981:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:1040:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1042:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1137:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1139:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1225:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1227:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1300:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1302:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1372:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1374:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1484:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1486:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1614:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1616:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1726:9: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1744:9: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1778:9: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1904:9: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1926:9: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1983:9: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:2070:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:2851:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:2938:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:3415:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3444:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3473:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3564:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3848:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3877:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3974:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4215:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4244:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4351:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4380:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4537:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4706:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4746:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4787:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4882:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:5060:7: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                                        ,idi->dbinfo.instance_id
                                         ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:5071:7: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                                        ,idi->dbinfo.instance_id
                                         ^~~~~~~~~~~~~~~~~~~~~~~
47 warnings generated.
gcc -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H   -D BUILD_NAGIOS_2X -o ndo2db-2x queue.c ndo2db.c dbhandlers-2x.o  io.o utils.o db.o     -L/opt/local/lib/mysql56/mysql  -lmysqlclient  -lz -lm 
queue.c:63:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
queue.c:102:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
                        syslog(LOG_ERR, logmsg);
                                        ^~~~~~
queue.c:102:20: note: treat the string as an argument to avoid this
                        syslog(LOG_ERR, logmsg);
                                        ^
                                        "%s", 
queue.c:122:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
                        syslog(LOG_ERR, logmsg);
                                        ^~~~~~
queue.c:122:20: note: treat the string as an argument to avoid this
                        syslog(LOG_ERR, logmsg);
                                        ^
                                        "%s", 
3 warnings generated.
ndo2db.c:2173:10: warning: address of array 'idi->mbuf' will always evaluate to 'true' [-Wpointer-bool-conversion]
        if(idi->mbuf){
        ~~ ~~~~~^~~~
ndo2db.c:2412:86: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
        fprintf(ndo2db_debug_file_fp,"[%lu.%06lu] [%03d.%d] [pid=%lu] ",current_time.tv_sec,current_time.tv_usec,le...
                                           ~~~~~                                            ^~~~~~~~~~~~~~~~~~~~
                                           %06d
2 warnings generated.
/Applications/Xcode.app/Contents/Developer/usr/bin/make ndo2db-3x
gcc -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H  -D BUILD_NAGIOS_3X -c -o dbhandlers-3x.o dbhandlers.c
dbhandlers.c:640:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:795:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:822:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:848:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:888:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:981:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:1040:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1042:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1137:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1139:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1225:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1227:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1300:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1302:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1372:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1374:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1484:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1486:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1614:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1616:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1726:9: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1744:9: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1778:9: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1904:9: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1926:9: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1983:9: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:2070:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:2851:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:2938:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:3415:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3444:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3473:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3564:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3848:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3877:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3974:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4215:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4244:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4351:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4380:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4537:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4706:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4746:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4787:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4882:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:5060:7: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                                        ,idi->dbinfo.instance_id
                                         ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:5071:7: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                                        ,idi->dbinfo.instance_id
                                         ^~~~~~~~~~~~~~~~~~~~~~~
47 warnings generated.
gcc -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H   -D BUILD_NAGIOS_3X -o ndo2db-3x queue.c ndo2db.c dbhandlers-3x.o  io.o utils.o db.o     -L/opt/local/lib/mysql56/mysql  -lmysqlclient  -lz -lm 
queue.c:63:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
queue.c:102:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
                        syslog(LOG_ERR, logmsg);
                                        ^~~~~~
queue.c:102:20: note: treat the string as an argument to avoid this
                        syslog(LOG_ERR, logmsg);
                                        ^
                                        "%s", 
queue.c:122:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
                        syslog(LOG_ERR, logmsg);
                                        ^~~~~~
queue.c:122:20: note: treat the string as an argument to avoid this
                        syslog(LOG_ERR, logmsg);
                                        ^
                                        "%s", 
3 warnings generated.
ndo2db.c:2173:10: warning: address of array 'idi->mbuf' will always evaluate to 'true' [-Wpointer-bool-conversion]
        if(idi->mbuf){
        ~~ ~~~~~^~~~
ndo2db.c:2412:86: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
        fprintf(ndo2db_debug_file_fp,"[%lu.%06lu] [%03d.%d] [pid=%lu] ",current_time.tv_sec,current_time.tv_usec,le...
                                           ~~~~~                                            ^~~~~~~~~~~~~~~~~~~~
                                           %06d
2 warnings generated.
/Applications/Xcode.app/Contents/Developer/usr/bin/make ndo2db-4x
gcc -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H  -I ../include/nagios-4x  -D BUILD_NAGIOS_4X -c -o dbhandlers-4x.o dbhandlers.c
dbhandlers.c:640:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:795:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:822:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:848:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:888:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:981:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:1040:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1042:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1137:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1139:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1225:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1227:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1300:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1302:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1372:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1374:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1484:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1486:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1614:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1616:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1726:9: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1744:9: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1778:9: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1904:9: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1926:9: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1983:9: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:2070:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:2851:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:2938:8: warning: format specifies type 'unsigned long' but the argument has type
      '__darwin_suseconds_t' (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:3415:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3444:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3473:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3564:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3821:5: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                                idi->dbinfo.instance_id, service_id, member_id) == -1) {
                                ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3848:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3877:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3974:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4215:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4244:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4351:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4380:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4537:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4706:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4746:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4787:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4882:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:5060:7: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                                        ,idi->dbinfo.instance_id
                                         ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:5071:7: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                                        ,idi->dbinfo.instance_id
                                         ^~~~~~~~~~~~~~~~~~~~~~~
48 warnings generated.
gcc -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H   -D BUILD_NAGIOS_4X -o ndo2db-4x queue.c ndo2db.c dbhandlers-4x.o  io.o utils.o db.o     -L/opt/local/lib/mysql56/mysql  -lmysqlclient  -lz -lm 
queue.c:63:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
queue.c:102:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
                        syslog(LOG_ERR, logmsg);
                                        ^~~~~~
queue.c:102:20: note: treat the string as an argument to avoid this
                        syslog(LOG_ERR, logmsg);
                                        ^
                                        "%s", 
queue.c:122:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
                        syslog(LOG_ERR, logmsg);
                                        ^~~~~~
queue.c:122:20: note: treat the string as an argument to avoid this
                        syslog(LOG_ERR, logmsg);
                                        ^
                                        "%s", 
3 warnings generated.
ndo2db.c:2173:10: warning: address of array 'idi->mbuf' will always evaluate to 'true' [-Wpointer-bool-conversion]
        if(idi->mbuf){
        ~~ ~~~~~^~~~
ndo2db.c:2412:86: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
        fprintf(ndo2db_debug_file_fp,"[%lu.%06lu] [%03d.%d] [pid=%lu] ",current_time.tv_sec,current_time.tv_usec,le...
                                           ~~~~~                                            ^~~~~~~~~~~~~~~~~~~~
                                           %06d
2 warnings generated.
/Applications/Xcode.app/Contents/Developer/usr/bin/make ndomod-2x.o
gcc -fno-common -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H  -D BUILD_NAGIOS_2X -o ndomod-2x.o ndomod.c  io.o utils.o -bundle -flat_namespace -undefined suppress    
ndomod.c:354:27: warning: expression which evaluates to zero treated as a null pointer constant of type 'char *'
      [-Wnon-literal-null-conversion]
        arglist[argcount]='\x0';
                          ^~~~~
ndomod.c:1373:35: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                                        bdp->value.timestamp.tv_sec, bdp->value.timestamp.tv_usec);
                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/secure/_stdio.h:57:62: note: expanded from macro 'snprintf'
  __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)
                                                             ^~~~~~~~~~~
ndomod.c:3544:5: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                 ,now.tv_usec
                  ^~~~~~~~~~~
/usr/include/secure/_stdio.h:57:62: note: expanded from macro 'snprintf'
  __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)
                                                             ^~~~~~~~~~~
ndomod.c:3563:5: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                 ,now.tv_usec
                  ^~~~~~~~~~~
/usr/include/secure/_stdio.h:57:62: note: expanded from macro 'snprintf'
  __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)
                                                             ^~~~~~~~~~~
ndomod.c:5263:5: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                 ,now.tv_usec
                  ^~~~~~~~~~~
ndomod.c:5330:5: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                 ,now.tv_usec
                  ^~~~~~~~~~~
6 warnings generated.
/Applications/Xcode.app/Contents/Developer/usr/bin/make ndomod-3x.o
gcc -fno-common -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H  -D BUILD_NAGIOS_3X -o ndomod-3x.o ndomod.c  io.o utils.o -bundle -flat_namespace -undefined suppress    
ndomod.c:354:27: warning: expression which evaluates to zero treated as a null pointer constant of type 'char *'
      [-Wnon-literal-null-conversion]
        arglist[argcount]='\x0';
                          ^~~~~
ndomod.c:1373:35: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                                        bdp->value.timestamp.tv_sec, bdp->value.timestamp.tv_usec);
                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/secure/_stdio.h:57:62: note: expanded from macro 'snprintf'
  __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)
                                                             ^~~~~~~~~~~
ndomod.c:3544:5: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                 ,now.tv_usec
                  ^~~~~~~~~~~
/usr/include/secure/_stdio.h:57:62: note: expanded from macro 'snprintf'
  __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)
                                                             ^~~~~~~~~~~
ndomod.c:3563:5: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                 ,now.tv_usec
                  ^~~~~~~~~~~
/usr/include/secure/_stdio.h:57:62: note: expanded from macro 'snprintf'
  __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)
                                                             ^~~~~~~~~~~
ndomod.c:5263:5: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                 ,now.tv_usec
                  ^~~~~~~~~~~
ndomod.c:5330:5: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                 ,now.tv_usec
                  ^~~~~~~~~~~
6 warnings generated.
/Applications/Xcode.app/Contents/Developer/usr/bin/make ndomod-4x.o
gcc -fno-common -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H  -I ../include/nagios-4x  -D BUILD_NAGIOS_4X -o ndomod-4x.o ndomod.c  io.o utils.o -bundle -flat_namespace -undefined suppress    
ndomod.c:354:27: warning: expression which evaluates to zero treated as a null pointer constant of type 'char *'
      [-Wnon-literal-null-conversion]
        arglist[argcount]='\x0';
                          ^~~~~
ndomod.c:1373:35: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                                        bdp->value.timestamp.tv_sec, bdp->value.timestamp.tv_usec);
                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/secure/_stdio.h:57:62: note: expanded from macro 'snprintf'
  __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)
                                                             ^~~~~~~~~~~
ndomod.c:3544:5: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                 ,now.tv_usec
                  ^~~~~~~~~~~
/usr/include/secure/_stdio.h:57:62: note: expanded from macro 'snprintf'
  __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)
                                                             ^~~~~~~~~~~
ndomod.c:3563:5: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                 ,now.tv_usec
                  ^~~~~~~~~~~
/usr/include/secure/_stdio.h:57:62: note: expanded from macro 'snprintf'
  __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)
                                                             ^~~~~~~~~~~
ndomod.c:5263:5: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                 ,now.tv_usec
                  ^~~~~~~~~~~
ndomod.c:5330:5: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                 ,now.tv_usec
                  ^~~~~~~~~~~
6 warnings generated.
gcc -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H  -o sockdebug sockdebug.c io.o utils.o   -lm  
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo make install
cd ./src && /Applications/Xcode.app/Contents/Developer/usr/bin/make install
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/var
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/bin
/usr/bin/install -c -m 755 -o nagios -g nagios ndo2db-4x /usr/local/nagios/bin/ndo2db
/usr/bin/install -c -m 755 -o nagios -g nagios ndomod-4x.o /usr/local/nagios/bin/ndomod.o
/usr/bin/install -c -m 774 -o nagios -g nagios file2sock /usr/local/nagios/bin
/usr/bin/install -c -m 774 -o nagios -g nagios log2ndo /usr/local/nagios/bin
/usr/bin/install -c -m 774 -o nagios -g nagios sockdebug /usr/local/nagios/bin

  Hint: NDOUtils Installation against Nagios v4.x
  completed.

  If you want to install NDOUtils for Nagios v3.x
  please type  'make install-3x

  If you want to install NDOUtils for Nagios v2.x
  please type  'make install-2x

  Next step should be the database initialization/upgrade
  cd into the db/ directory and either:
     ./installdb  (for a new installation) or:
     ./upgradedb  (for an existing one)

Main NDOUtils components installed

Johns-iMac:ndoutils-ndoutils-2.1.3 john$ cd db/
Johns-iMac:db john$ sudo perl ./installdb -u 'ndoutils' -p 'ndoutils_password' -h 'localhost' -d nagios
DBD::mysql::db do failed: Table 'nagios.nagios_dbversion' doesn't exist at ./installdb line 52.
** Creating tables for version 2.0.1
     Using mysql.sql for installation...
Warning: Using a password on the command line interface can be insecure.
** Updating table nagios_dbversion
Done!
Johns-iMac:db john$ cd ..
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo make install-config
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/etc
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/var
/usr/bin/install -c -m 644 -o nagios -g nagios config/ndo2db.cfg-sample /usr/local/nagios/etc
/usr/bin/install -c -m 644 -o nagios -g nagios config/ndomod.cfg-sample /usr/local/nagios/etc

*** Config files installed ***

Remember, these are *SAMPLE* config files.  You'll need to rename
the files in order to use them.
Please read the documentation to know what they are doing.

Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo mv /usr/local/nagios/etc/ndo2db.cfg-sample /usr/local/nagios/etc/ndo2db.cfg
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo sed -i '' 's/^db_user=.*/db_user=ndoutils/g' /usr/local/nagios/etc/ndo2db.cfg
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo sed -i '' 's/^db_pass=.*/db_pass=ndoutils_password/g' /usr/local/nagios/etc/ndo2db.cfg
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo mv /usr/local/nagios/etc/ndomod.cfg-sample /usr/local/nagios/etc/ndomod.cfg
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ 
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo make install-init
/usr/bin/install -c -m 755 startup/mac-init.plist /Library/LaunchDaemons/org.nagios.ndo2db.plist
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo launchctl start org.nagios.ndo2db
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo sh -c 'printf "\n\n# NDOUtils Broker Module\n" >> /usr/local/nagios/etc/nagios.cfg'
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo sh -c 'printf "broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg\n" >> /usr/local/nagios/etc/nagios.cfg'
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ 
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo /etc/rc.d/init.d/nagios restart
Running configuration check...
-n Stopping nagios:
-n .
 done.
-n Starting nagios:
 done.
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo /etc/rc.d/init.d/nagios status 
nagios is not running
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ 
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo /etc/rc.d/init.d/nagios status 
nagios is not running
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ tail /usr/local/nagios/var/nagios.log
[1494237729] wproc: Registry request: name=Core Worker 3712;pid=3712
[1494237729] wproc: Registry request: name=Core Worker 3713;pid=3713
[1494237729] wproc: Registry request: name=Core Worker 3715;pid=3715
[1494237729] wproc: Registry request: name=Core Worker 3716;pid=3716
[1494237729] Error: Could not load module '/usr/local/nagios/bin/ndomod.o' -> dlopen(/usr/local/nagios/bin/ndomod.o, 10): Symbol not found: ___nagios_object_structure_version
  Referenced from: /usr/local/nagios/bin/ndomod.o
  Expected in: flat namespace
 in /usr/local/nagios/bin/ndomod.o
[1494237729] Error: Failed to load module '/usr/local/nagios/bin/ndomod.o'.
[1494237729] Error: Module loading failed. Aborting.
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ ps -ef | grep ndo
    0    82     1   0  4:42am ??         0:00.01 /opt/local/bin/daemondo --label=apache2 --start-cmd /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper start ; --stop-cmd /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper stop ; --restart-cmd /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper restart ; --pid=none
  501    93     1   0  4:42am ??         0:00.51 /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow console
   88   205     1   0  4:42am ??         0:03.22 /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Resources/WindowServer -daemon
  503  3661     1   0  5:01am ??         0:00.01 ndo2db -c /usr/local/nagios/etc/ndo2db.cfg -f
  501  3726   415   0  5:03am ttys000    0:00.00 grep ndo
jfrickson commented 7 years ago

From my research, it looks like OS/X needs a -undefined dynamic_lookup argument to the linker. Could you try adding that to the MOD_LDFLAGS= line in src/Makefile around line 44 and see if that works?

box293 commented 7 years ago

Seems to be the same problem, assuming MOD_LDFLAGS=@MOD_LDFLAGS@ -undefined dynamic_lookup is the correct syntax:

troylea@mint-itx ~ $ ssh john@10.25.254.134
Password:
Last login: Thu May 11 18:33:50 2017
Johns-iMac:~ john$ sudo port install mysql56-server
Password:
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
--->  Computing dependencies for mysql56-server
The following dependencies will be installed: 
 mysql56
 mysql_select
 tcp_wrappers
Continue? [Y/n]: y
--->  Fetching archive for mysql_select
--->  Attempting to fetch mysql_select-0.1.2_3.darwin_15.noarch.tbz2 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/mysql_select
--->  Attempting to fetch mysql_select-0.1.2_3.darwin_15.noarch.tbz2.rmd160 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/mysql_select
--->  Installing mysql_select @0.1.2_3
--->  Activating mysql_select @0.1.2_3
--->  Cleaning mysql_select
--->  Fetching archive for tcp_wrappers
--->  Attempting to fetch tcp_wrappers-20_2.darwin_15.x86_64.tbz2 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/tcp_wrappers
--->  Attempting to fetch tcp_wrappers-20_2.darwin_15.x86_64.tbz2.rmd160 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/tcp_wrappers
--->  Installing tcp_wrappers @20_2
--->  Activating tcp_wrappers @20_2
--->  Cleaning tcp_wrappers
--->  Fetching archive for mysql56
--->  Attempting to fetch mysql56-5.6.34_0.darwin_15.x86_64.tbz2 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/mysql56
--->  Attempting to fetch mysql56-5.6.34_0.darwin_15.x86_64.tbz2.rmd160 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/mysql56
--->  Installing mysql56 @5.6.34_0
The mysql56 client has been installed.
To install the mysql56 server, install the mysql56-server port.
--->  Activating mysql56 @5.6.34_0
--->  Cleaning mysql56
--->  Fetching archive for mysql56-server
--->  Attempting to fetch mysql56-server-5.6.34_0.darwin_15.noarch.tbz2 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/mysql56-server
--->  Attempting to fetch mysql56-server-5.6.34_0.darwin_15.noarch.tbz2.rmd160 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/mysql56-server
--->  Installing mysql56-server @5.6.34_0
--->  Activating mysql56-server @5.6.34_0
--->  Cleaning mysql56-server
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.
--->  Some of the ports you installed have notes:
  mysql56 has the following notes:
    On activation if no /opt/local/etc/mysql56/my.cnf file exists one
    will be created which loads
    /opt/local/etc/mysql56/macports-default.cnf.

    If a /opt/local/etc/mysql56/my.cnf file exists MacPorts does not
    touch it and any changes you make to /opt/local/etc/mysql56/my.cnf
    will be preserved (e.g., during port upgrades, deactivations or
    activations). /opt/local/etc/mysql56/my.cnf is a good place to
    customize your mysql56 installation.

    Any changes made to /opt/local/etc/mysql56/macports-default.cnf
    will be lost during port upgrades, deactivations or activations so you
    are advised to not make changes here. Currently
    /opt/local/etc/mysql56/macports-default.cnf contains only one
    directive; to disable networking. With disabled networking it is
    possible to install and have running all the MacPorts mysql ports
    simultaneously.
  mysql56-server has the following notes:
    If this is a new install you might want to run:

    $ sudo -u _mysql /opt/local/lib/mysql56/bin/mysql_install_db
Johns-iMac:~ john$ sudo port select mysql mysql56
Password:
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
Selecting 'mysql56' for 'mysql' succeeded. 'mysql56' is now active.
Johns-iMac:~ john$ sudo port install p5-dbd-mysql
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
--->  Computing dependencies for p5-dbd-mysql
The following dependencies will be installed: 
 p5.24-dbd-mysql
 p5.24-dbi
Continue? [Y/n]: y
--->  Fetching archive for p5.24-dbi
--->  Attempting to fetch p5.24-dbi-1.636.0_0.darwin_15.x86_64.tbz2 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/p5.24-dbi
--->  Attempting to fetch p5.24-dbi-1.636.0_0.darwin_15.x86_64.tbz2.rmd160 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/p5.24-dbi
--->  Installing p5.24-dbi @1.636.0_0
--->  Activating p5.24-dbi @1.636.0_0
--->  Cleaning p5.24-dbi
--->  Fetching archive for p5.24-dbd-mysql
--->  Attempting to fetch p5.24-dbd-mysql-4.42.0_0+mysql56.darwin_15.x86_64.tbz2 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/p5.24-dbd-mysql
--->  Attempting to fetch p5.24-dbd-mysql-4.42.0_0+mysql56.darwin_15.x86_64.tbz2.rmd160 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/p5.24-dbd-mysql
--->  Installing p5.24-dbd-mysql @4.42.0_0+mysql56
--->  Activating p5.24-dbd-mysql @4.42.0_0+mysql56
--->  Cleaning p5.24-dbd-mysql
--->  Fetching archive for p5-dbd-mysql
--->  Attempting to fetch p5-dbd-mysql-4.42.0_0.darwin_15.noarch.tbz2 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/p5-dbd-mysql
--->  Attempting to fetch p5-dbd-mysql-4.42.0_0.darwin_15.noarch.tbz2.rmd160 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/p5-dbd-mysql
--->  Installing p5-dbd-mysql @4.42.0_0
--->  Activating p5-dbd-mysql @4.42.0_0
--->  Cleaning p5-dbd-mysql
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.
Johns-iMac:~ john$ sudo -u _mysql mysql_install_db
WARNING: Could not write to config file /opt/local/etc/mysql56/my-new.cnf: Permission denied

Installing MySQL system tables...2017-05-11 18:40:02 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-05-11 18:40:02 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2017-05-11 18:40:02 0 [Note] /opt/local/lib/mysql56/bin/mysqld (mysqld 5.6.34) starting as process 763 ...
2017-05-11 18:40:02 763 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-05-11 18:40:02 763 [Note] InnoDB: The InnoDB memory heap is disabled
2017-05-11 18:40:02 763 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-05-11 18:40:02 763 [Note] InnoDB: Memory barrier is not used
2017-05-11 18:40:02 763 [Note] InnoDB: Compressed tables use zlib 1.2.8
2017-05-11 18:40:02 763 [Note] InnoDB: Using CPU crc32 instructions
2017-05-11 18:40:02 763 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2017-05-11 18:40:02 763 [Note] InnoDB: Completed initialization of buffer pool
2017-05-11 18:40:03 763 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2017-05-11 18:40:03 763 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2017-05-11 18:40:03 763 [Note] InnoDB: Database physically writes the file full: wait...
2017-05-11 18:40:04 763 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2017-05-11 18:40:06 763 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2017-05-11 18:40:10 763 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2017-05-11 18:40:10 763 [Warning] InnoDB: New log files created, LSN=45781
2017-05-11 18:40:10 763 [Note] InnoDB: Doublewrite buffer not found: creating new
2017-05-11 18:40:10 763 [Note] InnoDB: Doublewrite buffer created
2017-05-11 18:40:10 763 [Note] InnoDB: 128 rollback segment(s) are active.
2017-05-11 18:40:10 763 [Warning] InnoDB: Creating foreign key constraint system tables.
2017-05-11 18:40:10 763 [Note] InnoDB: Foreign key constraint system tables created
2017-05-11 18:40:10 763 [Note] InnoDB: Creating tablespace and datafile system tables.
2017-05-11 18:40:10 763 [Note] InnoDB: Tablespace and datafile system tables created.
2017-05-11 18:40:10 763 [Note] InnoDB: Waiting for purge to start
2017-05-11 18:40:10 763 [Note] InnoDB: 5.6.34 started; log sequence number 0
2017-05-11 18:40:11 763 [Note] Binlog end
2017-05-11 18:40:11 763 [Note] InnoDB: FTS optimize thread exiting.
2017-05-11 18:40:11 763 [Note] InnoDB: Starting shutdown...
2017-05-11 18:40:12 763 [Note] InnoDB: Shutdown completed; log sequence number 1625977
OK

Filling help tables...2017-05-11 18:40:12 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-05-11 18:40:12 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2017-05-11 18:40:12 0 [Note] /opt/local/lib/mysql56/bin/mysqld (mysqld 5.6.34) starting as process 766 ...
2017-05-11 18:40:12 766 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-05-11 18:40:12 766 [Note] InnoDB: The InnoDB memory heap is disabled
2017-05-11 18:40:12 766 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-05-11 18:40:12 766 [Note] InnoDB: Memory barrier is not used
2017-05-11 18:40:12 766 [Note] InnoDB: Compressed tables use zlib 1.2.8
2017-05-11 18:40:12 766 [Note] InnoDB: Using CPU crc32 instructions
2017-05-11 18:40:12 766 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2017-05-11 18:40:12 766 [Note] InnoDB: Completed initialization of buffer pool
2017-05-11 18:40:12 766 [Note] InnoDB: Highest supported file format is Barracuda.
2017-05-11 18:40:12 766 [Note] InnoDB: 128 rollback segment(s) are active.
2017-05-11 18:40:12 766 [Note] InnoDB: Waiting for purge to start
2017-05-11 18:40:12 766 [Note] InnoDB: 5.6.34 started; log sequence number 1625977
2017-05-11 18:40:12 766 [Note] Binlog end
2017-05-11 18:40:12 766 [Note] InnoDB: FTS optimize thread exiting.
2017-05-11 18:40:12 766 [Note] InnoDB: Starting shutdown...
2017-05-11 18:40:13 766 [Note] InnoDB: Shutdown completed; log sequence number 1625987
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

  /opt/local/lib/mysql56/bin/mysqladmin -u root password 'new-password'
  /opt/local/lib/mysql56/bin/mysqladmin -u root -h Johns-iMac.local password 'new-password'

Alternatively you can run:

  /opt/local/lib/mysql56/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:

  cd /opt/local ; /opt/local/lib/mysql56/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

  cd mysql-test ; perl mysql-test-run.pl

Please report any problems at http://bugs.mysql.com/

The latest information about MySQL is available on the web at

  http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

WARNING: Could not copy config file template /opt/local/share/mysql56/support-files/my-default.cnf to
/opt/local/etc/mysql56/my-new.cnf, may not have access rights to do so.
You may want to copy the file manually, or create your own,
it will then be used by default by the server when you start it.

Johns-iMac:~ john$ sudo chown -R _mysql:_mysql /opt/local/var/db/mysql56/
Johns-iMac:~ john$ sudo chown -R _mysql:_mysql /opt/local/var/run/mysql56/
Johns-iMac:~ john$ sudo chown -R _mysql:_mysql /opt/local/var/log/mysql56/
Johns-iMac:~ john$ sudo port load mysql56-server
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
Johns-iMac:~ john$ ps -ax | grep mysql | grep -v grep
  780 ??         0:00.55 /opt/local/lib/mysql56/bin/mysqld
Johns-iMac:~ john$ /opt/local/bin/mysqladmin -u root password 'mypassword'
Warning: Using a password on the command line interface can be insecure.
Johns-iMac:~ john$ mysql -u root -p'mypassword'
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.34 Source distribution

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE DATABASE nagios DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
Query OK, 1 row affected (0.00 sec)

mysql> CREATE USER 'ndoutils'@'localhost' IDENTIFIED BY 'ndoutils_password';
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT USAGE ON *.* TO 'ndoutils'@'localhost' IDENTIFIED BY 'ndoutils_password' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ; 
Query OK, 0 rows affected (0.00 sec)

mysql> 
mysql> GRANT ALL PRIVILEGES ON nagios.* TO 'ndoutils'@'localhost' WITH GRANT OPTION ;
Query OK, 0 rows affected (0.00 sec)

mysql> \q
Bye
Johns-iMac:~ john$ echo 'show databases;' | mysql -u ndoutils -p'ndoutils_password' -h localhost
Warning: Using a password on the command line interface can be insecure.
Database
information_schema
nagios
test
Johns-iMac:~ john$ exit
logout
Connection to 10.25.254.134 closed.
troylea@mint-itx ~ $ echo I shutdown the Mac VM to take a snapshot
I shutdown the Mac VM to take a snapshot
troylea@mint-itx ~ $ ssh john@10.25.254.134
Password:
Last login: Thu May 11 18:44:18 2017
Johns-iMac:~ john$ cd /tmp
Johns-iMac:tmp john$ curl -L -o ndoutils.tar.gz https://github.com/NagiosEnterprises/ndoutils/archive/ndoutils-2.1.3.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   142    0   142    0     0     42      0 --:--:--  0:00:03 --:--:--    42
100 2131k    0 2131k    0     0   135k      0 --:--:--  0:00:15 --:--:--  244k
Johns-iMac:tmp john$ tar xzf ndoutils.tar.gz
Johns-iMac:tmp john$ cd /tmp/ndoutils-ndoutils-2.1.3/
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ vi src/Makefile.in 
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ cat src/Makefile.in | head -n 44 | tail -n 1
MOD_LDFLAGS=@MOD_LDFLAGS@ -undefined dynamic_lookup
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo ./configure
Password:
checking for a BSD-compatible install... /usr/bin/install -c
checking for perl... /opt/local/bin/perl
checking build system type... i386-apple-darwin15.6.0
checking host system type... i386-apple-darwin15.6.0
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking what the operating system is ... osx
checking what the distribution type is ... osx
checking what init system is being used ... launchd
checking what inetd is being used ... launchd
checking for which paths to use ... default
checking for which init file to use ... mac-init.plist
checking for which inetd files to use ... mac-inetd.plist
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking ltdl.h usability... no
checking ltdl.h presence... no
checking for ltdl.h... no
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking socket.h usability... no
checking socket.h presence... no
checking for socket.h... no
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking for stdint.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/msg.h usability... yes
checking sys/msg.h presence... yes
checking for sys/msg.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/sendfile.h usability... no
checking sys/sendfile.h presence... no
checking for sys/sendfile.h... no
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for sys/stat.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking for sys/types.h... (cached) yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking for sys/wait.h... (cached) yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking tcpd.h usability... no
checking tcpd.h presence... no
checking for tcpd.h... no
checking for unistd.h... (cached) yes
checking values.h usability... no
checking values.h presence... no
checking for values.h... no
checking for an ANSI C-conforming const... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking return type of signal handlers... void
checking for uid_t in sys/types.h... yes
checking type of array argument to getgroups... gid_t
checking size of int... 4
checking size of short... 2
checking size of long... 8
checking for uint32_t... yes
checking for u_int32_t... yes
checking for int32_t... yes
checking for main in -lnsl... no
checking for socket in -lsocket... no
checking for main in -lwrap... no
checking for getopt_long... yes
checking for strdup... yes
checking for strstr... yes
checking for strtoul... yes
checking for initgroups... yes
checking for strtof... yes
checking for nanosleep... yes
checking for va_copy... yes
checking for snprintf... yes
checking for asprintf... yes
checking for type of socket size... size_t
checking for linker flags for loadable modules... -bundle -flat_namespace -undefined suppress
checking for mysql_config... /opt/local/bin/mysql_config
checking for mysql_init in -lmysqlclient... yes
MySQL library and include file(s) were found!
checking for library containing sd_listen_fds... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config/ndo2db.cfg-sample
config.status: creating config/ndomod.cfg-sample
config.status: creating config/nagios.cfg
config.status: creating config/misccommands.cfg
config.status: creating docs/docbook/en-en/Makefile
config.status: creating include/io.h
config.status: creating include/common.h
config.status: creating startup/bsd-init
config.status: creating startup/debian-init
config.status: creating startup/default-init
config.status: creating startup/default-inetd
config.status: creating startup/default-service
config.status: creating startup/default-socket
config.status: creating startup/default-socket-svc
config.status: creating startup/default-xinetd
config.status: creating startup/mac-init.plist
config.status: creating startup/mac-inetd.plist
config.status: creating startup/newbsd-init
config.status: creating startup/openbsd-init
config.status: creating startup/openrc-conf
config.status: creating startup/openrc-init
config.status: creating startup/solaris-init.xml
config.status: creating startup/solaris-inetd.xml
config.status: creating startup/tmpfile.conf
config.status: creating startup/upstart-init
config.status: creating startup/rh-upstart-init
config.status: creating include/config.h

*** Configuration summary for ndoutils 2.1.3 2017-04-13 ***:

 General Options:
 -------------------------
 NDO2DB user:      nagios
 NDO2DB group:     nagios
 NDO2DB tcp port:  5668

Review the options above for accuracy.  If they look
okay, type 'make all' to compile the NDO utilities,
or type 'make' to get a list of make options.

Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo make all
cd ./src && /Applications/Xcode.app/Contents/Developer/usr/bin/make
gcc -fno-common -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H  -c -o io.o io.c
gcc -fno-common -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H  -c -o utils.o utils.c
gcc -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H  -o file2sock file2sock.c io.o utils.o   -lm  
gcc -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H  -o log2ndo log2ndo.c io.o utils.o   -lm  
/Applications/Xcode.app/Contents/Developer/usr/bin/make ndo2db-2x
gcc -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H  -c -o db.o db.c
gcc -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H  -D BUILD_NAGIOS_2X -c -o dbhandlers-2x.o dbhandlers.c
dbhandlers.c:640:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:795:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:822:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:848:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:888:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:981:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:1040:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1042:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1137:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1139:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1225:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1227:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1300:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1302:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1372:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1374:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1484:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1486:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1614:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1616:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1726:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1744:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1778:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1904:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1926:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1983:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:2070:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:2851:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:2938:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:3415:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3444:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3473:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3564:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3848:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3877:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3974:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4215:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4244:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4351:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4380:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4537:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4706:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4746:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4787:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4882:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:5060:7: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                                        ,idi->dbinfo.instance_id
                                         ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:5071:7: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                                        ,idi->dbinfo.instance_id
                                         ^~~~~~~~~~~~~~~~~~~~~~~
47 warnings generated.
gcc -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H   -D BUILD_NAGIOS_2X -o ndo2db-2x queue.c ndo2db.c dbhandlers-2x.o  io.o utils.o db.o     -L/opt/local/lib/mysql56/mysql  -lmysqlclient  -lz -lm 
queue.c:63:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
queue.c:102:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
                        syslog(LOG_ERR, logmsg);
                                        ^~~~~~
queue.c:102:20: note: treat the string as an argument to avoid this
                        syslog(LOG_ERR, logmsg);
                                        ^
                                        "%s", 
queue.c:122:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
                        syslog(LOG_ERR, logmsg);
                                        ^~~~~~
queue.c:122:20: note: treat the string as an argument to avoid this
                        syslog(LOG_ERR, logmsg);
                                        ^
                                        "%s", 
3 warnings generated.
ndo2db.c:2173:10: warning: address of array 'idi->mbuf' will always evaluate to 'true' [-Wpointer-bool-conversion]
        if(idi->mbuf){
        ~~ ~~~~~^~~~
ndo2db.c:2412:86: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
        fprintf(ndo2db_debug_file_fp,"[%lu.%06lu] [%03d.%d] [pid=%lu] ",current_time.tv_sec,current_time.tv_usec,leve...
                                           ~~~~~                                            ^~~~~~~~~~~~~~~~~~~~
                                           %06d
2 warnings generated.
/Applications/Xcode.app/Contents/Developer/usr/bin/make ndo2db-3x
gcc -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H  -D BUILD_NAGIOS_3X -c -o dbhandlers-3x.o dbhandlers.c
dbhandlers.c:640:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:795:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:822:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:848:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:888:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:981:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:1040:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1042:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1137:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1139:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1225:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1227:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1300:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1302:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1372:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1374:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1484:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1486:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1614:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1616:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1726:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1744:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1778:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1904:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1926:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1983:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:2070:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:2851:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:2938:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:3415:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3444:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3473:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3564:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3848:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3877:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3974:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4215:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4244:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4351:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4380:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4537:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4706:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4746:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4787:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4882:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:5060:7: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                                        ,idi->dbinfo.instance_id
                                         ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:5071:7: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                                        ,idi->dbinfo.instance_id
                                         ^~~~~~~~~~~~~~~~~~~~~~~
47 warnings generated.
gcc -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H   -D BUILD_NAGIOS_3X -o ndo2db-3x queue.c ndo2db.c dbhandlers-3x.o  io.o utils.o db.o     -L/opt/local/lib/mysql56/mysql  -lmysqlclient  -lz -lm 
queue.c:63:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
queue.c:102:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
                        syslog(LOG_ERR, logmsg);
                                        ^~~~~~
queue.c:102:20: note: treat the string as an argument to avoid this
                        syslog(LOG_ERR, logmsg);
                                        ^
                                        "%s", 
queue.c:122:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
                        syslog(LOG_ERR, logmsg);
                                        ^~~~~~
queue.c:122:20: note: treat the string as an argument to avoid this
                        syslog(LOG_ERR, logmsg);
                                        ^
                                        "%s", 
3 warnings generated.
ndo2db.c:2173:10: warning: address of array 'idi->mbuf' will always evaluate to 'true' [-Wpointer-bool-conversion]
        if(idi->mbuf){
        ~~ ~~~~~^~~~
ndo2db.c:2412:86: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
        fprintf(ndo2db_debug_file_fp,"[%lu.%06lu] [%03d.%d] [pid=%lu] ",current_time.tv_sec,current_time.tv_usec,leve...
                                           ~~~~~                                            ^~~~~~~~~~~~~~~~~~~~
                                           %06d
2 warnings generated.
/Applications/Xcode.app/Contents/Developer/usr/bin/make ndo2db-4x
gcc -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H  -I ../include/nagios-4x  -D BUILD_NAGIOS_4X -c -o dbhandlers-4x.o dbhandlers.c
dbhandlers.c:640:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:795:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:822:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:848:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:888:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:981:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:1040:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1042:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1137:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1139:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1225:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1227:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1300:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1302:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1372:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1374:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1484:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1486:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1614:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,start_time.tv_usec
                     ^~~~~~~~~~~~~~~~~~
dbhandlers.c:1616:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,end_time.tv_usec
                     ^~~~~~~~~~~~~~~~
dbhandlers.c:1726:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1744:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1778:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1904:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1926:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:1983:9: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                            ,tstamp.tv_usec
                             ^~~~~~~~~~~~~~
dbhandlers.c:2070:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:2851:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:2938:8: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
                    ,tstamp.tv_usec
                     ^~~~~~~~~~~~~~
dbhandlers.c:3415:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3444:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3473:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3564:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3821:5: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                                idi->dbinfo.instance_id, service_id, member_id) == -1) {
                                ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3848:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3877:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:3974:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4215:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4244:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4351:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4380:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4537:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4706:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4746:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4787:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:4882:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                            ,idi->dbinfo.instance_id
                             ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:5060:7: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                                        ,idi->dbinfo.instance_id
                                         ^~~~~~~~~~~~~~~~~~~~~~~
dbhandlers.c:5071:7: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                                        ,idi->dbinfo.instance_id
                                         ^~~~~~~~~~~~~~~~~~~~~~~
48 warnings generated.
gcc -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H   -D BUILD_NAGIOS_4X -o ndo2db-4x queue.c ndo2db.c dbhandlers-4x.o  io.o utils.o db.o     -L/opt/local/lib/mysql56/mysql  -lmysqlclient  -lz -lm 
queue.c:63:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
queue.c:102:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
                        syslog(LOG_ERR, logmsg);
                                        ^~~~~~
queue.c:102:20: note: treat the string as an argument to avoid this
                        syslog(LOG_ERR, logmsg);
                                        ^
                                        "%s", 
queue.c:122:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
                        syslog(LOG_ERR, logmsg);
                                        ^~~~~~
queue.c:122:20: note: treat the string as an argument to avoid this
                        syslog(LOG_ERR, logmsg);
                                        ^
                                        "%s", 
3 warnings generated.
ndo2db.c:2173:10: warning: address of array 'idi->mbuf' will always evaluate to 'true' [-Wpointer-bool-conversion]
        if(idi->mbuf){
        ~~ ~~~~~^~~~
ndo2db.c:2412:86: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t'
      (aka 'int') [-Wformat]
        fprintf(ndo2db_debug_file_fp,"[%lu.%06lu] [%03d.%d] [pid=%lu] ",current_time.tv_sec,current_time.tv_usec,leve...
                                           ~~~~~                                            ^~~~~~~~~~~~~~~~~~~~
                                           %06d
2 warnings generated.
/Applications/Xcode.app/Contents/Developer/usr/bin/make ndomod-2x.o
gcc -fno-common -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H  -D BUILD_NAGIOS_2X -o ndomod-2x.o ndomod.c  io.o utils.o -bundle -flat_namespace -undefined suppress -undefined dynamic_lookup    
ndomod.c:354:27: warning: expression which evaluates to zero treated as a null pointer constant of type 'char *'
      [-Wnon-literal-null-conversion]
        arglist[argcount]='\x0';
                          ^~~~~
ndomod.c:1373:35: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                                        bdp->value.timestamp.tv_sec, bdp->value.timestamp.tv_usec);
                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/secure/_stdio.h:57:62: note: expanded from macro 'snprintf'
  __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)
                                                             ^~~~~~~~~~~
ndomod.c:3544:5: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                 ,now.tv_usec
                  ^~~~~~~~~~~
/usr/include/secure/_stdio.h:57:62: note: expanded from macro 'snprintf'
  __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)
                                                             ^~~~~~~~~~~
ndomod.c:3563:5: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                 ,now.tv_usec
                  ^~~~~~~~~~~
/usr/include/secure/_stdio.h:57:62: note: expanded from macro 'snprintf'
  __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)
                                                             ^~~~~~~~~~~
ndomod.c:5263:5: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                 ,now.tv_usec
                  ^~~~~~~~~~~
ndomod.c:5330:5: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                 ,now.tv_usec
                  ^~~~~~~~~~~
6 warnings generated.
/Applications/Xcode.app/Contents/Developer/usr/bin/make ndomod-3x.o
gcc -fno-common -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H  -D BUILD_NAGIOS_3X -o ndomod-3x.o ndomod.c  io.o utils.o -bundle -flat_namespace -undefined suppress -undefined dynamic_lookup    
ndomod.c:354:27: warning: expression which evaluates to zero treated as a null pointer constant of type 'char *'
      [-Wnon-literal-null-conversion]
        arglist[argcount]='\x0';
                          ^~~~~
ndomod.c:1373:35: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                                        bdp->value.timestamp.tv_sec, bdp->value.timestamp.tv_usec);
                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/secure/_stdio.h:57:62: note: expanded from macro 'snprintf'
  __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)
                                                             ^~~~~~~~~~~
ndomod.c:3544:5: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                 ,now.tv_usec
                  ^~~~~~~~~~~
/usr/include/secure/_stdio.h:57:62: note: expanded from macro 'snprintf'
  __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)
                                                             ^~~~~~~~~~~
ndomod.c:3563:5: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                 ,now.tv_usec
                  ^~~~~~~~~~~
/usr/include/secure/_stdio.h:57:62: note: expanded from macro 'snprintf'
  __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)
                                                             ^~~~~~~~~~~
ndomod.c:5263:5: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                 ,now.tv_usec
                  ^~~~~~~~~~~
ndomod.c:5330:5: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                 ,now.tv_usec
                  ^~~~~~~~~~~
6 warnings generated.
/Applications/Xcode.app/Contents/Developer/usr/bin/make ndomod-4x.o
gcc -fno-common -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H  -I ../include/nagios-4x  -D BUILD_NAGIOS_4X -o ndomod-4x.o ndomod.c  io.o utils.o -bundle -flat_namespace -undefined suppress -undefined dynamic_lookup    
ndomod.c:354:27: warning: expression which evaluates to zero treated as a null pointer constant of type 'char *'
      [-Wnon-literal-null-conversion]
        arglist[argcount]='\x0';
                          ^~~~~
ndomod.c:1373:35: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                                        bdp->value.timestamp.tv_sec, bdp->value.timestamp.tv_usec);
                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/secure/_stdio.h:57:62: note: expanded from macro 'snprintf'
  __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)
                                                             ^~~~~~~~~~~
ndomod.c:3544:5: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                 ,now.tv_usec
                  ^~~~~~~~~~~
/usr/include/secure/_stdio.h:57:62: note: expanded from macro 'snprintf'
  __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)
                                                             ^~~~~~~~~~~
ndomod.c:3563:5: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                 ,now.tv_usec
                  ^~~~~~~~~~~
/usr/include/secure/_stdio.h:57:62: note: expanded from macro 'snprintf'
  __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)
                                                             ^~~~~~~~~~~
ndomod.c:5263:5: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                 ,now.tv_usec
                  ^~~~~~~~~~~
ndomod.c:5330:5: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int')
      [-Wformat]
                 ,now.tv_usec
                  ^~~~~~~~~~~
6 warnings generated.
gcc -fPIC -g -O2 -I/opt/local/include/mysql56/mysql -DHAVE_CONFIG_H  -o sockdebug sockdebug.c io.o utils.o   -lm  
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo make install
cd ./src && /Applications/Xcode.app/Contents/Developer/usr/bin/make install
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/var
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/bin
/usr/bin/install -c -m 755 -o nagios -g nagios ndo2db-4x /usr/local/nagios/bin/ndo2db
/usr/bin/install -c -m 755 -o nagios -g nagios ndomod-4x.o /usr/local/nagios/bin/ndomod.o
/usr/bin/install -c -m 774 -o nagios -g nagios file2sock /usr/local/nagios/bin
/usr/bin/install -c -m 774 -o nagios -g nagios log2ndo /usr/local/nagios/bin
/usr/bin/install -c -m 774 -o nagios -g nagios sockdebug /usr/local/nagios/bin

  Hint: NDOUtils Installation against Nagios v4.x
  completed.

  If you want to install NDOUtils for Nagios v3.x
  please type  'make install-3x

  If you want to install NDOUtils for Nagios v2.x
  please type  'make install-2x

  Next step should be the database initialization/upgrade
  cd into the db/ directory and either:
     ./installdb  (for a new installation) or:
     ./upgradedb  (for an existing one)

Main NDOUtils components installed

Johns-iMac:ndoutils-ndoutils-2.1.3 john$ cd db/
Johns-iMac:db john$ sudo perl ./installdb -u 'ndoutils' -p 'ndoutils_password' -h 'localhost' -d nagios
DBD::mysql::db do failed: Table 'nagios.nagios_dbversion' doesn't exist at ./installdb line 52.
** Creating tables for version 2.0.1
     Using mysql.sql for installation...
Warning: Using a password on the command line interface can be insecure.
** Updating table nagios_dbversion
Done!
Johns-iMac:db john$ cd .. 
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo make install-config
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/etc
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/var
/usr/bin/install -c -m 644 -o nagios -g nagios config/ndo2db.cfg-sample /usr/local/nagios/etc
/usr/bin/install -c -m 644 -o nagios -g nagios config/ndomod.cfg-sample /usr/local/nagios/etc

*** Config files installed ***

Remember, these are *SAMPLE* config files.  You'll need to rename
the files in order to use them.
Please read the documentation to know what they are doing.

Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo mv /usr/local/nagios/etc/ndo2db.cfg-sample /usr/local/nagios/etc/ndo2db.cfg
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo sed -i '' 's/^db_user=.*/db_user=ndoutils/g' /usr/local/nagios/etc/ndo2db.cfg
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo sed -i '' 's/^db_pass=.*/db_pass=ndoutils_password/g' /usr/local/nagios/etc/ndo2db.cfg
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo mv /usr/local/nagios/etc/ndomod.cfg-sample /usr/local/nagios/etc/ndomod.cfg
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo make install-init
/usr/bin/install -c -m 755 startup/mac-init.plist /Library/LaunchDaemons/org.nagios.ndo2db.plist
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo launchctl start org.nagios.ndo2db
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo sh -c 'printf "\n\n# NDOUtils Broker Module\n" >> /usr/local/nagios/etc/nagios.cfg'
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ sudo sh -c 'printf "broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg\n" >> /usr/local/nagios/etc/nagios.cfg'
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ 
Johns-iMac:ndoutils-ndoutils-2.1.3 john$  sudo /etc/rc.d/init.d/nagios restart
Running configuration check...
-n Stopping nagios:
-n .
 done.
-n Starting nagios:
 done.
Johns-iMac:ndoutils-ndoutils-2.1.3 john$  sudo /etc/rc.d/init.d/nagios status
nagios is not running
Johns-iMac:ndoutils-ndoutils-2.1.3 john$ tail -f /usr/local/nagios/var/nagios.log
[1494546690] wproc: Registry request: name=Core Worker 3529;pid=3529
[1494546690] wproc: Registry request: name=Core Worker 3530;pid=3530
[1494546690] wproc: Registry request: name=Core Worker 3531;pid=3531
[1494546690] wproc: Registry request: name=Core Worker 3532;pid=3532
[1494546690] Error: Could not load module '/usr/local/nagios/bin/ndomod.o' -> dlopen(/usr/local/nagios/bin/ndomod.o, 10): Symbol not found: ___nagios_object_structure_version
  Referenced from: /usr/local/nagios/bin/ndomod.o
  Expected in: flat namespace
 in /usr/local/nagios/bin/ndomod.o
[1494546690] Error: Failed to load module '/usr/local/nagios/bin/ndomod.o'.
[1494546690] Error: Module loading failed. Aborting.
hedenface commented 7 years ago

I'll look into this shortly. Thanks Troy.

ponnavanimisetty commented 7 years ago

Can you please let us know if this issue has been resolved ? We are facing the same issue while installing in macOS Sierra (10.12.5) and Nagios 4.3.2 and NDOutils 2.1.3

hedenface commented 6 years ago

@ponnavanimisetty This has not been resolved. I'll be attempting a fix for 2.1.4 - which is next on my priority list.

Can I ask you what you use NDO for on mac? I'm just curious - quite frankly, I didn't think it was that popular on the non-RHEL distros of linux.

sawolf commented 4 years ago

I haven't been successful in compiling NDO 3 on MacOS, but this problem should be resolved - NDO 3 only supports the object structure from Nagios Core 4+.