invalid or corrupt file: duplicate COMDAT / Previous Definition Different

Anonymouse asdf at asdf.net
Wed Jan 10 20:53:24 UTC 2018


On Wednesday, 10 January 2018 at 20:19:50 UTC, Benjamin Thaut 
wrote:
> Am 10.01.2018 um 20:32 schrieb Anonymouse:
>> 
>> I don't have a reduced testcase yet. I figured I'd ask if it's 
>> something known before making the effort.
>
> Are you by any chance mixing debug and release builds? Or are 
> the -version specifiers different when compiling the various 
> parts of your program? Check your compiler flags and ansure 
> that they are the same over your entire build process. 
> Especiall -debug -relase -inline -O -version

Admittedly I am alternating between building debug and unittest 
builds, but I'm only using dub, no separate compilation. I have 
limited control of the version specifiers other than through the 
build configurations, so there's not a whole lot to mix.

     $ dub clean
     Cleaning package at C:\cygwin\home\zorael\src\kameloso...

     $ dub build -c cygwin -a x86_64
     Performing "debug" build using dmd for x86_64.
     kameloso 1.0.0-beta.2+commit.57.g90fdd1d: building 
configuration "cygwin"...
     Linking...
     kameloso.obj : fatal error LNK1179: invalid or corrupt file: 
duplicate COMDAT 
'_D8kameloso7plugins6common8BotRegex6__ctorMFNcxEQBuQBoQBj10NickPolicyS3std5regex8internal2ir__T5RegexTaZQjZSQEcQDwQDrQDn'
     Error: linker exited with status 1179
     dmd failed with exit code 1179.

None of the (version specifiers in the) build configurations I 
have touch upon the part of the fairly innocent code mentioned in 
the error message, if I'm reading it right. 
(https://github.com/zorael/kameloso/blob/c00ca4489e39348bd4b1678c95c1b12636df307c/source/kameloso/plugins/common.d#L424)


More information about the Digitalmars-d-learn mailing list