where is the reference of dtdParse function

asked Nov 01 '17

updated Nov 01 '17

"C:\Development\wsbuild32\Wireshark.sln" (default target) (1) ->
        "C:\Development\wsbuild32\epan\epan.vcxproj.metaproj" (default target) (20) ->
        "C:\Development\wsbuild32\epan\epan.vcxproj" (default target) (104) ->
        (ClCompile target) ->
          dtd_parse.c(2195): error C2059: syntax error: '<parameter-list>' [C:\Development\wsbuild32\epan\epan.vcxproj]
          dtd_parse.c(2200): error C2059: syntax error: '<parameter-list>' [C:\Development\wsbuild32\epan\epan.vcxproj]
          dtd_parse.c(2205): error C2143: syntax error: missing ')' before '(' [C:\Development\wsbuild32\epan\epan.vcxproj]
          dtd_parse.c(2205): error C2059: syntax error: ')' [C:\Development\wsbuild32\epan\epan.vcxproj]
          dtd_parse.c(2205): error C2143: syntax error: missing ')' before 'type' [C:\Development\wsbuild32\epan\epan.vcxproj]
          dtd_parse.c(2205): error C2091: function returns function [C:\Development\wsbuild32\epan\epan.vcxproj]
          dtd_parse.c(2205): error C2373: 'free': redefinition; different type modifiers [C:\Development\wsbuild32\epan\epan.vcxproj]
          dtd_parse.c(2206): error C2059: syntax error: '{' [C:\Development\wsbuild32\epan\epan.vcxproj]
          dtd_parse.c(2205): fatal error C1903: unable to recover from previous error(s); stopping compilation [C:\Development\wsbuild32\epan\epan.vcxproj]

Comments

Presumably you're asking why your build fails when attempting to compile dtd_parse.c?

This is a file generated during the build by flex, and as a generated file if it fails to compile it's likely that the generation process has failed. To see what's happened can you do the following:

  1. Delete the generated file in C:\Development\wsbuild32\epan\dtd_parse.c
  2. Run the build, turning off multiple cpu support and redirecting the output to a text file msbuild /p:Configuration=RelWithDebInfo Wireshark.sln > build.txt
  3. Post the contents of build.txt here.
