Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on macos 10.14.3 and clang 7.0.1 #1

Open
paulocoutinhox opened this issue Mar 1, 2019 · 3 comments
Open

Error on macos 10.14.3 and clang 7.0.1 #1

paulocoutinhox opened this issue Mar 1, 2019 · 3 comments

Comments

@paulocoutinhox
Copy link

Hi,

Im getting this error:

libtool: link: gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wwrite-strings -I./../zlib -g -O2 -Wl,-no_pie -o as-new app.o as.o atof-generic.o compress-debug.o cond.o depend.o dwarf2dbg.o dw2gencfi.o ecoff.o ehopt.o expr.o flonum-copy.o flonum-konst.o flonum-mult.o frags.o hash.o input-file.o input-scrub.o listing.o literal.o macro.o messages.o output-file.o read.o remap.o sb.o stabs.o subsegs.o symbols.o write.o config/tc-arm.o config/obj-elf.o config/atof-ieee.o  ../opcodes/.libs/libopcodes.a ../bfd/.libs/libbfd.a -L/Users/paulo/Downloads/rpi3-sdk/binutils-2.32/zlib -ldl -lz ../libiberty/libiberty.a ./../intl/libintl.a -liconv
ld: warning: ld: warning: ignoring file ../bfd/.libs/libbfd.a, file was built for archive which is not the architecture being linked (x86_64): ../bfd/.libs/libbfd.aignoring file /Users/paulo/Downloads/rpi3-sdk/binutils-2.32/zlib/libz.a, file was built for archive which is not the architecture being linked (x86_64): /Users/paulo/Downloads/rpi3-sdk/binutils-2.32/zlib/libz.a

