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))

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

bitQ

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值