ADALM-PLUTO 編譯buildroot 報錯:error: conflicting types for '__packed'

錯誤打印:

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

參考網址:https://github.com/beagleboard/buildroot/blob/master/package/linux-headers/3.0.101/linux-headers-headers_install-fix-__packed-in-exported-kernel-head.patch

修改方法 修改
output/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/mtd/ubi-user.h
將 __packed 替換爲 attribute((packed))

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章