ubuntu版本高导致Linux 内核编译错误

报错信息:

/usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x50): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
HOSTLD scripts/genksyms/genksyms
collect2: error: ld returned 1 exit status

yylloc重定义了

解决方法:

修改scripts/dtc目录下的dtc-lexer.lex.c_shipped文件中找到 YYLTYPE yyloc,在之前面加上extern

 

posted @ 2024-04-08 16:27  菜腿慕  阅读(753)  评论(0)    收藏  举报