[Nagiosplug-devel] [ nagiosplug-Bugs-1094326 ] check-ide-smart does not build

SourceForge.net noreply at sourceforge.net
Tue Jun 19 11:02:33 CEST 2007


Bugs item #1094326, was opened at 2005-01-02 14:53
Message generated for change (Comment added) made by reuben
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1094326&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: CVS
Status: Open
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Reuben Farrelly (reuben)
Assigned to: Benoit Mortier (opensides)
Summary: check-ide-smart does not build

Initial Comment:
The .c file remains unbuilt in the plugins directory,
after a build run:

-rw-r--r--   1 root root 11217 Dec 26 22:43
check_ide_smart.c

Upon invoking   'make check_ide_smart',  I then get a
compile failure:

[root at tornado plugins]# make check_ide_smart
if gcc -DLOCALEDIR=\"/usr/share/nagios/locale\"
-DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../intl
-I/usr/include/ldap    -I/include  -g -O2 -MT
check_ide_smart.o -MD -MP -MF
".deps/check_ide_smart.Tpo" -c -o check_ide_smart.o
check_ide_smart.c; \
then mv -f ".deps/check_ide_smart.Tpo"
".deps/check_ide_smart.Po"; else rm -f
".deps/check_ide_smart.Tpo"; exit 1; fi
check_ide_smart.c:401: error: conflicting types for
'print_values'
check_ide_smart.c:257: error: previous implicit
declaration of 'print_values' was here
check_ide_smart.c:452: error: conflicting types for
'smart_cmd_simple'
check_ide_smart.c:452: note: an argument type that has
a default promotion can't match an empty parameter name
list declaration
check_ide_smart.c:229: error: previous implicit
declaration of 'smart_cmd_simple' was here
check_ide_smart.c:491: error: conflicting types for
'print_help'
check_ide_smart.c:203: error: previous implicit
declaration of 'print_help' was here
check_ide_smart.c: In function `print_usage':
check_ide_smart.c:518: error: syntax error before ')' token
make: *** [check_ide_smart.o] Error 1
[root at tornado plugins]#


----------------------------------------------------------------------

>Comment By: Reuben Farrelly (reuben)
Date: 2007-06-19 19:02

Message:
Logged In: YES 
user_id=26209
Originator: YES

Builds fine on Gentoo and seems to function good with a SATA drive:

tornado plugins # ./check_ide_smart -d /dev/sda
Id=  1, Status=15 {PreFailure , OnLine }, Value=114, Threshold=  6,
Passed
Id=  3, Status= 3 {PreFailure , OnLine }, Value= 98, Threshold=  0,
Passed
Id=  4, Status=50 {Advisory    , OnLine }, Value=100, Threshold= 20,
Passed
Id=  5, Status=51 {PreFailure , OnLine }, Value=100, Threshold= 36,
Passed
Id=  7, Status=15 {PreFailure , OnLine }, Value= 84, Threshold= 30,
Passed
Id=  9, Status=50 {Advisory    , OnLine }, Value= 91, Threshold=  0,
Passed
Id= 10, Status=19 {PreFailure , OnLine }, Value=100, Threshold= 97,
Passed
Id= 12, Status=50 {Advisory    , OnLine }, Value=100, Threshold= 20,
Passed
Id=187, Status=50 {Advisory    , OnLine }, Value=100, Threshold=  0,
Passed
Id=189, Status=58 {Advisory    , OnLine }, Value=100, Threshold=  0,
Passed
Id=190, Status=34 {Advisory    , OnLine }, Value= 74, Threshold= 45,
Passed
Id=194, Status=34 {Advisory    , OnLine }, Value= 26, Threshold=  0,
Passed
Id=195, Status=26 {Advisory    , OnLine }, Value= 63, Threshold=  0,
Passed
Id=197, Status=18 {Advisory    , OnLine }, Value=100, Threshold=  0,
Passed
Id=198, Status=16 {Advisory    , OffLine}, Value=100, Threshold=  0,
Passed
Id=199, Status=62 {Advisory    , OnLine }, Value=200, Threshold=  0,
Passed
Id=200, Status= 0 {Advisory    , OffLine}, Value=100, Threshold=  0,
Passed
Id=202, Status=50 {Advisory    , OnLine }, Value=100, Threshold=  0,
Passed
OffLineStatus=130 {Completed}, AutoOffLine=Yes, OffLineTimeout=7 minutes
OffLineCapability=91 {Immediate Auto SuspendOnCmd}
SmartRevision=10, CheckSum=246, SmartCapability=3 {SaveOnStandBy
AutoSave}
tornado plugins #

and

tornado plugins # ./check_ide_smart -d /dev/sda -n
OK - Operational (18/18 tests passed)
tornado plugins #

So I'd say that's all looking fixed.


----------------------------------------------------------------------

Comment By: Matthias Eble (psychotrahe)
Date: 2007-06-19 16:26

Message:
Logged In: YES 
user_id=1694341
Originator: NO

Update: 
In CVS I fixed the syntax errors and added some hopefully appropriate
configure conditions to so that the plugin will actually build.

I don't have a sata disk here so I cannot test the described problems with
them.
Can someone else test if this is a general problem?

----------------------------------------------------------------------

Comment By: Matthias Eble (psychotrahe)
Date: 2007-05-18 22:08

Message:
Logged In: YES 
user_id=1694341
Originator: NO

This plugin still/again does not build properly, beside the sata problem.

make check_ide_smart works after some small changes.. will look at this
later..

----------------------------------------------------------------------

Comment By: Reuben Farrelly (reuben)
Date: 2005-01-05 17:34

Message:
Logged In: YES 
user_id=26209

Compiles clearly now, some other little problems, but this
is progress ;-)

1. Does not get installed when running  'make install'.  
2. Running without arguments just silently fails, it ought
to output something, perhaps the output of ./check_ide_smart -h
3. Seems to be failing when run:

[root at tornado plugins]# ./check_ide_smart -d /dev/sda
CRITICAL - SMART_ENABLE: Inappropriate ioctl for device
CRITICAL - SMART_CMD_ENABLE
[root at tornado plugins]# 

[root at tornado plugins]# ./check_ide_smart -d /dev/sda -n
CRITICAL - Couldn't open device: No such file or directory
[root at tornado plugins]#

I'm using SATA drives.


----------------------------------------------------------------------

Comment By: Benoit Mortier (opensides)
Date: 2005-01-04 11:18

Message:
Logged In: YES 
user_id=388184

Hi, 
 
i just committed another fix in the cvs 
 
please try..and tell me..;-) 

----------------------------------------------------------------------

Comment By: Reuben Farrelly (reuben)
Date: 2005-01-04 09:47

Message:
Logged In: YES 
user_id=26209

Better, but still not quite there:

[root at tornado plugins]# make check_ide_smart
gcc  -g -O2  -L. -L/usr/lib -o check_ide_smart 
check_ide_smart.o utils.o ../lib/libnagiosplug.a
../lib/libcoreutils.a -I/usr/include
check_ide_smart.o(.text+0x87e): In function `main':
/usr/src/nagios/nagiosplug/plugins/check_ide_smart.c:222:
undefined reference to `show_help'
check_ide_smart.o(.text+0x883):/usr/src/nagios/nagiosplug/plugins/check_ide_smart.c:223:
undefined reference to `show_version'
collect2: ld returned 1 exit status
make: *** [check_ide_smart] Error 1
[root at tornado plugins]# 

----------------------------------------------------------------------

Comment By: Benoit Mortier (opensides)
Date: 2005-01-03 12:38

Message:
Logged In: YES 
user_id=388184

hi, 
 
i have corrected some more problems ;-) 
 
Could you just check this version out of cvs 
 

----------------------------------------------------------------------

Comment By: Reuben Farrelly (reuben)
Date: 2005-01-03 07:29

Message:
Logged In: YES 
user_id=26209

Still fails to build (but looks slightly better now)

[root at tornado plugins]# make check_ide_smart
if gcc -DLOCALEDIR=\"/usr/share/nagios/locale\"
-DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../intl
-I/usr/include/ldap    -I/include  -g -O2 -MT
check_ide_smart.o -MD -MP -MF ".deps/check_ide_smart.Tpo" -c
-o check_ide_smart.o check_ide_smart.c; \
then mv -f ".deps/check_ide_smart.Tpo"
".deps/check_ide_smart.Po"; else rm -f
".deps/check_ide_smart.Tpo"; exit 1; fi
check_ide_smart.c:401: error: conflicting types for
'print_values'
check_ide_smart.c:257: error: previous implicit declaration
of 'print_values' was here
check_ide_smart.c:451: error: conflicting types for
'smart_cmd_simple'
check_ide_smart.c:451: note: an argument type that has a
default promotion can't match an empty parameter name list
declaration
check_ide_smart.c:229: error: previous implicit declaration
of 'smart_cmd_simple' was here
check_ide_smart.c:490: error: conflicting types for 'print_help'
check_ide_smart.c:203: error: previous implicit declaration
of 'print_help' was here
make: *** [check_ide_smart.o] Error 1
[root at tornado plugins]

I'm using GCC 3.4.3 (Fedora Core 3) FWIW.


----------------------------------------------------------------------

Comment By: Benoit Mortier (opensides)
Date: 2005-01-03 05:37

Message:
Logged In: YES 
user_id=388184

Hi,  
 
i have juste fixed the various errors, but i still need to check why it 
doesn't build with the others plugins.. 
 
  

----------------------------------------------------------------------

Comment By: Benoit Mortier (opensides)
Date: 2005-01-03 01:04

Message:
Logged In: YES 
user_id=388184

Hi,  
 
i have juste fixed the various errors, but i still need to check why it 
doesn't build with the others plugins.. 
 
  

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1094326&group_id=29880




More information about the Devel mailing list