User 98587 ( Nov 01 '17 )

There are no C file under wsbuild32 all C files are place under the source code that I'd clone using git

User 97788 ( Nov 02 '17 )

It's not a file tracked by git, but a generated file, so it's generated into the build directory. Do you have any c files in C:\Development\wsbuild32\epan?

User 98587 ( Nov 02 '17 )

No , There are no C file in that location

User 97788 ( Nov 02 '17 )

here is the build.txt content

Microsoft (R) Build Engine version 14.0.25420.1 Copyright (C) Microsoft Corporation. All rights reserved.

Build started 11/2/2017 3:41:00 PM. 1>Project "C:\Development\wsbuild32\Wireshark.sln" on node 1 (default targets). 1>ValidateSolutionConfiguration: Building solution configuration "RelWithDebInfo|X64". ValidateProjects: The project "INSTALL" is not selected for building in solution configuration "RelWithDebInfo|x64". The project "checkAPI" is not selected for building in solution configuration "RelWithDebInfo|x64". The project "checkAPIcapchild-base" is not selected for building in solution configuration "RelWithDebInfo|x64". The project "checkAPIcapchild-todo" is not selected for building in solution configuration "RelWithDebInfo|x64". The project "checkAPIcaputils-base" is not selected for building in solution configuration "RelWithDebInfo|x64". The project "checkAPIcaputils-todo" is not selected for building in solution configuration "RelWithDebInfo|x64". The project "checkAPIcodecs" is not selected for building in solution configuration "RelWithDebInfo|x64". The project "checkAPIcrypt" is not selected for building in solution configuration "RelWithDebInfo|x64". The project "checkAPIdfilter" is not selected for building in solution configuration "RelWithDebInfo|x64". The project "checkAPIdissectors" is not selected for building in solution configuration "RelWithDebInfo|x64". The project "checkAPIdocsis" is not selected for building in solution configuration "RelWithDebInfo|x64". The project "checkAPIepan" is not selected for building in solution configuration "RelWithDebInfo|x64". The project "checkAPIethercat" is not selected for building in solution configuration "RelWithDebInfo|x64". The project "checkAPIftypes" is not selected for building in solution configuration "RelWithDebInfo|x64". The project

User 97788 ( Nov 02 '17 )

Unfortunately the text has been cut off. Can you post the text file on a publically accessible share somewhere, e.g. Google Drive, DropBox etc?

Also, please don't raise duplicate questions, I've deleted that other one.

User 98587 ( Nov 02 '17 )

here link to build.txt https://drive.google.com/file/d/1uSGB...

I'm very sorry I did not know there were 2 same questions

User 97788 ( Nov 07 '17 )

Your build output shows the build is failing for a few things, included generated files. The step to generate them doesn't appear in the build output which leads me to think you have missed a step in setting up (or have an error in) your build environment.

Can you please post the output of your CMake generate, i.e.

cmake "your parameters" 2>&1 > cmake.txt

On a side note you can look at the Wireshark build slave output for CMake and msbuild to compare with yours, the buildslaves are here and example CMake output is here and msbuild is here.

User 98587 ( Nov 07 '17 )

The output of the CMake step shows some issues with your build environment:

-- The following OPTIONAL packages have not been found:

 * CAP
 * Gettext
 * M
 ** Qt5Core
 ** Qt5LinguistTools
 ** Qt5Multimedia
 ** Qt5PrintSupport
 ** Qt5Svg
 ** Qt5Widgets
 ** Qt5WinExtras
 * SETCAP
 * HTMLHelp
 **ASCIIDOC

The double starred items are the issues, either you haven't installed QT, or you haven't set the QT5_BASE_DIR env var, see Developers Guide Sect 2.2.3, and you don't have the Cygwin asciidoc and docbook-xml45 packages installed, see the Developers Guide Sect. 2.2.4.

User 98587 ( Nov 08 '17 )

Thanks for helping me Now my cmake is look much better all Qt packages and Asciidoc are found , however the project still has failed in the compilation step attach link to my cmake log https://drive.google.com/open?id=1uSG... build log https://drive.google.com/open?id=14Xt...

thanks in advance

User 97788 ( Nov 20 '17 )

The CMake output looks OK. Can you attempt a rebuild using the following command line:

msbuild /p:Configuration=RelWithDebInfo Wireshark.sln /t:Rebuild 2>&1 > build.txt

and post the output of the resulting build.txt.

User 98587 ( Nov 20 '17 )

attach link to build.

User 97788 ( Nov 20 '17 )

Your build is failing to generate the required files using lex and yacc. I don't understand why this is happening as the CMake output shows the correct executables (winflex.exe and winbison.exe) have been found.

I note that you're building an x64 version yet your build directory is called "wsbuild32", the name can be anything but have you previously attempt to build a 32 bit version in the same directory? If so then that will have messed up the build directory, you must use separate build directories for 32 and 64 bit.

As I can't think why your build is failing to generate the files, I think it's time for the nuclear option, delete your build directory (wsbuild32), create a new one, cd into it and then rerun the CMake and msbuild steps.

User 98587 ( Nov 20 '17 )

Thanks again

I have tried it , but the same results

User 97788 ( Nov 20 '17 )

Where did you get your source tree from, a git clone or a downloaded tarball? What version of the sources do you have? Do you have any modifications to the sources?

User 98587 ( Nov 20 '17 )

I had got the source code from a git clone I had clone it using this link https://code.wireshark.org/review/wir... this link is show in Win32/64: Step-by-Step Guide website

User 97788 ( Nov 20 '17 )

OK, can you update your source tree to the latest, presumably master, with a git pull?

User 98587 ( Nov 20 '17 )

thanks , sure I'll do it , I'll send an update probably tomorrow

User 97788 ( Nov 20 '17 )

I did update the source tree to the latest Still having error do you have source tree that success to compile can you place it so I could get it , and try it ? thank you very much

User 97788 ( Nov 21 '17 )

I use a git clone as do the build slaves and they all work, so it's still down to something in your environment.

Can you add some debugging info? In the source tree cmake\modules\FindLEX.cmake, locate the line DEPENDS ${_in} and add the following line below it:

COMMENT "Using (${LEX_EXECUTABLE}) to generate ${_outc} and ${_outh} from ${_in}"

Then run the CMake generate step again, and then rebuild using msbuild /p:Configuration=RelWithDebInfo /t:Rebuild Wireshark.sln 2>&1 > C:\temp\build.txt and post a link to build.txt.

The above addition should cause the build log to show exactly what's happening when generating the files using lex.

User 98587 ( Nov 21 '17 )

here is the link to build file https://drive.google.com/open?id=1UeP... thanks

User 97788 ( Nov 22 '17 )

This is a real puzzle. For some reason the solution generated by CMake isn't running any of the "custom commands", these are used to generate the files.

Can you share the file C:\Development\wsbuild64\ui\ui.vcxproj?

User 98587 ( Nov 22 '17 )

I have shared the whole folder ( wsbuild64) in this link https://drive.google.com/open?id=1SgF...

User 97788 ( Nov 22 '17 )

The required command to call win_flex is there, along with the additional comment I asked you to add, so the CMake generation step still looks good, but the msbuild step fails to run it. Very confusing. Can you confirm you are just using the msbuild command line of:

msbuild /p:Configuration=RelWithDebInfo Wireshark.sln /t:Rebuild 2>&1 > build.txt
User 98587 ( Nov 22 '17 )

yes this is what did

User 97788 ( Nov 23 '17 )

do you want me to share the whole development directory so you could test it on your station ?

User 97788 ( Nov 23 '17 )

Can you run cleanup, msbuild ... /t:clean and then create a zip of the build64 directory and I'll download that and try it?

User 98587 ( Nov 23 '17 )

I do appreciate your effort , thanks again here is a link to the zip file

User 97788 ( Nov 23 '17 )

I'm stumped. I copied your build directory to my VM, fixed up some symbolic links to make things look the same as your build environment, reran the msbuild (which caused a CMake generation step to run as my sources are newer than yours) and then msbuild generated the required files which your build fails to do.

I don't understand what's wrong in your environment that causes this. The only thing I can suggest is to attempt to recreate the build environment again, either in a VM, or on another machine.

User 98587 ( Nov 26 '17 )

okay so now we have a working reference can you please specify which version you are using for the following list

CygWin --- visual studio -- Qt --- Cmake --

also what should I set for this environment set WIRESHARKVERSIONEXTRA=-YourExtraVersionInfo ?

User 97788 ( Nov 27 '17 )
  • Cygwin: 2.8.2
  • Visual Studio: VS2015 Community Edition Update 3
  • Qt: 5.9.1
  • CMake: 3.9.4

WIRESHARK_VERSION_EXTRA is just a label that is added to the installer package name and in the Help->About menu to distinguish your "version". I use my initials; "-GMB".

User 98587 ( Nov 27 '17 )