交叉编译linux parted命令之静态编译问题
交叉编译linux parted命令之静态编译出错记录
接上一篇顺利编译后,make&&make install后在build/arch/sbin下找到parted可执行文件,使用
执行file ./arch/sbin/parted,得到:
./arch/sbin/parted: ELF 32-bit LSB executable, MIPS, MIPS32 rel2 version 1, dynamically linked, interpreter /lib/ld-linux-mipsn8.so.1, for GNU/Linux 3.10.14, not stripped
这个是动态链接文件,实际不可用,那么如何进行静态编译呢?
到build/parted目录下降之前编译好的libuuid.a & libparted.a文件拷贝到此目录下,使用命令:mips-linux-gnu-gcc -static -o parted *.a *.o,但编译结果如下:
真是一步一个坑,在此记录下便于后期追查:
command.o: In function `command_create':
command.c:(.text+0x24): undefined reference to `xmalloc'
parted.o: In function `_partition_warn_busy':
parted.c:(.text+0x24c): undefined reference to `ped_partition_is_busy'
parted.c:(.text+0x260): undefined reference to `ped_partition_get_path'
parted.c:(.text+0x280): undefined reference to `ped_exception_throw'
parted.o: In function `_disk_warn_busy':
parted.c:(.text+0x2f8): undefined reference to `ped_device_is_busy'
parted.c:(.text+0x348): undefined reference to `ped_exception_throw'
parted.o: In function `_disk_warn_loss':
parted.c:(.text+0x3b4): undefined reference to `ped_exception_throw'
parted.o: In function `snap':
parted.c:(.text+0x414): undefined reference to `ped_geometry_test_sector_inside'
parted.c:(.text+0x440): undefined reference to `ped_assert'
parted.c:(.text+0x454): undefined reference to `ped_geometry_test_sector_inside'
parted.o: In function `prefer_snap':
parted.c:(.text+0x520): undefined reference to `ped_assert'
parted.c:(.text+0x5d8): undefined reference to `ped_geometry_test_sector_inside'
parted.c:(.text+0x68c): undefined reference to `ped_geometry_test_sector_inside'
parted.c:(.text+0x820): undefined reference to `ped_assert'
parted.o: In function `snap_to_boundaries':
parted.c:(.text+0x97c): undefined reference to `ped_disk_get_partition_by_sector'
parted.c:(.text+0x99c): undefined reference to `ped_disk_get_partition_by_sector'
parted.c:(.text+0xb64): undefined reference to `ped_assert'
parted.c:(.text+0xc44): undefined reference to `ped_assert'
parted.c:(.text+0xcc4): undefined reference to `ped_assert'
parted.c:(.text+0xdc8): undefined reference to `ped_geometry_test_sector_inside'
parted.c:(.text+0xdf4): undefined reference to `ped_assert'
parted.c:(.text+0xe10): undefined reference to `ped_geometry_test_sector_inside'
parted.c:(.text+0xe3c): undefined reference to `ped_assert'
parted.c:(.text+0xe94): undefined reference to `ped_assert'
parted.c:(.text+0xf00): undefined reference to `ped_geometry_set'
parted.o: In function `constraint_from_start_end':
parted.c:(.text+0xf48): undefined reference to `ped_alignment_any'
parted.c:(.text+0xf4c): undefined reference to `ped_alignment_any'
parted.c:(.text+0xf50): undefined reference to `ped_alignment_any'
parted.c:(.text+0xf54): undefined reference to `ped_alignment_any'
parted.c:(.text+0xf84): undefined reference to `ped_constraint_new'
parted.o: In function `constraint_from_start_end_fixed_start':
parted.c:(.text+0xff8): undefined reference to `ped_alignment_any'
parted.c:(.text+0xffc): undefined reference to `ped_alignment_any'
parted.c:(.text+0x1000): undefined reference to `ped_alignment_any'
parted.c:(.text+0x1004): undefined reference to `ped_alignment_any'
parted.c:(.text+0x1038): undefined reference to `ped_constraint_new'
parted.o: In function `do_mklabel':
parted.c:(.text+0x12d8): undefined reference to `ped_exception_fetch_all'
parted.c:(.text+0x12ec): undefined reference to `ped_disk_new'
parted.c:(.text+0x1304): undefined reference to `ped_exception_catch'
parted.c:(.text+0x130c): undefined reference to `ped_exception_leave_all'
parted.c:(.text+0x138c): undefined reference to `ped_disk_new_fresh'
parted.c:(.text+0x13a8): undefined reference to `ped_disk_commit'
parted.c:(.text+0x13f8): undefined reference to `ped_disk_destroy'
parted.c:(.text+0x1420): undefined reference to `ped_disk_destroy'
parted.o: In function `_strip_trailing_spaces':
parted.c:(.text+0x14f0): undefined reference to `c_isblank'
parted.o: In function `_string_ends_with_iec_unit':
parted.c:(.text+0x15bc): undefined reference to `c_strcasecmp'
parted.o: In function `_adjust_end_if_iec':
parted.c:(.text+0x16f8): undefined reference to `ped_assert'
parted.c:(.text+0x1728): undefined reference to `ped_assert'
parted.c:(.text+0x1758): undefined reference to `ped_assert'
parted.c:(.text+0x179c): undefined reference to `ped_unit_get_default'
parted.o: In function `do_mkpart':
parted.c:(.text+0x18f8): undefined reference to `ped_file_system_type_get'
parted.c:(.text+0x1968): undefined reference to `ped_disk_new'
parted.c:(.text+0x1994): undefined reference to `ped_disk_is_flag_available'
parted.c:(.text+0x19c4): undefined reference to `ped_disk_set_flag'
parted.c:(.text+0x19e4): undefined reference to `ped_disk_type_check_feature'
parted.c:(.text+0x1a34): undefined reference to `ped_disk_type_check_feature'
parted.c:(.text+0x1c08): undefined reference to `ped_partition_new'
parted.c:(.text+0x1c9c): undefined reference to `ped_assert'
parted.c:(.text+0x1cc4): undefined reference to `ped_device_get_optimal_aligned_constraint'
parted.c:(.text+0x1cf8): undefined reference to `ped_device_get_minimal_aligned_constraint'
parted.c:(.text+0x1d18): undefined reference to `ped_device_get_constraint'
parted.c:(.text+0x1d4c): undefined reference to `ped_assert'
parted.c:(.text+0x1d5c): undefined reference to `ped_constraint_intersect'
parted.c:(.text+0x1d6c): undefined reference to `ped_constraint_destroy'
parted.c:(.text+0x1d78): undefined reference to `ped_constraint_destroy'
parted.c:(.text+0x1d8c): undefined reference to `ped_exception_fetch_all'
parted.c:(.text+0x1da0): undefined reference to `ped_disk_add_partition'
parted.c:(.text+0x1db4): undefined reference to `ped_constraint_destroy'
parted.c:(.text+0x1dd0): undefined reference to `ped_exception_leave_all'
parted.c:(.text+0x1de4): undefined reference to `ped_constraint_any'
parted.c:(.text+0x1dfc): undefined reference to `ped_disk_add_partition'
parted.c:(.text+0x1e10): undefined reference to `ped_constraint_destroy'
parted.c:(.text+0x1e44): undefined reference to `ped_geometry_test_sector_inside'
parted.c:(.text+0x1e6c): undefined reference to `ped_geometry_test_sector_inside'
parted.c:(.text+0x1e94): undefined reference to `ped_unit_format'
parted.c:(.text+0x1eb8): undefined reference to `ped_unit_format'
parted.c:(.text+0x1ee0): undefined reference to `ped_unit_format'
parted.c:(.text+0x1f08): undefined reference to `ped_unit_format'
parted.c:(.text+0x1ff4): undefined reference to `ped_exception_throw'
parted.c:(.text+0x20c4): undefined reference to `ped_exception_throw'
parted.c:(.text+0x20e4): undefined reference to `ped_exception_leave_all'
parted.c:(.text+0x20ec): undefined reference to `ped_exception_catch'
parted.c:(.text+0x2108): undefined reference to `ped_partition_set_name'
parted.c:(.text+0x2134): undefined reference to `ped_assert'
parted.c:(.text+0x2158): undefined reference to `ped_partition_set_system'
parted.c:(.text+0x2170): undefined reference to `ped_partition_is_flag_available'
parted.c:(.text+0x218c): undefined reference to `ped_partition_set_flag'
parted.c:(.text+0x2198): undefined reference to `ped_disk_commit'
parted.c:(.text+0x21bc): undefined reference to `ped_geometry_destroy'
parted.c:(.text+0x21d8): undefined reference to `ped_geometry_destroy'
parted.c:(.text+0x224c): undefined reference to `ped_disk_remove_partition'
parted.c:(.text+0x2264): undefined reference to `ped_partition_destroy'
parted.c:(.text+0x22f8): undefined reference to `ped_geometry_destroy'
parted.c:(.text+0x2314): undefined reference to `ped_geometry_destroy'
parted.o: In function `do_name':
parted.c:(.text+0x23a0): undefined reference to `ped_disk_new'
parted.c:(.text+0x23f4): undefined reference to `ped_partition_get_name'
parted.c:(.text+0x2434): undefined reference to `ped_partition_set_name'
parted.c:(.text+0x245c): undefined reference to `ped_disk_commit'
parted.o: In function `partition_print_flags':
parted.c:(.text+0x24f4): undefined reference to `xstrdup'
parted.c:(.text+0x2530): undefined reference to `ped_partition_flag_next'
parted.c:(.text+0x254c): undefined reference to `ped_partition_get_flag'
parted.c:(.text+0x2560): undefined reference to `ped_partition_flag_get_name'
parted.c:(.text+0x25a0): undefined reference to `xrealloc'
parted.c:(.text+0x25f4): undefined reference to `ped_partition_flag_next'
parted.o: In function `disk_print_flags':
parted.c:(.text+0x2674): undefined reference to `xstrdup'
parted.c:(.text+0x26b0): undefined reference to `ped_disk_flag_next'
parted.c:(.text+0x26cc): undefined reference to `ped_disk_get_flag'
parted.c:(.text+0x26e0): undefined reference to `ped_disk_flag_get_name'
parted.c:(.text+0x2720): undefined reference to `xrealloc'
parted.c:(.text+0x2774): undefined reference to `ped_disk_flag_next'
parted.o: In function `_print_disk_geometry':
parted.c:(.text+0x27e8): undefined reference to `ped_assert'
parted.c:(.text+0x2828): undefined reference to `ped_unit_format_custom'
parted.o: In function `_print_disk_info':
parted.c:(.text+0x293c): undefined reference to `ped_unit_format'
parted.c:(.text+0x2948): undefined reference to `ped_unit_get_default'
parted.c:(.text+0x29f0): undefined reference to `ped_unit_format_byte'
parted.c:(.text+0x2bd8): undefined reference to `ped_unit_get_default'
parted.c:(.text+0x2bf0): undefined reference to `ped_unit_get_default'
parted.o: In function `do_print':
parted.c:(.text+0x2e24): undefined reference to `ped_disk_new'
parted.c:(.text+0x2e7c): undefined reference to `ped_disk_is_flag_available'
parted.c:(.text+0x2eb4): undefined reference to `ped_disk_set_flag'
parted.c:(.text+0x2ee0): undefined reference to `ped_device_probe_all'
parted.c:(.text+0x2f34): undefined reference to `ped_unit_format_byte'
parted.c:(.text+0x2f70): undefined reference to `ped_device_get_next'
parted.c:(.text+0x2f98): undefined reference to `xstrdup'
parted.c:(.text+0x2fa4): undefined reference to `ped_device_free_all'
parted.c:(.text+0x2fb0): undefined reference to `ped_device_get'
parted.c:(.text+0x2fec): undefined reference to `ped_device_open'
parted.c:(.text+0x310c): undefined reference to `ped_disk_type_check_feature'
parted.c:(.text+0x312c): undefined reference to `ped_disk_type_check_feature'
parted.c:(.text+0x3148): undefined reference to `ped_unit_get_default'
parted.c:(.text+0x3264): undefined reference to `ped_disk_next_partition'
parted.c:(.text+0x3288): undefined reference to `ped_partition_is_active'
parted.c:(.text+0x32b0): undefined reference to `ped_malloc'
parted.c:(.text+0x3340): undefined reference to `ped_unit_format'
parted.c:(.text+0x33e4): undefined reference to `ped_unit_format_byte'
parted.c:(.text+0x340c): undefined reference to `ped_unit_format'
parted.c:(.text+0x3418): undefined reference to `ped_unit_get_default'
parted.c:(.text+0x34b4): undefined reference to `ped_partition_type_get_name'
parted.c:(.text+0x351c): undefined reference to `ped_partition_get_name'
parted.c:(.text+0x3630): undefined reference to `ped_disk_next_partition'
parted.c:(.text+0x36a0): undefined reference to `ped_disk_next_partition'
parted.c:(.text+0x36c4): undefined reference to `ped_partition_is_active'
parted.c:(.text+0x375c): undefined reference to `ped_unit_format'
parted.c:(.text+0x3820): undefined reference to `ped_unit_format_byte'
parted.c:(.text+0x384c): undefined reference to `ped_unit_get_default'
parted.c:(.text+0x3880): undefined reference to `ped_unit_format'
parted.c:(.text+0x3914): undefined reference to `ped_partition_get_name'
parted.c:(.text+0x39a8): undefined reference to `ped_disk_next_partition'
parted.o: In function `_print_list':
parted.c:(.text+0x3a04): undefined reference to `ped_device_probe_all'
parted.c:(.text+0x3a40): undefined reference to `ped_disk_destroy'
parted.c:(.text+0x3a60): undefined reference to `ped_device_get_next'
parted.o: In function `_disk_get_part_type_for_sector':
parted.c:(.text+0x3af8): undefined reference to `ped_disk_extended_partition'
parted.c:(.text+0x3b24): undefined reference to `ped_geometry_test_sector_inside'
parted.o: In function `_rescue_add_partition':
parted.c:(.text+0x3b80): undefined reference to `ped_file_system_probe'
parted.c:(.text+0x3bb4): undefined reference to `ped_file_system_probe_specific'
parted.c:(.text+0x3be8): undefined reference to `ped_geometry_test_inside'
parted.c:(.text+0x3bfc): undefined reference to `ped_geometry_destroy'
parted.c:(.text+0x3c14): undefined reference to `ped_constraint_exact'
parted.c:(.text+0x3c5c): undefined reference to `ped_disk_set_partition_geom'
parted.c:(.text+0x3c70): undefined reference to `ped_constraint_destroy'
parted.c:(.text+0x3c88): undefined reference to `ped_constraint_destroy'
parted.c:(.text+0x3cac): undefined reference to `ped_unit_format'
parted.c:(.text+0x3cd4): undefined reference to `ped_unit_format'
parted.c:(.text+0x3cf4): undefined reference to `ped_partition_type_get_name'
parted.c:(.text+0x3d28): undefined reference to `ped_exception_throw'
parted.c:(.text+0x3d38): undefined reference to `ped_geometry_destroy'
parted.c:(.text+0x3d94): undefined reference to `ped_partition_set_system'
parted.c:(.text+0x3da8): undefined reference to `ped_disk_commit'
parted.o: In function `_rescue_pass':
parted.c:(.text+0x3e9c): undefined reference to `ped_geometry_init'
parted.c:(.text+0x3eb0): undefined reference to `ped_timer_reset'
parted.c:(.text+0x3ecc): undefined reference to `ped_timer_set_state_name'
parted.c:(.text+0x3f54): undefined reference to `ped_timer_update'
parted.c:(.text+0x3f80): undefined reference to `ped_geometry_init'
parted.c:(.text+0x3f88): undefined reference to `ped_alignment_any'
parted.c:(.text+0x3f8c): undefined reference to `ped_alignment_any'
parted.c:(.text+0x3f90): undefined reference to `ped_alignment_any'
parted.c:(.text+0x3f94): undefined reference to `ped_alignment_any'
parted.c:(.text+0x3fd0): undefined reference to `ped_constraint_init'
parted.c:(.text+0x4008): undefined reference to `ped_partition_new'
parted.c:(.text+0x4028): undefined reference to `ped_constraint_done'
parted.c:(.text+0x4038): undefined reference to `ped_exception_fetch_all'
parted.c:(.text+0x4050): undefined reference to `ped_disk_add_partition'
parted.c:(.text+0x4060): undefined reference to `ped_exception_leave_all'
parted.c:(.text+0x40a4): undefined reference to `ped_constraint_done'
parted.c:(.text+0x40c0): undefined reference to `ped_disk_remove_partition'
parted.c:(.text+0x40d0): undefined reference to `ped_exception_leave_all'
parted.c:(.text+0x40dc): undefined reference to `ped_partition_destroy'
parted.c:(.text+0x40ec): undefined reference to `ped_constraint_done'
parted.c:(.text+0x4174): undefined reference to `ped_timer_update'
parted.c:(.text+0x4194): undefined reference to `ped_disk_remove_partition'
parted.c:(.text+0x41a0): undefined reference to `ped_partition_destroy'
parted.c:(.text+0x41b0): undefined reference to `ped_constraint_done'
parted.o: In function `do_rescue':
parted.c:(.text+0x4240): undefined reference to `ped_disk_destroy'
parted.c:(.text+0x425c): undefined reference to `ped_disk_new'
parted.c:(.text+0x4668): undefined reference to `ped_geometry_init'
parted.c:(.text+0x4774): undefined reference to `ped_geometry_init'
parted.c:(.text+0x47a4): undefined reference to `ped_disk_destroy'
parted.c:(.text+0x47fc): undefined reference to `ped_disk_destroy'
parted.o: In function `do_resize':
parted.c:(.text+0x4874): undefined reference to `ped_exception_throw'
parted.o: In function `do_resizepart':
parted.c:(.text+0x48e0): undefined reference to `ped_disk_new'
parted.c:(.text+0x490c): undefined reference to `ped_disk_is_flag_available'
parted.c:(.text+0x493c): undefined reference to `ped_disk_set_flag'
parted.c:(.text+0x4a50): undefined reference to `ped_disk_set_partition_geom'
parted.c:(.text+0x4aac): undefined reference to `ped_exception_throw'
parted.c:(.text+0x4ac8): undefined reference to `ped_disk_commit'
parted.c:(.text+0x4b18): undefined reference to `ped_constraint_destroy'
parted.c:(.text+0x4b70): undefined reference to `ped_geometry_destroy'
parted.o: In function `do_rm':
parted.c:(.text+0x4bcc): undefined reference to `ped_disk_new'
parted.c:(.text+0x4c48): undefined reference to `ped_disk_delete_partition'
parted.c:(.text+0x4c5c): undefined reference to `ped_disk_commit'
parted.o: In function `do_select':
parted.c:(.text+0x4d24): undefined reference to `ped_device_open'
parted.c:(.text+0x4d4c): undefined reference to `ped_device_close'
parted.c:(.text+0x4d70): undefined reference to `ped_disk_destroy'
parted.o: In function `partition_align_check':
parted.c:(.text+0x4e10): undefined reference to `ped_assert'
parted.c:(.text+0x4e38): undefined reference to `ped_device_get_minimum_alignment'
parted.c:(.text+0x4e4c): undefined reference to `ped_device_get_optimum_alignment'
parted.c:(.text+0x4ea8): undefined reference to `ped_assert'
parted.o: In function `do_align_check':
parted.c:(.text+0x4f6c): undefined reference to `ped_disk_new'
parted.o: In function `do_disk_set':
parted.c:(.text+0x50f0): undefined reference to `ped_disk_new'
parted.c:(.text+0x5150): undefined reference to `ped_disk_get_flag'
parted.c:(.text+0x51b0): undefined reference to `ped_disk_set_flag'
parted.c:(.text+0x51cc): undefined reference to `ped_disk_commit'
parted.o: In function `do_set':
parted.c:(.text+0x5294): undefined reference to `ped_disk_new'
parted.c:(.text+0x531c): undefined reference to `ped_partition_get_flag'
parted.c:(.text+0x5378): undefined reference to `ped_partition_set_flag'
parted.c:(.text+0x5394): undefined reference to `ped_disk_commit'
parted.o: In function `do_unit':
parted.c:(.text+0x5500): undefined reference to `ped_unit_get_default'
parted.c:(.text+0x5540): undefined reference to `ped_unit_set_default'
parted.o: In function `_init_messages':
parted.c:(.text+0x55f0): undefined reference to `ped_partition_flag_next'
parted.c:(.text+0x5634): undefined reference to `ped_partition_flag_get_name'
parted.c:(.text+0x5650): undefined reference to `ped_partition_flag_next'
parted.c:(.text+0x56c8): undefined reference to `ped_disk_flag_next'
parted.c:(.text+0x570c): undefined reference to `ped_disk_flag_get_name'
parted.c:(.text+0x5728): undefined reference to `ped_disk_flag_next'
parted.c:(.text+0x57d8): undefined reference to `ped_unit_get_name'
parted.c:(.text+0x586c): undefined reference to `ped_disk_type_get_next'
parted.c:(.text+0x58e8): undefined reference to `ped_disk_type_get_next'
parted.c:(.text+0x5960): undefined reference to `ped_file_system_type_get_next'
parted.c:(.text+0x59bc): undefined reference to `ped_file_system_type_get_next'
parted.c:(.text+0x59d8): undefined reference to `ped_file_system_alias_get_next'
parted.c:(.text+0x5a34): undefined reference to `ped_file_system_alias_get_next'
parted.o: In function `_version':
parted.c:(.text+0x666c): undefined reference to `version_etc'
parted.o: In function `_parse_options':
parted.c:(.text+0x66e4): undefined reference to `rpl_getopt_long'
parted.c:(.text+0x6788): undefined reference to `rpl_optarg'
parted.c:(.text+0x678c): undefined reference to `rpl_optarg'
parted.c:(.text+0x6790): undefined reference to `argmatch_die'
parted.c:(.text+0x6794): undefined reference to `argmatch_die'
parted.c:(.text+0x67c0): undefined reference to `__xargmatch_internal'
parted.c:(.text+0x6834): undefined reference to `program_name'
parted.c:(.text+0x6838): undefined reference to `program_name'
parted.c:(.text+0x68c8): undefined reference to `rpl_optind'
parted.c:(.text+0x68cc): undefined reference to `rpl_optind'
parted.c:(.text+0x68e4): undefined reference to `rpl_optind'
parted.c:(.text+0x68e8): undefined reference to `rpl_optind'
parted.o: In function `_choose_device':
parted.c:(.text+0x6950): undefined reference to `ped_device_get'
parted.c:(.text+0x69a8): undefined reference to `ped_device_probe_all'
parted.c:(.text+0x69b4): undefined reference to `ped_device_get_next'
parted.c:(.text+0x69dc): undefined reference to `ped_exception_throw'
parted.c:(.text+0x6a0c): undefined reference to `ped_device_open'
parted.o: In function `_init':
parted.c:(.text+0x6b30): undefined reference to `ped_timer_new'
parted.o: In function `_done':
parted.c:(.text+0x6bf8): undefined reference to `ped_disk_destroy'
parted.c:(.text+0x6c34): undefined reference to `ped_exception_throw'
parted.c:(.text+0x6c7c): undefined reference to `ped_exception_throw'
parted.c:(.text+0x6c88): undefined reference to `ped_device_close'
parted.c:(.text+0x6c9c): undefined reference to `ped_timer_destroy'
parted.o: In function `main':
parted.c:(.text+0x6d00): undefined reference to `set_program_name'
parted.c:(.text+0x6d08): undefined reference to `close_stdout'
parted.c:(.text+0x6d0c): undefined reference to `close_stdout'
strlist.o: In function `wchar_strdup':
strlist.c:(.text+0x120): undefined reference to `xstrdup'
strlist.o: In function `gettext_to_wchar':
strlist.c:(.text+0x158): undefined reference to `xstrdup'
strlist.o: In function `wchar_to_str':
strlist.c:(.text+0x194): undefined reference to `xstrdup'
strlist.o: In function `str_list_alloc':
strlist.c:(.text+0x274): undefined reference to `xmalloc'
strlist.o: In function `str_list_convert':
strlist.c:(.text+0x86c): undefined reference to `xstrdup'
strlist.o: In function `str_list_print_wrap':
strlist.c:(.text+0xb7c): undefined reference to `ped_assert'
table.o: In function `table_new':
table.c:(.text+0x48): undefined reference to `xmalloc'
table.o: In function `table_calc_column_widths':
table.c:(.text+0x2f0): undefined reference to `xmalloc'
table.o: In function `table_add_row':
table.c:(.text+0x4b8): undefined reference to `xrealloc'
table.o: In function `table_add_row_from_strlist':
table.c:(.text+0x558): undefined reference to `xmalloc'
table.c:(.text+0x588): undefined reference to `xstrdup'
table.c:(.text+0x5b0): undefined reference to `xalloc_die'
table.o: In function `table_render_row':
table.c:(.text+0x77c): undefined reference to `xrealloc'
table.c:(.text+0x844): undefined reference to `xmalloc'
table.o: In function `table_render':
table.c:(.text+0xaac): undefined reference to `xmalloc'
ui.o: In function `sa_sigsegv_handler':
ui.c:(.text+0x2d8): undefined reference to `ped_assert'
ui.c:(.text+0x350): undefined reference to `ped_assert'
ui.o: In function `_print_exception_text':
ui.c:(.text+0xa74): undefined reference to `ped_exception_get_type_string'
ui.o: In function `command_line_pop_word':
ui.c:(.text+0xc80): undefined reference to `ped_assert'
ui.o: In function `_construct_prompt':
ui.c:(.text+0x1158): undefined reference to `ped_assert'
ui.o: In function `command_line_get_sector':
ui.c:(.text+0x1780): undefined reference to `ped_unit_format'
ui.c:(.text+0x1848): undefined reference to `ped_geometry_new'
ui.c:(.text+0x1900): undefined reference to `ped_unit_parse'
ui.o: In function `command_line_get_device':
ui.c:(.text+0x1adc): undefined reference to `ped_device_get'
ui.o: In function `command_line_get_disk':
ui.c:(.text+0x1bf4): undefined reference to `ped_disk_new'
ui.o: In function `command_line_get_partition':
ui.c:(.text+0x1cb4): undefined reference to `ped_exception_throw'
ui.c:(.text+0x1cd4): undefined reference to `ped_disk_get_partition'
ui.c:(.text+0x1cfc): undefined reference to `ped_exception_throw'
ui.o: In function `command_line_get_fs_type':
ui.c:(.text+0x1db8): undefined reference to `ped_exception_throw'
ui.c:(.text+0x1dd0): undefined reference to `ped_file_system_type_get'
ui.c:(.text+0x1dfc): undefined reference to `ped_exception_throw'
ui.o: In function `command_line_get_disk_type':
ui.c:(.text+0x1ed0): undefined reference to `ped_exception_throw'
ui.c:(.text+0x1ee8): undefined reference to `ped_disk_type_get'
ui.c:(.text+0x1f34): undefined reference to `ped_assert'
ui.o: In function `command_line_get_disk_flag':
ui.c:(.text+0x1f8c): undefined reference to `ped_disk_is_flag_available'
ui.c:(.text+0x1fa0): undefined reference to `ped_disk_flag_get_name'
ui.c:(.text+0x1fd8): undefined reference to `ped_disk_flag_next'
ui.c:(.text+0x2028): undefined reference to `ped_disk_flag_get_by_name'
ui.o: In function `command_line_get_part_flag':
ui.c:(.text+0x20a4): undefined reference to `ped_partition_is_flag_available'
ui.c:(.text+0x20b8): undefined reference to `ped_partition_flag_get_name'
ui.c:(.text+0x20f0): undefined reference to `ped_partition_flag_next'
ui.c:(.text+0x2140): undefined reference to `ped_partition_flag_get_by_name'
ui.o: In function `_can_create_primary':
ui.c:(.text+0x21b4): undefined reference to `ped_disk_get_partition'
ui.c:(.text+0x21e0): undefined reference to `ped_disk_get_max_primary_partition_count'
ui.o: In function `_can_create_extended':
ui.c:(.text+0x225c): undefined reference to `ped_disk_type_check_feature'
ui.c:(.text+0x227c): undefined reference to `ped_disk_extended_partition'
ui.o: In function `_can_create_logical':
ui.c:(.text+0x22d8): undefined reference to `ped_disk_type_check_feature'
ui.c:(.text+0x22f8): undefined reference to `ped_disk_extended_partition'
ui.o: In function `command_line_get_part_type':
ui.c:(.text+0x2428): undefined reference to `ped_exception_throw'
ui.c:(.text+0x2480): undefined reference to `ped_exception_throw'
ui.o: In function `command_line_get_ex_opt':
ui.c:(.text+0x25c0): undefined reference to `ped_exception_get_option_string'
ui.c:(.text+0x25e0): undefined reference to `ped_exception_get_option_string'
ui.c:(.text+0x2668): undefined reference to `ped_exception_get_option_string'
ui.c:(.text+0x268c): undefined reference to `ped_exception_get_option_string'
ui.o: In function `command_line_get_unit':
ui.c:(.text+0x2834): undefined reference to `ped_unit_get_name'
ui.c:(.text+0x286c): undefined reference to `ped_unit_get_default'
ui.c:(.text+0x2878): undefined reference to `ped_unit_get_name'
ui.c:(.text+0x28bc): undefined reference to `ped_unit_get_by_name'
ui.o: In function `init_ex_opt_str':
ui.c:(.text+0x29b4): undefined reference to `ped_exception_get_option_string'
ui.c:(.text+0x29c4): undefined reference to `ped_exception_get_option_string'
ui.o: In function `init_fs_type_str':
ui.c:(.text+0x2d90): undefined reference to `ped_file_system_type_get_next'
ui.c:(.text+0x2df0): undefined reference to `ped_file_system_type_get_next'
ui.c:(.text+0x2e0c): undefined reference to `ped_file_system_alias_get_next'
ui.c:(.text+0x2e6c): undefined reference to `ped_file_system_alias_get_next'
ui.o: In function `init_disk_type_str':
ui.c:(.text+0x2ebc): undefined reference to `ped_disk_type_get_next'
ui.c:(.text+0x2f1c): undefined reference to `ped_disk_type_get_next'
ui.o: In function `init_ui':
ui.c:(.text+0x2fe8): undefined reference to `ped_exception_set_handler'
ui.o: In function `done_ui':
ui.c:(.text+0x31d4): undefined reference to `ped_exception_set_handler'
collect2: error: ld returned 1 exit status
依据打印信息应该是没有包含到对应的.o才对,然而有时候有些错真的很让人无语,把编译命令的依赖库.a和.o文件顺序调换就顺利得到:
file parted
parted: ELF 32-bit LSB executable, MIPS, MIPS32 rel2 version 1, statically linked, for GNU/Linux 3.10.14, not stripped