linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* error cross compiling ubi-utils
@ 2009-07-29  7:53 Norbert van Bolhuis
  2009-08-09  7:31 ` Artem Bityutskiy
  0 siblings, 1 reply; 3+ messages in thread
From: Norbert van Bolhuis @ 2009-07-29  7:53 UTC (permalink / raw)
  To: linux-mtd


This happens with current git tree (git://git.infradead.org/mtd-utils.git)

building for HOST (i686, FC6) works fine.
cross compiling (for powerpc) fails because of this error:

/swdev/tools/linuxppc/gcc-4.2.4-glibc-2.7/powerpc-e300c3-linux/bin/powerpc-e300c3-linux-gcc -Iinclude -Isrc -I../include -D_FILE_OFFSET_BITS=64 -O2 -g -Wall -Wextra 
-Wwrite-strings -Wno-sign-compare -c -o 
/home/nvbolhuis/new_83xx_kernel/ubi_utilities3_cross/mtd-utils//swdev/tools/linuxppc/gcc-4.2.4-glibc-2.7/powerpc-e300c3-linux/bin/powerpc-e300c3-linux/ubi-utils/libubi.o 
src/libubi.c -g 
-Wp,-MD,/home/nvbolhuis/new_83xx_kernel/ubi_utilities3_cross/mtd-utils//swdev/tools/linuxppc/gcc-4.2.4-glibc-2.7/powerpc-e300c3-linux/bin/powerpc-e300c3-linux/ubi-utils/.libubi.c.dep
In file included from include/libubi.h:29,
                  from src/libubi.c:33:
../include/mtd/ubi-media.h:149: error: expected specifier-qualifier-list before '__be32'
../include/mtd/ubi-media.h:269: error: expected specifier-qualifier-list before '__be32'
../include/mtd/ubi-media.h:356: error: expected specifier-qualifier-list before '__be32'
make[1]: *** 
[/home/nvbolhuis/new_83xx_kernel/ubi_utilities3_cross/mtd-utils//swdev/tools/linuxppc/gcc-4.2.4-glibc-2.7/powerpc-e300c3-linux/bin/powerpc-e300c3-linux/ubi-utils/libubi.o] 
Error 1
make[1]: Leaving directory `/home/nvbolhuis/new_83xx_kernel/ubi_utilities3_cross/mtd-utils/ubi-utils'
make: *** [subdirs_ubi-utils_all] Error 2

To cross compile I set CROSS=/swdev/tools/linuxppc/gcc-4.2.4-glibc-2.7/powerpc-e300c3-linux/bin/powerpc-e300c3-linux-
and issued make in mtd-utils directory.

The problem is that my powerpc cross compiler (gcc-2.7) doesn't define __be32 (nor __be16 and __be64) in
the standard system headers
(/swdev/tools/linuxppc/gcc-4.2.4-glibc-2.7/powerpc-e300c3-linux/powerpc-e300c3-linux/sys-include/asm/types.h).

For the HOST build "/usr/include/linux/types.h" is used which does define __be64/__be32/__be16.

I guess mtd-utils/include/mtd/ubi-media.h should use __u64/__u32/__u16 ?

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

* Re: error cross compiling ubi-utils
  2009-07-29  7:53 error cross compiling ubi-utils Norbert van Bolhuis
@ 2009-08-09  7:31 ` Artem Bityutskiy
  2009-08-11 13:19   ` Norbert van Bolhuis
  0 siblings, 1 reply; 3+ messages in thread
From: Artem Bityutskiy @ 2009-08-09  7:31 UTC (permalink / raw)
  To: Norbert van Bolhuis; +Cc: linux-mtd

