对ubuntu系统使用buildroot构建根文件系统
发生错误如下
gdbusauth.c:1302:11: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
1302 | debug_print ("SERVER: WaitingForBegin, read '%s'", line);
gdbusmessage.c:2702:30: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
2702 | tupled_signature_str = g_strdup_printf ("(%s)", signature_str);
通过百度发现是该两文件内缺少了条件
首先寻找到这两个文件
sudo find / -name gdbusauth.c
sudo find / -name gdbusmessage.c
若是寻找不到则make clean 重新继续make all再寻找 直到找到为止
然后进入目录 打开
sudo vi gdbusauth.c
#进入vi编辑器 根据错误找到第1302行 可在一般模式输入1302gg移动到该位置
#在错误前输入 if(line != NULL)
#:wq退出保存
同理
sudo vi gdbusmessage.c
#进入vi编辑器 根据错误找到第2702行 可在一般模式输入2702gg移动到该位置
#在错误前输入 if(signature_str!= NULL)
#:wq退出保存
接着继续make all 然后等到死(bushi 大概两到三小时,所以不建议在宿舍快熄灯的时候运行
finally success!!!!!!