错误打印:
In file included from tools/env/fw_env.c:38:0:
/home/bitq/ADALM_PLUTO/plutosdr-fw-master/buildroot/output/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/mtd/ubi-user.h:329:3: error: conflicting types for '__packed'
/home/bitq/ADALM_PLUTO/plutosdr-fw-master/buildroot/output/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/mtd/ubi-user.h:313:3: note: previous declaration of '__packed' was here
/home/bitq/ADALM_PLUTO/plutosdr-fw-master/buildroot/output/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/mtd/ubi-user.h:371:3: error: conflicting types for '__packed'
/home/bitq/ADALM_PLUTO/plutosdr-fw-master/buildroot/output/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/mtd/ubi-user.h:313:3: note: previous declaration of '__packed' was here
/home/bitq/ADALM_PLUTO/plutosdr-fw-master/buildroot/output/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/mtd/ubi-user.h:386:3: error: conflicting types for '__packed'
/home/bitq/ADALM_PLUTO/plutosdr-fw-master/buildroot/output/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/mtd/ubi-user.h:313:3: note: previous declaration of '__packed' was here
/home/bitq/ADALM_PLUTO/plutosdr-fw-master/buildroot/output/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/mtd/ubi-user.h:398:3: error: conflicting types for '__packed'
/home/bitq/ADALM_PLUTO/plutosdr-fw-master/buildroot/output/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/mtd/ubi-user.h:313:3: note: previous declaration of '__packed' was here
/home/bitq/ADALM_PLUTO/plutosdr-fw-master/buildroot/output/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/mtd/ubi-user.h:412:4: error: conflicting types for '__packed'
/home/bitq/ADALM_PLUTO/plutosdr-fw-master/buildroot/output/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/mtd/ubi-user.h:313:3: note: previous declaration of '__packed' was here
tools/env/fw_env.c: In function 'fw_env_flush':
tools/env/fw_env.c:508:6: warning: unused variable 'ret' [-Wunused-variable]
scripts/Makefile.host:116: recipe for target 'tools/env/fw_env.o' failed
make[4]: *** [tools/env/fw_env.o] Error 1
Makefile:1457: recipe for target 'envtools' failed
make[3]: *** [envtools] Error 2
package/pkg-generic.mk:221: recipe for target '/home/bitq/ADALM_PLUTO/plutosdr-fw-master/buildroot/output/build/uboot-tools-2018.01/.stamp_built' failed
make[2]: *** [/home/bitq/ADALM_PLUTO/plutosdr-fw-master/buildroot/output/build/uboot-tools-2018.01/.stamp_built] Error 2
Makefile:79: recipe for target '_all' failed
make[1]: *** [_all] Error 2
make[1]: Leaving directory '/home/bitq/ADALM_PLUTO/plutosdr-fw-master/buildroot'
Makefile:91: recipe for target 'buildroot/output/images/rootfs.cpio.gz' failed
make: *** [buildroot/output/images/rootfs.cpio.gz] Error 2
修改方法 修改
output/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/mtd/ubi-user.h
将 __packed 替换为 attribute((packed))