linux下xxx:warning: ignoring unsupported character ‘

还原经过:
1 git拉取代码到Windows的nfs目录
2 ubuntu下挂载Windows的nfs
3 cp nfs下代码到ubuntu本地
4 make xxx_defconfig

出现一大堆错误和警告,主要出现在Kconfig及其它几个文件中。
诸如此类:

1 ./Kconfig:warning: ignoring unsupported character ''
2 lib/Kconfig.debug:1747: syntax error
3 lib/Kconfig.debug:1746:warning: ignoring unsupported character ':'
4 ./scripts/kconfig/check.sh: 行 14: 语法错误: 未预期的文件结尾
5 ./scripts/kconfig/lxdialog/check-lxdialog.sh: 行 3: $'\r': 未找到命令
6 ./scripts/kconfig/lxdialog/check-lxdialog.sh: 行 5: 未预期的符号 `$'\r'' 附近有语法错误
 
打开相应文件查看,并未发现什么问题。仔细看报错,’\r’这不是Windows的吗,于是,
Windows是dos文本格式
linux下是unix文本格式

解决方法:

apt-get install dos2unix
find ./ -name Kconfig -exec dos2unix {} \;
find ./ -name Kconfig.debug -exec dos2unix {} \;
....
 
依次对所有报错的文件进行转换

也可以对全部文件转换

find ./ -exec dos2unix {} \;

 
原文链接:https://blog.csdn.net/qq_30659437/article/details/109562363

posted on   lydstory  阅读(697)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
历史上的今天:
2019-12-13 git 使用
2019-12-13 C/C++:GCC/G++ -Wl,-soname 链接选项作用
2019-12-13 nm U -l库的
2019-12-13 定位符号连接错误???
2019-12-13 如何调用.so动态库中的函数,如何把自己的函数导出为.so的动态库函数供别人调用
2019-12-13 Linux(ubuntu)下创建用户没有创建家目录
2019-12-13 c 和 c++ 啊 Make

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示