|
From: | ChenMin |
Subject: | Compiling errors occure, when --enable-discover-only.(On both parted-2.3 and parted-1.8.8) |
Date: | Sun, 13 Jun 2010 13:51:28 +0800 |
Hi, Compiling errors occure, when --enable-discover-only is set. If "--enable-discover-only" isn't set, the parted-2.3 can be builded successfully. parted-1.8.8 still cann't be compiled successfully with --enable-discover-only. I would like to use libparted library on an embeded platform, and only a subset features of libparted are needed. Following is based on parted-2.3. I met 3 errors, 2 compilation errors and 1 linking error. ./configure \ --cache-file=/dev/null \ --build=i386-pc-linux-gnu \ --host=mipsel-unknown-linux-gnu \ --prefix=/usr \ --exec-prefix=/usr \ --bindir=/usr/bin \ --sbindir=/usr/sbin \ --libexecdir=/usr/lib \ --sysconfdir=/etc \ --datadir=/usr/share \ --localstatedir=/var \ --mandir=/usr/man \ --infodir=/usr/info \ --includedir=/home/chenmin/stb225_trunk/stb225_dvn_mapi/stb225/build_stb225_dvn_mapi/staging/usr/include \ --disable-mtrace \ --disable-device-mapper \ --enable-discover-only \ --disable-dynamic-loading \ --disable-fs \ --disable-debug \ --enable-read-only \ --disable-Werror \ --disable-largefile \ --disable-shared \ --disable-nls \ --disable-rpath \ --without-readline \ CC=/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross/bin/mipsel-linux-gcc \ CFLAGS="-Os -D_FILE_OFFSET_BITS=64 -DLARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fgnu89-inline -I/home/chenmin/stb225_trunk/stb225_dvn_mapi/stb225/build_stb225_dvn_mapi/staging/usr/include -I/home/chenmin/stb225_trunk/stb225_dvn_mapi/stb225/build_stb225_dvn_mapi/packages/buildroot/build_mipsel/e2fsprogs-1.41.3/lib" \ LDFLAGS=-L/home/chenmin/stb225_trunk/stb225_dvn_mapi/stb225/build_stb225_dvn_mapi/rootfs/lib ================================================= 1, parted-2.3 release code. ================================================= dos.c:2079: warning: implicit declaration of function 'partition_probe_bios_geometry' CC dvh.lo CC efi_crc32.lo CC gpt.lo gpt.c: In function 'gpt_read': gpt.c:993: error: 'write_back' undeclared (first use in this function) gpt.c:993: error: (Each undeclared identifier is reported only once gpt.c:993: error: for each function it appears in.) make[5]: *** [gpt.lo] Error 1 make[5]: Leaving directory `/home/chenmin/stb225_trunk/stb225_nxp_platform/stb225_tarballs/parted-2.3/libparted/labels' make[4]: *** [all] Error 2 make[4]: Leaving directory `/home/chenmin/stb225_trunk/stb225_nxp_platform/stb225_tarballs/parted-2.3/libparted/labels' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/chenmin/stb225_trunk/stb225_nxp_platform/stb225_tarballs/parted-2.3/libparted' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/chenmin/stb225_trunk/stb225_nxp_platform/stb225_tarballs/parted-2.3' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/chenmin/stb225_trunk/stb225_nxp_platform/stb225_tarballs/parted-2.3' ================================================= 2, Error again with following code change. static int gpt_read (PedDisk *disk) { GPTDiskData *gpt_disk_data = disk->disk_specific; int i; -#ifndef DISCOVER_ONLY +//#ifndef DISCOVER_ONLY int write_back = 0; -#endif +//#endif ================================================= CC sun.lo sun.c: In function 'sun_probe': sun.c:174: error: invalid storage class for function 'sun_alloc' sun.c:239: error: invalid storage class for function 'sun_duplicate' sun.c:255: error: invalid storage class for function 'sun_free' sun.c:262: error: invalid storage class for function 'sun_disk_set_flag' sun.c:275: error: invalid storage class for function 'sun_disk_get_flag' sun.c:287: error: invalid storage class for function 'sun_disk_is_flag_available' sun.c:298: error: invalid storage class for function '_check_geometry_sanity' sun.c:350: error: invalid storage class for function 'sun_read' sun.c:537: error: invalid storage class for function 'sun_partition_new' sun.c:570: error: invalid storage class for function 'sun_partition_duplicate' sun.c:594: error: invalid storage class for function 'sun_partition_destroy' sun.c:604: error: invalid storage class for function 'sun_partition_set_system' sun.c:639: error: invalid storage class for function 'sun_partition_set_flag' sun.c:693: error: invalid storage class for function 'sun_partition_get_flag' sun.c:720: error: invalid storage class for function 'sun_partition_is_flag_available' sun.c:735: error: invalid storage class for function 'sun_get_max_supported_partition_count' sun.c:742: error: invalid storage class for function 'sun_get_max_primary_partition_count' sun.c:748: error: invalid storage class for function 'sun_get_partition_alignment' sun.c:757: error: invalid storage class for function '_get_strict_constraint' sun.c:778: error: invalid storage class for function '_get_lax_constraint' sun.c:804: error: invalid storage class for function 'sun_partition_align' sun.c:828: error: invalid storage class for function 'sun_partition_enumerate' sun.c:875: error: invalid storage class for function 'sun_alloc_metadata' sun.c:918: error: invalid storage class for function 'sun_partition_check' sun.c:918: error: invalid storage class for function 'sun_partition_max_start_sector' sun.c:918: error: invalid storage class for function 'sun_partition_max_length' sun.c:924: error: initializer element is not constant sun.c:924: error: (near initialization for 'sun_disk_ops.disk_set_flag') sun.c:925: error: initializer element is not constant sun.c:925: error: (near initialization for 'sun_disk_ops.disk_get_flag') sun.c:926: error: initializer element is not constant sun.c:926: error: (near initialization for 'sun_disk_ops.disk_is_flag_available') sun.c:928: error: initializer element is not constant sun.c:928: error: (near initialization for 'sun_disk_ops.get_partition_alignment') sun.c:933: error: initializer element is not constant sun.c:933: error: (near initialization for 'sun_disk_ops.alloc') sun.c:933: error: initializer element is not constant sun.c:933: error: (near initialization for 'sun_disk_ops.duplicate') sun.c:933: error: initializer element is not constant sun.c:933: error: (near initialization for 'sun_disk_ops.free') sun.c:933: error: initializer element is not constant sun.c:933: error: (near initialization for 'sun_disk_ops.read') sun.c:933: error: initializer element is not constant sun.c:933: error: (near initialization for 'sun_disk_ops.partition_new') sun.c:933: error: initializer element is not constant sun.c:933: error: (near initialization for 'sun_disk_ops.partition_duplicate') sun.c:933: error: initializer element is not constant sun.c:933: error: (near initialization for 'sun_disk_ops.partition_set_flag') sun.c:933: error: initializer element is not constant sun.c:933: error: (near initialization for 'sun_disk_ops.partition_get_flag') sun.c:933: error: initializer element is not constant sun.c:933: error: (near initialization for 'sun_disk_ops.partition_set_system') sun.c:933: error: initializer element is not constant sun.c:933: error: (near initialization for 'sun_disk_ops.partition_is_flag_available') sun.c:933: error: initializer element is not constant sun.c:933: error: (near initialization for 'sun_disk_ops.partition_align') sun.c:933: error: initializer element is not constant sun.c:933: error: (near initialization for 'sun_disk_ops.partition_destroy') sun.c:933: error: initializer element is not constant sun.c:933: error: (near initialization for 'sun_disk_ops.partition_enumerate') sun.c:933: error: initializer element is not constant sun.c:933: error: (near initialization for 'sun_disk_ops.alloc_metadata') sun.c:933: error: initializer element is not constant sun.c:933: error: (near initialization for 'sun_disk_ops.get_max_primary_partition_count') sun.c:933: error: initializer element is not constant sun.c:933: error: (near initialization for 'sun_disk_ops.get_max_supported_partition_count') sun.c:933: error: initializer element is not constant sun.c:933: error: (near initialization for 'sun_disk_ops.partition_check') sun.c:933: error: initializer element is not constant sun.c:933: error: (near initialization for 'sun_disk_ops.max_length') sun.c:934: error: initializer element is not constant sun.c:934: error: (near initialization for 'sun_disk_ops.max_start_sector') sun.c:954: error: expected declaration or statement at end of input make[5]: *** [sun.lo] Error 1 make[5]: Leaving directory `/home/chenmin/stb225_trunk/stb225_nxp_platform/stb225_tarballs/parted-2.3/libparted/labels' make[4]: *** [all] Error 2 make[4]: Leaving directory `/home/chenmin/stb225_trunk/stb225_nxp_platform/stb225_tarballs/parted-2.3/libparted/labels' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/chenmin/stb225_trunk/stb225_nxp_platform/stb225_tarballs/parted-2.3/libparted' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/chenmin/stb225_trunk/stb225_nxp_platform/stb225_tarballs/parted-2.3' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/chenmin/stb225_trunk/stb225_nxp_platform/stb225_tarballs/parted-2.3' ================================================= 3, Error again with following code change. static int sun_probe (const PedDevice *dev) { PED_ASSERT (dev != NULL, return 0); void *s0; if (!ptt_read_sector (dev, 0, &s0)) return 0; SunRawLabel const *label = (void const *) s0; int ok = 1; /* check magic */ if (PED_BE16_TO_CPU (label->magic) != SUN_DISK_MAGIC) { ok = 0; } else { #ifndef DISCOVER_ONLY if (!sun_verify_checksum(label)) { ok = 0; ped_exception_throw ( PED_EXCEPTION_ERROR, PED_EXCEPTION_CANCEL, _("Corrupted Sun disk label detected.")); } +#endif } -#endif free (s0); return ok; } ================================================= ../libparted/.libs/libparted.a(dos.o): In function `msdos_alloc_metadata': dos.c:(.text+0x7a0): undefined reference to `partition_probe_bios_geometry' dos.c:(.text+0x90c): undefined reference to `partition_probe_bios_geometry' ../libparted/.libs/libparted.a(dos.o): In function `msdos_partition_align': dos.c:(.text+0x150c): undefined reference to `partition_probe_bios_geometry' collect2: ld returned 1 exit status make[4]: *** [parted] Error 1 make[4]: Leaving directory `/home/chenmin/stb225_trunk/stb225_nxp_platform/stb225_tarballs/parted-2.3/parted' make[3]: *** [all] Error 2 make[3]: Leaving directory `/home/chenmin/stb225_trunk/stb225_nxp_platform/stb225_tarballs/parted-2.3/parted' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/chenmin/stb225_trunk/stb225_nxp_platform/stb225_tarballs/parted-2.3' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/chenmin/stb225_trunk/stb225_nxp_platform/stb225_tarballs/parted-2.3' BRs! 使用新一代 Windows Live Messenger 轻松交流和共享! 立刻下载! |
[Prev in Thread] | Current Thread | [Next in Thread] |