update to ticket 1951, I think I found a compatibility issue (2.7.0)

David Smoot dsmoot at orbitalnetwork.com
Sun Apr 17 03:08:16 CEST 2005


I'm pretty new at Linux so I could be wrong but i think I found a minor 
bug.  First let me say because of the deployed software we have in 
place, I have to make your package work with a redhat 7.1 distribution 
(kernel 2.4.7-10)

I have been unable to get lm sensors to build on my clean redhat 7.1 
box (kernel 2.4.7-10).  The specific error I get is:

gcc  -DMODVERSIONS -include 
/lib/modules/2.4.7-10/build/include/linux/modversions.h -D__KERNEL__ 
-DMODULE -DEXPORT_SYMTAB -fomit-frame-pointer -I. -Ikernel/include 
-I/usr/local/include -I/lib/modules/2.4.7-10/build/include   -O2   -c 
kernel/busses/i2c-amd8111.c -o kernel/busses/i2c-amd8111.o
kernel/busses/i2c-amd8111.c: In function `amd8111_access':
kernel/busses/i2c-amd8111.c:272: parse error before `u8'
kernel/busses/i2c-amd8111.c:281: parse error before `u8'
kernel/busses/i2c-amd8111.c:300: parse error before `u8'
kernel/busses/i2c-amd8111.c:360: parse error before `u8'
kernel/busses/i2c-amd8111.c: At top level:
kernel/busses/i2c-amd8111.c:500: initializer element is not constant
kernel/busses/i2c-amd8111.c:500: (near initialization for 
`amd8111_driver.remove')
kernel/busses/i2c-amd8111.c:501: initializer element is not constant
kernel/busses/i2c-amd8111.c:501: (near initialization for 
`amd8111_driver')
make: *** [kernel/busses/i2c-amd8111.o] Error 1

When I view the code for i2c-amd8111.c line 272 I noticed the min_t 
function.  According to my googling, min_t was not defined until kernel 
2.4.10.  see:
http://www.linuxathome.net/archive/arc8-2001.html and
http://lists.osdl.org/pipermail/kernel-janitors/2004-April/000887.html

I grep'd the lm_sensors-2.7.0 code and that was the only source file 
that used min_t.  So I edited the Module.mk in kernel/busses and 
commented out the target instructions related to i2c-amd8111.c.  I 
tried "make all" again as root and it completed the build process.

So it appears to me that at least that module is not compatible with 
any kernel pre 2.4.10.

I consider my issue solved if you want to close the ticket.  You might 
want to put a disclaimer somewhere about this.

By the way, thank you for such a wonderful project.  Even though I have 
struggled with this for several days, it beats the heck out of coding 
my own hardware monitoring package from scratch.

David



More information about the lm-sensors mailing list