some problems when i cross compiling the nagios-plugins

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
speerless
Posts: 25
Joined: Thu Mar 28, 2013 8:02 am

some problems when i cross compiling the nagios-plugins

Post by speerless »

When i try to cross-compiling the nagios-plugin, i had a mistake when i "make "it ,the error is :

Code: Select all

/opt/arm-2009q1/bin/arm-none-linux-gnueabi-gcc -g -O2 -o check_disk check_disk.o utils.o popen.o  -L/usr/local/src/nagios-plugins-1.4.13/plugins -L/shame/arm_linux/lib ../lib/libnagiosplug.a ../gl/libgnu.a -ldl
check_disk.o: In function `main':
/usr/local/src/nagios-plugins-1.4.13/plugins/check_disk.c:262: undefined reference to `get_fs_usage'
/usr/local/src/nagios-plugins-1.4.13/plugins/check_disk.c:307: undefined reference to `get_fs_usage'
collect2: ld returned 1 exit status
make[2]: *** [check_disk] 错误 1
make[2]: 离开目录“/usr/local/src/nagios-plugins-1.4.13/plugins”
make[1]: *** [all-recursive] 错误 1
make[1]: 离开目录“/usr/local/src/nagios-plugins-1.4.13”
make: *** [all] 错误 2
i had search it on the net ,but i can not find any help .so if you know something ,please help me ,thanks!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: some problems when i cross compiling the nagios-plugins

Post by abrist »

From: http://permalink.gmane.org/gmane.networ ... ugins/4053
A colleague of mine found the problem.
He says it's because of the way that is being used for searching for
OpenSSL. There is a -I/usr/include as compiler option which causes i.e.
check_nrpe to look into inet/in.h in which all the Intel LittleEndian
stuff is declared, but m68k is BigEndian.
Furthermore, the following options right before calling ./configure
helped with the get_fs_usage() problem:
fu_cv_sys_stat_statvfs=yes
From: http://comments.gmane.org/gmane.network ... ugins/4052
1. Compile manually your plugins: "cd plugins; make check_stuff", etc.
You youll have to install them manually as well.

2. Remove referenced to check_disk from Makefile (or from Makefile.am
but you'll need a working installation of GNU auto* tools)

3 (haven't tried): use make -i (ignore errors)

BTW get_fs_usage() is from Gnulib.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
speerless
Posts: 25
Joined: Thu Mar 28, 2013 8:02 am

Re: some problems when i cross compiling the nagios-plugins

Post by speerless »

abrist wrote:From: http://permalink.gmane.org/gmane.networ ... ugins/4053
A colleague of mine found the problem.
He says it's because of the way that is being used for searching for
OpenSSL. There is a -I/usr/include as compiler option which causes i.e.
check_nrpe to look into inet/in.h in which all the Intel LittleEndian
stuff is declared, but m68k is BigEndian.
Furthermore, the following options right before calling ./configure
helped with the get_fs_usage() problem:
fu_cv_sys_stat_statvfs=yes
From: http://comments.gmane.org/gmane.network ... ugins/4052
1. Compile manually your plugins: "cd plugins; make check_stuff", etc.
You youll have to install them manually as well.

2. Remove referenced to check_disk from Makefile (or from Makefile.am
but you'll need a working installation of GNU auto* tools)

3 (haven't tried): use make -i (ignore errors)

BTW get_fs_usage() is from Gnulib.
Thank u, i solved it by "make -i",thansk for your help again!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: some problems when i cross compiling the nagios-plugins

Post by slansing »

Thanks for letting us know this was resolved!
Locked