Skip to contentSkip to conversation

error Invalid kernel header inluded in user space

DISCUSSION Sabrina Lautier 2 participants 3 messages Mar 7, 2003 – Mar 10, 2003

lore
Share & tools
lore
#0 lore raw

Hi all !

I'm following the "Linux IP Masqueade HowTo" to set up a linux router-firewall.
I'm having trouble compiling iptables and I don't know how to solve my problem...

I'm running linux redhat 7.3 with a 2.4.18-3 kernel but I've downloaded the latest kernel version (2.4.20) in order to compile it with iptables-1.2.7a and patch-o-matic kernel patches.

When I try to compile here is the error I get:
**********************************************************************

$ make KERNEL_DIR=/usr/src/kernel/linux
Extentions found:
cc -02 ...
In file included from /usr/src/kernel/linux/include/linux/config.h:4,
from /usr/src/kernel/linux/include/linux/netfilter_ipv4.h:8,
from /usr/src/kernel/linux/include/linux/netfilter_ipv4/iptables.h:25,
from include/libiptc.h:6,
from include/iptables.h:5,
from extentions/libipt_ah.c:8,
/usr/include/linux/autoconf.h:1:2: #error Invalid kernel header
inluded in user space
make: ** [extentions/libipt_ah_sh.o] Error 1
**********************************************************************

For information, I'm using gcc-2.96-110. I've tried to upgrade to gcc-3.2-7 but cannot find glibc-devel-2.2.90-12 required for this version of gcc (can someone tell me where to find it ?).

Any idea of how to solve my issue ?
Any help would be greatly appreciated.

Regards,
Sabrina

---------------------------------------------
Powered by Alinto (http://www.alinto.net)
for lavache.com (http://www.lavacheautomatique.com)

#1 lore raw

Why does nobody reply to my mail ? Is my question too obvious/stupid ? I still haven't find a solution to my issue... I still can compile the linux kernel with iptables-1.2.7a and patch-o-matic kernel patches :-(.

Thanks in advance for any clue.
Regards,
Sabrina

Quoted 1 line

---------------- Beginning of the original message -----------------

-

Quoted 8 lines

Hi all !

I'm following the "Linux IP Masqueade HowTo" to set up a linux router-firewall.
I'm having trouble compiling iptables and I don't know how to solve my
problem...

Quoted 7 lines

I'm running linux redhat 7.3 with a 2.4.18-3 kernel but I've downloaded the latest kernel version (2.4.20) in order to compile it
with iptables-1.2.7a and patch-o-matic kernel patches.

When I try to compile here is the error I get:

**********************************************************************

Quoted 7 lines
$ make KERNEL_DIR=/usr/src/kernel/linux
Extentions found:
cc -02 ...
In file included from
/usr/src/kernel/linux/include/linux/config.h:4,
from /usr/src/kernel/linux/include/linux/netfilter_ipv4.h:8,
from
Quoted 9 lines
/usr/src/kernel/linux/include/linux/netfilter_ipv4/iptables.h:25,
from include/libiptc.h:6,
from include/iptables.h:5,
from extentions/libipt_ah.c:8,
/usr/include/linux/autoconf.h:1:2: #error Invalid kernel
header
inluded in user space
make: ** [extentions/libipt_ah_sh.o] Error 1

**********************************************************************

Quoted 13 lines

For information, I'm using gcc-2.96-110. I've tried to upgrade to
gcc-3.2-7 but cannot find glibc-devel-2.2.90-12 required for this
version of gcc (can someone tell me where to find it ?).

Any idea of how to solve my issue ?
Any help would be greatly appreciated.

Regards,
Sabrina

Quoted 6 lines

---------------------------------------------
Powered by Alinto (http://www.alinto.net)
for lavache.com (http://www.lavacheautomatique.com)

------------------- End of the original message --------------------

-

Sabrina

---------------------------------------------
Powered by Alinto (http://www.alinto.net)
for lavache.com (http://www.lavacheautomatique.com)

#2 lore raw
Quoted 18 lines · Sabrina Lautier
Quoted 2 lines

When I try to compile here is the error I get:

**********************************************************************

Quoted 15 lines
$ make KERNEL_DIR=/usr/src/kernel/linux
Extentions found:
cc -02 ...
In file included from
/usr/src/kernel/linux/include/linux/config.h:4,
from /usr/src/kernel/linux/include/linux/netfilter_ipv4.h:8,
from
/usr/src/kernel/linux/include/linux/netfilter_ipv4/iptables.h:25,
from include/libiptc.h:6,
from include/iptables.h:5,
from extentions/libipt_ah.c:8,
/usr/include/linux/autoconf.h:1:2: #error Invalid kernel
header
inluded in user space
make: ** [extentions/libipt_ah_sh.o] Error 1

This implies something is defining __KERNEL__ (or not) when it
shouldn't (or should) be. Yes, I'm being vague as I've not tried it myself. I notice the "cc -O2 ..." above, the full line might help. Also the actual error is from "/usr/include/linux/autoconf.h", do symlinks make that the same as "/usr/src/kernel/linux/include/linuxautoconf.h" or is it part of some 'stub' headers package on your system? A mismatch could cause such a problem.

-Ath

Signature · 4 lines
- Athanasius = Athanasius(at)miggy.org / http://www.miggy.org/
                  Finger athan(at)fysh.org for PGP key
	   "And it's me who is my enemy. Me who beats me up.
Me who makes the monsters. Me who strips my confidence." Paula Cole - ME