All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: 2.6.31.1 BUG #include <asm/bitsperlong.h>
@ 2009-09-27 11:16 Bernard Pidoux
  2009-09-27 11:24 ` Arjan van de Ven
  2009-09-27 11:46 ` Sam Ravnborg
  0 siblings, 2 replies; 14+ messages in thread
From: Bernard Pidoux @ 2009-09-27 11:16 UTC (permalink / raw)
  To: linux-kernel

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.h including <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

Bernard Pidoux




On Sun, Sep 27, 2009 at 11:56:47AM +0200, Bernard Pidoux wrote:
> In kernel 2.6.31.1 the following files in
>
> /usr/src/linux-2.6.31.1/include/asm-generic/
>
> include <asm/bitsperlong.h> 
>
> while they should #include <asm-generic/bitsperlong.h>

It would be wrong to include the generic version
directly.
We need access to the arch specifics definitions
before we include the generic version.

See how different architectures does various things
in their: arch/$(ARCH)/include/asm/bitsperlong.h

	Sam


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: 2.6.31.1 BUG #include <asm/bitsperlong.h>
  2009-09-27 11:16 2.6.31.1 BUG #include <asm/bitsperlong.h> Bernard Pidoux
@ 2009-09-27 11:24 ` Arjan van de Ven
  2009-09-27 11:46 ` Sam Ravnborg
  1 sibling, 0 replies; 14+ messages in thread
From: Arjan van de Ven @ 2009-09-27 11:24 UTC (permalink / raw)
  To: Bernard Pidoux; +Cc: linux-kernel

On Sun, 27 Sep 2009 13:16:41 +0200
Bernard Pidoux <bernard.pidoux@upmc.fr> wrote:

> 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?



-- 
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: 2.6.31.1 BUG #include <asm/bitsperlong.h>
  2009-09-27 11:16 2.6.31.1 BUG #include <asm/bitsperlong.h> Bernard Pidoux
  2009-09-27 11:24 ` Arjan van de Ven
@ 2009-09-27 11:46 ` Sam Ravnborg
  1 sibling, 0 replies; 14+ messages in thread
From: Sam Ravnborg @ 2009-09-27 11:46 UTC (permalink / raw)
  To: Bernard Pidoux; +Cc: linux-kernel

On Sun, Sep 27, 2009 at 01:16:41PM +0200, Bernard Pidoux wrote:
> 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.h including <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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: 2.6.31.1 BUG #include <asm/bitsperlong.h>
  2009-09-27 16:58 ` arnd
@ 2009-09-27 18:33   ` Bernard Pidoux
  0 siblings, 0 replies; 14+ messages in thread
From: Bernard Pidoux @ 2009-09-27 18:33 UTC (permalink / raw)
  To: arnd; +Cc: linux-kernel

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

arnd@arndb.de a écrit :
> 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.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 type
>> listen.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 <><
> 


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: 2.6.31.1 BUG #include <asm/bitsperlong.h>
  2009-09-27 13:19     ` Arjan van de Ven
  2009-09-27 16:29       ` Bernard Pidoux
@ 2009-09-27 17:35       ` Bernard Pidoux
  1 sibling, 0 replies; 14+ messages in thread
From: Bernard Pidoux @ 2009-09-27 17:35 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: sam, linux-kernel

Here is the difference that made my system crazy :

--- /usr/src/linux-2.6.30.6/include/asm-generic/int-ll64.h	2009-06-10 05:05:27.000000000 +0200
+++ /usr/src/linux-2.6.31/include/asm-generic/int-ll64.h	2009-09-27 11:27:02.577804468 +0200
@@ -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


> 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



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: 2.6.31.1 BUG #include <asm/bitsperlong.h>
  2009-09-27 11:36 Bernard Pidoux
  2009-09-27 11:57 ` Bernard Pidoux
@ 2009-09-27 16:58 ` arnd
  2009-09-27 18:33   ` Bernard Pidoux
  1 sibling, 1 reply; 14+ messages in thread
From: arnd @ 2009-09-27 16:58 UTC (permalink / raw)
  To: Bernard Pidoux; +Cc: linux-kernel, arnd

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.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 type
> listen.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 <><

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: 2.6.31.1 BUG #include <asm/bitsperlong.h>
  2009-09-27 16:29       ` Bernard Pidoux
@ 2009-09-27 16:50         ` Arjan van de Ven
  0 siblings, 0 replies; 14+ messages in thread
From: Arjan van de Ven @ 2009-09-27 16:50 UTC (permalink / raw)
  To: Bernard Pidoux; +Cc: linux-kernel

On Sun, 27 Sep 2009 18:29:11 +0200
Bernard Pidoux <bernard.pidoux@upmc.fr> wrote:

> 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]# ll include/asm/
> total 8
> -rw-r--r-- 1 root root 4890 2009-09-27 14:34 asm-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.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: 2.6.31.1 BUG #include <asm/bitsperlong.h>
  2009-09-27 13:19     ` Arjan van de Ven
@ 2009-09-27 16:29       ` Bernard Pidoux
  2009-09-27 16:50         ` Arjan van de Ven
  2009-09-27 17:35       ` Bernard Pidoux
  1 sibling, 1 reply; 14+ messages in thread
From: Bernard Pidoux @ 2009-09-27 16:29 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: linux-kernel

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


