I am trying to build wireshark using the instructions in https://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html. I have followed the instructions carefully. This is a clean windows 7 PC, with just the software needed per the instructions. The files are building ok up to the point where the Microsoft resource compiler (rx.exe) runs. At this point there is an error message "error RC1015: cannot open include file 'winver.h' It does not appear that the list of include paths presented to rc.exe during the build include the Windows SDK. I cannot find where this list is constructed and then it launches the resource compiler. I have collected the data you requested and hopefully was able to place the two files on my Google drive. It is difficult to do this at work since our corporate IT firewalls have services like Drive blocked. cmake.txt https://drive.google.com/file/d/0B2bPJmyYo1uRYnVoVWt3LUhMY21aRmNLSVZBU1F5MlJrcGpV/view?usp=drivesdk msbuild.txt https://drive.google.com/file/d/0B2bPJmyYo1uRZ3lTMkk0MUxRZHJfR3R4NVcwbGx0UUN5aXVj/view?usp=drivesdk asked 24 Jul '17, 14:10 eckorsberg2 edited 25 Jul '17, 04:47 showing 5 of 13 show 8 more comments |
One Answer:
This might be due to us passing /WX to rc.exe: https://code.wireshark.org/review/#/c/22794/ answered 25 Jul '17, 13:46 Gerald Combs ♦♦ |
We need to see to outputs from your build, the CMake configure step and the msbuild step. You can save the outputs by redirecting to a file and then either edit your question with the output, or as it's likely to be large, saving the files on a file sharing service (with no login required) e.g Google Drive, DropBox etc and editing your question with a link to to the shared files.
To redirect the CMake step use:
and for msbuild, it's best to turn off the parallel build:
I have collected the data you requested and hopefully was able to place the two files on my Google drive. It is difficult to do this at work since our corporate IT firewalls have services like Drive blocked.
cmake.txt https://drive.google.com/file/d/0B2bPJmyYo1uRYnVoVWt3LUhMY21aRmNLSVZBU1F5MlJrcGpV/view?usp=drivesdk
msbuild.txt https://drive.google.com/file/d/0B2bPJmyYo1uRZ3lTMkk0MUxRZHJfR3R4NVcwbGx0UUN5aXVj/view?usp=drivesdk
The output looks good (apart from the build errors).
winver.h should be in
C:\Program Files (x86)\Windows Kits\8.1\Include\um
and that path should be in the environment variableINCLUDE
. Do you have that file, and if so what is the value of that env var?Yes I have that file. Originally I did not have the INCLUDE variable set. Then I added C:\Program Files (x86)\Windows Kits\8.1\Include\um to that variable and repeated the process and got the same results.
The problem seems to be that whatever program or script launches the resource compile (rc.exe) it does not include the full path information. Here is a link to what ultimately is executed by msbuild. I don't know where all these include paths come from but it does not include what we need.
https://drive.google.com/file/d/0B2bPJmyYo1uRWHlVSHpoZnB0RnlDc1BVMERtU1BYMDZYQ084/view?usp=drivesdk
The INCLUDE env var is set by the vs setup batch file that is run when setting up the command line build environment as per Sect 2.2.10 of the WSDG.
Can you confirm you are opening a VS Command Prompt tool to build with?
Yes I am using the VS Command Prompt to build. I have tried to follow the instructions carefully.
fyi
the tools located in C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts
contain this shortcut which I am using VS2013 x64 Cross Tools Command Prompt and that shortcut is actually the below command
%comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"" x86_amd64
Why the cross compile? Not that it should make a difference in this case, but I think the native x64 is faster.
You can inspect vcvarsall.bat and see that it calls
...\VC\bin\x86_amd64\vcvarsx86_amd64.bat
and that batch file sets the INCLUDE variable. However, the setting of the INCLUDE variable is guarded by a check that the env varWindowsSdkDir
is set, and this is set by a call to...\Common7\Tools\VCVarsQueryRegistry.bat
which gets the SDK path from the registry keyHKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1
in the valueInstallationFolder
.So, does your command prompt have an env var
WindowsSdkDir
and if not, do you have the registry value listed above? If not, it would seem you have a broken install of the 8.1 SDK (as installed by VS).Well I downloaded the Windows 8.1 SDK and installed that. Then reran the cmake and msbuild steps but still got the same errors.
These are some of my environment variables that would apply to this build.
VisualStudioVersion=12.0 VS100COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\ VS110COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\ VS120COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\ VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 12.0\ WINDIR=C:\Windows WindowsSdkDir=C:\Program Files (x86)\Windows Kits\8.1\ WindowsSDK_ExecutablePath_x64=C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\ WindowsSDK_ExecutablePath_x86=C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\ windows_tracing_flags=3 windows_tracing_logfile=C:\BVTBin\Tests\installpackage\csilogfile.log WIRESHARK_BASE_DIR=C:\Development WIRESHARK_CYGWIN_INSTALL_PATH=C:\cygwin64 WIRESHARK_TARGET_PLATFORM=win64
You haven't shown the
INCLUDE
var, but please note the pending change 22794 that might be applicable to your issue.Here are some additional env variables. Also assuming pending change 22794 is the root of my problem, when shall I know this is completed?
Here is a link to the output of the env command on the VS2013 x64 Native Tools Command Prompt
https://drive.google.com/file/d/0B2bPJmyYo1uRekFLQ05NSWpzWjNZUGp0ekhWV2pISHJzQWFZ/view?usp=drivesdk
Change 22794 has now been merged to master and the master-2.4 branches, so simply pull all upstream changes into your repo
Note that I was finally able to rebuild with 1 exception. When I downloaded new sources and followed the proscribed build procedure, I got some cmd.exe error during the command line msbuild procedure. But then I opened the project in the Visual Studio 2013 IDE and built successfully. So in that respect I am ok, but I thought you may still want to know at least I had this issue.
Again I created a clean Windows 7 PC install for this configuration, and tried to follow the instructions to the letter. I think in the process I had to manually add a location to my PATH variable but the details of that was lost during the scramble to get the build working.
There shouldn't be any errors, there might be some warnings. You can inspect the output of the build slaves here to see how they compile the code.