https://github.com/atilaneves/unit-threaded/issues/213
I got this error, when build with VisualD-v1.0.1-dmd-2.093.1-ldc2-1.23.0.exe
dmd:
lib\unit-threaded_property.lib: Error: corrupt MS Coff object module obj\debug\dummy\dummy\dummy\dummy\dummy\dummy\unit-threaded_property\..\..\..\..\..\..\Users...\AppData\Local\dub\packages\unit-threaded-1.0.4\unit-threaded\subpackages\property\source\unit_threaded\randomized\benchmark.obj 320
lib\unit-threaded_property.lib: Error: corrupt MS Coff object module obj\debug\dummy\dummy\dummy\dummy\dummy\dummy\unit-threaded_property\..\..\..\..\..\..\Users...\AppData\Local\dub\packages\unit-threaded-1.0.4\unit-threaded\subpackages\property\source\unit_threaded\randomized\package.obj 320
Building lib\unit-threaded_property.lib failed!
(I didn't add package unit-threaded myself, guess it's indirectly pulled in by some other packages.)
How to fix this Coff object issues?
(BTW, why there are so many \dummy... dirs?)
I just completely deleted that packages dir,
C:\Users...\AppData\Local\dub\packages<all_the_dirs>
and the <proj_dir>/.dub dir, and also the app.sln file; then I start from scratch:
dub.exe generate visuald
But I got the exact same build error: corrupt MS Coff object.
I think it's showhow caused by the build process itself, maybe just inside the unit-threaded-1.0.4 package, any suggestions where to check further?
I just tried, using -m32:
/mnt/c/project/dlang/dmd-2.093.1/windows/bin/sc.ini
[Environment]
DFLAGS="-I%@p%....\src\phobos" "-I%@p%....\src\druntime\import" "-d" "-m32"
at least that error is gone, and I was able to build:
.dub/lib/unit-threaded_property.lib
So, looks like this unit-threaded_property.lib cannot be build with -m64, but I just wonder why?
I think this could be a VisualD issue. I cannot build with VisualD, but I can build on Windows using command line:
C:\project\dlang\dmd-2.093.1\windows\bin64\dub.exe test --build=unittest
Comment #1 by r.sagitario — 2020-08-25T21:02:44Z
I suspect there is some mismatch with some part build with -m32 (OMF object files) and -m32mscoff (COFF object files). This shouldn't be an issue with -m64, though.
unit-threaded itself does not seem to have this problem. Please provide explicit steps necessary to reproduce the issue (I don't know too much about dub).
Comment #2 by r.sagitario — 2020-08-28T08:39:29Z
I just tried:
dub init
dub add unit-threaded
dub generate visuald
and building the resulting solution works just fine.
Are you doing something else?
Comment #3 by r.sagitario — 2020-10-11T07:59:08Z
Cannot reproduce. Please reopen and provide more information if it still happens for you.