Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 297068 - linux-headers - kernel headers error: include/asm/bitsperlong.h: No such file or directory
Summary: linux-headers - kernel headers error: include/asm/bitsperlong.h: No such file...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://lwn.net/Articles/244375/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-15 18:06 UTC by cilly
Modified: 2011-02-15 19:20 UTC (History)
3 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 cilly 2009-12-15 18:06:47 UTC
dir include/asm/
total 16
drwxr-xr-x  2 root root 4096 2009-12-15 16:57 .
drwxr-xr-x 22 root root 4096 2009-12-15 16:57 ..
-rw-r--r--  1 root root 4272 2009-12-15 16:57 asm-offsets.h

In order to compile i.e. iptables against kernel-sources, the following command needs to be applied:

cp /usr/src/linux/include/asm-generic/bitsperlong.h /usr/src/linux/include/asm/

Otherwise, you get:

/usr/src/linux-2.6.31.7/include -I /usr/src/linux-2.6.31.7/include -g 
-O2 -MT libiptc/libip4tc.lo -MD -MP -MF libiptc/.deps/libip4tc.Tpo -c 
libiptc/libip4tc.c  -fPIC -DPIC -o libiptc/.libs/libip4tc.o 
In file included from /usr/include/asm/types.h:4, 
                  from ./include/linux/types.h:6, 
                  from ./include/libiptc/libiptc.h:5, 
                  from libiptc/libip4tc.c:29: 
/usr/src/linux-2.6.31.7/include/asm-generic/int-ll64.h:11:29: error: 
asm/bitsperlong.h: No such file or directory 
make[2]: *** [libiptc/libip4tc.lo] Error 1 
make[2]: Leaving directory `/usr/src/iptables-1.4.3.2' 
make[1]: *** [all-recursive] Error 1 
make[1]: Leaving directory `/usr/src/iptables-1.4.3.2' 
make: *** [all] Error 2
Comment 1 cilly 2009-12-15 18:19:20 UTC
probably, it is related to old version of:

sys-kernel/linux-headers-2.6.29

and missing bitsperlong.h in /usr/include/asm

sorry, no idea where this bugreport should go
Comment 2 cilly 2009-12-15 18:26:19 UTC
See also bug 282261
Comment 3 cilly 2009-12-15 18:28:35 UTC
This shouldn't be managed in individual ebuilds of userspace progs.

It is a matter of the kernel installation and make headers_install.

Additional info: fails with iptables 1.4.5 (which is made for kernel tree .31.x) against 2.6.31.x
Comment 4 koenigrollo 2010-01-14 11:04:47 UTC
Same here for sys-apps/pcmcia-cs-3.2.8-r2 with kernel 2.6.31-r6

make -j2 all
make[1]: Entering directory `/var/tmp/portage/sys-apps/pcmcia-cs-3.2.8-r2/work/pcmcia-cs-3.2.8/cardmgr'
i686-pc-linux-gnu-gcc -O2 -march=pentium-m -pipe -MD -O3 -Wall -Wstrict-prototypes -pipe -Wa,--no-warn -I../include/static -I/usr/src/linux/include -I../include -I../modules -c cardmgr.c
i686-pc-linux-gnu-gcc -O2 -march=pentium-m -pipe -c -MD -O -pipe -I../include/static -I/usr/src/linux/include -I../include -I../modules yacc_config.c
In file included from /usr/include/asm/types.h:4,
                 from /usr/include/asm/sigcontext.h:5,
                 from /usr/include/bits/sigcontext.h:28,
                 from /usr/include/signal.h:333,
                 from cardmgr.c:43:
/usr/src/linux/include/asm-generic/int-ll64.h:11:29: error: asm/bitsperlong.h: No such file or directory
cardmgr.c: In function ‘main’:
cardmgr.c:1492: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result
make[1]: *** [cardmgr.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/sys-apps/pcmcia-cs-3.2.8-r2/work/pcmcia-cs-3.2.8/cardmgr'
make: *** [all] Error 2
Comment 5 NiTr0 2010-02-05 16:15:50 UTC
I meet this trouble when I tried to build accel-pptp (kernel-level PPTP driver). Kernel-headers - 2.6.30 (latest version that found in portage tree).

So may be it's time to add fresh kernel headers to portage? It's quite strange that fresh kernel is more than half year available (even 2.6.32 is already availible in portage), and there is still no headers for it (even marked as unstable), that causes many troubles with kernel-related stuff compilation.
Comment 6 Doktor Notor 2010-02-20 06:12:12 UTC
$ qfile -v /usr/include/asm/bitsperlong.h
sys-kernel/linux-headers-2.6.32 (/usr/include/asm/bitsperlong.h)

Looks like fixed to me... 
Comment 7 cilly 2010-02-23 20:18:47 UTC
iptables compiles fine now. Thx, for fixing.
Comment 8 Christophe LEFEBVRE 2010-11-02 22:26:10 UTC
(In reply to comment #6)
> $ qfile -v /usr/include/asm/bitsperlong.h
> sys-kernel/linux-headers-2.6.32 (/usr/include/asm/bitsperlong.h)
> 
> Looks like fixed to me... 
> 

Why this bug has been marked by "RESOLVED FIXED" ? linux-headers-2.6.32 hasn't been stabilized in portage.

Several packages are yet impacted by this bug : 343875 336323 317539 285376

1. What about do reopen this bug and mark "Bug 297068 blocks 343875 336323 317539 285376" ?
2. Validated version in portage of linux-headers is 2.6.30-r1 : Then, what about a quick stabilize if >=2.6.32 resolve this bug ? Or do we need to correct individually each ebuild ?
Comment 9 Christophe LEFEBVRE 2010-11-02 22:50:37 UTC
(In reply to comment #3)
> This shouldn't be managed in individual ebuilds of userspace progs.
> 
> It is a matter of the kernel installation and make headers_install.
> 
> Additional info: fails with iptables 1.4.5 (which is made for kernel tree
> .31.x) against 2.6.31.x
> 

F.Y.I. this kind of bug has been already resolved in individual ebuilds.

The following bugs are affected __or__ have been affected (and resolved invidually) by this bug : 
275476 282261 284810 285376 287644 291865 294658 295029 305463 316759 317539 325247 336323 343875
Comment 10 genbug 2011-01-02 10:49:14 UTC
I re-ask Christophe's question: why is this marked FIXED?!


        [   ] 2.4.33.3 (0)
        [ ~ ] 2.4.36 (0)
        [   ] 2.6.27-r2 (0)
        [  I] 2.6.30-r1 (0)
        [M~ ] 2.6.33 (0)
        [M~ ] 2.6.34 (0)
        [M~ ] 2.6.35 (0)
        [M~ ] 2.6.36 (0)
        [M~ ] 2.6.36.1 (0)

2.6.30 is broken and there is no 2.6.32 kernel-headers in the tree at this stage. 

It is bad to use headers ahead of the kernel so why are there no headers available for 2.6.32 ?


Comment 11 Mike Williams 2011-02-15 19:20:58 UTC
(In reply to comment #10)
> 2.6.30 is broken and there is no 2.6.32 kernel-headers in the tree at this
> stage. 
> 
> It is bad to use headers ahead of the kernel so why are there no headers
> available for 2.6.32 ?

#352335 linux-headers-2.6.36.1 just went stable for x86.

Mike