2014-02-28 140 views
0

我在運行verify_tools時遇到問題,無法在Windows上生成Wireshark。生成文件失敗,出現以下關於無法找到文件的錯誤。Wireshark verify_tools失敗,顯示「沒有這樣的文件或目錄」

C:\Development\wireshark>nmake -f Makefile.nmake verify_tools 

Microsoft (R) Program Maintenance Utility Version 10.00.40219.01 
Copyright (C) Microsoft Corporation. All rights reserved. 

tools/win64-setup.sh: line 12: /cygdrive/c/Development/wireshark/tools/win-setup: No such file or directory 
tools/win64-setup.sh: line 12: exec: /cygdrive/c/Development/wireshark/tools/win: cannot execute: No such file or directory 
tools/win64-setup.sh: line 12: /cygdrive/c/Development/wireshark/tools/win-setup: No such file or directory 
tools/win64-setup.sh: line 12: exec: /cygdrive/c/Development/wireshark/tools/win: cannot execute: No such file or directory 
NMAKE : fatal error U1077: 'C:\Users\indiv\apps\cygwin\bin\bash.EXE' : return code '0x7e' 
Stop. 

要調試,我改變win64-setup.sh並使其打印WIN_SETUP

echo WIN_SETUP: [$WIN_SETUP] 
exec $WIN_SETUP [email protected] 

結果很奇怪。可能是由於一些行尾問題。

C:\Development\wireshark>nmake -f Makefile.nmake verify_tools 

Microsoft (R) Program Maintenance Utility Version 10.00.40219.01 
Copyright (C) Microsoft Corporation. All rights reserved. 

]IN_SETUP: [tools/win-setup.sh 

我該如何解決或解決此問題?

回答

0

Wireshark構建依賴於來自cygwin的所有支持實用程序,但cl,linknmake除外。您的路徑設置爲使得一些支持實用程序來自您環境中的其他地方。就像從安裝gnuwin32或其他東西。

爲便於說明,假設將變量CYGWIN設置爲您的cygwin路徑,如c:\cygwin\bin

你可能會做這樣的事情,通過Wireshark的維基的建議:

set PATH=%PATH%;%CYGWIN% 
call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd" /Release /x64 

而不是做這樣的說法的,Cygwin的較早移動路徑搜索順序,使可執行文件始終從那裏來的。然後設置您的Windows構建環境,以便微軟的link在cygwin的link之前。

set PATH=%CYGWIN%;%PATH% 
call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd" /Release /x64 

當你做出這些改變,以重新啓動外殼擦拭舊環境完全因爲SetEnv.cmd可能已緩存的舊環境,這將阻止您更改%PATH%不要忘記。

然後你得到這個,而不是當您運行verify_tools規則:

c:\Development\wireshark>nmake -f Makefile.nmake verify_tools 

Microsoft (R) Program Maintenance Utility Version 10.00.40219.01 
Copyright (C) Microsoft Corporation. All rights reserved. 

Checking for required applications: 
     cl: /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/Bin/cl 
     link: /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/Bin/link 
     nmake: /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/Bin/nmake 
     bash: /usr/bin/bash 
     bison: /usr/bin/bison 
     flex: /usr/bin/flex 
     env: /usr/bin/env 
     grep: /usr/bin/grep 
     /usr/bin/find: /usr/bin/find 
     peflags: /usr/bin/peflags 
     perl: /usr/bin/perl 
     sed: /usr/bin/sed 
     unzip: /usr/bin/unzip 
     wget: /usr/bin/wget 
相關問題