Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Problems building for ucLinux/ARM with elf2flt enabled
@ 2013-07-24 10:02 Anna Fischer
  2013-07-24 10:40 ` Thomas De Schampheleire
  0 siblings, 1 reply; 9+ messages in thread
From: Anna Fischer @ 2013-07-24 10:02 UTC (permalink / raw)
  To: buildroot

I'm trying to build a ucLinux system for an ARM platform (no-MMU), but when trying to enabled elf2flt in the menuconfig I get the following error:

/home/buildroot-2013.05/output/build/host-binutils-2.21.1/bfd/libbfd.a(compress.o): In function `bfd_compress_section_contents':
compress.c:(.text+0x25): undefined reference to `compressBound'
/home//buildroot-2013.05/output/build/host-binutils-2.21.1/bfd/libbfd.a(compress.o): In function `bfd_get_full_section_contents':
compress.c:(.text+0x226): undefined reference to `inflateEnd'
compress.c:(.text+0x37a): undefined reference to `inflateInit_'
compress.c:(.text+0x3b0): undefined reference to `inflate'
compress.c:(.text+0x3bf): undefined reference to `inflateReset'
collect2: ld returned 1 exit status
make[1]: *** [elf2flt] Error 1
make[1]: Leaving directory `/home/buildroot-2013.05/output/toolchain/elf2flt'
make: *** [/home/buildroot-2013.05/output/toolchain/elf2flt/elf2flt] Error 2

It seems like it is missing libz? But I don't quite understand why, because I definitely have it installed on the system. Anyone ever seen this before?

I'm using the buildroot internal toolchain, uClibc-0.9.33.2, gcc-4.7.3, linux-3.8, and this is buildroot-2013.05. I have attached my .config as well. My build host is Ubuntu 64-bit.

Thanks for any pointers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: buildroot.config
Type: application/octet-stream
Size: 32645 bytes
Desc: buildroot.config
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130724/4ec04577/attachment-0001.obj>

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

* [Buildroot] Problems building for ucLinux/ARM with elf2flt enabled
  2013-07-24 10:02 [Buildroot] Problems building for ucLinux/ARM with elf2flt enabled Anna Fischer
@ 2013-07-24 10:40 ` Thomas De Schampheleire
  2013-07-24 11:39   ` Anna Fischer
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas De Schampheleire @ 2013-07-24 10:40 UTC (permalink / raw)
  To: buildroot

Hi Anna,

On Wed, Jul 24, 2013 at 12:02 PM, Anna Fischer (novero/Bochum)
<Anna.Fischer@novero.com> wrote:
> I'm trying to build a ucLinux system for an ARM platform (no-MMU), but when trying to enabled elf2flt in the menuconfig I get the following error:
>
> /home/buildroot-2013.05/output/build/host-binutils-2.21.1/bfd/libbfd.a(compress.o): In function `bfd_compress_section_contents':
> compress.c:(.text+0x25): undefined reference to `compressBound'
> /home//buildroot-2013.05/output/build/host-binutils-2.21.1/bfd/libbfd.a(compress.o): In function `bfd_get_full_section_contents':
> compress.c:(.text+0x226): undefined reference to `inflateEnd'
> compress.c:(.text+0x37a): undefined reference to `inflateInit_'
> compress.c:(.text+0x3b0): undefined reference to `inflate'
> compress.c:(.text+0x3bf): undefined reference to `inflateReset'
> collect2: ld returned 1 exit status
> make[1]: *** [elf2flt] Error 1
> make[1]: Leaving directory `/home/buildroot-2013.05/output/toolchain/elf2flt'
> make: *** [/home/buildroot-2013.05/output/toolchain/elf2flt/elf2flt] Error 2
>
> It seems like it is missing libz? But I don't quite understand why, because I definitely have it installed on the system. Anyone ever seen this before?
>
> I'm using the buildroot internal toolchain, uClibc-0.9.33.2, gcc-4.7.3, linux-3.8, and this is buildroot-2013.05. I have attached my .config as well. My build host is Ubuntu 64-bit.

Do you have the -dev package of zlib? Also for 64-bit?

On a CentOS system, I have seen a problem with the static version of
zlib missing, when building a static toolchain with crosstool-ng. On
CentOS, the static version (libz.a) is distributed as a separate
package. I don't know if this is the case on your system.

Best regards,
Thomas

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

* [Buildroot] Problems building for ucLinux/ARM with elf2flt enabled
  2013-07-24 10:40 ` Thomas De Schampheleire
