[Issue 22645] Linking fails with fatal error LNK1318: Unexpected PDB-error: OK (0) ""

2022-01-04 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22645

--- Comment #7 from simon.vanber...@yahoo.de ---
> Sure. For the future, note that dusmite can reduce projects (mostly)
> automatic.

Very nice tool, didn't know about that!

--


[Issue 22645] Linking fails with fatal error LNK1318: Unexpected PDB-error: OK (0) ""

2022-01-04 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22645

--- Comment #6 from moonlightsenti...@disroot.org ---
(In reply to simon.vanbernem from comment #5)
> I have uploaded my project to my onedrive here:
> https://1drv.ms/u/s!AsdZfH5hzKtphP4Do8VJERxBR94P8w?e=PM6fXl. Getting to the
> error (if it repros for you) should be as easy as unzipping and running the
> compile.bat file in the toplevel folder. 

Thanks!


> I did not try to reduce the amount of code involved in the project. It is at
> 40k lines and before starting to invest a lot of time to randomly delete
> code all over the place and see when it still fails, I will just switch
> compilers.

Sure. For the future, note that dusmite can reduce projects (mostly) automatic.

--


[Issue 22645] Linking fails with fatal error LNK1318: Unexpected PDB-error: OK (0) ""

2022-01-04 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22645

--- Comment #5 from simon.vanber...@yahoo.de ---
(In reply to moonlightsentinel from comment #3)
> (In reply to simon.vanbernem from comment #2)
> > If you think there is value to it I can continue to try to find a minimal
> > example or send you the projects, but I personally hoped that inspecting the
> > way PDB errors are handled might already yield something.
> 
> A minimal example would definitly help. Note that the error messages are
> issued by LINK.exe (provided by VS), not dmd itself.
> 
> Does LINK.exe fail reliably when you rerun the linker manually? 
> (Use `-v` to get the command line issued by dmd)

I have uploaded my project to my onedrive here:
https://1drv.ms/u/s!AsdZfH5hzKtphP4Do8VJERxBR94P8w?e=PM6fXl. Getting to the
error (if it repros for you) should be as easy as unzipping and running the
compile.bat file in the toplevel folder. 

I didn't upload the project directly as an attachment here, because I don't
want my code to just be on the internet indefinitely. The onedrive link will
stay valid for two weeks.

I did not try to reduce the amount of code involved in the project. It is at
40k lines and before starting to invest a lot of time to randomly delete code
all over the place and see when it still fails, I will just switch compilers.

--


[Issue 22645] Linking fails with fatal error LNK1318: Unexpected PDB-error: OK (0) ""

2022-01-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22645

--- Comment #4 from simon.vanber...@yahoo.de ---
If I use the link command that -v gives me, the linker fails because it can't
find phobos64.lib. If I fix the arguments by giving the full path, at first it
linked successfully, repeatedly. I then ran dmd once. It failed. I then ran
link.exe again. It now also failed, repeatedly.

--


[Issue 22645] Linking fails with fatal error LNK1318: Unexpected PDB-error: OK (0) ""

2022-01-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22645

--- Comment #3 from moonlightsenti...@disroot.org ---
(In reply to simon.vanbernem from comment #2)
> If you think there is value to it I can continue to try to find a minimal
> example or send you the projects, but I personally hoped that inspecting the
> way PDB errors are handled might already yield something.

A minimal example would definitly help. Note that the error messages are issued
by LINK.exe (provided by VS), not dmd itself.

Does LINK.exe fail reliably when you rerun the linker manually? 
(Use `-v` to get the command line issued by dmd)

--


[Issue 22645] Linking fails with fatal error LNK1318: Unexpected PDB-error: OK (0) ""

2022-01-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22645

--- Comment #2 from simon.vanber...@yahoo.de ---
I can try to create a minimal example, but tbh I don't have a lot of hope of
this reproducing:

Just using the same flags on a simple program doesn't repro. Having different
objs in the error on each run seems like there is some parallelism involved,
and the fact that it worked (sometimes) after a version upgrade (and now also 2
times after using ldc for a while 2) sounds like the compiler is caching bad
state that causes the issue. So even if I sent you the entire project, what are
the chances of having an issue with parallelism and caching behaviour repro for
other people? It doesn't even repro for me for the same code all the time.

I hoped the error could be diagnosed somewhat easily without a repro, because
the PDB-Error here is 0 and the error message is just empty. That sounds to me
like some part of the linker uses something other than this error code to
diagnose an error, but that something is not enough information to determine
there is an error, so the linker exits even though there is no PDB-error.

If you think there is value to it I can continue to try to find a minimal
example or send you the projects, but I personally hoped that inspecting the
way PDB errors are handled might already yield something.

--


[Issue 22645] Linking fails with fatal error LNK1318: Unexpected PDB-error: OK (0) ""

2022-01-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22645

moonlightsenti...@disroot.org changed:

   What|Removed |Added

Summary|Compilation fails with  |Linking fails with fatal
   |fatal error LNK1318:|error LNK1318: Unexpected
   |Unexpected PDB-error: OK|PDB-error: OK (0) ""
   |(0) ""  |

--