Bug 12983 - include <asm/swab.h> is causing issues
Summary: include <asm/swab.h> is causing issues
Status: CLOSED INVALID
Alias: None
Product: Drivers
Classification: Unclassified
Component: Network (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_network@kernel-bugs.osdl.org
URL: http://bugs.gentoo.org/show_bug.cgi?i...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-31 13:13 UTC by Slava
Modified: 2012-05-30 15:05 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.29
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Slava 2009-03-31 13:13:15 UTC
I'm trying to compile ipsec-tools-0.7.1 and it fails because it can't find
asm/swab.h even though asm/swab.h exists.

i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -I./../libipsec  
-D_GNU_SOURCE -include ./src/include-glibc/glibc-bugs.h -I./src/include-glibc
-I./src/include-glibc  -I./../../src/racoon/missing -D_GNU_SOURCE -include
../../src/include-glibc/glibc-bugs.h -I../../src/include-glibc
-I../../src/include-glibc -DSYSCONFDIR=\"/etc\"
-DADMINPORTDIR=\"/var/lib/racoon\" -O2 -march=pentium3 -pipe  -Wall 
-Wno-unused -MT isakmp.o -MD -MP -MF .deps/isakmp.Tpo -c -o isakmp.o isakmp.c
In file included from
../../src/include-glibc/linux/byteorder/little_endian.h:12,
                 from /usr/include/asm/byteorder.h:79,
                 from ../../src/include-glibc/linux/ip.h:20,
                 from isakmp.c:115:
../../src/include-glibc/linux/swab.h:6:22: error: asm/swab.h: No such file or
directory
make[4]: *** [isakmp.o] Error 1


I have the following files.

/usr/src/linux-2.6.29/arch/parisc/include/asm/swab.h
/usr/src/linux-2.6.29/arch/cris/include/asm/swab.h
/usr/src/linux-2.6.29/arch/cris/include/arch-v32/arch/swab.h
/usr/src/linux-2.6.29/arch/cris/include/arch-v10/arch/swab.h
/usr/src/linux-2.6.29/arch/sparc/include/asm/swab.h
/usr/src/linux-2.6.29/arch/h8300/include/asm/swab.h
/usr/src/linux-2.6.29/arch/s390/include/asm/swab.h
/usr/src/linux-2.6.29/arch/m68k/include/asm/swab.h
/usr/src/linux-2.6.29/arch/x86/include/asm/swab.h
/usr/src/linux-2.6.29/arch/xtensa/include/asm/swab.h
/usr/src/linux-2.6.29/arch/powerpc/include/asm/swab.h
/usr/src/linux-2.6.29/arch/sh/include/asm/swab.h
/usr/src/linux-2.6.29/arch/arm/include/asm/swab.h
/usr/src/linux-2.6.29/arch/blackfin/include/asm/swab.h
/usr/src/linux-2.6.29/arch/mips/include/asm/swab.h
/usr/src/linux-2.6.29/arch/avr32/include/asm/swab.h
/usr/src/linux-2.6.29/arch/alpha/include/asm/swab.h
/usr/src/linux-2.6.29/arch/ia64/include/asm/swab.h
/usr/src/linux-2.6.29/fs/ufs/swab.h
/usr/src/linux-2.6.29/include/asm-mn10300/swab.h
/usr/src/linux-2.6.29/include/asm-m32r/swab.h
/usr/src/linux-2.6.29/include/linux/swab.h
/usr/src/linux-2.6.29/include/asm-frv/swab.h



I'm running vanilla-kernel 2.6.29 on Gentoo.  I've brought this up with Gentoo but it seems that this is a kernel bug.  Please see below response.


nyx ~ # readlink
/var/tmp/portage/net-firewall/ipsec-tools-0.7.1/work/ipsec-tools-0.7.1/src/include-glibc/linux
/usr/src/linux/include/linux
nyx ~ #

So the error comes from /usr/src/linux/include/linux/swab.h
(#include <asm/swab.h>).

On my x86_64 system, /usr/src/linux/include/asm
is a symlink to asm-x86 which in turn does not contain swab.h.
The only asm-* subdirectories below /usr/src/linux/include
that contain swab.h are asm-frv, asm-m32r and asm-mn10300.

I tried touching /usr/src/linux/include/asm/swab.h, but
it's not being used. What actually helped was
"touch /usr/include/asm/swab.h".

Ok, I've investigaged further.
Kernel 2.6.28 had '#include <asm/byteorder.h>' in
/usr/src/linux/include/linux/swab.h whereas
2.6.29 has '#include <asm/swab.h>'. So it's specific
to 2.6.29 and looks like a bug in the kernel sources, no?

Please refer to the bug entered in Gentoo bugzilla for more details. http://bugs.gentoo.org/show_bug.cgi?id=264233

Thank you

Note You need to log in before you can comment on or make changes to this bug.