[Nagiosplug-help] check_smtp.c error in make
bobi at netshel.net
bobi at netshel.net
Wed Nov 8 18:35:33 CET 2006
I jusst downloaded and compiled the latest Nagios Plugins (1.4.5) on a
Solaris 5.8 box without incident. (Well, it did miss include -lz and -ldl
in the linker flags for the plugins directoryt, but that's a different
issue than yours...)
Anyway, from looking at the check_cmtp.c source and the error lines
referenced in your make output, it looks like the configure process is not
including the proper system header for the DNS functions (gethostbyname()
and the hostent structure.)
This header file (/usr/include/netdb.h) should be included within the
common.h plugin header file, but in your case, it looks like it isn't.
Since I don't have Solaris 5.7 lying around, you might verify that your
system has the /usr/include/netdb.h file and that it includes definitions
for the gethostbyname() function and "struct hostent".
If so, then the configure script needs to be tweaked to detect and include
these file properly.
In the meantime, as a workaround, you can manually add the following line:
#include <netdb.h>
to either somewhere near the top of the check_smtp.c file or to the
common.h file.
Bob
> I am facing similar problem. How you were able to resolve below problem
> on Solaris 5.7.
>
> source='check_smtp.c' object='check_smtp.o' libtool=no \
> DEPDIR=.deps depmode=gcc /bin/bash ../depcomp \
> /usr/local/bin/gcc -DLOCALEDIR=\"/usr/local/nagios/share/locale\"
> -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../intl
> -I/usr/local/ssl/include -I/usr/local/ssl/include -g -O2 -c check_smtp.c
> check_smtp.c: In function `main':
> check_smtp.c:194: warning: assignment makes pointer from integer without
> a cast
> check_smtp.c:196: dereferencing pointer to incomplete type
> check_smtp.c:386: warning: assignment discards qualifiers from pointer
> target type
> check_smtp.c:391: warning: assignment discards qualifiers from pointer
> target type
> check_smtp.c:401: warning: assignment discards qualifiers from pointer
> target type
> check_smtp.c:411: warning: assignment discards qualifiers from pointer
> target type
> check_smtp.c:424: warning: assignment discards qualifiers from pointer
> target type
> check_smtp.c:433: warning: assignment discards qualifiers from pointer
> target type
> check_smtp.c:445: warning: assignment discards qualifiers from pointer
> target type
> check_smtp.c:454: warning: assignment discards qualifiers from pointer
> target type
> check_smtp.c:461: warning: assignment discards qualifiers from pointer
> target type
> make[2]: *** [check_smtp.o] Error 1
> make[2]: Leaving directory
> `/usr/local/nagios/nagios-plugins-1.4.5/plugins'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/usr/local/nagios/nagios-plugins-1.4.5'
> make: *** [all] Error 2
>
> Regards.
> Yadavendra.
>
> Michael Shoemaker wrote:
>> I am having some issues trying to get the 1.4.3 plugins to compile on
>> this
>> solaris 5.7 system.
>>
>> the relavant configure line and error are below. Anyone have any ideas?
>>
>> ./configure --with-nagios-group=www --without-openssl
>> --enable-emulate-getaddrinfo
>>
>> gcc -Wall -g -O2 -o check_real check_real.o netutils.o utils.o
>> getaddrinfo.o
>> gethostbyname.o -L/usr/src/nagios-plugins-1.4.3/plugins
>> ../lib/libnagiosplug.a ../lib/libcoreutils.a -lsocket -lresolv
>> ../intl/libintl.a -lgen -lnsl
>> source='check_smtp.c' object='check_smtp.o' libtool=no \
>> DEPDIR=.deps depmode=gcc /bin/ksh ../depcomp \
>> gcc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H -I.
>> -I. -I.. -I.. -I../lib -I../intl -Wall -g -O2 -c
>> check_smtp.c
>> check_smtp.c: In function `main':
>> check_smtp.c:179: warning: implicit declaration of function
>> `gethostbyname'
>> check_smtp.c:179: warning: assignment makes pointer from integer without
>> a
>> cast
>> check_smtp.c:181: dereferencing pointer to incomplete type
>> make[3]: *** [check_smtp.o] Error 1
>> make[3]: Leaving directory `/usr/share/src/nagios-plugins-1.4.3/plugins'
>> make[2]: *** [all-recursive] Error 1
>> make[2]: Leaving directory `/usr/share/src/nagios-plugins-1.4.3/plugins'
>> make[1]: *** [all-recursive] Error 1
>> make[1]: Leaving directory `/usr/share/src/nagios-plugins-1.4.3'
>> make: *** [all] Error 2
>>
>> -------------------------------------------------------------------------
>> Using Tomcat but need to do more? Need to support web services,
>> security?
>> Get stuff done quickly with pre-integrated technology to make your job
>> easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache
>> Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>> _______________________________________________
>> Nagiosplug-help mailing list
>> Nagiosplug-help at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
>> ::: Please include plugins version (-v) and OS when reporting any issue.
>> ::: Messages without supporting info will risk being sent to /dev/null
>>
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
More information about the Help
mailing list