On 31 December 2015 at 05:03, Yang Luo <[email protected]> wrote:

> Hi Alexis,
>
> So it seems that I need to build Wireshark from source. I encountered some
> errors when building:
>
> My build machine is Win10 x64. I am using the trunk code of Wireshark (git
> clone https://code.wireshark.org/review/wireshark), VS 2013 Ultimate, QT
> 5.5.1 for MSVC 2013 64bit, CMake 3.4.1 and latest cygwin64. I followed the
> guide here:
> https://www.wireshark.org/docs/wsdg_html_chunked/ChSetupCMake.html#ChWin32Build
> The code is stored here:
> J:\github_repos\wireshark
>
> My commands are:
>
> set CYGWIN=nodosfilewarning
> set WIRESHARK_BASE_DIR=J:\github_repos
> set WIRESHARK_TARGET_PLATFORM=win64
> set QT5_BASE_DIR=C:\Qt\Qt5.5.1\5.5\msvc2013_64
> set WIRESHARK_VERSION_EXTRA=-MonitorEnabled
>
> set WIRESHARK_CYGWIN_INSTALL_PATH=c:\cygwin64
>
> mkdir J:\github_repos\wsbuild64
> cd J:\github_repos\wsbuild64
>
> cmake -DENABLE_CHM_GUIDES=on -G "Visual Studio 12 2013 Win64" ..\wireshark
>
> msbuild /m /p:Configuration=RelWithDebInfo Wireshark.sln
>
>
> And I encountered many errors like below, how to fix these errors? The
> entire build log is in the attachment.
>
>     74>C:\Program Files
> (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5):
> error MSB6006: "cmd.e
>        xe" exited with code 9009.
> [J:\github_repos\wsbuild64\docbook\developer_guide_docbook.vcxproj]
>
>
> 91>J:\github_repos\wireshark-win64-libs\gtk2\include\glib-2.0\gobject/gsignal.h
> : error C2220: warning treated as e
>        rror - no 'object' file generated
> (J:\github_repos\wireshark\ui\gtk\about_dlg.c)
> [J:\github_repos\wsbuild64\ui\g
>        tk\gtkui.vcxproj]
>
> 91>J:\github_repos\wireshark-win64-libs\gtk2\include\glib-2.0\gobject/gsignal.h
> : error C2220: warning treated as e
>        rror - no 'object' file generated
> (J:\github_repos\wireshark\ui\gtk\addr_resolution_dlg.c)
> [J:\github_repos\wsbu
>        ild64\ui\gtk\gtkui.vcxproj]
>          capture_if_dlg.c
>          capture_info_dlg.c
>          color_dlg.c
>
> 91>J:\github_repos\wireshark-win64-libs\gtk2\include\glib-2.0\gobject/gsignal.h
> : warning C4819: The file contains
>        a character that cannot be represented in the current code page
> (936). Save the file in Unicode format to preven
>        t data loss (J:\github_repos\wireshark\ui\gtk\about_dlg.c)
> [J:\github_repos\wsbuild64\ui\gtk\gtkui.vcxproj]
>
> 91>J:\github_repos\wireshark-win64-libs\gtk2\include\glib-2.0\gobject/gsignal.h
> : warning C4819: The file contains
>        a character that cannot be represented in the current code page
> (936). Save the file in Unicode format to preven
>        t data loss
> (J:\github_repos\wireshark\ui\gtk\addr_resolution_dlg.c)
> [J:\github_repos\wsbuild64\ui\gtk\gtkui.vcx
>        proj]
>
> 91>J:\github_repos\wireshark-win64-libs\gtk2\include\glib-2.0\gobject/gsignal.h
> : error C2220: warning treated as e
>        rror - no 'object' file generated
> (J:\github_repos\wireshark\ui\gtk\bytes_view.c)
> [J:\github_repos\wsbuild64\ui\
>        gtk\gtkui.vcxproj]
>
> 91>J:\github_repos\wireshark-win64-libs\gtk2\include\glib-2.0\gobject/gsignal.h
> : error C2220: warning treated as e
>        rror - no 'object' file generated
> (J:\github_repos\wireshark\ui\gtk\capture_dlg.c)
> [J:\github_repos\wsbuild64\ui
>        \gtk\gtkui.vcxproj]
>
> 91>J:\github_repos\wireshark-win64-libs\gtk2\include\glib-2.0\gobject/gsignal.h
> : error C2220: warning treated as e
>        rror - no 'object' file generated
> (J:\github_repos\wireshark\ui\gtk\capture_file_dlg.c)
> [J:\github_repos\wsbuild
>        64\ui\gtk\gtkui.vcxproj]
>
> 91>J:\github_repos\wireshark-win64-libs\gtk2\include\glib-2.0\gobject/gsignal.h
> : error C2220: warning treated as e
>        rror - no 'object' file generated
> (J:\github_repos\wireshark\ui\gtk\color_dlg.c)
> [J:\github_repos\wsbuild64\ui\g
>        tk\gtkui.vcxproj]
>
> 91>J:\github_repos\wireshark-win64-libs\gtk2\include\glib-2.0\gobject/gsignal.h
> : error C2220: warning treated as e
>        rror - no 'object' file generated
> (J:\github_repos\wireshark\ui\gtk\capture_info_dlg.c)
> [J:\github_repos\wsbuild
>        64\ui\gtk\gtkui.vcxproj]
>
>
> Cheers,
> Yang
>
>
I didn't see the attachment, but the MSDN help for that error (
https://msdn.microsoft.com/en-us/library/ms173715.aspx) implies an issue
with the glib headers and the code page (936) used by your command prompt.
Maybe try using a different code page, or build as I do from a
PowerShell shell that is, I think, Unicode.

If building in a PowerShell shell, I use the following PowerShell script to
initialise the shell instance, adapt as required for your installation:

# Environment setup for Wireshark x64

$host.ui.RawUI.WindowTitle = "x64 build"

$env:CYGWIN = "nodosfilewarning"
$env:WIRESHARK_BASE_DIR = "E:\Wireshark"
$env:WIRESHARK_TARGET_PLATFORM = "win64"
$env:QT5_BASE_DIR = "C:\Qt\Qt5.5.0-64\5.5\msvc2013_64"
$env:WIRESHARK_VERSION_EXTRA = "-GMB"

Import-VisualStudioVars 2013 x64

$Global:docmake = 'cmake -DENABLE_CHM_GUIDES=on -G "Visual Studio 12 Win64"
..\wireshark'
$Global:dobuild = "msbuild /m /p:Configuration=RelWithDebInfo Wireshark.sln"
$Global:doprep = "msbuild /m /p:Configuration=RelWithDebInfo
nsis_package_prep.vcxproj"
$Global:dopackage = "msbuild /m /p:Configuration=RelWithDebInfo
nsis_package.vcxproj"


Note that the "Import-VisualStudioVars" command comes from PowerShell
Community Extensions (PSCX - https://pscx.codeplex.com/), and can be
installed with chocolatey (choco install pscx).

The global variables "docmake" etc. are shortcuts for the command lines
used in building and are invoked as "iex $docmake" for example (using the
standard alias "iex" for Invoke-Expression).

-- 
Graham Bloice
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <[email protected]>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:[email protected]?subject=unsubscribe

Reply via email to