Ask Your Question
0

windows wireshark build error:CAN NOT FIND GLIB2

asked 2020-12-01 09:31:46 +0000

Drjcool gravatar image

updated 2020-12-01 22:36:40 +0000

grahamb gravatar image

hi, i'am a linux user that know nothing in windows develop,but i just wanna to build wireshark in windows. As i follow the developer's guide book,dowload a lot env.the build the wireshark,error happened:

D:\wsbuild\326build64> cmake -G "Visual Studio 16 2019" -A x64 ..\wireshark-3.2.6
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.17763.
-- The C compiler identification is MSVC 19.28.29334.0
-- The CXX compiler identification is MSVC 19.28.29334.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: D:/install/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/install/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Generating build using CMake 3.18.20081302-MSVC_2
CMake Warning (dev) at D:/install/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to find_package_handle_standard_args (POWERSHELL) does not match the name of the calling package (PowerShell).
  This can lead to problems in calling code that expects find_package result variables (e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/modules/FindPowerShell.cmake:17 (find_package_handle_standard_args)
  CMakeLists.txt:64 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Found POWERSHELL: C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe
-- Building for win64 using Visual Studio 16 2019 Working in D:\wsbuild\wireshark-win64-libs-3.2
Tag 2020-06-30-3.2 not found. Refreshing.
Found 7-zip at C:\ProgramData\chocolatey\tools\7z.exe
Downloading https://anonsvn.wireshark.org/wireshark-win64-libs/tags/2020-06-30-3.2/packages/npcap-0.9994.exe into D:\wsbuild\wireshark-win64-libs-3.2
Verifying D:\wsbuild\wireshark-win64-libs-3.2\npcap-0.9994.exe
Downloading https://anonsvn.wireshark.org/wireshark-win64-libs/tags/2020-06-30-3.2/packages/USBPcapSetup-1.5.4.0.exe into D:\wsbuild\wireshark-win64-libs-3.2
Verifying D:\wsbuild\wireshark-win64-libs-3.2\USBPcapSetup-1.5.4.0.exe
Downloading https://anonsvn.wireshark.org/wireshark-win64-libs/tags/2020-06-30-3.2/packages/AirPcap_Devpack_4_1_0_1622.zip into D:\wsbuild\wireshark-win64-libs-3.2
Verifying D:\wsbuild\wireshark-win64-libs-3.2\AirPcap_Devpack_4_1_0_1622.zip
Downloading https://anonsvn.wireshark.org/wireshark-win64-libs/tags/2020-06-30-3.2/packages/bcg729-1.0.4-win64ws.zip into D:\wsbuild\wireshark-win64-libs-3.2
Verifying D:\wsbuild\wireshark-win64-libs-3.2\bcg729-1.0.4-win64ws.zip
Downloading https://anonsvn.wireshark.org/wireshark-win64-libs/tags/2020-06-30-3.2/packages/brotli-1.0.2-4-win64ws.zip into D:\wsbuild\wireshark-win64-libs-3.2
Verifying D:\wsbuild\wireshark-win64-libs-3.2\brotli-1.0.2-4-win64ws.zip
Downloading https://anonsvn.wireshark.org/wireshark-win64-libs/tags/2020-06-30-3.2/packages/c-ares-1.15.0-win64ws.zip into D:\wsbuild\wireshark-win64-libs-3.2
Verifying D:\wsbuild\wireshark-win64-libs-3.2\c-ares-1.15.0-win64ws.zip
Downloading https://anonsvn.wireshark.org/wireshark-win64-libs/tags/2020-06-30-3.2/packages/gnutls-3.6.3-1-win64ws.zip into D:\wsbuild\wireshark-win64-libs-3.2
Verifying D:\wsbuild\wireshark-win64-libs-3.2\gnutls-3 ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2020-12-01 12:17:53 +0000

grahamb gravatar image

You appear to be building some version of 3.2, not the latest as seen by the 3rd party libs tag of Tag 2020-06-30-3.2. The current build (as can be seen on the buildbot output is 2020-09-14-3.2, although updating your sources to the current version is unlikely to fix your issue.

As noted, CMake is failing to find Glib2. This is normally downloaded as part of the 3rd party libs script and is part of the vcpkg-export bundle, which appears to be downloaded and as there are no errors it looks as though the expansion of the archive has succeeded.

I would suggest deleting your build directory (D:\wsbuild\326build64) and your libs directory (D:\wsbuild\wireshark-win64-libs-3.2), creating a new build dir and running the CMake generation step again.

If the generation still fails, have a look in D:\wsbuild\wireshark-win64-libs-3.2\vcpkg-export-20190318-win64ws\installed\x64-windows\bin for glib dll's.

edit flag offensive delete link more

Comments

I tryed to do what you told me,but useless. the gilb-2.dll is in the dir,but still not find it .I guess that it's maybe the cmakelist.txt error ? we have the lib but it;s still cant' find.

Drjcool gravatar imageDrjcool ( 2020-12-02 02:19:22 +0000 )edit

Have you set the environment variables that point to the libraries?

Chuckc gravatar imageChuckc ( 2020-12-02 03:59:53 +0000 )edit

Oh my god! that it is!!! I set the lib variables after you say ,like:set WIRESHARK_LIB_DIR=c:\wireshark-win64-libs-3.2, then it works!!! oh thanks a lot!~~~~QAQ

Drjcool gravatar imageDrjcool ( 2020-12-02 06:28:20 +0000 )edit

thanks for grahamb and Chucks, great coder!!!!

Drjcool gravatar imageDrjcool ( 2020-12-02 06:30:14 +0000 )edit

Note that it's simpler to set WIRESHARK_BASE_DIR as then CMake will keep the libs separate for 32 bit and 64 bit builds automatically.

grahamb gravatar imagegrahamb ( 2020-12-02 11:09:05 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2020-12-01 09:31:46 +0000

Seen: 971 times

Last updated: Aug 07 '22