ld: warning: ignoring file ../opcodes/.libs/libopcodes.a, file was built for archive which is not the architecture being linked (x86_64): ../opcodes/.libs/libopcodes.a
ld: warning: ignoring file ../libiberty/libiberty.a, file was built for archive which is not the architecture being linked (x86_64): ../libiberty/libiberty.a
ld: warning: ignoring file ./../intl/libintl.a, file was built for archive which is not the architecture being linked (x86_64): ./../intl/libintl.a
Undefined symbols for architecture x86_64:
  "__bfd_elf_obj_attrs_arg_type", referenced from:
      _obj_elf_vendor_attribute in obj-elf.o
  "__bfd_std_section", referenced from:
      _main in as.o
      _dwarf2_directive_loc in dwarf2dbg.o
      _dwarf2_finish in dwarf2dbg.o
      _check_eh_frame in ehopt.o
      _make_expr_symbol in expr.o
      _expr_build_dot in expr.o
      _current_location in expr.o
      ...
  "__hex_value", referenced from:
      _integer_constant in expr.o
      _hex_float in read.o
  "__obstack_begin", referenced from:
      _hash_new_sized in hash.o
      _read_begin in read.o
      _subsegs_begin in subsegs.o
      _subseg_set_rest in subsegs.o
  "__obstack_free", referenced from:
      _s_endif in cond.o
      _cond_exit_macro in cond.o
      _hash_die in hash.o
      _hash_delete in hash.o
      _s_stab_generic in stabs.o
  "__obstack_newchunk", referenced from:
      _s_ifdef in cond.o
      _s_if in cond.o
      _s_ifb in cond.o
      _s_ifc in cond.o
      _s_ifeqs in cond.o
      _cfi_add_label in dw2gencfi.o
      _frag_alloc in frags.o
      ...
  "__sch_istable", referenced from:
      _atof_generic in atof-generic.o
      _dwarf2_directive_loc in dwarf2dbg.o
      _input_file_open in input-file.o
      _listing_newline in listing.o
      _debugging_pseudo in listing.o
      _macro_expand_body in macro.o
      _read_a_source_file in read.o
      ...
  "__sch_tolower", referenced from:
      _operand in expr.o
      _define_macro in macro.o
      _check_macro in macro.o
      _delete_macro in macro.o
      _read_a_source_file in read.o
      _s_unreq in tc-arm.o
      _md_assemble in tc-arm.o
      ...
  "__sch_toupper", referenced from:
      _save_symbol_name in symbols.o
      _symbol_find_noref in symbols.o
      _s_unreq in tc-arm.o
      _s_arm_cpu in tc-arm.o
      _md_assemble in tc-arm.o
      _arm_parse_cpu in tc-arm.o
      _aeabi_set_public_attributes in tc-arm.o
      ...
  "_bfd_alloc", referenced from:
      _write_object_file in write.o
  "_bfd_arch_bits_per_address", referenced from:
      _dwarf2_finish in dwarf2dbg.o
      _cfi_finish in dw2gencfi.o
      _output_fde in dw2gencfi.o
      _output_cfi_insn in dw2gencfi.o
      _write_object_file in write.o
      _create_note_reloc in write.o
  "_bfd_cache_close_all", referenced from:
      _output_file_close in output-file.o
  "_bfd_close", referenced from:
      _output_file_close in output-file.o
  "_bfd_elf_add_obj_attr_int", referenced from:
      _aeabi_set_public_attributes in tc-arm.o
      _obj_elf_vendor_attribute in obj-elf.o
  "_bfd_elf_add_obj_attr_int_string", referenced from:
      _obj_elf_vendor_attribute in obj-elf.o
  "_bfd_elf_add_obj_attr_string", referenced from:
      _aeabi_set_public_attributes in tc-arm.o
      _obj_elf_vendor_attribute in obj-elf.o
  "_bfd_elf_get_default_section_type", referenced from:
      _obj_elf_change_section in obj-elf.o
  "_bfd_elf_obj_attr_size", referenced from:
      _write_object_file in write.o
  "_bfd_elf_set_obj_attr_contents", referenced from:
      _write_object_file in write.o
  "_bfd_errmsg", referenced from:
      _output_file_create in output-file.o
      _output_file_close in output-file.o
      _s_linkonce in read.o
      _symbol_create in symbols.o
      _symbol_clone in symbols.o
      _dot_symbol_init in symbols.o
      _write_contents in write.o
      ...
  "_bfd_get_arch_size", referenced from:
      _cfi_finish in dw2gencfi.o
      _select_cie_for_fde in dw2gencfi.o
      _output_fde in dw2gencfi.o
  "_bfd_get_compression_header_size", referenced from:
      _compress_debug in write.o
  "_bfd_get_error", referenced from:
      _output_file_create in output-file.o
      _output_file_close in output-file.o
      _s_linkonce in read.o
      _symbol_create in symbols.o
      _symbol_clone in symbols.o
      _dot_symbol_init in symbols.o
      _write_contents in write.o
      ...
  "_bfd_get_reloc_code_name", referenced from:
      _print_fixup in write.o
      _tc_gen_reloc in tc-arm.o
  "_bfd_get_reloc_size", referenced from:
      _s_arm_elf_cons in tc-arm.o
  "_bfd_get_section_by_name", referenced from:
      _dwarf2_finish in dwarf2dbg.o
      _write_object_file in write.o
      _elf_begin in obj-elf.o
      _adjust_stab_sections in obj-elf.o
  "_bfd_get_section_by_name_if", referenced from:
      _obj_elf_change_section in obj-elf.o
  "_bfd_hash_set_default_size", referenced from:
      _set_gas_hash_table_size in hash.o
  "_bfd_init", referenced from:
      _main in as.o
  "_bfd_install_relocation", referenced from:
      _install_reloc in write.o
  "_bfd_is_arm_special_symbol_name", referenced from:
      _arm_adjust_symtab in tc-arm.o
  "_bfd_is_local_label", referenced from:
      _S_IS_LOCAL in symbols.o
  "_bfd_make_section", referenced from:
      _md_begin in tc-arm.o
  "_bfd_make_section_anyway", referenced from:
      _subseg_get in subsegs.o
      _subseg_force_new in subsegs.o
  "_bfd_make_section_old_way", referenced from:
      _subseg_get in subsegs.o
      _subseg_new in subsegs.o
  "_bfd_map_over_sections", referenced from:
      _write_object_file in write.o
      _arm_adjust_symtab in tc-arm.o
      _elf_adjust_symtab in obj-elf.o
      _elf_frob_file in obj-elf.o
  "_bfd_openw", referenced from:
      _output_file_create in output-file.o
  "_bfd_reloc_name_lookup", referenced from:
      _s_reloc in read.o
  "_bfd_reloc_type_lookup", referenced from:
      _s_reloc in read.o
      _create_note_reloc in write.o
      _s_arm_elf_cons in tc-arm.o
      _tc_gen_reloc in tc-arm.o
  "_bfd_scan_vma", referenced from:
      _main in as.o
  "_bfd_set_error_program_name", referenced from:
      _main in as.o
  "_bfd_set_format", referenced from:
      _output_file_create in output-file.o
  "_bfd_set_section_contents", referenced from:
      _write_object_file in write.o
      _write_contents in write.o
      _md_begin in tc-arm.o
  "_bfd_set_section_flags", referenced from:
      _main in as.o
      _dwarf2_finish in dwarf2dbg.o
      _cfi_finish in dw2gencfi.o
      _s_linkonce in read.o
      _get_stab_string_offset in stabs.o
      _s_stab_generic in stabs.o
      _write_object_file in write.o
      ...
  "_bfd_set_section_size", referenced from:
      _size_seg in write.o
      _compress_debug in write.o
      _md_begin in tc-arm.o
      _elf_frob_file_after_relocs in obj-elf.o
  "_bfd_set_symtab", referenced from:
      _write_object_file in write.o
  "_bfd_update_compression_header", referenced from:
      _compress_debug in write.o
  "_concat", referenced from:
      _main in as.o
      _dwarf2_finish in dwarf2dbg.o
      _operand in expr.o
      _listing_warning in listing.o
      _listing_error in listing.o
      _s_weakref in read.o
      _remap_debug_filename in remap.o
      ...
  "_deflate", referenced from:
      _compress_data in compress-debug.o
      _compress_finish in compress-debug.o
  "_deflateEnd", referenced from:
      _compress_finish in compress-debug.o
  "_deflateInit_", referenced from:
      _compress_init in compress-debug.o
  "_expandargv", referenced from:
      _main in as.o
  "_filename_cmp", referenced from:
      _register_dependency in depend.o
      _get_filenum in dwarf2dbg.o
      _new_logical_line_flags in input-scrub.o
      _new_logical_line in input-scrub.o
      _listing_newline in listing.o
      _listing_source_file in listing.o
      _generate_asm_file in stabs.o
      ...
  "_filename_ncmp", referenced from:
      _get_filenum in dwarf2dbg.o
      _remap_debug_filename in remap.o
  "_get_run_time", referenced from:
      _main in as.o
      _dump_statistics in as.o
  "_getpwd", referenced from:
      _dwarf2_finish in dwarf2dbg.o
      _stabs_generate_asm_file in stabs.o
  "_hex_init", referenced from:
      _main in as.o
  "_lbasename", referenced from:
      _get_filenum in dwarf2dbg.o
  "_libintl_bindtextdomain", referenced from:
      _main in as.o
  "_libintl_gettext", referenced from:
      _do_scrub_chars in app.o
      _print_version_id in as.o
      _main in as.o
      _dump_statistics in as.o
      _show_usage in as.o
      _atof_generic in atof-generic.o
      _s_ifdef in cond.o
      ...
  "_libintl_ngettext", referenced from:
      _main in as.o
      _frag_grow in frags.o
      _frag_more in frags.o
      _frag_var in frags.o
      _emit_expr_with_reloc in read.o
      _fix_segment in write.o
      _compress_debug in write.o
      ...
  "_libintl_textdomain", referenced from:
      _main in as.o
  "_unlink_if_ordinary", referenced from:
      _close_output_file in as.o
      _as_fatal in messages.o
  "_xatexit", referenced from:
      _main in as.o
  "_xcalloc", referenced from:
      _cfi_new_fde in dw2gencfi.o
      _cfi_add_advance_loc in dw2gencfi.o
      _cfi_add_label in dw2gencfi.o
      _cfi_add_CFA_offset in dw2gencfi.o
      _cfi_add_CFA_val_offset in dw2gencfi.o
      _cfi_add_CFA_def_cfa in dw2gencfi.o
      _cfi_add_CFA_register in dw2gencfi.o
      ...
  "_xexit", referenced from:
      _main in as.o
      _as_fatal in messages.o
      _as_abort in messages.o
  "_xmalloc", referenced from:
      _app_push in app.o
      _main in as.o
      _atof_generic in atof-generic.o
      _register_dependency in depend.o
      _dwarf2_gen_line_info in dwarf2dbg.o
      _get_filenum in dwarf2dbg.o
      _dwarf2_move_insn in dwarf2dbg.o
      ...
  "_xmalloc_set_program_name", referenced from:
      _main in as.o
  "_xrealloc", referenced from:
      _get_filenum in dwarf2dbg.o
      _input_scrub_next_buffer in input-scrub.o
      _read_a_source_file in read.o
      _read_symbol_name in read.o
      _add_include_dir in read.o
      _sb_add_sb in sb.o
      _sb_scrub_and_add_sb in sb.o
      ...
  "_xstrdup", referenced from:
      _main in as.o
      _register_dependency in depend.o
      _get_filenum in dwarf2dbg.o
      _listing_newline in listing.o
      _listing_source_file in listing.o
      _s_incbin in read.o
      _s_func in read.o
      ...
  "_xstrerror", referenced from:
      _input_file_open in input-file.o
      _input_file_give_next_buffer in input-file.o
      _input_file_get in input-file.o
      _listing_print in listing.o
      _s_func in read.o
      _stabs_generate_asm_func in stabs.o
      _stabs_generate_asm_endfunc in stabs.o
      ...
  "_xstrndup", referenced from:
      _obj_elf_vendor_attribute in obj-elf.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [as-new] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-gas] Error 2
