Wireshark-dev: Re: [Wireshark-dev] Current master not compiling

From: Anders Broman <anders.broman@xxxxxxxxxxxx>
Date: Mon, 4 Apr 2016 14:08:19 +0000

Hi,

Thanks Graham that fixed it. I was running the build (separate build dir) on my localized repo where I had been doing nmake builds before. Cleaning that up (clean distclean maintainer-clean)

Fixed the problem. I’m pretty sure I did clean on it before starting though.

 

Actually, just tested on my Wireshark dir, clean does not remove the generated files distclean does…

Best regards

Anders

 

From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Graham Bloice
Sent: den 4 april 2016 15:26
To: Developer support list for Wireshark
Subject: Re: [Wireshark-dev] Current master not compiling

 

 

 

On 4 April 2016 at 12:05, Anders Broman <anders.broman@xxxxxxxxxxxx> wrote:

Hi,
I'm also facing issues on MSVC 2015 and Cmake

         C:\Development\ewireshark\trunk\epan\dfilter\dfilter.c(214): error C2065: 'yyscan_t': undeclared identifier [C:\Development\wsbuild64\epan\dfilter\dfilter.vcxproj]
         C:\Development\ewireshark\trunk\epan\dfilter\dfilter.c(214): error C2146: syntax error: missing ';' before identifier 'scanner' [C:\Development\wsbuild64\epan\dfilter\dfilter.vcxproj]
         C:\Development\ewireshark\trunk\epan\dfilter\dfilter.c(214): error C2065: 'scanner': undeclared identifier [C:\Development\wsbuild64\epan\dfilter\dfilter.vcxproj]
         C:\Development\ewireshark\trunk\epan\dfilter\dfilter.c(215): error C2065: 'YY_BUFFER_STATE': undeclared identifier [C:\Development\wsbuild64\epan\dfilter\dfilter.vcxproj]
         C:\Development\ewireshark\trunk\epan\dfilter\dfilter.c(215): error C2146: syntax error: missing ';' before identifier 'in_buffer' [C:\Development\wsbuild64\epan\dfilter\dfilter.vcxproj]
         C:\Development\ewireshark\trunk\epan\dfilter\dfilter.c(215): error C2065: 'in_buffer': undeclared identifier [C:\Development\wsbuild64\epan\dfilter\dfilter.vcxproj]
         C:\Development\ewireshark\trunk\epan\dfilter\dfilter.c(235): error C2065: 'scanner': undeclared identifier [C:\Development\wsbuild64\epan\dfilter\dfilter.vcxproj]
         C:\Development\ewireshark\trunk\epan\dfilter\dfilter.c(243): error C2065: 'in_buffer': undeclared identifier [C:\Development\wsbuild64\epan\dfilter\dfilter.vcxproj]
         C:\Development\ewireshark\trunk\epan\dfilter\dfilter.c(243): error C2065: 'scanner': undeclared identifier [C:\Development\wsbuild64\epan\dfilter\dfilter.vcxproj]
         C:\Development\ewireshark\trunk\epan\dfilter\dfilter.c(250): error C2065: 'scanner': undeclared identifier [C:\Development\wsbuild64\epan\dfilter\dfilter.vcxproj]
         C:\Development\ewireshark\trunk\epan\dfilter\dfilter.c(256): error C2065: 'scanner': undeclared identifier [C:\Development\wsbuild64\epan\dfilter\dfilter.vcxproj]
         C:\Development\ewireshark\trunk\epan\dfilter\dfilter.c(319): error C2065: 'in_buffer': undeclared identifier [C:\Development\wsbuild64\epan\dfilter\dfilter.vcxproj]
         C:\Development\ewireshark\trunk\epan\dfilter\dfilter.c(319): error C2065: 'scanner': undeclared identifier [C:\Development\wsbuild64\epan\dfilter\dfilter.vcxproj]
         C:\Development\ewireshark\trunk\epan\dfilter\dfilter.c(320): error C2065: 'scanner': undeclared identifier [C:\Development\wsbuild64\epan\dfilter\dfilter.vcxproj]


       "C:\Development\wsbuild64\Wireshark.sln" (default target) (1) ->
       "C:\Development\wsbuild64\ALL_BUILD.vcxproj.metaproj" (default target) (2) ->
       "C:\Development\wsbuild64\ui\ui.vcxproj.metaproj" (default target) (113) ->
       "C:\Development\wsbuild64\ui\ui.vcxproj" (default target) (165) ->
         C:\Development\ewireshark\trunk\ui\text_import.c(909): error C2065: 'yyscan_t': undeclared identifier [C:\Development\wsbuild64\ui\ui.vcxproj]
         C:\Development\ewireshark\trunk\ui\text_import.c(909): error C2146: syntax error: missing ';' before identifier 'scanner' [C:\Development\wsbuild64\ui\ui.vcxproj]
         C:\Development\ewireshark\trunk\ui\text_import.c(909): error C2065: 'scanner': undeclared identifier [C:\Development\wsbuild64\ui\ui.vcxproj]
         C:\Development\ewireshark\trunk\ui\text_import.c(1021): error C2065: 'scanner': undeclared identifier [C:\Development\wsbuild64\ui\ui.vcxproj]
         C:\Development\ewireshark\trunk\ui\text_import.c(1027): error C2065: 'scanner': undeclared identifier [C:\Development\wsbuild64\ui\ui.vcxproj]
         C:\Development\ewireshark\trunk\ui\text_import.c(1029): error C2065: 'scanner': undeclared identifier [C:\Development\wsbuild64\ui\ui.vcxproj]
         C:\Development\ewireshark\trunk\ui\text_import.c(1031): error C2065: 'scanner': undeclared identifier [C:\Development\wsbuild64\ui\ui.vcxproj]

But dfilter is built with lemon isn't it? Flex is Cygwin 2.5.39-1 and there's not any newer version available...


On Windows, using CMake, I had to delete a lot of lex detritus grammar.[c|h], xxx.c, xxx_lex.h in my repo to get rid of the above errors.

 

I used git clean -dfx, maybe check first with git clean -dnx to see what will be deleted.

 

On Windows at least, I suspect this may be down to the difference between quotes and angle brackets in includes.  We've been down this road before.

 

I'm not sure how the lex detritus got there, it didn't come back after the build.


--

Graham Bloice