@ 2013-07-24 11:39   ` Anna Fischer
  2013-07-24 11:50     ` Thomas De Schampheleire
  0 siblings, 1 reply; 9+ messages in thread
From: Anna Fischer @ 2013-07-24 11:39 UTC (permalink / raw)
  To: buildroot

> Subject: Re: [Buildroot] Problems building for ucLinux/ARM with elf2flt
> enabled
> 
> Hi Anna,
> 
> On Wed, Jul 24, 2013 at 12:02 PM, Anna Fischer (novero/Bochum)
> <Anna.Fischer@novero.com> wrote:
> > I'm trying to build a ucLinux system for an ARM platform (no-MMU),
> but when trying to enabled elf2flt in the menuconfig I get the
> following error:
> >
> > /home/buildroot-2013.05/output/build/host-binutils-
> 2.21.1/bfd/libbfd.a(compress.o): In function
> `bfd_compress_section_contents':
> > compress.c:(.text+0x25): undefined reference to `compressBound'
> > /home//buildroot-2013.05/output/build/host-binutils-
> 2.21.1/bfd/libbfd.a(compress.o): In function
> `bfd_get_full_section_contents':
> > compress.c:(.text+0x226): undefined reference to `inflateEnd'
> > compress.c:(.text+0x37a): undefined reference to `inflateInit_'
> > compress.c:(.text+0x3b0): undefined reference to `inflate'
> > compress.c:(.text+0x3bf): undefined reference to `inflateReset'
> > collect2: ld returned 1 exit status
> > make[1]: *** [elf2flt] Error 1
> > make[1]: Leaving directory `/home/buildroot-
> 2013.05/output/toolchain/elf2flt'
> > make: *** [/home/buildroot-2013.05/output/toolchain/elf2flt/elf2flt]
> > Error 2
> >
> > It seems like it is missing libz? But I don't quite understand why,
> because I definitely have it installed on the system. Anyone ever seen
> this before?
> >
> > I'm using the buildroot internal toolchain, uClibc-0.9.33.2, gcc-
> 4.7.3, linux-3.8, and this is buildroot-2013.05. I have attached my
> .config as well. My build host is Ubuntu 64-bit.
> 
> Do you have the -dev package of zlib? Also for 64-bit?
> 
> On a CentOS system, I have seen a problem with the static version of
> zlib missing, when building a static toolchain with crosstool-ng. On
> CentOS, the static version (libz.a) is distributed as a separate
> package. I don't know if this is the case on your system.

libz.a and libz.so are installed in output/host/usr/lib in the buildroot system, so apart from the fact that I have it installed as part of my Ubuntu distribution (yes, I have the -dev package installed), it is present in the buildroot output directory. The elf2flt Makefile also references this folder in LDFLAGS. It is not clear to me though if the problem is in elf2flt or in the binutils itself under build/host-binutils-2.21.1/bfd (as referenced by the error message I printed out above)?

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

* [Buildroot] Problems building for ucLinux/ARM with elf2flt enabled
  2013-07-24 11:39   ` Anna Fischer
@ 2013-07-24 11:50     ` Thomas De Schampheleire
  2013-07-24 12:05       ` Anna Fischer
  2013-07-25  9:45       ` Anna Fischer
  0 siblings, 2 replies; 9+ messages in thread
From: Thomas De Schampheleire @ 2013-07-24 11:50 UTC (permalink / raw)
  To: buildroot

On Wed, Jul 24, 2013 at 1:39 PM, Anna Fischer (novero/Bochum)
<Anna.Fischer@novero.com> wrote:
>> Subject: Re: [Buildroot] Problems building for ucLinux/ARM with elf2flt
>> enabled
>>
>> Hi Anna,
>>
>> On Wed, Jul 24, 2013 at 12:02 PM, Anna Fischer (novero/Bochum)
>> <Anna.Fischer@novero.com> wrote:
>> > I'm trying to build a ucLinux system for an ARM platform (no-MMU),
>> but when trying to enabled elf2flt in the menuconfig I get the
>> following error:
>> >
>> > /home/buildroot-2013.05/output/build/host-binutils-
>> 2.21.1/bfd/libbfd.a(compress.o): In function
>> `bfd_compress_section_contents':
>> > compress.c:(.text+0x25): undefined reference to `compressBound'
>> > /home//buildroot-2013.05/output/build/host-binutils-
>> 2.21.1/bfd/libbfd.a(compress.o): In function
>> `bfd_get_full_section_contents':
>> > compress.c:(.text+0x226): undefined reference to `inflateEnd'
>> > compress.c:(.text+0x37a): undefined reference to `inflateInit_'
>> > compress.c:(.text+0x3b0): undefined reference to `inflate'
>> > compress.c:(.text+0x3bf): undefined reference to `inflateReset'
>> > collect2: ld returned 1 exit status
>> > make[1]: *** [elf2flt] Error 1
>> > make[1]: Leaving directory `/home/buildroot-
>> 2013.05/output/toolchain/elf2flt'
>> > make: *** [/home/buildroot-2013.05/output/toolchain/elf2flt/elf2flt]
>> > Error 2
>> >
>> > It seems like it is missing libz? But I don't quite understand why,
>> because I definitely have it installed on the system. Anyone ever seen
>> this before?
>> >
>> > I'm using the buildroot internal toolchain, uClibc-0.9.33.2, gcc-
>> 4.7.3, linux-3.8, and this is buildroot-2013.05. I have attached my
>> .config as well. My build host is Ubuntu 64-bit.
>>
>> Do you have the -dev package of zlib? Also for 64-bit?
>>
>> On a CentOS system, I have seen a problem with the static version of
>> zlib missing, when building a static toolchain with crosstool-ng. On
>> CentOS, the static version (libz.a) is distributed as a separate
>> package. I don't know if this is the case on your system.
>
> libz.a and libz.so are installed in output/host/usr/lib in the buildroot system, so apart from the fact that I have it installed as part of my Ubuntu distribution (yes, I have the -dev package installed), it is present in the buildroot output directory. The elf2flt Makefile also references this folder in LDFLAGS. It is not clear to me though if the problem is in elf2flt or in the binutils itself under build/host-binutils-2.21.1/bfd (as referenced by the error message I printed out above)?

Where exactly can you find libz in output/ ?
Since the error is in a host package, there should be such files in output/host/
Any libz files in output/staging are irrelevant, as these are for the
target, not for the host.

If there is no libz in output/host, there may be a missing dependency
to host-zlib in binutils. You could verify this by running 'make
host-zlib' manually first, and then retrying the binutils build.

Best regards,
Thomas

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

