GCC Cross compiler binutils problem

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
JayMay
Posts: 8
Joined: Sun May 30, 2010 8:49 am

GCC Cross compiler binutils problem

Post by JayMay »

Noob here. I already proved I was a noob by downloading the wrong binutils. I expect this to be something similarly stupid on my part. Following the wiki on GCC cross-compilers, i get to the 'make all' command under binutils. Here are my errors:

Code: Select all

./elf32-target.h:487: warning: implicit declaration of function `boolean'
./elf32-target.h:487: error: parse error before ')' token
./elf32-target.h:487: error: initializer element is not constant
./elf32-target.h:487: error: (near initialization for `bfd_elf32_i386_vec._bfd_c
opy_private_bfd_data')
./elf32-target.h:487: error: parse error before ')' token
./elf32-target.h:487: error: initializer element is not constant
./elf32-target.h:487: error: (near initialization for `bfd_elf32_i386_vec._bfd_m
erge_private_bfd_data')
./elf32-target.h:487: error: `bfd_elf32_bfd_copy_private_header_data' undeclared
 here (not in a function)
./elf32-target.h:487: error: initializer element is not constant
./elf32-target.h:487: error: (near initialization for `bfd_elf32_i386_vec._bfd_c
opy_private_header_data')
./elf32-target.h:487: error: parse error before ')' token
./elf32-target.h:487: error: initializer element is not constant
./elf32-target.h:487: error: (near initialization for `bfd_elf32_i386_vec._bfd_s
et_private_flags')
./elf32-target.h:494: error: `bfd_elf32_canonicalize_symtab' undeclared here (no
t in a function)
./elf32-target.h:494: error: initializer element is not constant
./elf32-target.h:494: error: (near initialization for `bfd_elf32_i386_vec._bfd_c
anonicalize_symtab')
./elf32-target.h:494: error: `bfd_elf32_print_symbol' undeclared here (not in a
function)
./elf32-target.h:494: error: initializer element is not constant
./elf32-target.h:494: error: (near initialization for `bfd_elf32_i386_vec._bfd_p
rint_symbol')
./elf32-target.h:494: error: `bfd_elf32_bfd_is_target_special_symbol' undeclared
 here (not in a function)
./elf32-target.h:494: error: initializer element is not constant
./elf32-target.h:494: error: (near initialization for `bfd_elf32_i386_vec._bfd_i
s_target_special_symbol')
./elf32-target.h:494: error: `bfd_elf32_find_inliner_info' undeclared here (not
in a function)
./elf32-target.h:494: error: initializer element is not constant
./elf32-target.h:494: error: (near initialization for `bfd_elf32_i386_vec._bfd_f
ind_inliner_info')
./elf32-target.h:497: error: `bfd_elf32_bfd_link_add_symbols' undeclared here (n
ot in a function)
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_vec._bfd_l
ink_add_symbols')
./elf32-target.h:497: error: `bfd_elf32_bfd_link_just_syms' undeclared here (not
 in a function)
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_vec._bfd_l
ink_just_syms')
./elf32-target.h:497: error: `bfd_elf32_bfd_final_link' undeclared here (not in
a function)
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_vec._bfd_f
inal_link')
./elf32-target.h:497: error: `bfd_elf32_bfd_gc_sections' undeclared here (not in
 a function)
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_vec._bfd_g
c_sections')
./elf32-target.h:497: error: `bfd_elf32_bfd_merge_sections' undeclared here (not
 in a function)
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_vec._bfd_m
erge_sections')
./elf32-target.h:497: error: `bfd_elf32_bfd_is_group_section' undeclared here (n
ot in a function)
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_vec._bfd_i
s_group_section')
./elf32-target.h:497: error: `bfd_elf32_bfd_discard_group' undeclared here (not
in a function)
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_vec._bfd_d
iscard_group')
./elf32-target.h:497: error: `bfd_elf32_section_already_linked' undeclared here
(not in a function)
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_vec._secti
on_already_linked')
./elf32-target.h:497: error: `bfd_elf32_bfd_define_common_symbol' undeclared her
e (not in a function)
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_vec._bfd_d
efine_common_symbol')
./elf32-target.h:498: error: `bfd_elf32_get_synthetic_symtab' undeclared here (n
ot in a function)
./elf32-target.h:498: error: initializer element is not constant
./elf32-target.h:498: error: (near initialization for `bfd_elf32_i386_vec._bfd_g
et_synthetic_symtab')
./elf32-target.h:502: warning: missing initializer
./elf32-target.h:502: warning: (near initialization for `bfd_elf32_i386_vec.back
end_data')
In file included from ../../binutils-2.20.1/bfd/elf32-i386.c:4676:
./elf32-target.h:291: error: initializer element is not constant
./elf32-target.h:291: error: (near initialization for `elf32_i386_fbsd_bed.minpa
gesize')
./elf32-target.h:292: error: initializer element is not constant
./elf32-target.h:292: error: (near initialization for `elf32_i386_fbsd_bed.commo
npagesize')
./elf32-target.h:293: warning: initialization makes integer from pointer without
 a cast
./elf32-target.h:301: warning: initialization from incompatible pointer type
./elf32-target.h:305: warning: initialization from incompatible pointer type
./elf32-target.h:306: warning: initialization from incompatible pointer type
./elf32-target.h:307: warning: initialization from incompatible pointer type
./elf32-target.h:308: warning: initialization from incompatible pointer type
./elf32-target.h:309: warning: initialization from incompatible pointer type
./elf32-target.h:310: warning: initialization from incompatible pointer type
./elf32-target.h:311: warning: initialization from incompatible pointer type
./elf32-target.h:320: warning: initialization from incompatible pointer type
./elf32-target.h:322: warning: initialization makes pointer from integer without
 a cast
./elf32-target.h:323: warning: initialization makes pointer from integer without
 a cast
./elf32-target.h:327: warning: initialization makes pointer from integer without
 a cast
./elf32-target.h:327: warning: missing initializer
./elf32-target.h:327: warning: (near initialization for `elf32_i386_fbsd_bed.elf
_backend_additional_program_headers')
./elf32-target.h:487: error: parse error before ')' token
./elf32-target.h:487: error: initializer element is not constant
./elf32-target.h:487: error: (near initialization for `bfd_elf32_i386_freebsd_ve
c._bfd_copy_private_bfd_data')
./elf32-target.h:487: error: parse error before ')' token
./elf32-target.h:487: error: initializer element is not constant
./elf32-target.h:487: error: (near initialization for `bfd_elf32_i386_freebsd_ve
c._bfd_merge_private_bfd_data')
./elf32-target.h:487: error: initializer element is not constant
./elf32-target.h:487: error: (near initialization for `bfd_elf32_i386_freebsd_ve
c._bfd_copy_private_header_data')
./elf32-target.h:487: error: parse error before ')' token
./elf32-target.h:487: error: initializer element is not constant
./elf32-target.h:487: error: (near initialization for `bfd_elf32_i386_freebsd_ve
c._bfd_set_private_flags')
./elf32-target.h:494: error: initializer element is not constant
./elf32-target.h:494: error: (near initialization for `bfd_elf32_i386_freebsd_ve
c._bfd_canonicalize_symtab')
./elf32-target.h:494: error: initializer element is not constant
./elf32-target.h:494: error: (near initialization for `bfd_elf32_i386_freebsd_ve
c._bfd_print_symbol')
./elf32-target.h:494: error: initializer element is not constant
./elf32-target.h:494: error: (near initialization for `bfd_elf32_i386_freebsd_ve
c._bfd_is_target_special_symbol')
./elf32-target.h:494: error: initializer element is not constant
./elf32-target.h:494: error: (near initialization for `bfd_elf32_i386_freebsd_ve
c._bfd_find_inliner_info')
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_freebsd_ve
c._bfd_link_add_symbols')
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_freebsd_ve
c._bfd_link_just_syms')
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_freebsd_ve
c._bfd_final_link')
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_freebsd_ve
c._bfd_gc_sections')
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_freebsd_ve
c._bfd_merge_sections')
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_freebsd_ve
c._bfd_is_group_section')
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_freebsd_ve
c._bfd_discard_group')
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_freebsd_ve
c._section_already_linked')
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_freebsd_ve
c._bfd_define_common_symbol')
./elf32-target.h:498: error: initializer element is not constant
./elf32-target.h:498: error: (near initialization for `bfd_elf32_i386_freebsd_ve
c._bfd_get_synthetic_symtab')
./elf32-target.h:502: warning: missing initializer
./elf32-target.h:502: warning: (near initialization for `bfd_elf32_i386_freebsd_
vec.backend_data')
In file included from ../../binutils-2.20.1/bfd/elf32-i386.c:4731:
./elf32-target.h:291: error: initializer element is not constant
./elf32-target.h:291: error: (near initialization for `elf32_i386_vxworks_bed.mi
npagesize')
./elf32-target.h:292: error: initializer element is not constant
./elf32-target.h:292: error: (near initialization for `elf32_i386_vxworks_bed.co
mmonpagesize')
./elf32-target.h:293: warning: initialization makes integer from pointer without
 a cast
./elf32-target.h:301: warning: initialization from incompatible pointer type
./elf32-target.h:303: warning: initialization from incompatible pointer type
./elf32-target.h:304: warning: initialization from incompatible pointer type
./elf32-target.h:305: warning: initialization from incompatible pointer type
./elf32-target.h:306: warning: initialization from incompatible pointer type
./elf32-target.h:307: warning: initialization from incompatible pointer type
./elf32-target.h:308: warning: initialization from incompatible pointer type
./elf32-target.h:309: warning: initialization from incompatible pointer type
./elf32-target.h:310: warning: initialization from incompatible pointer type
./elf32-target.h:311: warning: initialization from incompatible pointer type
./elf32-target.h:314: warning: initialization from incompatible pointer type
./elf32-target.h:320: warning: initialization from incompatible pointer type
./elf32-target.h:322: warning: initialization makes pointer from integer without
 a cast
./elf32-target.h:323: warning: initialization makes pointer from integer without
 a cast
./elf32-target.h:324: warning: initialization makes pointer from integer without
 a cast
./elf32-target.h:327: warning: initialization makes pointer from integer without
 a cast
./elf32-target.h:327: warning: missing initializer
./elf32-target.h:327: warning: (near initialization for `elf32_i386_vxworks_bed.
elf_backend_additional_program_headers')
./elf32-target.h:487: error: parse error before ')' token
./elf32-target.h:487: error: initializer element is not constant
./elf32-target.h:487: error: (near initialization for `bfd_elf32_i386_vxworks_ve
c._bfd_copy_private_bfd_data')
./elf32-target.h:487: error: parse error before ')' token
./elf32-target.h:487: error: initializer element is not constant
./elf32-target.h:487: error: (near initialization for `bfd_elf32_i386_vxworks_ve
c._bfd_merge_private_bfd_data')
./elf32-target.h:487: error: initializer element is not constant
./elf32-target.h:487: error: (near initialization for `bfd_elf32_i386_vxworks_ve
c._bfd_copy_private_header_data')
./elf32-target.h:487: error: parse error before ')' token
./elf32-target.h:487: error: initializer element is not constant
./elf32-target.h:487: error: (near initialization for `bfd_elf32_i386_vxworks_ve
c._bfd_set_private_flags')
./elf32-target.h:494: error: initializer element is not constant
./elf32-target.h:494: error: (near initialization for `bfd_elf32_i386_vxworks_ve
c._bfd_canonicalize_symtab')
./elf32-target.h:494: error: initializer element is not constant
./elf32-target.h:494: error: (near initialization for `bfd_elf32_i386_vxworks_ve
c._bfd_print_symbol')
./elf32-target.h:494: error: initializer element is not constant
./elf32-target.h:494: error: (near initialization for `bfd_elf32_i386_vxworks_ve
c._bfd_is_target_special_symbol')
./elf32-target.h:494: error: initializer element is not constant
./elf32-target.h:494: error: (near initialization for `bfd_elf32_i386_vxworks_ve
c._bfd_find_inliner_info')
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_vxworks_ve
c._bfd_link_add_symbols')
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_vxworks_ve
c._bfd_link_just_syms')
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_vxworks_ve
c._bfd_final_link')
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_vxworks_ve
c._bfd_gc_sections')
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_vxworks_ve
c._bfd_merge_sections')
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_vxworks_ve
c._bfd_is_group_section')
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_vxworks_ve
c._bfd_discard_group')
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_vxworks_ve
c._section_already_linked')
./elf32-target.h:497: error: initializer element is not constant
./elf32-target.h:497: error: (near initialization for `bfd_elf32_i386_vxworks_ve
c._bfd_define_common_symbol')
./elf32-target.h:498: error: initializer element is not constant
./elf32-target.h:498: error: (near initialization for `bfd_elf32_i386_vxworks_ve
c._bfd_get_synthetic_symtab')
./elf32-target.h:502: warning: missing initializer
./elf32-target.h:502: warning: (near initialization for `bfd_elf32_i386_vxworks_
vec.backend_data')
../../binutils-2.20.1/bfd/elf32-i386.c:407: warning: 'elf_i386_grok_prstatus' de
fined but not used
../../binutils-2.20.1/bfd/elf32-i386.c:457: warning: 'elf_i386_grok_psinfo' defi
ned but not used
../../binutils-2.20.1/bfd/elf32-i386.c:892: warning: 'elf_i386_copy_indirect_sym
bol' defined but not used
../../binutils-2.20.1/bfd/elf32-i386.c:1741: warning: 'elf_i386_gc_mark_hook' de
fined but not used
../../binutils-2.20.1/bfd/elf32-i386.c:1760: warning: 'elf_i386_gc_sweep_hook' d
efined but not used
../../binutils-2.20.1/bfd/elf32-i386.c:4343: warning: 'elf_i386_reloc_type_class
' defined but not used
../../binutils-2.20.1/bfd/elf32-i386.c:4559: warning: 'elf_i386_plt_sym_val' def
ined but not used
../../binutils-2.20.1/bfd/elf32-i386.c:4567: warning: 'elf_i386_hash_symbol' def
ined but not used
../../binutils-2.20.1/bfd/elf32-i386.c:4660: warning: 'elf_i386_fbsd_post_proces
s_headers' defined but not used
make[4]: *** [elf32-i386.lo] Error 1
make[4]: Leaving directory `/usr/src/build-binutils/bfd'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/src/build-binutils/bfd'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/build-binutils/bfd'
make[1]: *** [all-bfd] Error 2
make[1]: Leaving directory `/usr/src/build-binutils'
make: *** [all] Error 2
PLEASE HELP! :shock:
This is too long to repost in my sig- but just look: How OS's would run the airlines
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: GCC Cross compiler binutils problem

Post by gerryg400 »

What platform are you compiling on ? What version of binutils is this ?
If a trainstation is where trains stop, what is a workstation ?
quok
Member
Member
Posts: 490
Joined: Wed Oct 18, 2006 10:43 pm
Location: Kansas City, KS, USA

Re: GCC Cross compiler binutils problem

Post by quok »

gerryg400 wrote:What version of binutils is this ?
If you looked at the output the OP gave, you'd see it is binutils 2.20.1.

What I'd like to see is what the OP used for the configure line, including the PREFIX and TARGET variables.
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: GCC Cross compiler binutils problem

Post by gerryg400 »

If you looked at the output the OP gave, you'd see it is binutils 2.20.1.
Hmmm., maybe, but I'd prefer he supply all the information. I've got better things to do. (i.e. my own bugs!)
If a trainstation is where trains stop, what is a workstation ?
JayMay
Posts: 8
Joined: Sun May 30, 2010 8:49 am

Re: GCC Cross compiler binutils problem

Post by JayMay »

OP here. It turns out that I turned to the forums too quickly. A little looking around and I discovered some remnants of my mistaken binutil 2.9 failure. After a make clean and removing all other remnants, I did make all and the result was success. THANK GOD. 5 hours into this 1 hour assignment, I finally succeeded.

BTW i used PREFIX= /usr/cross TARGET=i586-elf. If I had made an error there I might as well have given up.
This is too long to repost in my sig- but just look: How OS's would run the airlines
quok
Member
Member
Posts: 490
Joined: Wed Oct 18, 2006 10:43 pm
Location: Kansas City, KS, USA

Re: GCC Cross compiler binutils problem

Post by quok »

Good to hear you found the solution to your problem. :)
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: GCC Cross compiler binutils problem

Post by gerryg400 »

A little looking around and I discovered some remnants of my mistaken binutil 2.9 failure.
Quok, now you know why I asked about the binutils version. I had built binutils this morning and I checked my elf32-target.h, line 487. There was no reference to boolean.

So I asked what version the OP was using.
If a trainstation is where trains stop, what is a workstation ?
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: GCC Cross compiler binutils problem

Post by Solar »

Bottom line, failure to communicate on both sides: JayMay failed to provide all the essential information, and you failed to tell why exactly you're asking. 8)
Every good solution is obvious once you've found it.
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: GCC Cross compiler binutils problem

Post by gerryg400 »

Bottom line, failure to communicate on both sides: JayMay failed to provide all the essential information, and you failed to tell why exactly you're asking.
Solar, I think that's a very harsh criticism. It was the middle of the work day here only had a few moments between meetings to think about the OP's problem. It prompted a question and I asked it. I don't accept that I need to provide anything when I'm helping someone. The onus is firmly on the poster to do the hard work. I certainly wasn't deliberately concealing anything.
If a trainstation is where trains stop, what is a workstation ?
Post Reply