On 07/29/2009 10:53 AM, Norbert van Bolhuis wrote:
>
> This happens with current git tree (git://git.infradead.org/mtd-utils.git)
>
> building for HOST (i686, FC6) works fine.
> cross compiling (for powerpc) fails because of this error:
>
> /swdev/tools/linuxppc/gcc-4.2.4-glibc-2.7/powerpc-e300c3-linux/bin/powerpc-e300c3-linux-gcc
> -Iinclude -Isrc -I../include -D_FILE_OFFSET_BITS=64 -O2 -g -Wall -Wextra
> -Wwrite-strings -Wno-sign-compare -c -o
> /home/nvbolhuis/new_83xx_kernel/ubi_utilities3_cross/mtd-utils//swdev/tools/linuxppc/gcc-4.2.4-glibc-2.7/powerpc-e300c3-linux/bin/powerpc-e300c3-linux/ubi-utils/libubi.o
> src/libubi.c -g
> -Wp,-MD,/home/nvbolhuis/new_83xx_kernel/ubi_utilities3_cross/mtd-utils//swdev/tools/linuxppc/gcc-4.2.4-glibc-2.7/powerpc-e300c3-linux/bin/powerpc-e300c3-linux/ubi-utils/.libubi.c.dep
>
> In file included from include/libubi.h:29,
> from src/libubi.c:33:
> ../include/mtd/ubi-media.h:149: error: expected specifier-qualifier-list
> before '__be32'
> ../include/mtd/ubi-media.h:269: error: expected specifier-qualifier-list
> before '__be32'
> ../include/mtd/ubi-media.h:356: error: expected specifier-qualifier-list
> before '__be32'
> make[1]: ***
> [/home/nvbolhuis/new_83xx_kernel/ubi_utilities3_cross/mtd-utils//swdev/tools/linuxppc/gcc-4.2.4-glibc-2.7/powerpc-e300c3-linux/bin/powerpc-e300c3-linux/ubi-utils/libubi.o]
> Error 1
> make[1]: Leaving directory
> `/home/nvbolhuis/new_83xx_kernel/ubi_utilities3_cross/mtd-utils/ubi-utils'
> make: *** [subdirs_ubi-utils_all] Error 2
>
> To cross compile I set
> CROSS=/swdev/tools/linuxppc/gcc-4.2.4-glibc-2.7/powerpc-e300c3-linux/bin/powerpc-e300c3-linux-
>
> and issued make in mtd-utils directory.
>
> The problem is that my powerpc cross compiler (gcc-2.7) doesn't define
> __be32 (nor __be16 and __be64) in
> the standard system headers
> (/swdev/tools/linuxppc/gcc-4.2.4-glibc-2.7/powerpc-e300c3-linux/powerpc-e300c3-linux/sys-include/asm/types.h).
>
>
> For the HOST build "/usr/include/linux/types.h" is used which does
> define __be64/__be32/__be16.
>
> I guess mtd-utils/include/mtd/ubi-media.h should use __u64/__u32/__u16 ?

I believe new kernels export these types via their headers, and you just
have an old kernel. You could try to make mtd-utils be independent of
these types.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

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

* Re: error cross compiling ubi-utils
  2009-08-09  7:31 ` Artem Bityutskiy
@ 2009-08-11 13:19   ` Norbert van Bolhuis
  0 siblings, 0 replies; 3+ messages in thread
From: Norbert van Bolhuis @ 2009-08-11 13:19 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: linux-mtd

Artem Bityutskiy wrote:
>> I guess mtd-utils/include/mtd/ubi-media.h should use __u64/__u32/__u16 ?
> 
> I believe new kernels export these types via their headers, and you just
> have an old kernel. You could try to make mtd-utils be independent of
> these types.
> 


You're right.
I didn't realize my "../sys-include/asm/types.h" comes from
linux-libc-headers-2.6.12.0(/include/asm-ppc/types.h).
I guess I should've used more recent kernel headers when building my CDE.

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

end of thread, other threads:[~2009-08-11 13:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-29  7:53 error cross compiling ubi-utils Norbert van Bolhuis
2009-08-09  7:31 ` Artem Bityutskiy
2009-08-11 13:19   ` Norbert van Bolhuis

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