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] Win10 CMakeList.txt Error

From: Pascal Quantin <pascal.quantin@xxxxxxxxx>
Date: Mon, 14 Mar 2016 17:32:50 +0100


2016-03-14 15:46 GMT+01:00 T. Scholz <scholzt234@xxxxxxxxxxxxxx>:
The Problem is, that there is no folder at "D:/Development/wireshark-win64-libs". Last time I started CMake for win7 compilation the folder and its content was automatically be downloaded, but right now I don't know how to get the folder with its content by myself.

At which part will it be downloaded? Maybe there Is a failure at this point?

It's supposed to be downloaded while generating CMake files through PowerShell (it is running the tools/win-setup.ps1 script). Just gave it a try and it works fine for me.

Here is the corresponding code in CMakeLists.txt

    # Download third-party libraries
    file (TO_NATIVE_PATH ${CMAKE_SOURCE_DIR}/tools/win-setup.ps1 _win_setup)
    file (TO_NATIVE_PATH ${_PROJECT_LIB_DIR} _ws_lib_dir)
    if(MSVC14)
        set(_vsversion_args "14")
    elseif(MSVC12)
        set(_vsversion_args "12")
    elseif(MSVC11)
        set(_vsversion_args "11")
    elseif(MSVC10)
        set(_vsversion_args "10")
    else()
        message(FATAL_ERROR "Unsupported compiler ${CMAKE_C_COMPILER}")
    endif()

    # Is it possible to have a one-time, non-cached option in CMake? If
    # so, we could add a "-DFORCE_WIN_SETUP" which passes -Force to
    # win-setup.ps1.
    execute_process(
        COMMAND ${POWERSHELL_COMMAND} "\"${_win_setup}\"" -Destination "${_ws_lib_dir}" -Platform ${WIRESHARK_TARGET_PLATFORM} -VSVersion ${_vsversion_args}
        RESULT_VARIABLE _win_setup_failed
    )
    if (${_win_setup_failed})
        message(FATAL_ERROR "Windows setup (win-setup.ps1) failed.")
    endif()

    # XXX Add a dependency on ${_ws_lib_dir}/current_tag.txt?


Regards



Am 14.03.2016 um 10:57 schrieb T. Scholz:
Hello everyone

today I tried to compile Wireshark for my laptop. (win10 - x64) Therefore I just did the same as I did before for win7 compilation mentioned in the dev guide. Right now I'm getting an Error using CMake:

################################
CMake Error at CMakeLists.txt:758 (add_subdirectory):
  add_subdirectory given source
  "D:/Development/wireshark-win64-libs/zlib-1.2.8-ws" which is not an
  existing directory.


CMake Error at CMakeLists.txt:763 (set_target_properties):
  set_target_properties Can not find target to add properties to: zlib


CMake Error at CMakeLists.txt:765 (set_target_properties):
  set_target_properties Can not find target to add properties to: zlibstatic


-- Packagelist: AIRPCAP;CAP;CARES;GCRYPT;GEOIP;GLIB2;GMODULE2;GNUTLS;GTHREAD2;GTK2;Gettext;Git;HtmlViewer;KERBEROS;LEX;LIBSSH;LUA;M;PCAP;POD;PORTAUDIO;Perl;PythonInterp;Qt5Core;Qt5LinguistTools;Qt5Multimedia;Qt5PrintSupport;Qt5Svg;Qt5Widgets;Qt5WinExtras;SBC;SED;SETCAP;SH;SMI;WINSPARKLE;YACC;YAPP;ZLIB
-- Could NOT find AIRPCAP (missing:  AIRPCAP_INCLUDE_DIR AIRPCAP_LIBRARY)
-- AIRPCAP NOT FOUND
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'libcap'
-- Could NOT find CAP (missing:  CAP_LIBRARY CAP_INCLUDE_DIR)
-- CAP NOT FOUND
-- Could NOT find CARES (missing:  CARES_LIBRARY CARES_INCLUDE_DIR)
-- CARES NOT FOUND
-- Could NOT find GCRYPT (missing:  GCRYPT_LIBRARY GCRYPT_INCLUDE_DIR) (Required is at least version "1.4.2")
-- GCRYPT NOT FOUND
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'geoip'
-- Could NOT find GEOIP (missing:  GEOIP_LIBRARY GEOIP_INCLUDE_DIR)
-- GEOIP NOT FOUND
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'glib-2.0>=2.14.0'
CMake Error at C:/ProgramData/chocolatey/lib/cmake.portable/tools/cmake-3.5.0-win32-x86/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find GLIB2 (missing: GLIB2_LIBRARY GLIB2_MAIN_INCLUDE_DIR)
Call Stack (most recent call first):
C:/ProgramData/chocolatey/lib/cmake.portable/tools/cmake-3.5.0-win32-x86/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  cmake/modules/FindGLIB2.cmake:90 (find_package_handle_standard_args)
  CMakeLists.txt:829 (find_package)


-- Configuring incomplete, errors occurred!
See also "D:/Development/wsbuild64_VS2013/CMakeFiles/CMakeOutput.log".
See also "D:/Development/wsbuild64_VS2013/CMakeFiles/CMakeError.log".
################################

Here is my batch file content:
################################
@echo off

echo Adding Environment Vars for Wireshark-Qt ...
set CYGWIN=nodosfilewarning
set WIRESHARK_BASE_DIR=D:\Development
set WIRESHARK_TARGET_PLATFORM=win64
set QT5_BASE_DIR=D:\Development\Qt5.5\5.5\msvc2013_64
set WIRESHARK_VERSION_EXTRA=(x64_TS_PS)
set WIRESHARK_CYGWIN_INSTALL_PATH=C:\Cygwin
set VisualStudioVersion=12.0
title Command Prompt (VS 2013 x64)
echo Finished settings for enironment vars ...
echo Adding new directory for Wireshark x64 ...
mkdir D:\Development\wsbuild64_VS2013
cd D:\Development\wsbuild64_VS2013
echo Ready for preparing VS_Cmd_x64 ...
################################

Since Zlib is responsible for the error, I checked my Cygwin installation whether it is installed. Looking on the package list of cygwin, "zlib", "zlib-devel" and "zlib0"  v1.2.8.3 are installed.

Is it possible to compile Wireshark for win10 machines or did I just make a simple mistake, which I haven't notieced yet?

Regards

T. Scholz


---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus



---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
            mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe