谷动谷力

 找回密码
 立即注册
查看: 1857|回复: 0
打印 上一主题 下一主题
收起左侧

【openwrt】编译OpenWRT 出错unsquashfs undefined reference to makedev解...

[复制链接]
跳转到指定楼层
楼主
发表于 2023-7-7 16:35:07 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 sunsili 于 2023-7-7 17:13 编辑

【openwrt】编译OpenWRT 15.05(Chaos Calmer CC)出错unsquashfs undefined reference to makedev解决方法

现象
出错提示:
gcc   unsquashfs.o unsquash-1.o unsquash-2.o unsquash-3.o unsquash-4.o swap.o compressor.o gzip_wrapper.o lzma_xz_wrapper.o xz_wrapper.o lzma_xz_options.o /home/fan/openwrt_CC_mt76xx_omj_source/staging_dir/host/lib/liblzma.a -lpthread -lm -lz -o unsquashfs
/usr/bin/ld: unsquashfs.o: in function create_inode': unsquashfs.c:(.text+0x24dc): undefined reference to makedev'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:242: unsquashfs] Error 1
make[4]: Leaving directory '/home/fan/openwrt_CC_mt76xx_omj_source/build_dir/host/squashfs4.2/squashfs-tools'
make[3]: *** [Makefile:43: /home/fan/openwrt_CC_mt76xx_omj_source/build_dir/host/squashfs4.2/.built] Error 2
make[3]: Leaving directory '/home/fan/openwrt_CC_mt76xx_omj_source/tools/squashfs4'
make[2]: *** [tools/Makefile:123: tools/squashfs4/compile] Error 2
make[2]: Leaving directory '/home/fan/openwrt_CC_mt76xx_omj_source'
make[1]: *** [tools/Makefile:121: /home/fan/openwrt_CC_mt76xx_omj_source/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/stamp/.tools_install_yynyynynynyyyyyyyyynyyyyyyyyynyyyyynnyyynnyynnnyy] Error 2
make[1]: Leaving directory '/home/fan/openwrt_CC_mt76xx_omj_source'
make: *** [/home/fan/openwrt_CC_mt76xx_omj_source/include/toplevel.mk:183: world] Error 2

解决方法
修改:
vim build_dir/host/squashfs4.2/squashfs-tools/unsquashfs.c
在代码头部添加
#include <sys/sysmacros.h>


+10

本帖被以下淘专辑推荐:

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|深圳市光明谷科技有限公司|光明谷商城|Sunshine Silicon Corpporation ( 粤ICP备14060730号|Sitemap

GMT+8, 2024-12-28 01:19 , Processed in 0.085136 second(s), 43 queries .

Powered by Discuz! X3.2 Licensed

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表