Re: invalid or corrupt file: duplicate COMDAT / Previous Definition Different
On Wednesday, 10 January 2018 at 20:53:24 UTC, Anonymouse wrote: 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) struct Foo { this(Regex!char) { /* ... */ } this(StaticRegex!char) { /* ... */ } } It seems like the problem there is that StaticRegex is only an alias to Regex, so I'm overloading it twice. It rhymes well with the linked bug. /++ A $(D StaticRegex) is $(D Regex) object that contains D code specially generated at compile-time to speed up matching. No longer used, kept as alias to Regex for backwards compatibility. +/ public alias StaticRegex = Regex; // <-- Reducing it to just that doesn't reproduce the error message though. As long as Regex!char can house both ctRegex!"foo" and "foo".regex it works for me.
Re: invalid or corrupt file: duplicate COMDAT / Previous Definition Different
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)
Re: invalid or corrupt file: duplicate COMDAT / Previous Definition Different
On Wednesday, 10 January 2018 at 19:32:28 UTC, Anonymouse wrote: /usr/bin/ld: Warning: size of symbol I think your case is this bug: https://issues.dlang.org/show_bug.cgi?id=15324 Another COMDAT error is: https://issues.dlang.org/show_bug.cgi?id=16687
Re: invalid or corrupt file: duplicate COMDAT / Previous Definition Different
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 -- Kind Regards Benjamin Thaut