Skip to contentSkip to conversation

Patch regarding the I2C_HEADERS variable in

lm-sensors Alon Keren 2 participants 2 messages Apr 24, 2006 – Apr 27, 2006

lore
Share & tools
lore

Alon Keren

author
#0 lore raw

Hello all,
I consider the following as a nuisance, but still a bug. I've noticed that lm_sensors's compilation always assumes that there is a special path for i2c headers, which is held in I2C_HEADERS (default is '/usr/local/include'). In my opinion, it should be possible to unset that variable, in case there is no such special path. The attached patch does exactly that.

Alon

P.S. since I'm not subsribed to the mailing list, please CC me your replies.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lm_sensors-2.10.0-i2c_headers-1.patch
Type: application/octet-stream
Size: 784 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20060424/6358e2a6/lm_sensors-2.10.0-i2c_headers-1.obj

#1 lore raw

Hi Alon,

Quoted 6 lines

I consider the following as a nuisance, but still a bug. I've noticed that lm_sensors's compilation always assumes that there is a special path for i2c headers, which is held in I2C_HEADERS (default is '/usr/local/include'). In my opinion, it should be possible to unset that variable, in case there is no such special path. The attached patch does exactly that.

I disagree.

You can have installed i2c in two different ways: either you patched it into your kernel sources, or you installed it externally. In the former case, you must set I2C_HEADERS to point to your kernel source tree. In the latter case, you must set I2C_HEADERS to point to /usr/local/include (the default) or wherever you installed the headers that come from the i2c package. This should not be /usr/include, as this directory contains the kernel headers the glibc was compiled with and they should never be changed when installing a new kernel.

So in both cases, I2C_HEADERS points to a non-standard location and needs to be set, or gcc won't find the header files.

Signature · 1 line
Jean Delvare