Skip to contentSkip to conversation

2.6.4: strange (?) include path order

DISCUSSION Andreas Mohr 2 participants 5 messages May 19, 2005

lore
Share & tools
lore
#0 lore raw

Hi all,

I just tried compiling lm_sensors-2.6.4.
This didn't quite work:

gcc -DMODVERSIONS -include /usr/src/linux/include/linux/modversions.h -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -fomit-frame-pointer -I. -Ikernel/include -I/usr/local/include -I/usr/src/linux/include -O2 -c kernel/busses/i2c-ali1535.c -o kernel/busses/i2c-ali1535.o
kernel/busses/i2c-ali1535.c:183: `I2C_HW_SMBUS_ALI1535' undeclared here (not in a function)
kernel/busses/i2c-ali1535.c:183: initializer element is not constant kernel/busses/i2c-ali1535.c:183: (near initialization for `ali1535_adapter.id')
make: *** [kernel/busses/i2c-ali1535.o] Fehler 1 root@andi:/usr/src/system/lm_sensors-2.6.4#

This is because I have an old i2c.h header in /usr/local/include.

Why do you specify /usr/local/include before /usr/src/linux/include ?? In this case it was fatal.

I guess you can safely assume that /usr/src/linux is the most recent tree.

BTW:

Bus 0, device 0, function 1:
IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE] (rev 208).
IRQ 14.
Master Capable. Latencyd.
I/O at 0x4000 [0x400f].
Bus 0, device 1, function 0:

    ISA bridge: Silicon Integrated Systems [SiS] 85C503/5513 (rev 1).

And on another system:
Bus 0, device 2, function 0:

    ISA bridge: Silicon Integrated Systems [SiS] 85C503/5513 (rev 0).

Bus 0, device 2, function 3:
USB Controller: Silicon Integrated Systems [SiS] 7001 (#2) (rev 7).
IRQ 11.
Master Capable. Latencyd. Max Lat€.
Non-prefetchable 32 bit memory at 0xcffff000 [0xcfffffff].
Bus 0, device 2, function 2:
USB Controller: Silicon Integrated Systems [SiS] 7001 (rev 7).
IRQ 5.
Master Capable. Latencyd. Max Lat€.
Non-prefetchable 32 bit memory at 0xcfffe000 [0xcfffefff].
Bus 0, device 2, function 5:
IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE] (rev 208).
Master Capable. Latency.
I/O at 0xff00 [0xff0f].

See ? I'm an "SiS only" house (well, not quite). :-) (this is a GA586SGX and K7S5A, respectively)

BTW, I've even got 5595 chipset specs !!!

Needless to say I'll try to have a go about the 5511/12/13 misdetection issue.

Have fun !

Signature · 2 lines
Andreas Mohr                        Stauferstr. 6, D-71272 Renningen, Germany
Tel. +49 7159 800604                http://mohr.de.tt
#1 lore raw
Quoted 8 lines

This is because I have an old i2c.h header in /usr/local/include.

Why do you specify /usr/local/include before /usr/src/linux/include ?? In this case it was fatal.

I guess you can safely assume that /usr/src/linux is the most recent tree.

No, we of course can't. The most recent tree is... ours ;)

Did you install i2c-2.6.4 before lm_sensors-2.6.4? My guess is, you didn't.

Signature · 2 lines
Jean "Khali" Delvare
http://www.ensicaen.ismra.fr/~delvare/
#2 lore raw
In reply to Andreas Mohr
Quoted 10 lines · Jean Delvare
Quoted 8 lines

This is because I have an old i2c.h header in /usr/local/include.

Why do you specify /usr/local/include before /usr/src/linux/include ?? In this case it was fatal.

I guess you can safely assume that /usr/src/linux is the most recent tree.

No, we of course can't. The most recent tree is... ours ;)

Oh, ok.

Quoted 2 lines

Did you install i2c-2.6.4 before lm_sensors-2.6.4? My guess is, you didn't.

Of course I didn't:
I'm using 2.4.18 builtin i2c support modules.
If you don't plan to/can't fix this, then maybe you might want to mention this in the FAQ...

Currently having a look at the perl script detection code... Hmm, weird stuff. Not sure yet what can be done about that.

Signature · 1 line
Microsoft Licensing 6.0: "Pay us now in advance, so that we can own you later."
#3 lore raw
In reply to Andreas Mohr
Quoted 7 lines
Quoted 3 lines

Did you install i2c-2.6.4 before lm_sensors-2.6.4? My guess is, you didn't.

Of course I didn't:
I'm using 2.4.18 builtin i2c support modules.
If you don't plan to/can't fix this, then maybe you might want to mention this in the FAQ...

I don't see how we could fix this. If we have /usr/src/linux/include before /usr/local/include, people installing the latest i2c release won't see it used and will probably get somehow frustrated. What's more, I think it is always better to use the version of i2c we release with lm_sensors. Of course, older versions (and thus kernel version) may work, but it may not work as well.
Now, is it worth an entry in the FAQ? Not even sure. I think (I indeed *hope*) that someone encountering the problem you faced would try updating i2c before reading the FAQ (and so, wouldn't read the FAQ since it would work). Anyone got a different opinion?

Quoted 2 lines

Currently having a look at the perl script detection code... Hmm, weird stuff. Not sure yet what can be done about that.

I don't get you. What do you mean?

Signature · 2 lines
Jean "Khali" Delvare
http://www.ensicaen.ismra.fr/~delvare/
#4 lore raw
In reply to Andreas Mohr
Quoted 4 lines · Jean Delvare
Quoted 2 lines

Currently having a look at the perl script detection code... Hmm, weird stuff. Not sure yet what can be done about that.

I don't get you. What do you mean?

I was thinking out loud.

I hope I'll be able to come up with a solution to this problem (i.e. maybe scan *twice* for problematic PCI IDs, once to detect the chipset and once for finding out about the *real* chip, e.g. by searching for other IDs on the board that indicate such-and-such chip)

We could also add an "advice" string for each entry in the pci_adapters list maybe.
That way we could print some warnings/hints for certain adapters. (such as "try using it87 chip driver for misdetected SiS 8895 modules")

Signature · 1 line
Microsoft Licensing 6.0: "Pay us now in advance, so that we can own you later."