This is our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Hi,

I'm awfully stuck for two days trying to build legacy code(1.8.7) on windows 7, 64bit machine.

I followed the process as below: https://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html

But it fails during CMake.

My understanding from the below log is that required libraries(gmodule-2.0, gthread-2.0) are not found. These libraries are supposed to be in folder 'wireshark-win64-libs' But this folder is not present in my source code.

I'm totally clueless. Request for some pointers so that I can progress ahead

C:\Development\wsbuild64>cmake -DENABLE_CHM_GUIDES=on -G "Visual Studio 12 Win64" ..\wireshark
-- The C compiler identification is MSVC 18.0.31101.0
-- The CXX compiler identification is MSVC 18.0.31101.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- V: 1.8.7, MaV: 1, MiV: 8, PL: 7, EV: .
-- Performing Test WS_C_FLAG_VALID0
-- Performing Test WS_C_FLAG_VALID0 - Failed
-- Performing Test WS_C_FLAG_VALID1
-- Performing Test WS_C_FLAG_VALID1 - Success
-- Performing Test WS_C_FLAG_VALID2
-- Performing Test WS_C_FLAG_VALID2 - Failed
-- Performing Test WS_C_FLAG_VALID3
-- Performing Test WS_C_FLAG_VALID3 - Failed
-- Performing Test WS_C_FLAG_VALID4
-- Performing Test WS_C_FLAG_VALID4 - Failed
-- Performing Test WS_C_FLAG_VALID5
-- Performing Test WS_C_FLAG_VALID5 - Failed
-- Performing Test WS_C_FLAG_VALID6
-- Performing Test WS_C_FLAG_VALID6 - Failed
-- Performing Test WS_C_FLAG_VALID7
-- Performing Test WS_C_FLAG_VALID7 - Failed
-- Performing Test WS_C_FLAG_VALID8
-- Performing Test WS_C_FLAG_VALID8 - Failed
-- Performing Test WS_C_FLAG_VALID9
-- Performing Test WS_C_FLAG_VALID9 - Failed
-- Performing Test WS_C_FLAG_VALID10
-- Performing Test WS_C_FLAG_VALID10 - Failed
-- Performing Test WS_C_FLAG_VALID11
-- Performing Test WS_C_FLAG_VALID11 - Failed
-- Performing Test WS_C_FLAG_VALID12
-- Performing Test WS_C_FLAG_VALID12 - Failed
statuscheck linker flag - test linker flags: -Wl,--as-needed
-- Performing Test WS_LD_FLAG_VALID0
-- Performing Test WS_LD_FLAG_VALID0 - Failed
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'glib-2.0>=2.14.0'
GLIB2_FOUND
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'gmodule-2.0'
-- Could NOT find GMODULE2
GMODULE2_FOUND
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'gthread-2.0'
-- Could NOT find GTHREAD2
GTHREAD2_FOUND
-- Could NOT find M (missing:  M_LIBRARY)
M_FOUND
-- Found LEX: C:/cygwin64/bin/flex.exe
LEX_FOUND
-- LEX includes:
-- LEX libs:
-- Found YACC: C:/cygwin64/bin/bison.exe
YACC_FOUND
-- YACC includes:
-- YACC libs:
-- Found Perl: C:/cygwin64/bin/perl.exe (found version "5.22.2")
Perl_FOUND
-- Perl includes:
-- Perl libs:
-- Found SH: C:/Program Files/Git/bin/sh.exe
SH_FOUND
-- SH includes:
-- SH libs:
-- Found PythonInterp: C:/ProgramData/chocolatey/bin/python.exe (found version "3.5.1")
PythonInterp_FOUND
-- PythonInterp includes:
-- PythonInterp libs:
-- Could NOT find HtmlViewer (missing:  HTML_VIEWER_EXECUTABLE)
HtmlViewer_FOUND
FATAL Pcap include dirs cannot be found
FATALPcap library cannot be found
-- Looking for pcap_version
-- Looking for pcap_version - not found
-- Looking for pcap_open_dead
-- Looking for pcap_open_dead - not found
-- Looking for pcap_freecode
-- Looking for pcap_freecode - not found
-- Looking for pcap_breakloop
-- Looking for pcap_breakloop - not found
-- Looking for pcap_create
-- Looking for pcap_create - not found
-- Looking for pcap_datalink_name_to_val
-- Looking for pcap_datalink_name_to_val - not found
-- Looking for pcap_datalink_val_to_description
-- Looking for pcap_datalink_val_to_description - not found
-- Looking for pcap_datalink_val_to_name
-- Looking for pcap_datalink_val_to_name - not found
-- Looking for pcap_findalldevs
-- Looking for pcap_findalldevs - not found
-- Looking for pcap_free_datalinks
-- Looking for pcap_free_datalinks - not found
-- Looking for pcap_get_selectable_fd
-- Looking for pcap_get_selectable_fd - not found
-- Looking for pcap_lib_version
-- Looking for pcap_lib_version - not found
-- Looking for pcap_list_datalinks
-- Looking for pcap_list_datalinks - not found
-- Looking for pcap_set_datalink
-- Looking for pcap_set_datalink - not found
-- Looking for pcap_open
-- Looking for pcap_open - not found
-- Looking for pcap_findalldevs_ex
-- Looking for pcap_findalldevs_ex - not found
-- Looking for pcap_createsrcstr
-- Looking for pcap_createsrcstr - not found
-- Could NOT find PCAP (missing:  PCAP_INCLUDE_DIRS PCAP_LIBRARIES)
PCAP_FOUND
GTK2_FOUND
-- Could NOT find SMI (missing:  SMI_LIBRARY SMI_INCLUDE_DIR)
SMI_FOUND
-- Could NOT find GCRYPT (missing:  GCRYPT_LIBRARY GCRYPT_INCLUDE_DIR)
GCRYPT_FOUND
-- Could NOT find GNUTLS (missing:  GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR)
GNUTLS_FOUND
-- Could NOT find KERBEROS (missing:  KERBEROS_LIBRARY KERBEROS_INCLUDE_DIR)
KERBEROS_FOUND
-- Could NOT find PORTAUDIO (missing:  PORTAUDIO_LIBRARY PORTAUDIO_INCLUDE_DIR)
PORTAUDIO_FOUND
-- Could NOT find CARES (missing:  CARES_LIBRARY CARES_INCLUDE_DIR)
CARES_FOUND
-- Looking for inflatePrime
-- Looking for inflatePrime - not found
-- Could NOT find ZLIB (missing:  ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
ZLIB_FOUND
-- Could NOT find LUA (missing:  LUA_LIBRARY LUA_INCLUDE_DIR)
LUA_FOUND
-- Could NOT find GEOIP (missing:  GEOIP_LIBRARY GEOIP_INCLUDE_DIR)
GEOIP_FOUND
-- Could NOT find CAP (missing:  CAP_LIBRARY CAP_INCLUDE_DIR)
CAP_FOUND
-- Could NOT find YAPP (missing:  YAPP_EXECUTABLE)
YAPP_FOUND
-- Found POD: C:/cygwin64/bin/pod2man
POD_FOUND
-- POD includes:
-- POD libs:
-- Looking for arpa/inet.h
-- Looking for arpa/inet.h - not found
-- Looking for arpa/nameser.h
-- Looking for arpa/nameser.h - not found
-- Looking for direct.h
-- Looking for direct.h - found
-- Looking for dirent.h
-- Looking for dirent.h - not found
-- Looking for dlfcn.h
-- Looking for dlfcn.h - not found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for grp.h
-- Looking for grp.h - not found
-- Looking for g_ascii_strtoull.h
-- Looking for g_ascii_strtoull.h - not found
-- Looking for inet/aton.h
-- Looking for inet/aton.h - not found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for lauxlib.h
-- Looking for lauxlib.h - not found
-- Looking for memory.h
-- Looking for memory.h - found
-- Looking for netinet/in.h
-- Looking for netinet/in.h - not found
-- Looking for netdb.h
-- Looking for netdb.h - not found
-- Looking for Ntddndis.h
-- Looking for Ntddndis.h - not found
-- Looking for portaudio.h
-- Looking for portaudio.h - not found
-- Looking for pwd.h
-- Looking for pwd.h - not found
-- Looking for stdarg.h
-- Looking for stdarg.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stdlib.h
-- Looking for stdlib.h - found
-- Looking for strings.h
-- Looking for strings.h - not found
-- Looking for string.h
-- Looking for string.h - found
-- Looking for sys/ioctl.h
-- Looking for sys/ioctl.h - not found
-- Looking for sys/param.h
-- Looking for sys/param.h - not found
-- Looking for sys/socket.h

Finally below error:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
GMODULE2_LIBRARIES (ADVANCED)
    linked by target "wiretap" in directory C:/Development/wireshark/wiretap
PCAP_LIBRARY
    linked by target "tshark" in directory C:/Development/wireshark
    linked by target "dftest" in directory C:/Development/wireshark
    linked by target "randpkt" in directory C:/Development/wireshark
    linked by target "epan" in directory C:/Development/wireshark/epan

-- Configuring incomplete, errors occurred!
See also "C:/Development/wsbuild64/CMakeFiles/CMakeOutput.log".
See also "C:/Development/wsbuild64/CMakeFiles/CMakeError.log".

asked 29 Aug '16, 09:05

satishp's gravatar image

satishp
16226
accept rate: 0%

edited 29 Aug '16, 10:22

grahamb's gravatar image

grahamb ♦
19.8k330206


Using CMake doesn't work isn't used for Windows in versions < 2.0.

You have to build using NMake, there's a copy of the older Developers Guide for 1.11 here that may be useful.

permanent link

answered 29 Aug '16, 10:25

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%

edited 30 Aug '16, 01:28

Thanks graham for your quick response. I now switched to nmake but ran into different problems.

My device is Windows 7, 64 bit using Visual studio 10 express

I followed steps as in below link https://www.wireshark.org/~gerald/wsdg_html_2014_01/ChSetupWin32.html

..\..\config.nmake(1035) : fatal error U1050: Can't find C:\wireshark-win32-libs-1.8\vcredist_x86.exe. Have you downloaded it from Microsoft? See the developer's guide section "C-Runtime "Redistributa

As per my understanding it should look in C:\wireshark-win64-libs-1.8. Can you please give me pointers where I might have gone wrong

Below are the tools and they seem to be fine:

    cl: /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/Bin/amd64/cl
    link: /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/Bin/amd64/link
    nmake: /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/Bin/amd64/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
(29 Aug '16, 23:22) satishp

For Express Editions of VS you must manually download the vc redist files and place them in the appropriate locations. See Section 2.2.13 of the Dev Guide.

(30 Aug '16, 01:27) grahamb ♦

Thanks graham for your help, I could fix all the issues

(01 Sep '16, 20:12) satishp
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×103
×15
×3

question asked: 29 Aug '16, 09:05

question was seen: 1,702 times

last updated: 01 Sep '16, 20:12

p​o​w​e​r​e​d by O​S​Q​A