军事研究员 2023-06-01 09:25 采纳率: 98.6%
浏览 18
已结题

在Docker中编译报错-20230601

##在Docker中编译报错-20230601

include/generated/nvtversion.h:1:1: error: expected identifier or '(' before '-' token
include/generated/nvtversion.h:1:4: error: stray '#' in program


make[1]: *** [sub-make] Error 2
linux: Build finish
In file included from ../arch/mips/nvt-boards/na51023/nvt-info.c:22:0:
include/generated/nvtversion.h:1:1: error: expected identifier or '(' before '-' token
 -e #define NVT_UTS_RELEASE  "4.1.0_e46cb0d"
 ^
include/generated/nvtversion.h:1:4: error: stray '#' in program
 -e #define NVT_UTS_RELEASE  "4.1.0_e46cb0d"
    ^
../arch/mips/nvt-boards/na51023/nvt-info.c: In function 'nvt_version_show':
../arch/mips/nvt-boards/na51023/nvt-info.c:299:34: error: 'NVT_UTS_RELEASE' undeclared (first use in this function)
  seq_printf(m, "Version: %s \n", NVT_UTS_RELEASE);
                                  ^
../arch/mips/nvt-boards/na51023/nvt-info.c:299:34: note: each undeclared identifier is reported only once for each function it appears in
make[4]: *** [arch/mips/nvt-boards/na51023/nvt-info.o] Error 1
make[3]: *** [arch/mips/nvt-boards/na51023] Error 2
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [arch/mips] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [sub-make] Error 2
make: *** [linux] Error 2
  • 写回答

2条回答 默认 最新

  • 于扶摇 2023-06-02 00:09
    关注

    可以初步判断问题出现在Docker容器中的编译过程中。可能的原因包括:

    NVT SDK 6.7x 版本与当前Docker容器中的编译器版本不兼容;
    Docker容器中的编译环境缺失了必要的依赖项或配置错误;
    NVT SDK源代码中存在错误或语法问题。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 系统已结题 7月20日
  • 已采纳回答 7月12日
  • 修改了问题 6月3日
  • 修改了问题 6月1日
  • 展开全部