Open fredlcore opened 6 years ago
I have now installed binutils with brew (the binutils-devel seems not to be available), and fwget.sh now throws a lot of error messages and eventually fails to compile FirmwareExtractor:
[ 50%] Building C object CMakeFiles/FirmwareExtractor.dir/extractfw.o [100%] Linking C executable FirmwareExtractor Undefined symbols for architecture x86_64: "__hex_value", referenced from: _ihex_object_p in libbfd.a(ihex.o) _ihex_get_section_contents in libbfd.a(ihex.o) _srec_object_p in libbfd.a(srec.o) _srec_get_section_contents in libbfd.a(srec.o) _srec_scan in libbfd.a(srec.o) _tekhex_object_p in libbfd.a(tekhex.o) _getvalue in libbfd.a(tekhex.o) ... "__objalloc_alloc", referenced from: _bfd_alloc in libbfd.a(opncls.o) _bfd_hash_table_init_n in libbfd.a(hash.o) _bfd_hash_lookup in libbfd.a(hash.o) _bfd_hash_insert in libbfd.a(hash.o) _bfd_hash_allocate in libbfd.a(hash.o) _elf32_aarch64_get_local_sym_hash in libbfd.a(elf32-aarch64.o) _elf64_aarch64_get_local_sym_hash in libbfd.a(elf64-aarch64.o) ... "__sch_istable", referenced from: _error_handler_internal in libbfd.a(bfd.o) _bfd_default_scan in libbfd.a(archures.o) _bfd_is_section_compressed_with_header in libbfd.a(compress.o) _mangle_name in libbfd.a(binary.o) __bfd_generic_read_ar_hdr_mag in libbfd.a(archive.o) __bfd_bsd44_write_ar_hdr in libbfd.a(archive.o) __bfd_vms_lib_get_imagelib_file in libbfd.a(vms-lib.o) ... "__sch_tolower", referenced from: __bfd_vms_lib_get_imagelib_file in libbfd.a(vms-lib.o) "__sch_toupper", referenced from: _bfd_decode_symclass in libbfd.a(syms.o) _som_get_symbol_info in libbfd.a(som.o) _vms_get_module_name in libbfd.a(vms-misc.o) "_compress", referenced from: _bfd_compress_section_contents in libbfd.a(compress.o) (maybe you meant: __bfd_pex64_print_ce_compressed_pdata, __bfd_pep_print_ce_compressed_pdata , __bfd_pe_print_ce_compressed_pdata , _bfd_is_section_compressed_with_header , _bfd_compress_section , _bfd_get_compression_header_size , _bfd_init_section_compress_status , _bfd_update_compression_header , _bfd_is_section_compressed , _bfd_check_compression_header ) "_compressBound", referenced from: _bfd_compress_section_contents in libbfd.a(compress.o) "_concat", referenced from: _bfd_plugin_object_p in libbfd.a(plugin.o) _arc_elf_merge_private_bfd_data in libbfd.a(elf32-arc.o) _allocate_global_data_opd in libbfd.a(elf64-hppa.o) _elf64_hppa_finalize_opd in libbfd.a(elf64-hppa.o) _mips_elf_check_symbols in libbfd.a(elfxx-mips.o) _mips_elf_create_stub_symbol in libbfd.a(elfxx-mips.o) _m68hc11_elf_export_one_stub in libbfd.a(elf32-m68hc1x.o) ... "_cplus_demangle", referenced from: _bfd_demangle in libbfd.a(bfd.o) "_filename_cmp", referenced from: __bfd_get_elt_at_filepos in libbfd.a(archive.o) __bfd_construct_extended_name_table in libbfd.a(archive.o) __bfd_stab_section_find_nearest_line in libbfd.a(syms.o) _bfinfdpic_relocate_section in libbfd.a(elf32-bfin.o) _elf32_frv_relocate_section in libbfd.a(elf32-frv.o) _generic_core_file_matches_executable_p in libbfd.a(corefile.o) _spu_elf_final_link in libbfd.a(elf32-spu.o) ... "_filename_ncmp", referenced from: __bfd_construct_extended_name_table in libbfd.a(archive.o) _adjust_relative_path in libbfd.a(archive.o) __bfd_stab_section_find_nearest_line in libbfd.a(syms.o) "_getpwd", referenced from: _adjust_relative_path in libbfd.a(archive.o) "_hex_init", referenced from: _ihex_object_p in libbfd.a(ihex.o) _srec_object_p in libbfd.a(srec.o) _srec_mkobject in libbfd.a(srec.o) _symbolsrec_object_p in libbfd.a(srec.o) _tekhex_init in libbfd.a(tekhex.o) _verilog_mkobject in libbfd.a(verilog.o) "_htab_clear_slot", referenced from: __bfd_archive_close_and_cleanup in libbfd.a(archive.o) __bfinfdpic_resolve_final_relocs_info in libbfd.a(elf32-bfin.o) __frvfdpic_resolve_final_relocs_info in libbfd.a(elf32-frv.o) _score_elf_resolve_final_got_entry in libbfd.a(elf32-score.o) _score_elf_resolve_final_got_entry in libbfd.a(elf32-score7.o) "_htab_create", referenced from: _riscv_elf_relocate_section in libbfd.a(elf32-riscv.o) _riscv_elf_relocate_section in libbfd.a(elf64-riscv.o) _mips_elf_resolve_final_got_entries in libbfd.a(elfxx-mips.o) __bfd_xcoff_bfd_link_hash_table_create in libbfd.a(xcofflink.o) "_htab_create_alloc", referenced from: __bfd_add_bfd_to_archive_cache in libbfd.a(archive.o) "_htab_delete", referenced from: __bfd_archive_close_and_cleanup in libbfd.a(archive.o) _elf32_aarch64_link_hash_table_free in libbfd.a(elf32-aarch64.o) _elf64_aarch64_link_hash_table_free in libbfd.a(elf64-aarch64.o) _elf32_ia64_link_hash_table_free in libbfd.a(elf32-ia64.o) _elf64_ia64_link_hash_table_free in libbfd.a(elf64-ia64.o) _elf64_ia64_link_hash_table_free in libbfd.a(elf64-ia64-vms.o) _elf_m68k_link_hash_table_free in libbfd.a(elf32-m68k.o) ... "_htab_elements", referenced from: _mips_elf_check_symbols in libbfd.a(elfxx-mips.o) "_htab_find", referenced from: __bfd_look_for_bfd_in_cache in libbfd.a(archive.o) __bfinfdpic_resolve_final_relocs_info in libbfd.a(elf32-bfin.o) __frvfdpic_resolve_final_relocs_info in libbfd.a(elf32-frv.o) _riscv_elf_relocate_section in libbfd.a(elf32-riscv.o) _riscv_elf_relocate_section in libbfd.a(elf64-riscv.o) _s3_bfd_score_elf_hide_symbol in libbfd.a(elf32-score.o) _score_elf_resolve_final_got_entry in libbfd.a(elf32-score.o) ... "_htab_find_slot", referenced from: __bfd_add_bfd_to_archive_cache in libbfd.a(archive.o) __bfd_archive_close_and_cleanup in libbfd.a(archive.o) _bfinfdpic_relocs_info_find in libbfd.a(elf32-bfin.o) __bfinfdpic_resolve_final_relocs_info in libbfd.a(elf32-bfin.o) _frvfdpic_relocs_info_find in libbfd.a(elf32-frv.o) __frvfdpic_resolve_final_relocs_info in libbfd.a(elf32-frv.o) _elf_m68k_get_bfd2got_entry in libbfd.a(elf32-m68k.o) ... "_htab_find_slot_with_hash", referenced from: _elf32_aarch64_get_local_sym_hash in libbfd.a(elf32-aarch64.o) _elf64_aarch64_get_local_sym_hash in libbfd.a(elf64-aarch64.o) _get_local_sym_hash in libbfd.a(elf32-ia64.o) _get_local_sym_hash in libbfd.a(elf64-ia64.o) _get_local_sym_hash in libbfd.a(elf64-ia64-vms.o) _tocsave_find in libbfd.a(elf64-ppc.o) __bfd_elf_discard_section_eh_frame in libbfd.a(elf-eh-frame.o) ... "_htab_hash_pointer", referenced from: _xcoff_archive_info_hash in libbfd.a(xcofflink.o) "_htab_size", referenced from: _mips_elf_resolve_final_got_entries in libbfd.a(elfxx-mips.o) "_htab_traverse", referenced from: _elf32_aarch64_size_dynamic_sections in libbfd.a(elf32-aarch64.o) _elf32_aarch64_finish_dynamic_sections in libbfd.a(elf32-aarch64.o) _elf64_aarch64_size_dynamic_sections in libbfd.a(elf64-aarch64.o) _elf64_aarch64_finish_dynamic_sections in libbfd.a(elf64-aarch64.o) _elf32_bfinfdpic_size_dynamic_sections in libbfd.a(elf32-bfin.o) _bfinfdpic_elf_discard_info in libbfd.a(elf32-bfin.o) __bfinfdpic_size_got_plt in libbfd.a(elf32-bfin.o) ... "_htab_traverse_noresize", referenced from: __bfd_archive_close_and_cleanup in libbfd.a(archive.o) _elf_m68k_partition_multi_got_1 in libbfd.a(elf32-m68k.o) "_htab_try_create", referenced from: _elf32_aarch64_link_hash_table_create in libbfd.a(elf32-aarch64.o) _elf64_aarch64_link_hash_table_create in libbfd.a(elf64-aarch64.o) __bfin_create_got_section in libbfd.a(elf32-bfin.o) __frv_create_got_section in libbfd.a(elf32-frv.o) _elf32_ia64_hash_table_create in libbfd.a(elf32-ia64.o) _elf64_ia64_hash_table_create in libbfd.a(elf64-ia64.o) _elf64_ia64_hash_table_create in libbfd.a(elf64-ia64-vms.o) ... "_inflate", referenced from: _decompress_contents in libbfd.a(compress.o) "_inflateEnd", referenced from: _decompress_contents in libbfd.a(compress.o) "_inflateInit_", referenced from: _decompress_contents in libbfd.a(compress.o) "_inflateReset", referenced from: _decompress_contents in libbfd.a(compress.o) "_iterative_hash", referenced from: __bfd_elf_discard_section_eh_frame in libbfd.a(elf-eh-frame.o) "_lbasename", referenced from: _bfd_create_gnu_debuglink_section in libbfd.a(opncls.o) _bfd_fill_in_gnu_debuglink_section in libbfd.a(opncls.o) __bfd_append_relative_path in libbfd.a(archive.o) __bfd_construct_extended_name_table in libbfd.a(archive.o) __bfd_archive_bsd44_construct_extended_name_table in libbfd.a(archive.o) __bfd_bsd44_write_ar_hdr in libbfd.a(archive.o) _bfd_dont_truncate_arname in libbfd.a(archive.o) ... "_libintl_dgettext", referenced from: __bfd_abort in libbfd.a(bfd.o) _bfd_errmsg in libbfd.a(bfd.o) _bfd_assert in libbfd.a(bfd.o) __bfd_generic_get_section_contents in libbfd.a(libbfd.o) __bfd_warn_deprecated in libbfd.a(libbfd.o) _bfd_cache_lookup_worker in libbfd.a(cache.o) _bfd_get_full_section_contents in libbfd.a(compress.o) ... "_libintl_dngettext", referenced from: _ppc64_elf_build_stubs in libbfd.a(elf64-ppc.o) "_lrealpath", referenced from: _find_separate_debug_file in libbfd.a(opncls.o) _adjust_relative_path in libbfd.a(archive.o) "_make_relative_prefix", referenced from: _bfd_plugin_object_p in libbfd.a(plugin.o) "_objalloc_create", referenced from: __bfd_new_bfd in libbfd.a(opncls.o) _bfd_hash_table_init_n in libbfd.a(hash.o) _elf32_aarch64_link_hash_table_create in libbfd.a(elf32-aarch64.o) _elf64_aarch64_link_hash_table_create in libbfd.a(elf64-aarch64.o) _elf32_ia64_hash_table_create in libbfd.a(elf32-ia64.o) _elf64_ia64_hash_table_create in libbfd.a(elf64-ia64.o) _elf64_ia64_hash_table_create in libbfd.a(elf64-ia64-vms.o) ... "_objalloc_free", referenced from: __bfd_free_cached_info in libbfd.a(opncls.o) __bfd_delete_bfd in libbfd.a(opncls.o) _bfd_hash_table_init_n in libbfd.a(hash.o) _bfd_hash_table_free in libbfd.a(hash.o) __bfd_stringtab_free in libbfd.a(hash.o) _elf32_aarch64_link_hash_table_free in libbfd.a(elf32-aarch64.o) _elf64_aarch64_link_hash_table_free in libbfd.a(elf64-aarch64.o) ... "_objalloc_free_block", referenced from: _bfd_release in libbfd.a(opncls.o) _elf_link_add_object_symbols in libbfd.a(elflink.o) "_splay_tree_foreach", referenced from: _elf_xtensa_relax_section in libbfd.a(elf32-xtensa.o) _check_section_ebb_pcrels_fit in libbfd.a(elf32-xtensa.o) _removed_by_actions_map in libbfd.a(elf32-xtensa.o) "_splay_tree_insert", referenced from: _elf_xtensa_relax_section in libbfd.a(elf32-xtensa.o) _text_action_add in libbfd.a(elf32-xtensa.o) "_splay_tree_lookup", referenced from: _elf_xtensa_relax_section in libbfd.a(elf32-xtensa.o) _text_action_add in libbfd.a(elf32-xtensa.o) _offset_with_removed_text in libbfd.a(elf32-xtensa.o) "_splay_tree_min", referenced from: _elf_xtensa_relax_section in libbfd.a(elf32-xtensa.o) _offset_with_removed_text in libbfd.a(elf32-xtensa.o) "_splay_tree_new", referenced from: _elf_xtensa_relax_section in libbfd.a(elf32-xtensa.o) "_splay_tree_successor", referenced from: _elf_xtensa_relax_section in libbfd.a(elf32-xtensa.o) _offset_with_removed_text in libbfd.a(elf32-xtensa.o) "_unlink_if_ordinary", referenced from: _bfd_open_file in libbfd.a(cache.o) "_xexit", referenced from: _spu_elf_final_link in libbfd.a(elf32-spu.o) "_xmalloc", referenced from: _new_got_entry_to_list in libbfd.a(elf32-arc.o) _elf32_arm_size_stubs in libbfd.a(elf32-arm.o) _elf32_arm_fix_exidx_coverage in libbfd.a(elf32-arm.o) _insert_cantunwind_after in libbfd.a(elf32-arm.o) _som_write_object_contents in libbfd.a(som.o) _som_begin_writing in libbfd.a(som.o) _bfd_mach_o_fat_member_init in libbfd.a(mach-o.o) ... "_xrealloc", referenced from: _som_write_object_contents in libbfd.a(som.o) _som_begin_writing in libbfd.a(som.o) "_xstrdup", referenced from: _bfd_fopen in libbfd.a(opncls.o) _bfd_openstreamr in libbfd.a(opncls.o) _bfd_openr_iovec in libbfd.a(opncls.o) _bfd_openw in libbfd.a(opncls.o) _bfd_create in libbfd.a(opncls.o) __bfd_get_elt_at_filepos in libbfd.a(archive.o) __bfd_vms_lib_get_module in libbfd.a(vms-lib.o) ... "_xstrerror", referenced from: _bfd_errmsg in libbfd.a(bfd.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[2]: *** [FirmwareExtractor] Error 1 make[1]: *** [CMakeFiles/FirmwareExtractor.dir/all] Error 2 make: *** [all] Error 2
Hi,
first of all thanks a lot for this amazing project - I was looking for an alternative to the Windows version a long time. I managed to compile OpenHantek with seemingly no errors except one:
-- BFD not found. Please install binutils-devel (fedora) / binutils-dev (ubuntu)
But I've read elsewhere that this only applies to Linux, so I left it at that. Once compilation is done, I can run the application, but after a few seconds, this error message appears:However, I can run Peter Dreisiebner's DSO-USB-Tool App without any problems on the same connection, i.e. libusb is installed and works.
I have tried downloading the firmwares from Hantek with fwget.sh and downloading also works, but stops after the last download with the error message
./fwget.sh: line 18: ./build/FirmwareExtractor: No such file or directory
I'm not sure at what stage I should run fwget.sh, before make or make install or after everything is installed, but no matter what I try, the error message stays.
I'm grateful for any suggestion, and once it works for me, I'd be willing to provide up-to-date binaries for Mac OSX.