Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#10605 closed bug (no change required)

Building ARM cross-compiler fails on Haiku

Reported by: idefix Owned by: bonefish
Priority: normal Milestone: R1
Component: Build System Version: R1/Development
Keywords: arm binutils Cc:
Blocked By: Blocking: #10670
Platform: All

Description

Using the hrev46924 nightly image.

When building the ARM cross-compiler with ../configure --build-cross-tools arm ../../buildtools, it fails at:

source='dwarf2.c' object='dwarf2.lo' libtool=yes \
DEPDIR=.deps depmode=gcc /bin/sh /boot/home/Build/RaspberryPi/buildtools/binutils/bfd/../depcomp \
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I/boot/home/Build/RaspberryPi/buildtools/binutils/bfd -I. -I/boot/home/Build/RaspberryPi/buildtools/binutils/bfd -I/boot/home/Build/RaspberryPi/buildtools/binutils/bfd/../include  -DHAVE_bfd_elf32_littlearm_vec -DHAVE_bfd_elf32_bigarm_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -DHAVE_i386pe_vec -DHAVE_i386pei_vec -DHAVE_bfd_elf32_i386_vec -DHAVE_x86_64pe_vec -DHAVE_x86_64pei_vec -DHAVE_bfd_elf64_x86_64_vec -DHAVE_bfd_elf64_l1om_vec -DHAVE_bfd_elf64_k1om_vec -DHAVE_bfd_elf64_little_generic_vec -DHAVE_bfd_elf64_big_generic_vec  -DBINDIR='"/boot/home/Build/RaspberryPi/haiku/generated.arm/cross-tools-arm/bin"'  -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -O2 -c -o dwarf2.lo -DDEBUGDIR=\"/boot/home/Build/RaspberryPi/haiku/generated.arm/cross-tools-arm/lib/debug\" /boot/home/Build/RaspberryPi/buildtools/binutils/bfd/dwarf2.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/boot/home/Build/RaspberryPi/buildtools/binutils/bfd -I. -I/boot/home/Build/RaspberryPi/buildtools/binutils/bfd -I/boot/home/Build/RaspberryPi/buildtools/binutils/bfd/../include -DHAVE_bfd_elf32_littlearm_vec -DHAVE_bfd_elf32_bigarm_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -DHAVE_i386pe_vec -DHAVE_i386pei_vec -DHAVE_bfd_elf32_i386_vec -DHAVE_x86_64pe_vec -DHAVE_x86_64pei_vec -DHAVE_bfd_elf64_x86_64_vec -DHAVE_bfd_elf64_l1om_vec -DHAVE_bfd_elf64_k1om_vec -DHAVE_bfd_elf64_little_generic_vec -DHAVE_bfd_elf64_big_generic_vec -DBINDIR=\"/boot/home/Build/RaspberryPi/haiku/generated.arm/cross-tools-arm/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -O2 -c -DDEBUGDIR=\"/boot/home/Build/RaspberryPi/haiku/generated.arm/cross-tools-arm/lib/debug\" /boot/home/Build/RaspberryPi/buildtools/binutils/bfd/dwarf2.c -Wp,-MD,.deps/dwarf2.TPlo -o dwarf2.o
/boot/home/Build/RaspberryPi/buildtools/binutils/bfd/dwarf2.c: In function `_bfd_dwarf2_cleanup_debug_info':
/boot/home/Build/RaspberryPi/buildtools/binutils/bfd/dwarf2.c:3625: parse error before `struct'
/boot/home/Build/RaspberryPi/buildtools/binutils/bfd/dwarf2.c:3630: `each' undeclared (first use in this function)
/boot/home/Build/RaspberryPi/buildtools/binutils/bfd/dwarf2.c:3630: (Each undeclared identifier is reported only once
/boot/home/Build/RaspberryPi/buildtools/binutils/bfd/dwarf2.c:3630: for each function it appears in.)
make[4]: *** [dwarf2.lo] Error 1
make[4]: Leaving directory `/boot/home/Build/RaspberryPi/haiku/generated.arm/cross-tools-arm-build/binutils/bfd'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/boot/home/Build/RaspberryPi/haiku/generated.arm/cross-tools-arm-build/binutils/bfd'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/boot/home/Build/RaspberryPi/haiku/generated.arm/cross-tools-arm-build/binutils/bfd'
make[1]: *** [all-bfd] Error 2
make[1]: Leaving directory `/boot/home/Build/RaspberryPi/haiku/generated.arm/cross-tools-arm-build/binutils'
make: *** [all] Error 2

Looks like this was fixed upstream.

Is it possible to update our binutils?

Change History (4)

comment:1 by korli, 11 years ago

That would mean binutils-2_24. It's possible but would imply updating related packages.

Did you test this update yet?

comment:2 by korli, 11 years ago

It's also possible to fix just this issue for the time being.

comment:3 by pulkomandy, 11 years ago

Resolution: no change required
Status: newclosed

You can't build gcc4 using gcc2. To build the ARM build tools, you must set yourself in a "setarch x86" environment.

However, to build Haiku using the ARM toolchain, you need to use gcc2, otherwise the generated tools for haiku_host won't work. Here is a procedure that should work: https://gist.github.com/pulkomandy/9162826

Note that bootstrapping Haiku on Haiku isn't supported, and will crash. But building the ARM toolchain works.

comment:4 by pulkomandy, 11 years ago

Blocking: 10670 added
Note: See TracTickets for help on using tickets.