nmake : NMAKE : 致命错误 U1073: 不知道如何制作 '"C:/Program Files (x86)/Git/nologo"'

Posted

技术标签:

【中文标题】nmake : NMAKE : 致命错误 U1073: 不知道如何制作 \'"C:/Program Files (x86)/Git/nologo"\'【英文标题】:nmake : NMAKE : fatal error U1073: don't know how to make '"C:/Program Files (x86)/Git/nologo"'nmake : NMAKE : 致命错误 U1073: 不知道如何制作 '"C:/Program Files (x86)/Git/nologo"' 【发布时间】:2019-06-05 04:56:51 【问题描述】:

我刚刚下载了 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.

【问题讨论】:

cat?有cygwin参与吗?还是 mingw32? 我正在使用 mingw32 终端来执行命令 不使用mingw32会怎样? 我试过了,我得到一个错误 - 'perl' 不被识别为内部或外部命令、可运行程序或批处理文件。我正在尝试在系统路径中添加 perl 模块,但不确定 /usr/bin/perl.exe windows 路径 安装 Perl for Windows 解决了我从 cmd 运行脚本时的问题 【参考方案1】:

我通过编辑 build.pl python 文件并将“nmake /nologo”的所有实例替换为“nmake”,从 Visual Studio x86 Native Tools Command Prompt for VS 2019 成功构建了 NetSNMP

【讨论】:

以上是关于nmake : NMAKE : 致命错误 U1073: 不知道如何制作 '"C:/Program Files (x86)/Git/nologo"'的主要内容,如果未能解决你的问题,请参考以下文章

vlfeat nmake:致命错误 U1073:不知道如何制作“msvcr100.dll”

NMAKE:致命错误 U1077:“cl.exe”:返回代码“0x1”停止。在命令提示符下

nmake - 关于转义的简单问题

nmake 编译错误

nmake - 模拟 eval 函数

nmake u1034 分隔符丢失