* [Buildroot] Problems building for ucLinux/ARM with elf2flt enabled
  2013-07-24 11:50     ` Thomas De Schampheleire
@ 2013-07-24 12:05       ` Anna Fischer
  2013-07-25  9:45       ` Anna Fischer
  1 sibling, 0 replies; 9+ messages in thread
From: Anna Fischer @ 2013-07-24 12:05 UTC (permalink / raw)
  To: buildroot

> Subject: Re: [Buildroot] Problems building for ucLinux/ARM with elf2flt
> enabled
> 
> On Wed, Jul 24, 2013 at 1:39 PM, Anna Fischer (novero/Bochum)
> <Anna.Fischer@novero.com> wrote:
> >> Subject: Re: [Buildroot] Problems building for ucLinux/ARM with
> >> elf2flt enabled
> >>
> >> Hi Anna,
> >>
> >> On Wed, Jul 24, 2013 at 12:02 PM, Anna Fischer (novero/Bochum)
> >> <Anna.Fischer@novero.com> wrote:
> >> > I'm trying to build a ucLinux system for an ARM platform (no-MMU),
> >> but when trying to enabled elf2flt in the menuconfig I get the
> >> following error:
> >> >
> >> > /home/buildroot-2013.05/output/build/host-binutils-
> >> 2.21.1/bfd/libbfd.a(compress.o): In function
> >> `bfd_compress_section_contents':
> >> > compress.c:(.text+0x25): undefined reference to `compressBound'
> >> > /home//buildroot-2013.05/output/build/host-binutils-
> >> 2.21.1/bfd/libbfd.a(compress.o): In function
> >> `bfd_get_full_section_contents':
> >> > compress.c:(.text+0x226): undefined reference to `inflateEnd'
> >> > compress.c:(.text+0x37a): undefined reference to `inflateInit_'
> >> > compress.c:(.text+0x3b0): undefined reference to `inflate'
> >> > compress.c:(.text+0x3bf): undefined reference to `inflateReset'
> >> > collect2: ld returned 1 exit status
> >> > make[1]: *** [elf2flt] Error 1
> >> > make[1]: Leaving directory `/home/buildroot-
> >> 2013.05/output/toolchain/elf2flt'
> >> > make: ***
> >> > [/home/buildroot-2013.05/output/toolchain/elf2flt/elf2flt]
> >> > Error 2
> >> >
> >> > It seems like it is missing libz? But I don't quite understand
> why,
> >> because I definitely have it installed on the system. Anyone ever
> >> seen this before?
> >> >
> >> > I'm using the buildroot internal toolchain, uClibc-0.9.33.2, gcc-
> >> 4.7.3, linux-3.8, and this is buildroot-2013.05. I have attached my
> >> .config as well. My build host is Ubuntu 64-bit.
> >>
> >> Do you have the -dev package of zlib? Also for 64-bit?
> >>
> >> On a CentOS system, I have seen a problem with the static version of
> >> zlib missing, when building a static toolchain with crosstool-ng. On
> >> CentOS, the static version (libz.a) is distributed as a separate
> >> package. I don't know if this is the case on your system.
> >
> > libz.a and libz.so are installed in output/host/usr/lib in the
> buildroot system, so apart from the fact that I have it installed as
> part of my Ubuntu distribution (yes, I have the -dev package
> installed), it is present in the buildroot output directory. The
> elf2flt Makefile also references this folder in LDFLAGS. It is not
> clear to me though if the problem is in elf2flt or in the binutils
> itself under build/host-binutils-2.21.1/bfd (as referenced by the error
> message I printed out above)?
> 
> Where exactly can you find libz in output/ ?

As I said in output/host/usr/lib/libz.*


> Since the error is in a host package, there should be such files in
> output/host/ Any libz files in output/staging are irrelevant, as these
> are for the target, not for the host.

The libraries are there, but I still get the error.

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

* [Buildroot] Problems building for ucLinux/ARM with elf2flt enabled
  2013-07-24 11:50     ` Thomas De Schampheleire
  2013-07-24 12:05       ` Anna Fischer
@ 2013-07-25  9:45       ` Anna Fischer
  2013-07-25 10:03         ` Thomas De Schampheleire
  1 sibling, 1 reply; 9+ messages in thread
From: Anna Fischer @ 2013-07-25  9:45 UTC (permalink / raw)
  To: buildroot

> Subject: Re: [Buildroot] Problems building for ucLinux/ARM with elf2flt
> enabled
> 
> On Wed, Jul 24, 2013 at 1:39 PM, Anna Fischer (novero/Bochum)
> <Anna.Fischer@novero.com> wrote:
> >> Subject: Re: [Buildroot] Problems building for ucLinux/ARM with
> >> elf2flt enabled
> >>
> >> Hi Anna,
> >>
> >> On Wed, Jul 24, 2013 at 12:02 PM, Anna Fischer (novero/Bochum)
> >> <Anna.Fischer@novero.com> wrote:
> >> > I'm trying to build a ucLinux system for an ARM platform (no-MMU),
> >> but when trying to enabled elf2flt in the menuconfig I get the
> >> following error:
> >> >
> >> > /home/buildroot-2013.05/output/build/host-binutils-
> >> 2.21.1/bfd/libbfd.a(compress.o): In function
> >> `bfd_compress_section_contents':
> >> > compress.c:(.text+0x25): undefined reference to `compressBound'
> >> > /home//buildroot-2013.05/output/build/host-binutils-
> >> 2.21.1/bfd/libbfd.a(compress.o): In function
> >> `bfd_get_full_section_contents':
> >> > compress.c:(.text+0x226): undefined reference to `inflateEnd'
> >> > compress.c:(.text+0x37a): undefined reference to `inflateInit_'
> >> > compress.c:(.text+0x3b0): undefined reference to `inflate'
> >> > compress.c:(.text+0x3bf): undefined reference to `inflateReset'
> >> > collect2: ld returned 1 exit status
> >> > make[1]: *** [elf2flt] Error 1
> >> > make[1]: Leaving directory `/home/buildroot-
> >> 2013.05/output/toolchain/elf2flt'
> >> > make: ***
> >> > [/home/buildroot-2013.05/output/toolchain/elf2flt/elf2flt]
> >> > Error 2
> >> >
> >> > It seems like it is missing libz? But I don't quite understand
> why,
> >> because I definitely have it installed on the system. Anyone ever
> >> seen this before?
> >> >
> >> > I'm using the buildroot internal toolchain, uClibc-0.9.33.2, gcc-
> >> 4.7.3, linux-3.8, and this is buildroot-2013.05. I have attached my
> >> .config as well. My build host is Ubuntu 64-bit.
> >>
> >> Do you have the -dev package of zlib? Also for 64-bit?
> >>
> >> On a CentOS system, I have seen a problem with the static version of
> >> zlib missing, when building a static toolchain with crosstool-ng. On
> >> CentOS, the static version (libz.a) is distributed as a separate
> >> package. I don't know if this is the case on your system.
> >
> > libz.a and libz.so are installed in output/host/usr/lib in the
> buildroot system, so apart from the fact that I have it installed as
> part of my Ubuntu distribution (yes, I have the -dev package
> installed), it is present in the buildroot output directory. The
> elf2flt Makefile also references this folder in LDFLAGS. It is not
> clear to me though if the problem is in elf2flt or in the binutils
> itself under build/host-binutils-2.21.1/bfd (as referenced by the error
> message I printed out above)?
> 
> Where exactly can you find libz in output/ ?
> Since the error is in a host package, there should be such files in
> output/host/ Any libz files in output/staging are irrelevant, as these
> are for the target, not for the host.
> 
> If there is no libz in output/host, there may be a missing dependency
> to host-zlib in binutils. You could verify this by running 'make host-
> zlib' manually first, and then retrying the binutils build.

I have fixed the problem now by adding the -lz to the end of the gcc command in the elf2flt Makefile. 
Now the whole system builds without errors.

However, in the target folder I'm still getting ELF files compiled, not FLAT format binaries. Is there any way I can tell the build system to change the binary format to FLAT by using the elf2flt tool at the end of each build process for binaries (or by adding -elf2flt to the build command)? I was hoping that by enabling elf2flt support it would do that automatically for target binaries.

Any pointers would be really appreciated.

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

* [Buildroot] Problems building for ucLinux/ARM with elf2flt enabled
  2013-07-25  9:45       ` Anna Fischer
@ 2013-07-25 10:03         ` Thomas De Schampheleire
  2013-07-25 10:13           ` Anna Fischer
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas De Schampheleire @ 2013-07-25 10:03 UTC (permalink / raw)
  To: buildroot

On Thu, Jul 25, 2013 at 11:45 AM, Anna Fischer (novero/Bochum)
<Anna.Fischer@novero.com> wrote:
>> Subject: Re: [Buildroot] Problems building for ucLinux/ARM with elf2flt
>> enabled
>>
>> On Wed, Jul 24, 2013 at 1:39 PM, Anna Fischer (novero/Bochum)
>> <Anna.Fischer@novero.com> wrote:
>> >> Subject: Re: [Buildroot] Problems building for ucLinux/ARM with
>> >> elf2flt enabled
>> >>
>> >> Hi Anna,
>> >>
>> >> On Wed, Jul 24, 2013 at 12:02 PM, Anna Fischer (novero/Bochum)
>> >> <Anna.Fischer@novero.com> wrote:
>> >> > I'm trying to build a ucLinux system for an ARM platform (no-MMU),
>> >> but when trying to enabled elf2flt in the menuconfig I get the
>> >> following error:
>> >> >
>> >> > /home/buildroot-2013.05/output/build/host-binutils-
>> >> 2.21.1/bfd/libbfd.a(compress.o): In function
>> >> `bfd_compress_section_contents':
>> >> > compress.c:(.text+0x25): undefined reference to `compressBound'
>> >> > /home//buildroot-2013.05/output/build/host-binutils-
>> >> 2.21.1/bfd/libbfd.a(compress.o): In function
>> >> `bfd_get_full_section_contents':
>> >> > compress.c:(.text+0x226): undefined reference to `inflateEnd'
>> >> > compress.c:(.text+0x37a): undefined reference to `inflateInit_'
>> >> > compress.c:(.text+0x3b0): undefined reference to `inflate'
>> >> > compress.c:(.text+0x3bf): undefined reference to `inflateReset'
>> >> > collect2: ld returned 1 exit status
>> >> > make[1]: *** [elf2flt] Error 1
>> >> > make[1]: Leaving directory `/home/buildroot-
>> >> 2013.05/output/toolchain/elf2flt'
>> >> > make: ***
>> >> > [/home/buildroot-2013.05/output/toolchain/elf2flt/elf2flt]
>> >> > Error 2
>> >> >
>> >> > It seems like it is missing libz? But I don't quite understand
>> why,
>> >> because I definitely have it installed on the system. Anyone ever
>> >> seen this before?
>> >> >
>> >> > I'm using the buildroot internal toolchain, uClibc-0.9.33.2, gcc-
>> >> 4.7.3, linux-3.8, and this is buildroot-2013.05. I have attached my
>> >> .config as well. My build host is Ubuntu 64-bit.
>> >>
>> >> Do you have the -dev package of zlib? Also for 64-bit?
>> >>
>> >> On a CentOS system, I have seen a problem with the static version of
>> >> zlib missing, when building a static toolchain with crosstool-ng. On
>> >> CentOS, the static version (libz.a) is distributed as a separate
>> >> package. I don't know if this is the case on your system.
>> >
>> > libz.a and libz.so are installed in output/host/usr/lib in the
>> buildroot system, so apart from the fact that I have it installed as
>> part of my Ubuntu distribution (yes, I have the -dev package
>> installed), it is present in the buildroot output directory. The
>> elf2flt Makefile also references this folder in LDFLAGS. It is not
>> clear to me though if the problem is in elf2flt or in the binutils
>> itself under build/host-binutils-2.21.1/bfd (as referenced by the error
>> message I printed out above)?
>>
>> Where exactly can you find libz in output/ ?
>> Since the error is in a host package, there should be such files in
>> output/host/ Any libz files in output/staging are irrelevant, as these
>> are for the target, not for the host.
>>
>> If there is no libz in output/host, there may be a missing dependency
>> to host-zlib in binutils. You could verify this by running 'make host-
>> zlib' manually first, and then retrying the binutils build.
>
> I have fixed the problem now by adding the -lz to the end of the gcc command in the elf2flt Makefile.
> Now the whole system builds without errors.
>
> However, in the target folder I'm still getting ELF files compiled, not FLAT format binaries. Is there any way I can tell the build system to change the binary format to FLAT by using the elf2flt tool at the end of each build process for binaries (or by adding -elf2flt to the build command)? I was hoping that by enabling elf2flt support it would do that automatically for target binaries.
>
> Any pointers would be really appreciated.

I'm afraid I'm not the person to help you here, I don't have any
experience with flat binaries in buildroot.
Others may be better suited. Thomas Petazzoni maybe?

Best regards,
Thomas

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

* [Buildroot] Problems building for ucLinux/ARM with elf2flt enabled
  2013-07-25 10:03         ` Thomas De Schampheleire
@ 2013-07-25 10:13           ` Anna Fischer
  2013-07-25 13:11             ` Gustavo Zacarias
  0 siblings, 1 reply; 9+ messages in thread
From: Anna Fischer @ 2013-07-25 10:13 UTC (permalink / raw)
  To: buildroot

> Subject: Re: [Buildroot] Problems building for ucLinux/ARM with elf2flt
> enabled
> 
> On Thu, Jul 25, 2013 at 11:45 AM, Anna Fischer (novero/Bochum)
> <Anna.Fischer@novero.com> wrote:
> >> Subject: Re: [Buildroot] Problems building for ucLinux/ARM with
> >> elf2flt enabled
> >>
> >> On Wed, Jul 24, 2013 at 1:39 PM, Anna Fischer (novero/Bochum)
> >> <Anna.Fischer@novero.com> wrote:
> >> >> Subject: Re: [Buildroot] Problems building for ucLinux/ARM with
> >> >> elf2flt enabled
> >> >>
> >> >> Hi Anna,
> >> >>
> >> >> On Wed, Jul 24, 2013 at 12:02 PM, Anna Fischer (novero/Bochum)
> >> >> <Anna.Fischer@novero.com> wrote:
> >> >> > I'm trying to build a ucLinux system for an ARM platform
> >> >> > (no-MMU),
> >> >> but when trying to enabled elf2flt in the menuconfig I get the
> >> >> following error:
> >> >> >
> >> >> > /home/buildroot-2013.05/output/build/host-binutils-
> >> >> 2.21.1/bfd/libbfd.a(compress.o): In function
> >> >> `bfd_compress_section_contents':
> >> >> > compress.c:(.text+0x25): undefined reference to `compressBound'
> >> >> > /home//buildroot-2013.05/output/build/host-binutils-
> >> >> 2.21.1/bfd/libbfd.a(compress.o): In function
> >> >> `bfd_get_full_section_contents':
> >> >> > compress.c:(.text+0x226): undefined reference to `inflateEnd'
> >> >> > compress.c:(.text+0x37a): undefined reference to `inflateInit_'
> >> >> > compress.c:(.text+0x3b0): undefined reference to `inflate'
> >> >> > compress.c:(.text+0x3bf): undefined reference to `inflateReset'
> >> >> > collect2: ld returned 1 exit status
> >> >> > make[1]: *** [elf2flt] Error 1
> >> >> > make[1]: Leaving directory `/home/buildroot-
> >> >> 2013.05/output/toolchain/elf2flt'
> >> >> > make: ***
> >> >> > [/home/buildroot-2013.05/output/toolchain/elf2flt/elf2flt]
> >> >> > Error 2
> >> >> >
> >> >> > It seems like it is missing libz? But I don't quite understand
> >> why,
> >> >> because I definitely have it installed on the system. Anyone ever
> >> >> seen this before?
> >> >> >
> >> >> > I'm using the buildroot internal toolchain, uClibc-0.9.33.2,
> >> >> > gcc-
> >> >> 4.7.3, linux-3.8, and this is buildroot-2013.05. I have attached
> >> >> my .config as well. My build host is Ubuntu 64-bit.
> >> >>
> >> >> Do you have the -dev package of zlib? Also for 64-bit?
> >> >>
> >> >> On a CentOS system, I have seen a problem with the static version
> >> >> of zlib missing, when building a static toolchain with
> >> >> crosstool-ng. On CentOS, the static version (libz.a) is
> >> >> distributed as a separate package. I don't know if this is the
> case on your system.
> >> >
> >> > libz.a and libz.so are installed in output/host/usr/lib in the
> >> buildroot system, so apart from the fact that I have it installed as
> >> part of my Ubuntu distribution (yes, I have the -dev package
> >> installed), it is present in the buildroot output directory. The
> >> elf2flt Makefile also references this folder in LDFLAGS. It is not
> >> clear to me though if the problem is in elf2flt or in the binutils
> >> itself under build/host-binutils-2.21.1/bfd (as referenced by the
> >> error message I printed out above)?
> >>
> >> Where exactly can you find libz in output/ ?
> >> Since the error is in a host package, there should be such files in
> >> output/host/ Any libz files in output/staging are irrelevant, as
> >> these are for the target, not for the host.
> >>
> >> If there is no libz in output/host, there may be a missing
> dependency
> >> to host-zlib in binutils. You could verify this by running 'make
> >> host- zlib' manually first, and then retrying the binutils build.
> >
> > I have fixed the problem now by adding the -lz to the end of the gcc
> command in the elf2flt Makefile.
> > Now the whole system builds without errors.
> >
> > However, in the target folder I'm still getting ELF files compiled,
> not FLAT format binaries. Is there any way I can tell the build system
> to change the binary format to FLAT by using the elf2flt tool at the
> end of each build process for binaries (or by adding -elf2flt to the
> build command)? I was hoping that by enabling elf2flt support it would
> do that automatically for target binaries.
> >
> > Any pointers would be really appreciated.
> 
> I'm afraid I'm not the person to help you here, I don't have any
> experience with flat binaries in buildroot.
> Others may be better suited. Thomas Petazzoni maybe?
> 

It seems as if by default FLAT binaries are not supported for the ARM architecture. It is only supported for Blackfin devices and m68k. Choosing the target binary format is disabled in by configuration because I use an ARM device.

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

* [Buildroot] Problems building for ucLinux/ARM with elf2flt enabled
  2013-07-25 10:13           ` Anna Fischer
