Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Wireshark 3.4.8 build from source tarball fails generating b

From: Graham Bloice <graham.bloice@xxxxxxxxxxxxx>
Date: Fri, 27 Aug 2021 08:42:47 +0100
You don't appear to be following the current Developers Guide steps for building Wireshark.  While it's not the only approach that will work, it is known to work.

A couple of things jump out to me:
  1. Cygwin.  Building wireshark does not need Cygwin, and in the past it has caused issues. If at all possible don't have Cygwin present in your Wireshark build env.
  2. From 1.,  WIRESHARK_CYGWIN_INSTALL_PATH is no longer used or does anything.
  3. No need to set WIRESHARK_TARGET_PLATFORM, that's set by the CMake scripts.
  4. Your Visual Studio environment seems odd, e.g. " -- Selecting Windows SDK version 8.1 to target Windows 6.1.7601. ".  normally VS2019 will have the Windows 10 SDK installed.
  5. As noted by Gerald WIRESHARK_BASE_DIR should NOT be the same as the build dir.  The WSDG steps set this to the parent of the source and build dirs, e.g.
C:\Development
    Wireshark (source dir)
    wsbuild64 (build dir)
    wireshark-win64-libs-xxx


On Thu, 26 Aug 2021 at 21:43, Michael Lum <michael.lum@xxxxxxxxxxxxxxxxx> wrote:
Hi,
 
I'm using the source tarball from the download page, extracted into c:\wireshark-3.4.8
 
I've got multiple Wireshark builds and multiple VS installations.
The last Wireshark build I did was 3.0.1.
 
I was following the Developer's Guide for the most part.
I am not using Git, Asciidoctor, Xsltproc or DocBook.
I installed strawberryperl.
 
I have nuked the ws348-64 directory and retried a couple of times and
always get the same results. (That's good ;))
 
These are my build settings:
 
  set WIRESHARK_BASE_DIR=C:\ws348-64
  set WIRESHARK_VERSION_EXTRA=-StarSolutions-1
  set CYGWIN=nodosfilewarning
  set WIRESHARK_TARGET_PLATFORM=win64
  set QT5_BASE_DIR=C:\Qt\5.15.2\5.15.2\msvc2019_64
  set WIRESHARK_CYGWIN_INSTALL_PATH=c:/cygwin64
Running this with administrator rights:
 
x64 Native Tools Command Prompt for VS 2019
 
The command I ran:
 
"WIRESHARK_CYGWIN_INSTALL_PATH=c:/cygwin64"
cmake -G "Visual Studio 16 2019" -A x64 c:\wireshark-3.4.8\
-- Selecting Windows SDK version 8.1 to target Windows 6.1.7601.
-- Generating build using CMake 3.21.2
-- LTO/IPO is enabled
-- Building for win64 using Visual Studio 16 2019
Working in C:\ws348-64\wireshark-win64-libs-3.4
Tag 2021-05-29-3.4 found. Skipping.
-- CMake build type: RelWithDebInfo
-- V: 3.4.8-StarSolutions-1, MaV: 3, MiV: 4, PL: 8, EV: -StarSolutions-1.
-- Linker flags: /LARGEADDRESSAWARE /MANIFEST:NO /INCREMENTAL:NO /RELEASE /guard:cf
-- Could NOT find Git (missing: GIT_EXECUTABLE)
Java HotSpot(TM) Client VM warning: TieredCompilation is disabled in this release.
-- Could NOT find DOXYGEN (missing: DOXYGEN_EXECUTABLE)
-- Could NOT find SpeexDSP (missing: SPEEXDSP_LIBRARY SPEEXDSP_INCLUDE_DIR) (found version "")
Java HotSpot(TM) Client VM warning: TieredCompilation is disabled in this release.
-- C-Flags:  /MP /Zo /utf-8 /guard:cf /w34295 /w34100 /w34189 /wd4200 /DWIN32 /D_WINDOWS /W3 /MD /Zi /O2 /Ob1 /DNDEBUG
-- CXX-Flags:  /MP /Zo /utf-8 /guard:cf /w34295 /w34100 /w34189 /wd4200 /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MD /Zi /O2 /Ob
1 /DNDEBUG
-- Warnings as errors disabled
-- The following OPTIONAL packages have been found:
...
 
I get the following errors when generating the build files:
 
...
-- Using VCINSTALLDIR: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC
-- Using C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Redist\MSVC\14.29.30133\vcredist_x64.exe for the NSIS installer.
-- Configuring done
CMake Error in epan/CMakeLists.txt:
  Target "epan" INTERFACE_INCLUDE_DIRECTORIES property contains path:
 
    "C:/ws348-64/wireshark-win64-libs-3.4/vcpkg-export-20190318-win64ws/installed/x64-windows/include"
 
  which is prefixed in the build directory.
 

CMake Error in epan/CMakeLists.txt:
  Target "epan" INTERFACE_INCLUDE_DIRECTORIES property contains path:
 
    "C:/ws348-64/wireshark-win64-libs-3.4/vcpkg-export-20190318-win64ws/installed/x64-windows/include"
 
  which is prefixed in the build directory.
 

CMake Error in wsutil/CMakeLists.txt:
  Target "wsutil" INTERFACE_INCLUDE_DIRECTORIES property contains path:
 
    "C:/ws348-64/wireshark-win64-libs-3.4/libgcrypt-1.8.3-win64ws/include"
 
  which is prefixed in the build directory.
 

CMake Error in wsutil/CMakeLists.txt:
  Target "wsutil" INTERFACE_INCLUDE_DIRECTORIES property contains path:
 
    "C:/ws348-64/wireshark-win64-libs-3.4/gnutls-3.6.3-1-win64ws/include"
 
  which is prefixed in the build directory.
 

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
 
C:\ws348-64>
 
I saw there was an old issue related to these kind of errors but that was fixed.
 
Any help would be appreciated.
 
 
Michael Lum (michael.lum@xxxxxxxxxxxxxxxxx) | STAR SOLUTIONS | Principal Software Engineer
4600 Jacombs Road, Richmond BC, Canada V6V 3B1 | +1.604.303.2315
 
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe


--
Graham Bloice