[Nagiosplug-help] statically compile for rpm creation

Pedro pclist at buydomains.com
Wed Apr 7 10:34:01 CEST 2004


Hello,
I'd like to create my own RPM from the nagios-plugins sources.  I'm a bit 
new to building RPMs but here's the info. I have quite a few servers that I 
need to monitor and I'd like to create an RPM that I can then use on each 
system.

The problem is that I have different versions of mysql server on the 
systems. Some have 3.23 and some have 4.0 and thus have different versions 
of libmysqlclient.so.  The code in check_mysql is pretty simple and it 
really shouldn't matter if I statically compile the library into the 
executable.

I'm not sure how to do that. I've tried adding --enable-static to the 
configure line and I've even tried adding -static to the Makefile.  When I 
add the '-static'  to the Makefile, complication fails with this error message:
netutils.o(.text+0x473): In function `my_connect':
/opt/install/nagios-plugins-1.3.1/plugins/netutils.c:281: Using 
'gethostbyname' in statically linked applications requires at runtime the 
shared libraries from the glibc version used for linkin

Any help would be appreciated.

Thanks
-p





More information about the Help mailing list