www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Link fails on vers 2.099 ; Windows version

reply Jim Korman <jimk.mm gmail.com> writes:
So, link fails on all programs I've tried it on with

     OPTLINK : Warning 9: Unknown Option : LIBPATH
     hello.obj Offset 00000H Record Type 004C
       Error 138: Module or Dictionary corrupt

This fails on vers 2.099.0 and above. Versions below that compile 
and link with no problems.

What I can see first of all is the the very first byte of the 
.obj file is 0x4C whereas in earlier versions it is 0x80. 
Actually the entire beginning of the object files between 
versions is drastically different in content as well as size.

I haven't found any articles addressing this.

I'm using the same computer and same environment set up for 
versions 2.096 forward and see no problems until I hit 2.099.

Any help would be greatly appreciated.

Jim Korman
Apr 23 2022
next sibling parent max haughton <maxhaton gmail.com> writes:
On Saturday, 23 April 2022 at 23:09:28 UTC, Jim Korman wrote:
 So, link fails on all programs I've tried it on with

     OPTLINK : Warning 9: Unknown Option : LIBPATH
     hello.obj Offset 00000H Record Type 004C
       Error 138: Module or Dictionary corrupt

 This fails on vers 2.099.0 and above. Versions below that 
 compile and link with no problems.

 What I can see first of all is the the very first byte of the 
 .obj file is 0x4C whereas in earlier versions it is 0x80. 
 Actually the entire beginning of the object files between 
 versions is drastically different in content as well as size.

 I haven't found any articles addressing this.

 I'm using the same computer and same environment set up for 
 versions 2.096 forward and see no problems until I hit 2.099.

 Any help would be greatly appreciated.

 Jim Korman
2.099 was the first release to do use mscoff for 32 bit builds, which makes me think that the compiler using OPTLINK at all is probably a bug.
Apr 23 2022
prev sibling parent reply Adam Ruppe <destructionator gmail.com> writes:
On Saturday, 23 April 2022 at 23:09:28 UTC, Jim Korman wrote:
 I haven't found any articles addressing this.
Probably this: https://dlang.org/changelog/2.099.0.html#fix18964 Try `-m32omf` in the new dmd build to get back to the old behavior optlink can understand. Alternatively, changing your linker to the bundled lld-link or the microsoft link.exe should also work.
Apr 23 2022
parent Jim Korman <jimk.mm gmail.com> writes:
On Sunday, 24 April 2022 at 00:31:03 UTC, Adam Ruppe wrote:
 On Saturday, 23 April 2022 at 23:09:28 UTC, Jim Korman wrote:
 I haven't found any articles addressing this.
Probably this: https://dlang.org/changelog/2.099.0.html#fix18964 Try `-m32omf` in the new dmd build to get back to the old behavior optlink can understand. Alternatively, changing your linker to the bundled lld-link or the microsoft link.exe should also work.
Many thanks. That option worked. I hadn't tried it since it is listed as deprecated. Using lld-link also appears to work. Jim Korman
Apr 23 2022