Skip to contentSkip to conversation

2.10.5 on 2.4 kernel requires sysfs/libsysfs.h?

lm-sensors Axel Thimm 2 participants 4 messages Nov 10, 2007 – Nov 12, 2007

lore
Share & tools
lore

Axel Thimm

author
#0 lore raw

Hi,

up to 2.10.4 sysfsutils was only required for 2.6 kernels. Now the build fails on 2.4 kernel system w/o sysfsutils with

make: *** No rule to make target sysfs/libsysfs.h', needed by lib/sysfs.ad'.

Is that a bug in the Makefiles or is sysfsutils now really required for 2.4. kernels as well?

(I hit this while building rpms for RHEL3).

Thanks!

Signature · 1 line
Axel.Thimm at ATrpms.net

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#1 lore raw

Hi Axel,

Quoted 9 lines · Axel Thimm

up to 2.10.4 sysfsutils was only required for 2.6 kernels. Now the build fails on 2.4 kernel system w/o sysfsutils with

make: *** No rule to make target sysfs/libsysfs.h', needed by lib/sysfs.ad'.

Is that a bug in the Makefiles or is sysfsutils now really required for 2.4. kernels as well?

(I hit this while building rpms for RHEL3).

No, sysfsutils is still not required for 2.4 kernels.

The only change in 2.10.5 that could cause this problem is this one:
http://www.lm-sensors.org/changeset/4738

But I tested this with a 2.4 kernel and it works as intended.

Hmmm, maybe I see what's going on. Are you cross-building the RHEL3 package, on a system itself running a 2.6 kernel? And how are you pointing the build system to the right kernel tree to build against in this case?

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
author
#2 lore raw
In reply to Axel Thimm
Quoted 11 lines · Jean Delvare

Hi Axel,

Quoted 8 lines · Axel Thimm

up to 2.10.4 sysfsutils was only required for 2.6 kernels. Now the build fails on 2.4 kernel system w/o sysfsutils with

make: *** No rule to make target sysfs/libsysfs.h', needed by lib/sysfs.ad'.

Is that a bug in the Makefiles or is sysfsutils now really required for 2.4. kernels as well?

Quoted 6 lines
Quoted 1 line

(I hit this while building rpms for RHEL3).

No, sysfsutils is still not required for 2.4 kernels.

The only change in 2.10.5 that could cause this problem is this one:
http://www.lm-sensors.org/changeset/4738

I see, I will probably need to divert KERNELVERSION.

Quoted 4 lines

But I tested this with a 2.4 kernel and it works as intended.

Hmmm, maybe I see what's going on. Are you cross-building the RHEL3 package, on a system itself running a 2.6 kernel?

Yes.

Quoted 2 lines

And how are you pointing the build system to the right kernel tree to build against in this case?

Something along
make LINUX=/srv/atrpms.net/atrpms/kernelsrc/el3-x86_64/2.4.21-52.EL-x86_64 I2C_HEADERS=/usr/include/i2c COMPILE_KERNEL=0

I'll add an KERNELVERSION=2.4.21-52.EL for good measure ;)

Signature · 1 line
Axel.Thimm at ATrpms.net

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#3 lore raw
In reply to Axel Thimm

Hi Axel,

Quoted 26 lines · Axel Thimm
Quoted 9 lines · Jean Delvare
Quoted 8 lines · Axel Thimm

up to 2.10.4 sysfsutils was only required for 2.6 kernels. Now the build fails on 2.4 kernel system w/o sysfsutils with

make: *** No rule to make target sysfs/libsysfs.h', needed by lib/sysfs.ad'.

Is that a bug in the Makefiles or is sysfsutils now really required for 2.4. kernels as well?

Quoted 6 lines
Quoted 1 line

(I hit this while building rpms for RHEL3).

No, sysfsutils is still not required for 2.4 kernels.

The only change in 2.10.5 that could cause this problem is this one:
http://www.lm-sensors.org/changeset/4738

I see, I will probably need to divert KERNELVERSION.

Quoted 4 lines

But I tested this with a 2.4 kernel and it works as intended.

Hmmm, maybe I see what's going on. Are you cross-building the RHEL3 package, on a system itself running a 2.6 kernel?

Yes.

Quoted 7 lines
Quoted 2 lines

And how are you pointing the build system to the right kernel tree to build against in this case?

Something along
make LINUX=/srv/atrpms.net/atrpms/kernelsrc/el3-x86_64/2.4.21-52.EL-x86_64 I2C_HEADERS=/usr/include/i2c COMPILE_KERNEL=0

I'll add an KERNELVERSION=2.4.21-52.EL for good measure ;)

Yes, that should solve the problem.

I admit that my fix introduced a regression, as it was previously possible to only set LINUX and you now have to set both LINUX and KERNELVERSION. However we have a chicken and egg problem, because the "UTS release" number, which in practice is the kernel version number, is defined in a different header depending on the kernel version.

But well, I'm not exactly sure what my change is fixing, so I might as well revert it, and wait for a real bug report before I change it again.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors