Can't compile plugins - undefined reference to `getloadavg'
Voon, Ton
Ton.Voon at egg.com
Thu Mar 6 12:59:36 CET 2003
David,
Couple of things to try:
- can you send the configure output and the config.log file
- what version of gcc?
- create a little c file called t.c:
char getloadavg();
int main() {
getloadavg()
; return 0; }
and run:
gcc -c t.c
gcc t.o lib/libnagiosplug.a
Do you still get the getloadavg missing?
- try: "gcc t.o lib/getloadavg.o". If this works, it suggests the ar file is
not being created correctly
- download GNU fileutils package which contains getloadavg:
http://ftp.gnu.org/gnu/fileutils/fileutils-4.1.tar.gz. With their compiled
version of getloadavg.o, can gcc work against that?
Ton
> -----Original Message-----
> From: David Gurr [SMTP:davidgu at yahoo.com]
> Sent: Wednesday, March 05, 2003 3:04 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Can't compile plugins - undefined reference
> to `getloadavg'
>
> I'm trying to install the plugins on an old Caldera
> OpenLinux 2.3 system, with a view to also installing
> nrpe.
>
> I've unpacked the nagios-plugins-1.3.0-beta3 tarball,
> and successfully run configure. When I do "make all",
> it fails on building check_load with the following
> error:
>
> gcc -g -O2 -L. -o check_load check_load.o utils.o
> ../lib/libnagiosplug.a popen.o -lutil
> check_load.o: In function `main':
> /tmp/nagios-plugins-1.3.0-beta3/plugins/check_load.c:80:
> undefined reference to `getloadavg'
> make[1]: *** [check_load] Error 1
>
> Earlier, the libnagiosplug.a library seemed to get
> built OK:
>
> gcc -DHAVE_CONFIG_H -I. -I. -I../plugins -I../plugins
> -I../plugins -I../plugins -I../plugins -I../plugins
> -I. -g -O2 -c getopt.c
> gcc -DHAVE_CONFIG_H -I. -I. -I../plugins -I../plugins
> -I../plugins -I../plugins -I../plugins -I../plugins
> -I. -g -O2 -c getopt1.c
> gcc -DHAVE_CONFIG_H -I. -I. -I../plugins -I../plugins
> -I../plugins -I../plugins -I../plugins -I../plugins
> -I. -g -O2 -c getloadavg.c
> rm -f libnagiosplug.a
> ar cru libnagiosplug.a getopt.o getopt1.o getloadavg.o
> ranlib libnagiosplug.a
>
> Any suggestions?
>
> Thx
>
>
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Etnus, makers of TotalView, The
> debugger
> for complex code. Debugging C/C++ programs can leave you feeling lost and
> disoriented. TotalView can help you find your way. Available on major UNIX
>
> and Linux platforms. Try it free. www.etnus.com
> _______________________________________________
> 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
This private and confidential e-mail has been sent to you by Egg.
The Egg group of companies includes Egg Banking plc
(registered no. 2999842), Egg Financial Products Ltd (registered
no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
carries out investment business on behalf of Egg and is regulated
by the Financial Services Authority.
Registered in England and Wales. Registered offices: 1 Waterhouse Square,
138-142 Holborn, London EC1N 2NA.
If you are not the intended recipient of this e-mail and have
received it in error, please notify the sender by replying with
'received in error' as the subject and then delete it from your
mailbox.
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
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