Ask Your Question
0

error MSB6006: "cmd.exe " exited with code 1. [C:\Development\wsbuild64\plugins\epan\homematic\homematic.vcxproj]

asked 2019-05-29 14:59:27 +0000

stbimudd gravatar image

updated 2019-05-30 09:07:54 +0000

grahamb gravatar image

after adding my custom plugin I am getting this error.

"C:\Development\wsbuild64\Wireshark.sln" (default target) (1) ->        "C:\Development\wsbuild64\plugins\epan\homematic\homematic.vcxproj.metaproj" (default target) (27) ->        "C:\Development\wsbuild64\plugins\epan\homematic\homematic.vcxproj" (default target) (124) ->        (CustomBuild target) ->          C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(209,5): error MSB6006: "cmd.exe        " exited with code 1. [C:\Development\wsbuild64\plugins\epan\homematic\homematic.vcxproj]

I looked in visual studio output window and its showing this error :

CMake Error at cmake_install.cmake:37 (file):
file cannot create directory: C:/Program Files
 (x86)/Wireshark/plugins/3.1/epan.

But I installed cmake before. And before adding my custom plugin I was not getting any such error and it was building perfectly.

edit retag flag offensive close merge delete

Comments

Please redirect the msbuild ouput to a file (append 2>&1 > file.txt to the command), post the file on a file sharing site, e.g. Google Drive, DropBox etc. and then post a link to the shared file back here.

You should also note that VS2019 isn't yet used for any official builds of Wireshark, so you're running on the "bleeding edge" here.

grahamb gravatar imagegrahamb ( 2019-05-29 15:30:11 +0000 )edit

https://drive.google.com/file/d/1SFUB...

I have attached my error as well as my plugin in this location. Kindly help.

stbimudd gravatar imagestbimudd ( 2019-05-29 22:53:09 +0000 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-05-30 09:26:24 +0000

grahamb gravatar image

You appear to have an odd and unsupported build environment. From the first line in the error log:

Setting environment for using Microsoft Visual Studio 2010 x64 tools.

VS 2010 isn't supported for current master, you must use VS 2015 or later, ideally VS 2017 as it's currently used for Wireshark releases.

Then the subsequent output implies that you have asked CMake to generate a build file for VS 2019 (16.0):

Project file contains ToolsVersion="16.0". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="4.0". For more information, please see http://go.microsoft.com/fwlink/?LinkId=291333.
    70>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x64.Targets(507,5): error MSB8008:
        Specified platform toolset (v142) is not installed or invalid. Please make sure that a supported PlatformToolset value is selected. [C:\Development\wsbuild64\ZERO_CHECK.vcxproj]

In summary:

  1. Install VS 2017.
  2. Delete your build directory (wsbuild64) and recreate it again.
  3. Open a VS 2017 command prompt for x64 compilation.
  4. Set the required env vars.
  5. Run the CMake generation step specifying VS 2017 and x64 as the generation target.
  6. Run msbuild.

i.e. do exactly as it says in the Developers Guide. If you stray from the guide, you're likely to end up with issues as you've discovered.

edit flag offensive delete link more

Comments

we uninstalled 2010 and installed 2017 vs and then followed all the steps from the guide. and we are getting the same error. I have attached my error with this comment kindly help. we are getting the same error every time. https://drive.google.com/open?id=1Z7b...

stbimudd gravatar imagestbimudd ( 2019-05-31 09:20:52 +0000 )edit

From the middle of the output (tip, search for "error"):

   134>CustomBuild:
         Traceback (most recent call last):
           File "C:\Development\wireshark\tools\make-plugin-reg.py", line 78, in <module>
             contents = file.read()
           File "C:\Users\KS-Lab\AppData\Local\Programs\Python\Python37\lib\encodings\cp1252.py", line 23, in decode
             return codecs.charmap_decode(input,self.errors,decoding_table)[0]
         UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 31742: character maps to <undefined>
   134>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(209,5): error MSB6006: "cmd.exe" exited with code 1. [C:\Development\wsbuild64\plugins\epan\homematic\homematic.vcxproj]
   134>Done Building Project "C:\Development\wsbuild64\plugins\epan\homematic\homematic.vcxproj" (default targets) -- FAILED.
    28>Done Building Project "C:\Development\wsbuild64\plugins\epan\homematic\homematic.vcxproj.metaproj" (default targets) -- FAILED.

The Python tool that creates the registration for plugins, make-plugin-reg.py, has encountered an illegal (non-UTF-8) character ...(more)

grahamb gravatar imagegrahamb ( 2019-05-31 09:48:34 +0000 )edit

Please tell me how do I identify and handle an illegal non-UTF-8 character? I can add my custom plugin if you say so. Kindly help.

stbimudd gravatar imagestbimudd ( 2019-05-31 13:00:28 +0000 )edit

since my code is written in c I am not able to find a way to remove or handle it

stbimudd gravatar imagestbimudd ( 2019-05-31 13:08:16 +0000 )edit

Open your editor and look at the character at offset 31742 in the file.

grahamb gravatar imagegrahamb ( 2019-05-31 14:13:48 +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

1 follower

Stats

Asked: 2019-05-29 14:59:27 +0000

Seen: 2,470 times

Last updated: May 31 '19