Page 1 of 1

[Nagios-devel] error compiling nagios3

Posted: Fri Dec 29, 2006 5:08 am
by Guest
This is a multipart message in MIME format.
--=_alternative 00482334C1257253_=
Content-Type: text/plain; charset="US-ASCII"

Dear list

trying to compile Nagios3 on Fedora Core 4 I got the following error:

...
gcc -g -O2 -DHAVE_CONFIG_H -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -DNSCGI -o statusmap.cgi statusmap.c
getcgi.o cgiutils.o cgiauth.o objects-cgi.o xobjects-cgi.o
statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o -lgd
-lttf -lpng -ljpeg -lz -lm -lglib-2.0
gcc -g -O2 -DHAVE_CONFIG_H -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -DNSCGI -o trends.cgi trends.c getcgi.o
cgiutils.o cgiauth.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o
xstatusdata-cgi.o comments-cgi.o downtime-cgi.o -lgd -lttf -lpng -ljpeg
-lz -lm -lglib-2.0
gcc -g -O2 -DHAVE_CONFIG_H -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -DNSCGI -o histogram.cgi histogram.c
getcgi.o cgiutils.o cgiauth.o objects-cgi.o xobjects-cgi.o
statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o -lgd
-lttf -lpng -ljpeg -lz -lm -lglib-2.0
make[1]: Leaving directory `/usr/src/nagios/nagios-cvs/cgi'
cd ./html && make
make[1]: Entering directory `/usr/src/nagios/nagios-cvs/html'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/src/nagios/nagios-cvs/html'
cd ./module && make
make[1]: Entering directory `/usr/src/nagios/nagios-cvs/module'
gcc -g -O2 -DHAVE_CONFIG_H -fPIC -o helloworld.o helloworld.c -shared
In file included from ../include/nebcallbacks.h:28,
from helloworld.c:27:
../include/config.h:195:18: error: glib.h: No such file or directory
make[1]: *** [helloworld.o] Error 1
make[1]: Leaving directory `/usr/src/nagios/nagios-cvs/module'
make: *** [all] Error 2


Andurin from german nagios forum suggested to change a line in the
Makefile in folder module to:

CFLAGS=-g -O2 -DHAVE_CONFIG_H -fPIC -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include

This solved the problem. Only the Makefile in the folder module was
affected.


Thomas
--=_alternative 00482334C1257253_=
Content-Type: text/html; charset="US-ASCII"


Dear list

trying to compile Nagios3 on Fedora
Core 4 I got the following error:

...
gcc -g -O2 -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
  -DNSCGI  -o statusmap.cgi statusmap.c getcgi.o cgiutils.o cgiauth.o
 objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o
downtime-cgi.o -lgd -lttf -lpng -ljpeg -lz -lm -lglib-2.0
gcc -g -O2 -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
  -DNSCGI  -o trends.cgi trends.c getcgi.o cgiutils.o cgiauth.o
 objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o
downtime-cgi.o -lgd -lttf -lpng -ljpeg -lz -lm -lglib-2.0
gcc -g -O2 -DHAVE_CONFIG_H -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
  -DNSCGI  -o histogram.cgi histogram.c getcgi.o cgiutils.o cgiauth.o
 objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o
downtime-cgi.o -lgd -lttf -lpng -ljpeg -lz -lm -lglib-2.0
make[1]: Leaving directory `/usr/src/nagios/nagios-cvs/cgi'
cd ./html && make
make[1]: Entering directory `/usr/src/nagios/nagios-cvs/html'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/src/nagios/nagios-cvs/html'
cd ./module && make
make[1]: Entering directory `/usr/src/nagios/nagios-cvs/module'
gcc -g -O2 -DHAVE_CONFIG_H -fPIC -o helloworld.o helloworld.c -shared
In file included from ../include/nebcallbacks.h:28,
                from helloworld.c:27:
../include/config.h:195:18: error: glib.h: No such file or directory
make[1]: *** [helloworld.o] Error 1
make[1]: Leaving directory `/usr/src/nagios/nagios-cvs/module'
make: *** [all] Error 2


Andurin from german nagios forum sugg

...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]