2.6.31.1 BUG #include <asm/bitsperlong.h>
This is a user space application.
Here is Gcc error message :
gcc -Wall -Wstrict-prototypes -O2 -ggdb2 -funsigned-char -D__LINUX__ -Wformat-security -D_FORTIFY_SOURCE=2 -DPROTOTYPES -I../lib -I/usr/src/linux/include -fstack-check -fstack-protector-all -c listen.c Dans le fichier inclus à partir de /usr/include/asm/types.h:4,
à partir de /usr/src/linux/include/linux/types.h:4,
à partir de /usr/src/linux/include/linux/if_ether.h:24,
à partir de /usr/include/net/ethernet.h:27,
à partir de listen.c:21:/usr/src/linux/include/asm-generic/int-ll64.h:11:29: erreur: asm/bitsperlong.h : Aucun fichier ou dossier de ce typelisten.c: In function ‘main’:
Quoted 2 lines · On Sun, 27 Sep 2009 13:16:41 +0200 Bernard Pidoux <[email protected]>…
The problem is that when I compile an application that never caused any problem before I get an error due to incorrect reference to <asm/bitsperlong>
is this a userspace application? or some kernel module?
Signature · 2 lines
Arjan van de Ven Intel Open Source Technology Centre For development, discussion and tips for power savings, visit http://www.lesswatts.org
The only file in asm-x86 directory is asm-offsets.h
This is a Mandriva 2009.1 Spring distro.
I checked that it was the same on two other machines with the same new installed distro.
I will copy bitsperlong.h into asm-x86 as suggested.
Should other files be present in the above directory ?
Should I send a bug report to Mandriva ?
Thank you all for your help.
Bernard Pidoux
Quoted 11 lines · Bernard Pidoux
The problem is that when I compile an application that never caused any problem before I get an error due to incorrect reference to <asm/bitsperlong>
This was due to
int-ll64.hincluding <asm/bitsperlong.h> which does not exists.Is the correct solution to replace symbolic link ?
/usr/src/linux/include/asm->asm-x86
by
/usr/src/linux/include/asm->asm-generic
The correct fix is to include the missing bitsperlong in the asm-x86 directory.
In other words your kernel headers are broken.
Looking at latest kernel we do export bitsperlong.h. So see if you can find a fix for your broken kernel headers.
Sam
I downloaded again linux-2.6.31.1.tar.bz2 and unpacked it.
ll /usr/src/linux-2.6.31.1/include/
total 128
drwxrwxr-x 3 root root 4096 2009-09-24 17:45 acpi/ lrwxrwxrwx 1 root root 7 2009-09-27 14:34 asm -> asm-x86/ drwxrwxr-x 3 root root 4096 2009-09-24 17:45 asm-generic/ drwxr-xr-x 2 root root 4096 2009-09-27 14:34 asm-x86/
and
ll /usr/src/linux-2.6.31.1/include/asm/
total 8
-rw-r--r-- 1 root root 4890 2009-09-27 14:34 asm-offsets.h
So, I think that the kernel header problem is in the linux package, not in my system installation.
Bernard Pidoux
Quoted 11 lines · Bernard Pidoux
The problem is that when I compile an application that never caused any problem before I get an error due to incorrect reference to <asm/bitsperlong>
This was due to
int-ll64.hincluding <asm/bitsperlong.h> which does not exists.Is the correct solution to replace symbolic link ?
/usr/src/linux/include/asm->asm-x86
by
/usr/src/linux/include/asm->asm-generic
The correct fix is to include the missing bitsperlong in the asm-x86 directory.
In other words your kernel headers are broken.
Looking at latest kernel we do export bitsperlong.h. So see if you can find a fix for your broken kernel headers.
Sam
Quoted 9 lines · On Sun, 27 Sep 2009 14:44:17 +0200 Bernard Pidoux <[email protected]>…
I downloaded again linux-2.6.31.1.tar.bz2 and unpacked it.
ll
/usr/src/linux-2.6.31.1/include/
total 128drwxrwxr-x 3 root root 4096 2009-09-24 17:45 acpi/ lrwxrwxrwx 1 root root 7 2009-09-27 14:34 asm -> asm-x86/ drwxrwxr-x 3 root root 4096 2009-09-24 17:45 asm-generic/ drwxr-xr-x 2 root root 4096 2009-09-27 14:34 asm-x86/
Quoted 8 lines
and
ll
/usr/src/linux-2.6.31.1/include/asm/
total 8
-rw-r--r-- 1 root root 4890 2009-09-27 14:34asm-offsets.hSo, I think that the kernel header problem is in the linux package, not in my system installation.
do not count until you have done "make headers_install"... there is magic there that fixes up a bunch of things.
.
Signature · 3 lines
Arjan van de Ven Intel Open Source Technology Centre For development, discussion and tips for power savings, visit http://www.lesswatts.org
If it was supposed to install bitsperlong.h in /asm/ magic did not work.
I am a little bit puzzled for the script writes
INSTALL include/asm (53 files)
and I can still only list one file in that directory.
[root@f6bvp-11 linux-2.6.31.1]# make headers_install
CHK include/linux/version.h
HOSTCC scripts/unifdef
INSTALL include/asm-generic (34 files)
INSTALL include/drm (12 files)
INSTALL include/linux/byteorder (2 files) INSTALL include/linux/can (4 files)
INSTALL include/linux/dvb (8 files)
INSTALL include/linux/hdlc (1 file)
INSTALL include/linux/isdn (1 file)
INSTALL include/linux/netfilter (58 files) INSTALL include/linux/netfilter_arp (2 files) INSTALL include/linux/netfilter_bridge (16 files) INSTALL include/linux/netfilter_ipv4 (46 files) INSTALL include/linux/netfilter_ipv6 (21 files) INSTALL include/linux/nfsd (6 files)
INSTALL include/linux/raid (2 files)
INSTALL include/linux/spi (1 file)
INSTALL include/linux/sunrpc (1 file)
INSTALL include/linux/tc_act (6 files)
INSTALL include/linux/tc_ematch (4 files) INSTALL include/linux/usb (8 files)
INSTALL include/linux/wimax (1 file)
INSTALL include/linux (353 files)
INSTALL include/mtd (5 files)
INSTALL include/rdma (1 file)
INSTALL include/scsi (4 files)
INSTALL include/sound (9 files)
INSTALL include/video (3 files)
INSTALL include/xen (1 file)
INSTALL include (0 file)
INSTALL include/asm (53 files)
[root@f6bvp-11 linux-2.6.31.1]# ll include/asm/ total 8
-rw-r--r-- 1 root root 4890 2009-09-27 14:34 asm-offsets.h
Quoted 26 lines · Arjan van de Ven
Quoted 9 lines · On Sun, 27 Sep 2009 14:44:17 +0200 Bernard Pidoux <[email protected]>…
I downloaded again linux-2.6.31.1.tar.bz2 and unpacked it.
ll
/usr/src/linux-2.6.31.1/include/
total 128drwxrwxr-x 3 root root 4096 2009-09-24 17:45 acpi/ lrwxrwxrwx 1 root root 7 2009-09-27 14:34 asm -> asm-x86/ drwxrwxr-x 3 root root 4096 2009-09-24 17:45 asm-generic/ drwxr-xr-x 2 root root 4096 2009-09-27 14:34 asm-x86/Quoted 8 lines
and
ll
/usr/src/linux-2.6.31.1/include/asm/
total 8
-rw-r--r-- 1 root root 4890 2009-09-27 14:34asm-offsets.hSo, I think that the kernel header problem is in the linux package, not in my system installation.
do not count until you have done "make
headers_install"... there is magic there that fixes up a bunch of things.
.
Quoted 5 lines · On Sun, 27 Sep 2009 18:29:11 +0200 Bernard Pidoux <[email protected]>…
If it was supposed to install
bitsperlong.hin /asm/ magic did not work.I am a little bit puzzled for the script writes
Quoted 8 lines
INSTALL
include/asm(53 files)and I can still only list one file in that directory.
[root@f6bvp-11 linux-2.6.31.1]# ll
include/asm/total 8
-rw-r--r-- 1 root root 4890 2009-09-27 14:34asm-offsets.h
ls /usr/include/asm
that's where it ends up.
the kernel's "include/asm" is supposed to be empty or near empty.
Here is the difference that made my system crazy :
usr/src/linux-2.6.31/include/asm-generic/int-ll64.h renamed from usr/src/linux-2.6.30.6/include/asm-generic/int-ll64.h +0 -0
@@ -8,6 +8,8 @@
#ifndef _ASM_GENERIC_INT_LL64_H
#define _ASM_GENERIC_INT_LL64_H
+#include <asm/bitsperlong.h>
+
#ifndef __ASSEMBLY__
/*
* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
So, where are supposed to be the export routines that did not work ?
Bernard
Quoted 8 lines
The correct fix is to include the missing bitsperlong in the asm-x86 directory.
In other words your kernel headers are broken.Looking at latest kernel we do export
bitsperlong.h. So see if you can find a fix for your broken kernel headers.Sam
Quoted 9 lines · On Sunday 27 September 2009 11:36:22 Bernard Pidoux wrote:
gcc -Wall -Wstrict-prototypes -O2 -ggdb2 -funsigned-char -D__LINUX__ -Wformat-security -D_FORTIFY_SOURCE=2 -DPROTOTYPES -I../lib -I/usr/src/linux/include -fstack-check -fstack-protector-all -c
listen.cDans le fichier inclus à partir de/usr/include/asm/types.h:4,
à partir de/usr/src/linux/include/linux/types.h:4,
à partir de/usr/src/linux/include/linux/if_ether.h:24,
à partir de/usr/include/net/ethernet.h:27,
à partir de listen.c:21:/usr/src/linux/include/asm-generic/int-ll64.h:11:29: erreur:asm/bitsperlong.h: Aucun fichier ou dossier de ce typelisten.c: In function ‘main’:
The problem is the '-I/usr/src/linux/include' part of the gcc command line. See http://kernelnewbies.org/KernelHeaders for why this is wrong. You should notify the maintainer of the package to fix this by removing this option. The headers in /usr/include/ are sufficient to build user code.
Arnd <><
Many thanks for the solution to my issue.
As I maintain the application, it was easy to perform the change to Makefile and it worked fine.
Best regards,
Bernard Pidoux
Quoted 19 lines · [email protected] a écrit :
Quoted 9 lines · On Sunday 27 September 2009 11:36:22 Bernard Pidoux wrote:
gcc -Wall -Wstrict-prototypes -O2 -ggdb2 -funsigned-char -D__LINUX__ -Wformat-security -D_FORTIFY_SOURCE=2 -DPROTOTYPES -I../lib -I/usr/src/linux/include -fstack-check -fstack-protector-all -c
listen.cDans le fichier inclus à partir de/usr/include/asm/types.h:4,
à partir de/usr/src/linux/include/linux/types.h:4,
à partir de/usr/src/linux/include/linux/if_ether.h:24,
à partir de/usr/include/net/ethernet.h:27,
à partir de listen.c:21:/usr/src/linux/include/asm-generic/int-ll64.h:11:29: erreur:asm/bitsperlong.h: Aucun fichier ou dossier de ce typelisten.c: In function ‘main’:The problem is the '-I/usr/src/linux/include' part of the gcc command line. See http://kernelnewbies.org/KernelHeaders for why this is wrong. You should notify the maintainer of the package to fix this by removing this option. The headers in
/usr/include/are sufficient to build user code.Arnd <><