@ 2013-07-25 13:11             ` Gustavo Zacarias
  0 siblings, 0 replies; 9+ messages in thread
From: Gustavo Zacarias @ 2013-07-25 13:11 UTC (permalink / raw)
  To: buildroot

On 07/25/2013 07:13 AM, Anna Fischer (novero/Bochum) wrote:
>>> Any pointers would be really appreciated.
>>
>> I'm afraid I'm not the person to help you here, I don't have any
>> experience with flat binaries in buildroot.
>> Others may be better suited. Thomas Petazzoni maybe?
>>
> 
> It seems as if by default FLAT binaries are not supported for the ARM architecture. It is only supported for Blackfin devices and m68k. Choosing the target binary format is disabled in by configuration because I use an ARM device.

The ARM nommu internal toolchain needs some work, similar to the
patchset i've sent for blackfin fixes.
For starters the tuple is wrong, it should be *-uclinux-* (instead of
*-linux-*) in package/Makefile.in
And there are other details regarding uclibc configuration for example
to fix.
It would probably be a good idea to add M-series and R-series cortex cpu
definitions too since those are the most likely to be used for nommu.
I'm looking into it but i make no promises, i lack hardware to test this
and qemu doesn't emulate anything useful regarding it.
Regards.

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

end of thread, other threads:[~2013-07-25 13:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-24 10:02 [Buildroot] Problems building for ucLinux/ARM with elf2flt enabled Anna Fischer
2013-07-24 10:40 ` Thomas De Schampheleire
2013-07-24 11:39   ` Anna Fischer
2013-07-24 11:50     ` Thomas De Schampheleire
2013-07-24 12:05       ` Anna Fischer
2013-07-25  9:45       ` Anna Fischer
2013-07-25 10:03         ` Thomas De Schampheleire
2013-07-25 10:13           ` Anna Fischer
2013-07-25 13:11             ` Gustavo Zacarias

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox