[ltp] Cisco airo-net driver compile problems

Fabrice Bellet linux-thinkpad@linux-thinkpad.org
Wed, 15 Oct 2003 23:56:20 +0200


Hi,

On Wed, Oct 15, 2003 at 01:08:35PM -0500, Rich Smrcina wrote:
> I am trying to follow the directions on compiling the airo-net driver
> under RHL9 (2.4.20-20 kernel) for a T40.  
> 
> root@rks0 wireless]# gcc -march=i386 -MD -O2 -Wall -Wstrict-prototypes
> -pipe -I. -I/usr/src/linux/include -D__KERNEL__ -DMODULE -DMODVERSIONS
> -c airo_mpi.c
> In file included from /usr/src/linux/include/linux/config.h:4,
>                  from airo_mpi.c:20:
> /usr/include/linux/autoconf.h:1:2: #error Invalid kernel header included
> in userspace
> In file included from /usr/src/linux/include/linux/module.h:25,
>                  from airo_mpi.c:25:
> /usr/include/asm/atomic.h:40:2: warning: #warning Using kernel header in
> userland program. BAD!
> 
> Alot of warnings follow until the compile bails out.  Neither autoconf.h
> nor atomic.h is in my kernel sources (RPM from RedHat).  Where might I
> find these files (or could someone send them to me)?

Both autoconf.h and atomic.h are included in the kernel-source RPM package:

[bellet@helix src]$ rpm -qf /usr/src/linux-2.4.20-20.9/include/linux/autoconf.h
kernel-source-2.4.20-20.9
[bellet@helix src]$ rpm -qf /usr/src/linux-2.4.20-20.9/include/asm/atomic.h
kernel-source-2.4.20-20.9

IIRC, the symlink /usr/src/linux -> /usr/src/linux-2.4 is not automatically
created in the RH9. Maybe you should check that this link exists ?

*But*, there're other compilation issues with the RH kernel, related
to a missing current->sigmask_lock member in 2.4.20.

Best wishes,
-- 
fabrice