LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-28-2013, 07:35 AM   #1
Kean
LQ Newbie
 
Registered: Aug 2011
Posts: 24

Rep: Reputation: Disabled
net-snmp with lm-sensors doesn't compile


Hello
I've tried to compile net-snmp with lm-sensors after configuring it with:
--with-mib-modules=ucd-snmp/lmSensors --with-ldflags=-lsensors

net-snmp-5.7.2
lm_sensors-3.3.3
glibc-2.17

Code:
libtool: link: ranlib .libs/libnetsnmpagent.a
libtool: link: ( cd ".libs" && rm -f "libnetsnmpagent.la" && ln -s "../libnetsnmpagent.la" "libnetsnmpagent.la" )
: libnetsnmpagent.la
making all in /root/net-snmp-5.7.2/agent/helpers
make[2]: Entering directory `/root/net-snmp-5.7.2/agent/helpers'
make[2]: Leaving directory `/root/net-snmp-5.7.2/agent/helpers'
making all in /root/net-snmp-5.7.2/agent/mibgroup
make[2]: Entering directory `/root/net-snmp-5.7.2/agent/mibgroup'
/bin/sh ../../libtool  --mode=compile gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib   -fno-strict-aliasing -g -O2 -Ulinux -Dlinux=linux  -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I/usr/lib/perl5/CORE   -c -o ucd-snmp/lmSensors.lo ucd-snmp/lmSensors.c
libtool: compile:  gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib -fno-strict-aliasing -g -O2 -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl5/CORE -c ucd-snmp/lmSensors.c  -fPIC -DPIC -o ucd-snmp/.libs/lmSensors.o
ucd-snmp/lmSensors.c: In function '_sensor_load':
ucd-snmp/lmSensors.c:950:5: error: unknown type name 'sensors_feature_data'
ucd-snmp/lmSensors.c:972:5: warning: passing argument 1 of 'sensors_get_detected_chips' from incompatible pointer type [enabled by default]
In file included from ucd-snmp/lmSensors.c:96:0:
/usr/include/sensors/sensors.h:128:26: note: expected 'const struct sensors_chip_name *' but argument is of type 'int *'
ucd-snmp/lmSensors.c:972:5: error: too few arguments to function 'sensors_get_detected_chips'
In file included from ucd-snmp/lmSensors.c:96:0:
/usr/include/sensors/sensors.h:128:26: note: declared here
ucd-snmp/lmSensors.c:976:22: warning: assignment makes pointer from integer without a cast [enabled by default]
ucd-snmp/lmSensors.c:980:22: error: request for member 'mode' in something not a structure or union
ucd-snmp/lmSensors.c:981:22: error: request for member 'mapping' in something not a structure or union
ucd-snmp/lmSensors.c:981:35: error: 'SENSORS_NO_MAPPING' undeclared (first use in this function)
ucd-snmp/lmSensors.c:981:35: note: each undeclared identifier is reported only once for each function it appears in
ucd-snmp/lmSensors.c:982:47: error: request for member 'number' in something not a structure or union
ucd-snmp/lmSensors.c:982:17: error: incompatible type for argument 1 of 'sensors_get_label'
In file included from ucd-snmp/lmSensors.c:96:0:
/usr/include/sensors/sensors.h:104:7: note: expected 'const struct sensors_chip_name *' but argument is of type 'sensors_chip_name'
ucd-snmp/lmSensors.c:982:17: error: too many arguments to function 'sensors_get_label'
In file included from ucd-snmp/lmSensors.c:96:0:
/usr/include/sensors/sensors.h:104:7: note: declared here
ucd-snmp/lmSensors.c:983:49: error: request for member 'number' in something not a structure or union
make[2]: *** [ucd-snmp/lmSensors.lo] Error 1
make[2]: Leaving directory `/root/net-snmp-5.7.2/agent/mibgroup'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/root/net-snmp-5.7.2/agent'
make: *** [subdirs] Error 1
Do you have any idea what can wrong in here?
 
Old 07-28-2013, 10:30 AM   #2
moo-cow
Member
 
Registered: Mar 2006
Distribution: Debian
Posts: 105

Rep: Reputation: 26
To me this looks like your version of net-snmp requires another version of lm_sensors. Have a look at net-snmp's to see which version of lm_sensors is recommended.
 
1 members found this post helpful.
Old 07-28-2013, 01:41 PM   #3
Kean
LQ Newbie
 
Registered: Aug 2011
Posts: 24

Original Poster
Rep: Reputation: Disabled
Yes... maybe it was not an issue of old lmsensors code, but rather old configuration options.
For all of people who will search for this info.
Try those options: --with-mib-modules=ucd-snmp/lmsensorsMib --with-ldflags=-lsensors
It is compiling without any issue.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
net-snmp 5.7.2 smux compile options nitin_ucer Linux - Software 0 06-14-2013 11:46 PM
net-snmp 5.7.2 smux compile options nitin_ucer Linux - Newbie 0 06-14-2013 04:45 AM
Integrate Mod-Apache-Snmp with Net-SNMP source kirukan Linux - Server 2 05-11-2011 01:48 AM
Net-SNMP writing a Subagent - snmp.conf Unknown token: master AustinMarton Programming 0 12-16-2008 07:34 PM
No net-snmp support compile error bubbers214 Linux - Software 1 05-21-2005 03:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration