linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Big include file move breaks user mode
@ 2008-08-05 16:09 Sean MacLennan
  2008-08-05 16:13 ` Kumar Gala
  2008-08-06 14:51 ` Arnd Bergmann
  0 siblings, 2 replies; 7+ messages in thread
From: Sean MacLennan @ 2008-08-05 16:09 UTC (permalink / raw)
  To: linuxppc-dev

Almost all of the includes in include/asm-powerpc where moved to
arch/powerpc/include/asm. This is breaking almost all of my user mode
code... so I assume I am doing something very wrong.

Here is a simple program that flushes stdout for no apparent reason ;)

#include <stdio.h>
#include <sys/ioctl.h>

int main(int argc, char *argv[])
{
	ioctl(1, TCFLSH, 1);
	return 0;
}

This builds and runs fine under x86 and ppc before the include file
move. After the move, the compile fails because gcc can't find
asm/ioctls.h which is needed by /usr/include/bits/ioctls.h (let's
ignore the cross-compile path for now).

The other big one I am hitting is that /usr/include/bits/errno.h
includes linux/errno.h which includes asm/errno.h which no longer
exists.

Anybody know how to fix this? I am using the DENX 4.1 toolchain if that
helps. Also, if there is a better place to post this, let me know. I
posted here since it only affects powerpc cross compiles... x86 still
has all the includes in "the right place".

Should include/asm be a link to arch/powerpc/include/asm?

Cheers,
   Sean

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

* Re: Big include file move breaks user mode
  2008-08-05 16:09 Big include file move breaks user mode Sean MacLennan
@ 2008-08-05 16:13 ` Kumar Gala
  2008-08-06 14:51 ` Arnd Bergmann
  1 sibling, 0 replies; 7+ messages in thread
From: Kumar Gala @ 2008-08-05 16:13 UTC (permalink / raw)
  To: Sean MacLennan; +Cc: linuxppc-dev


On Aug 5, 2008, at 11:09 AM, Sean MacLennan wrote:

> Almost all of the includes in include/asm-powerpc where moved to
> arch/powerpc/include/asm. This is breaking almost all of my user mode
> code... so I assume I am doing something very wrong.
>
> Here is a simple program that flushes stdout for no apparent reason ;)
>
> #include <stdio.h>
> #include <sys/ioctl.h>
>
> int main(int argc, char *argv[])
> {
> 	ioctl(1, TCFLSH, 1);
> 	return 0;
> }
>
> This builds and runs fine under x86 and ppc before the include file
> move. After the move, the compile fails because gcc can't find
> asm/ioctls.h which is needed by /usr/include/bits/ioctls.h (let's
> ignore the cross-compile path for now).
>
> The other big one I am hitting is that /usr/include/bits/errno.h
> includes linux/errno.h which includes asm/errno.h which no longer
> exists.
>
> Anybody know how to fix this? I am using the DENX 4.1 toolchain if  
> that
> helps. Also, if there is a better place to post this, let me know. I
> posted here since it only affects powerpc cross compiles... x86 still
> has all the includes in "the right place".
>
> Should include/asm be a link to arch/powerpc/include/asm?

Are you using the headers_install option?  or just point to a kernel  
tree.

- k

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

* Re: Big include file move breaks user mode
  2008-08-05 16:09 Big include file move breaks user mode Sean MacLennan
  2008-08-05 16:13 ` Kumar Gala
@ 2008-08-06 14:51 ` Arnd Bergmann
  2008-08-06 15:01   ` Sean MacLennan
  1 sibling, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2008-08-06 14:51 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Sean MacLennan

On Tuesday 05 August 2008, Sean MacLennan wrote:
> Should include/asm be a link to arch/powerpc/include/asm?

The user space headers are provided by your distribution, not
by the kernel, so include/asm should be a directory, not a symlink.
If you are building your own distro, don't just copy the files
but rather use 'make headers_install' to get a sanitized version.

	Arnd <><

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

* Re: Big include file move breaks user mode
  2008-08-06 14:51 ` Arnd Bergmann
