LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-04-2005, 06:50 PM   #1
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
slackware 10.1 lm_sensors


Has anybody succeeded to compile i2c/lm_sensors 2.9.0 on slackware 10.1
I get compilation errors....

I patched i2c 2.9.0 to 2.9.0.1, or at least i think i did:
after tar xvzf i2c-2.9.0.tar.gz
I did patch -p0 < i2c-2.9.0.1.patch
and make and checkinstall.
then I uncompressed lm_sensors and i get errors in make:
Code:
kernel/chips/bmcsensors.c: In function `ipmi_sprintf':
kernel/chips/bmcsensors.c:220: warning: operation on `from' may be undefined
kernel/chips/bmcsensors.c:221: warning: operation on `from' may be undefined
kernel/chips/bmcsensors.c: In function `bmcsensors_select_thresholds':
kernel/chips/bmcsensors.c:300: error: `m' undeclared (first use in this function)
kernel/chips/bmcsensors.c:300: error: (Each undeclared identifier is reported only once
kernel/chips/bmcsensors.c:300: error: for each function it appears in.)
kernel/chips/bmcsensors.c: At top level:
kernel/chips/bmcsensors.c:45: warning: `addr_data' defined but not used
make: *** [kernel/chips/bmcsensors.o] Error 1
if i don't patch i2c i get this:
Code:
kernel/busses/i2c-ipmi.c: At top level:
kernel/busses/i2c-ipmi.c:54: error: `I2C_ALGO_IPMI' undeclared here (not in a function)
kernel/busses/i2c-ipmi.c:54: error: initializer element is not constant
kernel/busses/i2c-ipmi.c:54: error: (near initialization for `i2c_ipmi_algorithm.id')
kernel/busses/i2c-ipmi.c:61: error: `I2C_ALGO_IPMI' undeclared here (not in a function)
kernel/busses/i2c-ipmi.c:61: error: `I2C_HW_IPMI' undeclared here (not in a function)
kernel/busses/i2c-ipmi.c:61: error: initializer element is not constant
kernel/busses/i2c-ipmi.c:61: error: (near initialization for `i2c_ipmi_adapter.id')
kernel/busses/i2c-ipmi.c: In function `ipmi_register_bmc':
kernel/busses/i2c-ipmi.c:183: warning: `return' with a value, in function returning void
make: *** [kernel/busses/i2c-ipmi.o] Error 1


Last edited by perfect_circle; 03-04-2005 at 06:58 PM.
 
Old 03-04-2005, 07:10 PM   #2
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
what kernel do you use ?

egag
 
Old 03-04-2005, 07:24 PM   #3
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Original Poster
Rep: Reputation: 53
the default bare.i 2.4.29
 
Old 03-04-2005, 07:30 PM   #4
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
oh...i was afraid of that....
( just took a look at the install-instructions for 2.4--- := horror)
i use a 2.6-- kernel.

so i have no experience with that, but maybe compiling a 2.6--- kernel is simpler.
maybe you want to go for that......?

egag
 
Old 03-04-2005, 08:08 PM   #5
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Original Poster
Rep: Reputation: 53
i think it was a bug, because when i downloaded the cvs version, it compiled fine....
Anyway, i did not manage to make it work. when did a sensor detect and added the lines in modules.conf, when i rebooted , i got messages of invalid lines in modules.conf. After i deleted the lines and rebooted i got a segmentation fault in hotplug and the computer stuck there. SO I booted from the cd and removed the packages. checkinstall saved me....The Makefiles of lm_sensors and i2c do not offer a make uninstall option. If i hadn't packed them, I would have a lot more problems. lm-sensors did not work, but at least my slack is bootable again....

*EDIT*
I thing it has to do with not having a proper kernel tree. I did replace the .config with the config-ide-2.4.29 (the configuration file of the kernel) and did "make xconfig" and saved the kernel configuration, and did "make dep" but I guess this wasn't enough. Maybe i need a new kernel compile to make lm_sensors work.
It's a same that it's not installed in slackware by default...

Last edited by perfect_circle; 03-04-2005 at 08:17 PM.
 
Old 03-04-2005, 09:09 PM   #6
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Original Poster
Rep: Reputation: 53
I managed to make it work. Last time I added by mistake the modprobe lines in modules.conf, thats why i had the errors. hotplug does seg_fault with lm)sensors and i had to dissable it in order to boot. I don't need it any way.....
I don't know if the values displayed are correct.
The bold ones are the values that could be correct:
Code:
lm90-i2c-0-4c
Adapter: SMBus Via Pro adapter at 5000
M/B Temp:    +49C  (low  =    +0C, high =   +70C)
CPU Temp:  +46.7C  (low  =  +0.0C, high = +70.0C)
M/B Crit:   +104C  (hyst =   +94C)
CPU Crit:   +106C  (hyst =   +96C)

eeprom-i2c-0-50
Adapter: SMBus Via Pro adapter at 5000
Memory type:            DDR SDRAM DIMM
Memory size (MB):       512

eeprom-i2c-0-51
Adapter: SMBus Via Pro adapter at 5000
Memory type:            DDR SDRAM DIMM
Memory size (MB):       512

it87-isa-0290
Adapter: ISA adapter
VCore 1:   +1.66 V  (min =  +1.42 V, max =  +1.57 V)   ALARM
VCore 2:   +1.26 V  (min =  +2.40 V, max =  +2.61 V)   ALARM
+3.3V:     +6.60 V  (min =  +3.14 V, max =  +3.46 V)   ALARM
+5V:       +4.87 V  (min =  +4.74 V, max =  +5.24 V)
+12V:     +12.08 V  (min = +11.40 V, max = +12.60 V)
-12V:      -6.88 V  (min = -12.63 V, max = -11.41 V)   ALARM
-5V:       -2.21 V  (min =  -5.24 V, max =  -4.76 V)   ALARM
Stdby:     +5.11 V  (min =  +4.74 V, max =  +5.24 V)
VBat:      +0.00 V
fan1:     1721 RPM  (min =    0 RPM, div = 8)
fan2:     1962 RPM  (min = 3013 RPM, div = 8)          ALARM
fan3:        0 RPM  (min = 3013 RPM, div = 8)
M/B Temp:    +33C  (low  =   +15C, high =   +40C)   sensor = thermistor
CPU Temp:    -55C  (low  =   +15C, high =   +45C)   sensor = thermistor
Temp3:       -55C  (low  =   +15C, high =   +45C)   sensor = thermistor

root@darkstar:/home/skalkoto#
The others look wierd.
Any commends?
 
Old 03-05-2005, 04:40 AM   #7
DaFrawg
LQ Newbie
 
Registered: Jun 2004
Location: The Netherlands
Distribution: Slackware 10.1, Debian Sarge
Posts: 28

Rep: Reputation: 15
Re: slackware 10.1 lm_sensors

Quote:
Originally posted by perfect_circle
Has anybody succeeded to compile i2c/lm_sensors 2.9.0 on slackware 10.1
I get compilation errors....
I did.
Quote:
Originally posted by perfect_circle
I patched i2c 2.9.0 to 2.9.0.1, or at least i think i did:
after tar xvzf i2c-2.9.0.tar.gz
I did patch -p0 < i2c-2.9.0.1.patch
Yes, you must patch it.
Quote:
Originally posted by perfect_circle
kernel/chips/bmcsensors.c:300: error: `m' undeclared (first use in this function)
kernel/chips/bmcsensors.c:300: error: (Each undeclared identifier is reported only once
kernel/chips/bmcsensors.c:300: error: for each function it appears in.)
That's a bug I had to fix manually. The authors of bmcsensors.c forgot to put 'sd->' before the identifier 'm'. So, open that file with your text editor of choice, go to line 300 and change
Code:
	/* swap lim1/lim2 if m < 0 or function is 1/x (but not both!) */
	if(m < 0 && sd->linear != 7 || m >= 0 && sd->linear == 7) {
		tmp = sd->lim1;
to
Code:
	/* swap lim1/lim2 if m < 0 or function is 1/x (but not both!) */
	if(sd->m < 0 && sd->linear != 7 || sd->m >= 0 && sd->linear == 7) {
		tmp = sd->lim1;
Note: I forgot where I got this from, but I didn't come up with it myself.
 
Old 03-05-2005, 08:04 AM   #8
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Original Poster
Rep: Reputation: 53
Re: Re: slackware 10.1 lm_sensors

Quote:
Originally posted by DaFrawg
I did.
Yes, you must patch it.
That's a bug I had to fix manually. The authors of bmcsensors.c forgot to put 'sd->' before the identifier 'm'. So, open that file with your text editor of choice, go to line 300 and change
Code:
	/* swap lim1/lim2 if m < 0 or function is 1/x (but not both!) */
	if(m < 0 && sd->linear != 7 || m >= 0 && sd->linear == 7) {
		tmp = sd->lim1;
to
Code:
	/* swap lim1/lim2 if m < 0 or function is 1/x (but not both!) */
	if(sd->m < 0 && sd->linear != 7 || sd->m >= 0 && sd->linear == 7) {
		tmp = sd->lim1;
Note: I forgot where I got this from, but I didn't come up with it myself.
Does hotplug still work?
 
Old 03-05-2005, 01:20 PM   #9
DaFrawg
LQ Newbie
 
Registered: Jun 2004
Location: The Netherlands
Distribution: Slackware 10.1, Debian Sarge
Posts: 28

Rep: Reputation: 15
Re: Re: Re: slackware 10.1 lm_sensors

Quote:
Originally posted by perfect_circle
Does hotplug still work?
What does hotplug have to do with it?

Oh by the way, to use lm_sensors, you must first modprobe all the sensor related modules. I had to load these:

i2c-core
i2c-proc
i2c-isa #yeah, the A7V8X-X has the sensors on the ISA bus
it87

After that, I did sensors -s (something you should always do before you use lm_sensors) and then just 'sensors' gives the sensor outputs. I had to tweak the configuration file a bit for my motherboard and the -5V and the -12V still display incorrect measurements, but it works good enough.

Good luck, it took me a while to get it working
 
Old 03-05-2005, 01:25 PM   #10
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Original Poster
Rep: Reputation: 53
Re: Re: Re: Re: slackware 10.1 lm_sensors

Quote:
Originally posted by DaFrawg
What does hotplug have to do with it?

Oh by the way, to use lm_sensors, you must first modprobe all the sensor related modules. I had to load these:

i2c-core
i2c-proc
i2c-isa #yeah, the A7V8X-X has the sensors on the ISA bus
it87

After that, I did sensors -s (something you should always do before you use lm_sensors) and then just 'sensors' gives the sensor outputs. I had to tweak the configuration file a bit for my motherboard and the -5V and the -12V still display incorrect measurements, but it works good enough.

Good luck, it took me a while to get it working
I did manage to get lm_sensors working. What I'm saying is that after I install i2c and lm_sensors, i cannot use hotplug, because it completely freaks out, causing segmentation fault, and makes my slackware unbootable. If i dissable it, the pc works well. When i uninstall i2c/lm_sensors hotplug works again fine

Last edited by perfect_circle; 03-05-2005 at 01:26 PM.
 
Old 03-06-2005, 12:56 PM   #11
DaFrawg
LQ Newbie
 
Registered: Jun 2004
Location: The Netherlands
Distribution: Slackware 10.1, Debian Sarge
Posts: 28

Rep: Reputation: 15
That's just... odd... I don't have any problems with hotplug (except that the usb part of hotplug script takes 10 seconds to complete, but I'm used to that). I have no idea what segmentation faults are (I'm kind of a newbie), but they sound severe...
 
Old 03-06-2005, 01:25 PM   #12
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Original Poster
Rep: Reputation: 53
segmentation fault is an error an application can get when it tries to access memory outside the its own address space, which would be really dengarous. SO the OS kills it. The fact that you don't get a segmentation fault could be out of luck. I do have a TV card on my system and when hotplug detects it, it tries to load some modules. One of the modules is bttv, and this is the module that causes a seg_fault. When i remove the TV Card hotplug works fine, because it doesn't need bttv any more. If I manually try then to load bttv(witout having the card plugged), i just get this error:
Code:
lib/modules/2.4.29/kernel/drivers/media/video/bttv.o.gz: init_module: No such device
/lib/modules/2.4.29/kernel/drivers/media/video/bttv.o.gz: Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters.
      You may find more information in syslog or the output from dmesg
/lib/modules/2.4.29/kernel/drivers/media/video/bttv.o.gz: insmod /lib/modules/2.4.29/kernel/drivers/media/video/bttv.o.gz failed
/lib/modules/2.4.29/kernel/drivers/media/video/bttv.o.gz: insmod bttv failed
And if i plug the tv card and manually try to load the module i get a segmentation fault.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
lm_sensors Joey.Dale Linux - Software 14 01-24-2004 04:44 PM
Trying to use lm_sensors... Kramer Linux - Hardware 5 10-10-2003 09:14 PM
lm_sensors vexer Linux - Software 1 06-07-2003 12:15 AM
lm_sensors help malvu Linux - Software 7 05-04-2003 08:13 AM
lm_sensors csDraco_ Slackware 3 04-17-2003 02:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:25 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration