Wireshark-dev: Re: [Wireshark-dev] warning LNK4291: module may contain '__except' but was not c

From: Graham Bloice <graham.bloice@xxxxxxxxxxxxx>
Date: Fri, 2 Jul 2021 18:07:09 +0100
And backing out MR 3229 with "git revert -n ebb8703a" allows incremental rebuilds again.

On Fri, 2 Jul 2021 at 17:44, chuck c <bubbasnmp@xxxxxxxxx> wrote:
LNK4291 first time after deleting wsbuild64 and rebuilding with 
cmake -G "Visual Studio 16 2019" -A x64 ..\wireshark

           libmaxminddb.lib(maxminddb.c.obj) : warning LNK4291: module may contain '__except' (Structured Exception Handling) 
but was not compiled with /guard:ehcont; generating conservative metadata [C:\Development\wsbuild64\mmdbresolve.vcxproj]  

After a code change, it is 
         c:\development\wireshark\epan\wslua\init_wslua.c : fatal error C1001: Internal compiler error. [C:\Development\wsbuild64\epan\epan.vcxproj]
         LINK : fatal error LNK1000: Internal error during IMAGE::BuildImage [C:\Development\wsbuild64\epan\epan.vcxproj]

 

On Fri, Jul 2, 2021 at 11:31 AM Graham Bloice <graham.bloice@xxxxxxxxxxxxx> wrote:


On Fri, 2 Jul 2021 at 17:28, Graham Bloice <graham.bloice@xxxxxxxxxxxxx> wrote:


On Fri, 2 Jul 2021 at 17:21, Maynard, Christopher via Wireshark-dev <wireshark-dev@xxxxxxxxxxxxx> wrote:
> From: Wireshark-dev <wireshark-dev-bounces@xxxxxxxxxxxxx> On Behalf Of Graham Bloice
> Sent: Friday, July 2, 2021 11:53 AM
> To: Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
> Subject: Re: [Wireshark-dev] warning LNK4291: module may contain '__except' but was not compiled with /guard:ehcont
>
> I'd be interested to know if you see link errors on subsequent rebuilds as noted by Martin M and myself in emails discussions today.
>
> --
> Graham Bloice
>

Yes, I do:

Build FAILED.

       "D:\wireshark\builds\win64\master\Wireshark.sln" (default target) (1) ->
       "D:\wireshark\builds\win64\master\wireshark.vcxproj.metaproj" (default target) (2) ->
       "D:\wireshark\builds\win64\master\wireshark.vcxproj" (default target) (150) ->
       (Link target) ->
         d:\wireshark\src\master\speexdsp\resample.c : fatal error C1001: Internal compiler error. [D:\wireshark\builds\win64\master\wireshark.vcxproj]
         LINK : fatal error LNK1000: Internal error during IMAGE::BuildImage [D:\wireshark\builds\win64\master\wireshark.vcxproj]

    0 Warning(s)
    2 Error(s)

- Chris


My suspicion is that the added compiler and linker flags taint the .obj files in some way that subsequently breaks the compilation.  It may be down to a conflict between the new security flags and link time code generation (so the .obj files are in some "intermediate form").  I didn't try making another code modification and rebuilding after I had gotten my build with /t:Rebuild to work, so I've kicked off one now (unfortunately the update to master has pulled in some CMake changes as well so the regeneration is running which might invalidate my attempt to replicate.


Failed in the same way.  Might have to try to make a minimal repo and report to MS. 

--
Graham Bloice


--
Graham Bloice