Upgrade Nagios to 4.4.0 compiling problem workers.c

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Peli
Posts: 5
Joined: Thu Jun 21, 2018 8:04 am

Upgrade Nagios to 4.4.0 compiling problem workers.c

Post by Peli »

Hello

I am not able to upgrade my nagios core installation from 4.3.4 to 4.4.0.

Code: Select all

nagios@nagios-test:/tmp/nagios-4.4.0$ make all
cd ./base && make
make[1]: Entering directory '/tmp/nagios-4.4.0/base'
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o nagios.o nagios.c
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCORE   -c -o broker.o broker.c
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCORE   -c -o nebmods.o nebmods.c
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o ../common/shared.o ../common/shared.c
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCORE   -c -o query-handler.o query-handler.c
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o workers.o workers.c
workers.c: In function ‘wproc_run_job’:
workers.c:1173:106: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘ssize_t {aka int}’ [-Wformat=]
   logit(NSLOG_RUNTIME_ERROR, TRUE, "wproc: '%s' seems to be choked. ret = %d; bufsize = %lu: written = %lu; errno = %d (%s)\n",
                                                                                                          ^
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCORE   -c -o checks.o checks.c
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCORE   -c -o config.o config.c
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCORE   -c -o commands.o commands.c
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCORE   -c -o events.o events.c
Linux Debian is on latest build 9.4

Any ideas? Thank you for helping.
Christian
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Upgrade Nagios to 4.4.0 compiling problem workers.c

Post by scottwilkerson »

Did you run ./configure ?
Did you pass any additional flags to ./configure?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Peli
Posts: 5
Joined: Thu Jun 21, 2018 8:04 am

Re: Upgrade Nagios to 4.4.0 compiling problem workers.c

Post by Peli »

scottwilkerson wrote:Did you run ./configure ?
Did you pass any additional flags to ./configure?
Yes, i run

Code: Select all

./configure --with-command-group=nagcmd
This worked for every upgrade yet.

Kind regards
Christian
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Upgrade Nagios to 4.4.0 compiling problem workers.c

Post by scottwilkerson »

We have tried but cannot replicate this issue, at this point I would suggest re-downloading the tar from
https://www.nagios.org/downloads/nagios-core/

and try again
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Peli
Posts: 5
Joined: Thu Jun 21, 2018 8:04 am

Re: Upgrade Nagios to 4.4.0 compiling problem workers.c

Post by Peli »

I have re-downloaded the source. But when compiling, i had the same error.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Upgrade Nagios to 4.4.0 compiling problem workers.c

Post by scottwilkerson »

Peli,

Talking with our C developer about the issue, we are both baffled, but he was wondering if it was possible for you to download our maint branch and try with that

https://github.com/NagiosEnterprises/na ... tree/maint
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
bheden
Product Development Manager
Posts: 179
Joined: Thu Feb 13, 2014 9:50 am
Location: Nagios Enterprises

Re: Upgrade Nagios to 4.4.0 compiling problem workers.c

Post by bheden »

Peli,

Before attempting to install the 4.4.1 branch, can you run the following command (from the directory you run make all from) and try to recompile?

Code: Select all

sed -i 's/written, errno/(long unsigned int)written, errno/' base/workers.c
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Nagios Enterprises
Senior Developer
Peli
Posts: 5
Joined: Thu Jun 21, 2018 8:04 am

Re: Upgrade Nagios to 4.4.0 compiling problem workers.c

Post by Peli »

bheden wrote:Peli,

Before attempting to install the 4.4.1 branch, can you run the following command (from the directory you run make all from) and try to recompile?

Code: Select all

sed -i 's/written, errno/(long unsigned int)written, errno/' base/workers.c
Thank you for helping. This worked. After this command, compiling passed without error.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Upgrade Nagios to 4.4.0 compiling problem workers.c

Post by scottwilkerson »

Excellent glad we could provide a fix.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
bheden
Product Development Manager
Posts: 179
Joined: Thu Feb 13, 2014 9:50 am
Location: Nagios Enterprises

Re: Upgrade Nagios to 4.4.0 compiling problem workers.c

Post by bheden »

4.4.1 was released yesterday - I would recommend upgrading to that version.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Nagios Enterprises
Senior Developer
Locked