Arjan van de Ven a écrit :
> On Sun, 27 Sep 2009 14:44:17 +0200
> Bernard Pidoux <bernard.pidoux@upmc.fr> wrote:
> 
>> 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.
> 
> do not count until you have done "make headers_install"... there is
> magic there that fixes up a bunch of things.
> .
> 
> 


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: 2.6.31.1 BUG #include <asm/bitsperlong.h>
  2009-09-27 12:44   ` Bernard Pidoux
@ 2009-09-27 13:19     ` Arjan van de Ven
  2009-09-27 16:29       ` Bernard Pidoux
  2009-09-27 17:35       ` Bernard Pidoux
  0 siblings, 2 replies; 14+ messages in thread
From: Arjan van de Ven @ 2009-09-27 13:19 UTC (permalink / raw)
  To: Bernard Pidoux; +Cc: linux-kernel

On Sun, 27 Sep 2009 14:44:17 +0200
Bernard Pidoux <bernard.pidoux@upmc.fr> wrote:

> 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.

do not count until you have done "make headers_install"... there is
magic there that fixes up a bunch of things.
.


-- 
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: 2.6.31.1 BUG #include <asm/bitsperlong.h>
  2009-09-27 11:57 ` Bernard Pidoux
@ 2009-09-27 12:44   ` Bernard Pidoux
  2009-09-27 13:19     ` Arjan van de Ven
  0 siblings, 1 reply; 14+ messages in thread
From: Bernard Pidoux @ 2009-09-27 12:44 UTC (permalink / raw)
  To: linux-kernel

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



On Sun, Sep 27, 2009 at 01:16:41PM +0200, Bernard Pidoux wrote:
> 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.h including <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


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: 2.6.31.1 BUG #include <asm/bitsperlong.h>
  2009-09-27 11:36 Bernard Pidoux
@ 2009-09-27 11:57 ` Bernard Pidoux
  2009-09-27 12:44   ` Bernard Pidoux
  2009-09-27 16:58 ` arnd
  1 sibling, 1 reply; 14+ messages in thread
From: Bernard Pidoux @ 2009-09-27 11:57 UTC (permalink / raw)
  To: linux-kernel

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


On Sun, Sep 27, 2009 at 01:16:41PM +0200, Bernard Pidoux wrote:
> 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.h including <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


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: 2.6.31.1 BUG #include <asm/bitsperlong.h>
@ 2009-09-27 11:36 Bernard Pidoux
  2009-09-27 11:57 ` Bernard Pidoux
  2009-09-27 16:58 ` arnd
  0 siblings, 2 replies; 14+ messages in thread
From: Bernard Pidoux @ 2009-09-27 11:36 UTC (permalink / raw)
  To: linux-kernel

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 type
listen.c: In function ‘main’:



On Sun, 27 Sep 2009 13:16:41 +0200
Bernard Pidoux <bernard.pidoux@upmc.fr> wrote:

> 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?



-- 
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: 2.6.31.1 BUG #include <asm/bitsperlong.h>
  2009-09-27  9:56 Bernard Pidoux
@ 2009-09-27 10:22 ` Sam Ravnborg
  0 siblings, 0 replies; 14+ messages in thread
From: Sam Ravnborg @ 2009-09-27 10:22 UTC (permalink / raw)
  To: Bernard Pidoux; +Cc: linux-kernel

On Sun, Sep 27, 2009 at 11:56:47AM +0200, Bernard Pidoux wrote:
> In kernel 2.6.31.1 the following files in
>
> /usr/src/linux-2.6.31.1/include/asm-generic/
>
> include <asm/bitsperlong.h> 
>
> while they should #include <asm-generic/bitsperlong.h>

It would be wrong to include the generic version
directly.
We need access to the arch specifics definitions
before we include the generic version.

See how different architectures does various things
in their: arch/$(ARCH)/include/asm/bitsperlong.h

	Sam

^ permalink raw reply	[flat|nested] 14+ messages in thread

* 2.6.31.1 BUG #include <asm/bitsperlong.h>
@ 2009-09-27  9:56 Bernard Pidoux
  2009-09-27 10:22 ` Sam Ravnborg
  0 siblings, 1 reply; 14+ messages in thread
From: Bernard Pidoux @ 2009-09-27  9:56 UTC (permalink / raw)
  To: linux-kernel

In kernel 2.6.31.1 the following files in

/usr/src/linux-2.6.31.1/include/asm-generic/

include <asm/bitsperlong.h> 

while they should #include <asm-generic/bitsperlong.h>

int-l64.h:#include <asm/bitsperlong.h>
int-ll64.h:#include <asm/bitsperlong.h>
msgbuf.h:#include <asm/bitsperlong.h>
posix_types.h:#include <asm/bitsperlong.h>
sembuf.h:#include <asm/bitsperlong.h>
shmbuf.h:#include <asm/bitsperlong.h>
stat.h:#include <asm/bitsperlong.h>
swab.h:#include <asm/bitsperlong.h>
unistd.h:#include <asm/bitsperlong.h>

Regards,

Bernard Pidoux

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2009-09-27 18:33 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-27 11:16 2.6.31.1 BUG #include <asm/bitsperlong.h> Bernard Pidoux
2009-09-27 11:24 ` Arjan van de Ven
2009-09-27 11:46 ` Sam Ravnborg
  -- strict thread matches above, loose matches on Subject: below --
2009-09-27 11:36 Bernard Pidoux
2009-09-27 11:57 ` Bernard Pidoux
2009-09-27 12:44   ` Bernard Pidoux
2009-09-27 13:19     ` Arjan van de Ven
2009-09-27 16:29       ` Bernard Pidoux
2009-09-27 16:50         ` Arjan van de Ven
2009-09-27 17:35       ` Bernard Pidoux
2009-09-27 16:58 ` arnd
2009-09-27 18:33   ` Bernard Pidoux
2009-09-27  9:56 Bernard Pidoux
2009-09-27 10:22 ` Sam Ravnborg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.