[Nagiosplug-help] statically compile for rpm creation
Pedro
pclist at buydomains.com
Wed Apr 7 12:48:18 CEST 2004
Hrm.
While your commenting solution would solve my primary compilation problem,
it won't get rid of the others. Isn't there some way to compile the
executables statically? While they may be a bit bloated, it would allow me
to use them on any server.
I guess I should have included all the errors, I just didn't want to
clutter the e-mail with a bunch of lines, but here they are:
gcc -g -O2 -static -static-libgcc -L. -L/usr/lib -o
check_http check_http.o netutils.o utils.o ../lib/libnagiosplug.a -lnsl
-lresolv -lssl -lcrypto
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 linking
netutils.o(.text+0x49b):/opt/install/nagios-plugins-1.3.1/plugins/netutils.c:292:
Using 'getprotobyname' in statically linked applications requires at
runtime the shared libraries from the glibc version used for linking
/usr/lib/libssl.a(kssl.o)(.text+0x187): In function `populate_cksumlens':
: undefined reference to `valid_cksumtype'
/usr/lib/libssl.a(kssl.o)(.text+0x1bc): In function `populate_cksumlens':
: undefined reference to `krb5_checksum_size'
/usr/lib/libssl.a(kssl.o)(.text+0x1f3): In function `populate_cksumlens':
: undefined reference to `krb5_checksum_size'
/usr/lib/libssl.a(kssl.o)(.text+0x6d4): In function `kssl_cget_tkt':
: undefined reference to `krb5_free_context'
/usr/lib/libssl.a(kssl.o)(.text+0x6ee): In function `kssl_cget_tkt':
: undefined reference to `krb5_auth_con_free'
/usr/lib/libssl.a(kssl.o)(.text+0x702): In function `kssl_cget_tkt':
: undefined reference to `krb5_free_principal'
/usr/lib/libssl.a(kssl.o)(.text+0x716): In function `kssl_cget_tkt':
: undefined reference to `krb5_free_principal'
/usr/lib/libssl.a(kssl.o)(.text+0x72a): In function `kssl_cget_tkt':
: undefined reference to `krb5_init_context'
/usr/lib/libssl.a(kssl.o)(.text+0x768): In function `kssl_cget_tkt':
: undefined reference to `krb5_sname_to_principal'
/usr/lib/libssl.a(kssl.o)(.text+0x7cb): In function `kssl_cget_tkt':
: undefined reference to `krb5_cc_default'
/usr/lib/libssl.a(kssl.o)(.text+0x851): In function `kssl_cget_tkt':
: undefined reference to `krb5_get_credentials'
/usr/lib/libssl.a(kssl.o)(.text+0x8df): In function `kssl_cget_tkt':
: undefined reference to `krb5_mk_req_extended'
/usr/lib/libssl.a(kssl.o)(.text+0xd2d): In function `kssl_sget_tkt':
: undefined reference to `krb5_auth_con_free'
/usr/lib/libssl.a(kssl.o)(.text+0xd57): In function `kssl_sget_tkt':
: undefined reference to `krb5_auth_con_init'
/usr/lib/libssl.a(kssl.o)(.text+0xdde): In function `kssl_sget_tkt':
: undefined reference to `krb5_free_principal'
/usr/lib/libssl.a(kssl.o)(.text+0xdf2): In function `kssl_sget_tkt':
: undefined reference to `krb5_free_ticket'
/usr/lib/libssl.a(kssl.o)(.text+0xe16): In function `kssl_sget_tkt':
: undefined reference to `krb5_auth_con_getrcache'
/usr/lib/libssl.a(kssl.o)(.text+0xe58): In function `kssl_sget_tkt':
: undefined reference to `krb5_sname_to_principal'
/usr/lib/libssl.a(kssl.o)(.text+0xe93): In function `kssl_sget_tkt':
: undefined reference to `krb5_get_server_rcache'
/usr/lib/libssl.a(kssl.o)(.text+0xebc): In function `kssl_sget_tkt':
: undefined reference to `krb5_auth_con_setrcache'
/usr/lib/libssl.a(kssl.o)(.text+0xeed): In function `kssl_sget_tkt':
: undefined reference to `krb5_kt_resolve'
/usr/lib/libssl.a(kssl.o)(.text+0xf92): In function `kssl_sget_tkt':
: undefined reference to `krb5_principal_compare'
/usr/lib/libssl.a(kssl.o)(.text+0x1025): In function `kssl_sget_tkt':
: undefined reference to `krb5_decrypt_tkt_part'
/usr/lib/libssl.a(kssl.o)(.text+0x1050): In function `kssl_sget_tkt':
: undefined reference to `krb5_kt_free_entry'
/usr/lib/libssl.a(kssl.o)(.text+0x1177): In function `kssl_sget_tkt':
: undefined reference to `krb5_kt_default'
/usr/lib/libssl.a(kssl.o)(.text+0x11da): In function `kssl_sget_tkt':
: undefined reference to `krb5_init_context'
/usr/lib/libssl.a(kssl.o)(.text+0x1735): In function
`kssl_keytab_is_available':
: undefined reference to `krb5_init_context'
/usr/lib/libssl.a(kssl.o)(.text+0x1760): In function
`kssl_keytab_is_available':
: undefined reference to `krb5_kt_resolve'
/usr/lib/libssl.a(kssl.o)(.text+0x1796): In function
`kssl_keytab_is_available':
: undefined reference to `krb5_sname_to_principal'
/usr/lib/libssl.a(kssl.o)(.text+0x1824): In function
`kssl_keytab_is_available':
: undefined reference to `krb5_free_context'
/usr/lib/libssl.a(kssl.o)(.text+0x183b): In function
`kssl_keytab_is_available':
: undefined reference to `krb5_free_principal'
/usr/lib/libssl.a(kssl.o)(.text+0x184c): In function
`kssl_keytab_is_available':
: undefined reference to `krb5_kt_free_entry'
/usr/lib/libssl.a(kssl.o)(.text+0x1865): In function
`kssl_keytab_is_available':
: undefined reference to `krb5_kt_default'
/usr/lib/libssl.a(kssl.o)(.text+0x18fc): In function `kssl_tgt_is_available':
: undefined reference to `krb5_init_context'
/usr/lib/libssl.a(kssl.o)(.text+0x1931): In function `kssl_tgt_is_available':
: undefined reference to `krb5_sname_to_principal'
/usr/lib/libssl.a(kssl.o)(.text+0x195a): In function `kssl_tgt_is_available':
: undefined reference to `krb5_free_context'
/usr/lib/libssl.a(kssl.o)(.text+0x196b): In function `kssl_tgt_is_available':
: undefined reference to `krb5_free_principal'
/usr/lib/libssl.a(kssl.o)(.text+0x197c): In function `kssl_tgt_is_available':
: undefined reference to `krb5_free_principal'
/usr/lib/libssl.a(kssl.o)(.text+0x1990): In function `kssl_tgt_is_available':
: undefined reference to `krb5_cc_default'
/usr/lib/libssl.a(kssl.o)(.text+0x19e5): In function `kssl_tgt_is_available':
: undefined reference to `krb5_get_credentials'
/usr/lib/libssl.a(kssl.o)(.text+0x1a33): In function
`kssl_krb5_free_data_contents':
: undefined reference to `krb5_free_data_contents'
/usr/lib/libssl.a(kssl.o)(.text+0x1c25): In function `get_rc_clockskew':
: undefined reference to `krb5_rc_default'
/usr/lib/libssl.a(kssl.o)(.text+0x1cd7): In function `kssl_validate_times':
: undefined reference to `krb5_init_context'
/usr/lib/libssl.a(kssl.o)(.text+0x1d0f): In function `kssl_validate_times':
: undefined reference to `krb5_timeofday'
/usr/lib/libssl.a(kssl.o)(.text+0x1d23): In function `kssl_validate_times':
: undefined reference to `krb5_free_context'
collect2: ld returned 1 exit status
make[2]: *** [check_http] Error 1
make[2]: Leaving directory `/opt/install/nagios-plugins-1.3.1/plugins'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/opt/install/nagios-plugins-1.3.1/plugins'
At 02:55 PM 4/7/2004, Andreas Ericsson wrote:
>Pedro wrote:
>>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
>If you remove the call to gethostbyname() you can tweak it a bit so that
>things work fine anyways, but you won't be able to use hostnames (as
>opposed to IP-addresses) for things to work. 'man 3 gethostbyname' for
>more info on how to hack your way around it.
>
>>Any help would be appreciated.
>>Thanks
>>-p
>--
>Mvh / Best Regards
>Sourcerer / Andreas Ericsson
>OP5 AB
>+46 (0)733 709032
>andreas.ericsson at op5.se
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: IBM Linux Tutorials
>Free Linux tutorial presented by Daniel Robbins, President and CEO of
>GenToo technologies. Learn everything from fundamentals to system
>administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
>_______________________________________________
>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