我刚刚下载了Net-SNMP代码,并尝试为Win OS构建。我已经在系统路径中添加了我的VC二进制文件。执行以下命令时,安装脚本将引发错误:
system("nmake /nologo clean" . ($logging ? " > clean.out 2>&1" : "")) == 0 || die ($logging ? "Build error (see clean.out)" : "Build error (see above)");
错误是:
$ cat clean.out
Microsoft (R) Program Maintenance Utility Version 14.15.26730.0
Copyright (C) Microsoft Corporation. All rights reserved.
NMAKE : fatal error U1073: don't know how to make '"C:/Program Files (x86)/Git/nologo"'
Stop.
如何解决该问题?
MINGW64 /c/tools/netsnmp/net-snmp-5.8/win32
$ ./build.bat
Net-SNMP build and install options
==================================
1. OpenSSL support: disabled
2. OpenSSL include directory: C:\OpenSSL-Win32\include
3. OpenSSL library director: C:\OpenSSL-Win32\lib\VC
4. Platform SDK support: disabled
5. Install path: c:/usr
6. Install after build: enabled
7. Perl modules: disabled
8. Install perl modules: disabled
9. Quiet build (logged): enabled
10. Debug mode: disabled
11. IPv6 transports (requires SDK): disabled
12. winExtDLL agent (requires SDK): disabled
13. Link type: static
14. Install development files disabled
F. Finished - start build
Q. Quit - abort build
Select option to set / toggle: F
Building...
Creating *.out log files.
Deleting old log files...
Running Configure...
Cleaning...
Build error (see clean.out) at build.pl line 196, <> line 1.
MINGW64 /c/tools/netsnmp/net-snmp-5.8/win32
$ cat clean.out
Microsoft (R) Program Maintenance Utility Version 14.15.26730.0
Copyright (C) Microsoft Corporation. All rights reserved.
NMAKE : fatal error U1073: don't know how to make '"C:/Program Files (x86)/Git/nologo"'
Stop.
MINGW64 /c/tools/netsnmp/net-snmp-5.8/win32
$ nmake /nologo clean
Microsoft (R) Program Maintenance Utility Version 14.15.26730.0
Copyright (C) Microsoft Corporation. All rights reserved.
NMAKE : fatal error U1073: don't know how to make '"C:/Program Files (x86)/Git/nologo"'
Stop.
答案 0 :(得分:0)
我通过编辑 build.pl python 文件并将“nmake /nologo”的所有实例替换为“nmake”,从 Visual Studio x86 Native Tools Command Prompt for VS 2019 成功构建了 NetSNMP