make: *** [all] Error 2

macos: 10.14.3
clang: 7.0.1
binutils: latest
ip: 192.168.0.22
raspberry pi: pi 3 model B

@angerman
Copy link
Contributor

angerman commented Mar 2, 2019

ld: warning: ld: warning: ignoring file ../bfd/.libs/libbfd.a, file was built for archive which is not the architecture being linked (x86_64): ../bfd/.libs/libbfd.aignoring file /Users/paulo/Downloads/rpi3-sdk/binutils-2.32/zlib/libz.a, file was built for archive which is not the architecture being linked (x86_64): /Users/paulo/Downloads/rpi3-sdk/binutils-2.32/zlib/libz.a

ld: warning: ignoring file ../opcodes/.libs/libopcodes.a, file was built for archive which is not the architecture being linked (x86_64): ../opcodes/.libs/libopcodes.a
ld: warning: ignoring file ../libiberty/libiberty.a, file was built for archive which is not the architecture being linked (x86_64): ../libiberty/libiberty.a
ld: warning: ignoring file ./../intl/libintl.a, file was built for archive which is not the architecture being linked (x86_64): ./../intl/libintl.a
Undefined symbols for architecture x86_64:```

You seem to be building for x86_64, not for arm. Hence it can't read the archives properly.

@paulocoutinhox
Copy link
Author

Exactly. But it is inside your script. I need run it from macos, correct?

@RoyiAvital
Copy link

@angerman , Is there a way to email you?
The mail on your website doesn't work.

Sorry for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants