Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 264233 - net-firewall/ipsec-tools-0.7.1 fails to compile; error: asm/swab.h: No such file
Summary: net-firewall/ipsec-tools-0.7.1 fails to compile; error: asm/swab.h: No such file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
: 264388 282752 290905 (view as bug list)
Depends on:
Blocks: 326647
  Show dependency tree
 
Reported: 2009-03-30 01:57 UTC by Slava
Modified: 2010-07-02 14:48 UTC (History)
12 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Slava 2009-03-30 01:57:55 UTC
I'm trying to emerge ipsec-tools-0.7.1 and it fails because it can't find asm/swab.h even though asm/swab.h exists

Reproducible: Always

Steps to Reproduce:
1. emerge ipsec-tools

Actual Results:  
Fails, can not find asm/swab.h

Expected Results:  
Should compile with no errors

I'm trying to emerge ipsec-tools-0.7.1 and it fails because it can't find asm/swab.h


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 and earlier versions of ipsec-tools emerged OK.

/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 with server profile.
Comment 1 Wolfram Schlich (RETIRED) gentoo-dev 2009-03-30 21:58:21 UTC
I have only problems *re*-merging ipsec-tools-0.7.1.
I just upgraded gcc and glibc, maybe that is related?!
Comment 2 Wolfram Schlich (RETIRED) gentoo-dev 2009-03-30 22:11:22 UTC
(In reply to comment #1)
> I have only problems *re*-merging ipsec-tools-0.7.1.
> I just upgraded gcc and glibc, maybe that is related?!

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?
Comment 3 Slava 2009-03-31 13:01:30 UTC
Yes, you're right.  I have the same directories on my x86 box.  So this is a Kernel bug and not Gentoo.  I will close this.

Thanks

Slava
Comment 4 Renato Caldas 2009-04-12 13:38:46 UTC
Is this really fixed upstream? It doesn't seem to be..
Comment 5 Renato Caldas 2009-04-12 14:22:51 UTC
This is NOT a kernel bug. This is an ipsec-tools bug, please reopen.

The include/asm-<arch> files have moved to arch/<arch>/include/asm, so ipsec-tools should be fixed accordingly.
Comment 6 Slava 2009-05-05 23:57:34 UTC
Reopening as requested
Comment 7 Peter Alfredsen (RETIRED) gentoo-dev 2009-05-06 08:53:49 UTC
The question then becomes... Is this a case of ipsec-tools using kernel headers in a wrong way or kernel headers being wrong?
Daniel, CCing you since you seem to have an interest in this package.
Comment 8 Renato Caldas 2009-05-06 10:23:29 UTC
The kernel header changes are clearly intentional, as can be seen by searching LKML for this subject.
Comment 9 Daniel Black (RETIRED) gentoo-dev 2009-05-07 01:29:29 UTC
(In reply to comment #7)
> The question then becomes... Is this a case of ipsec-tools using kernel headers
> in a wrong way or kernel headers being wrong?
ipsec-tools is wrong as per #8.

kernel headers change often and really don't care what it breaks as only are small subset are ment to be used.
It should be possible to work around with a few ifdef's based on kernel version.

> Daniel, CCing you since you seem to have an interest in this package.
I never wanted to give that impression. sorry.
Comment 10 E. Scaglione 2009-06-03 21:13:03 UTC
This happens only if sys-kernel/gentoo-sources and sys-kernel/linux-headers have different versions, make sure the have both the same version. So for example use both from ~x86 or both from stable but do not mix them.

having both in ~x86 solves the problem for me.
Comment 11 Christopher Hogan 2009-08-26 00:03:01 UTC
(In reply to comment #10)
> This happens only if sys-kernel/gentoo-sources and sys-kernel/linux-headers
> have different versions, 

I ran into this problem with ipsec-tools-0.7.2. Updating sys-kernel/linux-headers to match kernel version fixed the problem for me.

I've never really paid much attention to linux-headers. This is the first problem I've encountered with version mismatch. As a matter of curiosity, would it be possible to have gentoo-sources depend on a matching linux-headers? Or would this cause similar problems until you actually configured the new kernel?

As it is, I'll make sure to add updating linux-headers and rebuilding sys-libs/glibc (to take advantage of the new headers) to my checklist for upgrading the kernel.
Comment 12 MickKi 2009-09-12 12:24:39 UTC
I am using both headers and kernel from the stable tree:

sys-kernel/linux-headers-2.6.27-r2
sys-kernel/gentoo-sources-2.6.30-r6

it fails to build with the same error.  Are you saying that I should be updating the headers to version 2.6.30-r1 which is the latest unstable on the tree?  Given that this is the first time it happened to me it doesn't sound right.
-- 
Regards,
Mick
Comment 13 Mark H. Wood 2009-09-15 19:15:49 UTC
Yes, stable linux-headers has been at 2.6.27 for some time now but many subsequent gentoo-sources releases have gone stable in the meantime.  "Keep them in sync." isn't practical unless they release in sync.

(Grumble, grumble, only had to rebuild ipsec-tools because it's the last package depending on superseded libreadline.so.5....)
Comment 14 John Stile 2009-10-07 22:14:58 UTC
Shouldn't >=net-firewall/ipsec-tools-0.7.1 be masked until it can safely merge with what is stable in portage?  I just installed ipsec-tools-0.7.2 and the problem persists.
Comment 15 Víctor Ostorga (RETIRED) gentoo-dev 2009-10-31 14:36:59 UTC
*** Bug 290905 has been marked as a duplicate of this bug. ***
Comment 16 Víctor Ostorga (RETIRED) gentoo-dev 2009-10-31 14:38:15 UTC
*** Bug 282752 has been marked as a duplicate of this bug. ***
Comment 17 Víctor Ostorga (RETIRED) gentoo-dev 2009-10-31 14:49:40 UTC
*** Bug 264388 has been marked as a duplicate of this bug. ***
Comment 18 Łukasz Stelmach 2009-11-07 19:19:18 UTC
Why net-firewall/ipsec-tools-0.7.2 have been masked instead of making it depend on an appropriate version of linux-headers? Now I get en error while doing 
"emerge -uDNavt world":

!!! The following installed packages are masked:
- net-firewall/ipsec-tools-0.7.2 (masked by: package.mask)
/usr/portage/profiles/package.mask:
# Víctor Ostorga <vostorga@gentoo.org> (02 Nov 2009)
# If you use a kernel >= 2.6.29 it is needed >=linux-headers-2.6.29
# as well, otherwise net-firewall/ipsec-tools won't compile.
# See bug #264233 for reference

Which is completely pointless since I already, no matter how (I have installed linux-headers-2.6.30), have managed to install ipsec-tools.

I assume it requires a revision bump to change dependencies. OK, then mask 0.7.2 and release 0.7.2-r1 with proper dependencies. Everyone who have new enough kernel headers won't see any problem and no one who haven't got new kernel headers shouldn't have been able to install 0.7.2.

Have I missed something?

PS. emerge world does not want to do *anything* with my ipsec-tools, so why errors?
Comment 19 Víctor Ostorga (RETIRED) gentoo-dev 2009-11-07 19:50:46 UTC
(In reply to comment #18)
> Why net-firewall/ipsec-tools-0.7.2 have been masked instead of making it depend
> on an appropriate version of linux-headers? Now I get en error while doing 
> "emerge -uDNavt world":
> 
> !!! The following installed packages are masked:
> - net-firewall/ipsec-tools-0.7.2 (masked by: package.mask)
> /usr/portage/profiles/package.mask:
> # Víctor Ostorga <vostorga@gentoo.org> (02 Nov 2009)
> # If you use a kernel >= 2.6.29 it is needed >=linux-headers-2.6.29
> # as well, otherwise net-firewall/ipsec-tools won't compile.
> # See bug #264233 for reference
> 
> Which is completely pointless since I already, no matter how (I have installed
> linux-headers-2.6.30), have managed to install ipsec-tools.
> 
> I assume it requires a revision bump to change dependencies. OK, then mask
> 0.7.2 and release 0.7.2-r1 with proper dependencies. Everyone who have new
> enough kernel headers won't see any problem and no one who haven't got new
> kernel headers shouldn't have been able to install 0.7.2.
> 
> Have I missed something?
> 

Short history, ipsec-tools will build if kernel headers and kernel sources match. 
Long history if you have a working kernel >= 2.6.29 and linux-headers <= 2.6.29 it won't build because of mismatching headers.

If you want to avoid the message just play with package.unmask as stated in man portage
Comment 20 Roman Dyachkov 2009-11-16 19:11:33 UTC
fix to one build
1. unmask /etc/portage/package.keywords
   =net-firewall/ipsec-tools-0.7.3 ~x86
2. start emerge -v ipsec-tools-0.7.3

2.1 if unpack source ipsec-tools - [ok] then goto step3 in other terminal
3. dir /var/tmp/portage/net-firewall/ipsec-tools-0.7.3/work/ipsec-tools-0.7.3/src/include-glibc/asm
4. cp /usr/src/linux-2.6.30-gentoo-r8/arch/x86/include/asm/swab.h /var/tmp/portage/net-firewall/ipsec-tools-0.7.3/work/ipsec-tools-0.7.3/src/include-glibc/asm
Comment 21 Roman Dyachkov 2009-11-25 18:31:22 UTC
3. mkdir /var/tmp/portage/net-firewall/ipsec-tools-0.7.3/work/ipsec-tools-0.7.3/src/include-glibc/asm

(In reply to comment #20)
> fix to one build
> 1. unmask /etc/portage/package.keywords
>    =net-firewall/ipsec-tools-0.7.3 ~x86
> 2. start emerge -v ipsec-tools-0.7.3
> 2.1 if unpack source ipsec-tools - [ok] then goto step3 in other terminal
> 3. dir
> /var/tmp/portage/net-firewall/ipsec-tools-0.7.3/work/ipsec-tools-0.7.3/src/include-glibc/asm
> 4. cp /usr/src/linux-2.6.30-gentoo-r8/arch/x86/include/asm/swab.h
> /var/tmp/portage/net-firewall/ipsec-tools-0.7.3/work/ipsec-tools-0.7.3/src/include-glibc/asm

Comment 22 Kevin P. Inscoe 2009-12-04 14:25:56 UTC
(In reply to comment #10)
> This happens only if sys-kernel/gentoo-sources and sys-kernel/linux-headers
> have different versions, make sure the have both the same version. So for
> example use both from ~x86 or both from stable but do not mix them.
> 
> having both in ~x86 solves the problem for me.
> 

Ok dumb question why wouldn't sys-kernel/gentoo-sources and sys-kernel/linux-headers be in sync with each other? Right now headers is 2.6.30-r1 in unstable yet kernel 2.6.31 is stable? I don't like to install unstable stuff. Why would I have to merge an unstable headers to match my stable kernel?
Comment 23 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-01-10 01:12:33 UTC
fixed in 0.7.3-r1 as part of linux-info cleanup.