How to compile nrpe with static linking on Solaris?

markwag+nagios at u.washington.edu markwag+nagios at u.washington.edu
Tue Jan 20 17:25:15 CET 2004


On 19 January 2004 at 13:37, Michael Tucker <mtucker at airmail.net> wrote:


> So, how do I compile nrpe (and check_nrpe) with static linking on 
> Solaris? Specifically, what options do I need to feed to "./configure" 
> and/or "make", in order for all required libraries to be included?

See <http://www.faqs.org/faqs/Solaris2/FAQ/>, #6.24. In a nutshell,
you might try

./configure --enable-static-linking

If your autoconf isn't smart enough to cause the dl lib to be linked
dynamically (any app that uses gethostbyXXX cannot be purely static)
you might try

./configure # will enable dynamic linking

and then

make STATIC_LD= LOCAL_LIBS='-Wl,-B,dynamic -Wl,-R/etc/lib -ldl -Wl,-B,static'

which tells ld to to link with options "-Bdynamic -R/etc/lib -ldl -Bstatic,"
i.e., link everything except dl statically.

Another option would be to only link the SSL libraries (ssl, crypto) statically.
That might be something like

make STATIC_LD= LOCAL_LIBS='-Wl,-B,static -lssl -lcrypto -Wl,-B,dynamic -Wl,-R/etc/lib"

All this assumes you built ssl and crypto statically (i.e. you have
libcrypto.a and libssl.a).

Keep in mind static linking breaks the ABI so you may need to compile on the same
OS level and hardware as the system on which you run nrpe.

-- 
Mark Wagner markwag at u.washington.edu 206-598-0302
Unix System Administrator, Radiation Oncology and Radiology


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list