@ 2008-08-06 15:01   ` Sean MacLennan
  2008-08-06 17:43     ` René Rebe
  2008-08-06 17:44     ` René Rebe
  0 siblings, 2 replies; 7+ messages in thread
From: Sean MacLennan @ 2008-08-06 15:01 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linuxppc-dev

On Wed, 6 Aug 2008 16:51:40 +0200
"Arnd Bergmann" <arnd@arndb.de> wrote:

> The user space headers are provided by your distribution, not
> by the kernel, so include/asm should be a directory, not a symlink.
> If you are building your own distro, don't just copy the files
> but rather use 'make headers_install' to get a sanitized version.

Sorry, I forgot to reply to the list :( Kumar mentioned the "make
headers_install" and I got it working with our build system. So
everything is back on track.

Cheers,
   Sean

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

* Re: Big include file move breaks user mode
  2008-08-06 15:01   ` Sean MacLennan
@ 2008-08-06 17:43     ` René Rebe
  2008-08-06 17:44     ` René Rebe
  1 sibling, 0 replies; 7+ messages in thread
From: René Rebe @ 2008-08-06 17:43 UTC (permalink / raw)
  To: Sean MacLennan; +Cc: linuxppc-dev, Arnd Bergmann

Hi,

Sean MacLennan wrote:
> On Wed, 6 Aug 2008 16:51:40 +0200
> "Arnd Bergmann" <arnd@arndb.de> wrote:
>
>   
>> The user space headers are provided by your distribution, not
>> by the kernel, so include/asm should be a directory, not a symlink.
>> If you are building your own distro, don't just copy the files
>> but rather use 'make headers_install' to get a sanitized version.
>>     
>
> Sorry, I forgot to reply to the list :( Kumar mentioned the "make
> headers_install" and I got it working with our build system. So
> everything is back on track.
>   
Heh, you might also consider using "off the shelf" build systems, such
as the T2 SDE:

  http://t2-project.org

To avoid re-inventing the whell again and again.

Yours,

-- 
  René Rebe - ExactCODE GmbH - Europe, Germany, Berlin
  http://exactcode.de | http://t2-project.org | http://rene.rebe.name

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

* Re: Big include file move breaks user mode
  2008-08-06 15:01   ` Sean MacLennan
  2008-08-06 17:43     ` René Rebe
@ 2008-08-06 17:44     ` René Rebe
  2008-08-06 19:21       ` Kumar Gala
  1 sibling, 1 reply; 7+ messages in thread
From: René Rebe @ 2008-08-06 17:44 UTC (permalink / raw)
  To: Sean MacLennan; +Cc: linuxppc-dev, Arnd Bergmann

Hi,

Sean MacLennan wrote:
> On Wed, 6 Aug 2008 16:51:40 +0200
> "Arnd Bergmann" <arnd@arndb.de> wrote:
>
>   
>> The user space headers are provided by your distribution, not
>> by the kernel, so include/asm should be a directory, not a symlink.
>> If you are building your own distro, don't just copy the files
>> but rather use 'make headers_install' to get a sanitized version.
>>     
>
> Sorry, I forgot to reply to the list :( Kumar mentioned the "make
> headers_install" and I got it working with our build system. So
> everything is back on track.
>   

Heh, you might also consider using "off the shelf" build systems, such
as the T2 SDE:

  http://t2-project.org

To avoid re-inventing the wheel again and again.

Yours,

-- 
  René Rebe - ExactCODE GmbH - Europe, Germany, Berlin
  http://exactcode.de | http://t2-project.org | http://rene.rebe.name

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

* Re: Big include file move breaks user mode
  2008-08-06 17:44     ` René Rebe
@ 2008-08-06 19:21       ` Kumar Gala
  0 siblings, 0 replies; 7+ messages in thread
From: Kumar Gala @ 2008-08-06 19:21 UTC (permalink / raw)
  To: René Rebe
  Cc: ppc-dev list, Linux-Embedded, Arnd Bergmann, Sean MacLennan


On Aug 6, 2008, at 12:44 PM, Ren=E9 Rebe wrote:

>
> Heh, you might also consider using "off the shelf" build systems, such
> as the T2 SDE:
>
> http://t2-project.org
>
> To avoid re-inventing the wheel again and again.
>
> Yours,
>

Whee.. another rootfs build system.  Why we can't converge some of =20
these towards so we have a larger community is beyond me.

- k=

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

end of thread, other threads:[~2008-08-06 19:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-05 16:09 Big include file move breaks user mode Sean MacLennan
2008-08-05 16:13 ` Kumar Gala
2008-08-06 14:51 ` Arnd Bergmann
2008-08-06 15:01   ` Sean MacLennan
2008-08-06 17:43     ` René Rebe
2008-08-06 17:44     ` René Rebe
2008-08-06 19:21       ` Kumar Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).