Bug 21915 – dmd 2.092 is an invalid exe file on Windows XP

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2021-05-12T06:21:46Z
Last change time
2024-12-13T19:16:21Z
Assigned to
No Owner
Creator
Walter Bright
Moved to GitHub: dmd#19925 →

Comments

Comment #0 by bugzilla — 2021-05-12T06:21:46Z
dub.exe also is invalid.
Comment #1 by bugzilla — 2021-05-13T03:54:12Z
Imperatorn writes: I modified the PE header (set major version and subsystem to 5) and it worked Sure, you can use any PE editor or even a hex editor. I used https://petoolse.github.io/petools/ https://i.imgur.com/lnJxwkZ.png
Comment #2 by piotrunio-2004 — 2022-12-09T18:26:09Z
As of DMD32 D Compiler v2.101.0-dirty this situation is even worse since even with modified PE header, lld-link.exe relies on GetFinalPathNameByHandleW, forcing the use of -m32omf to get it to link.
Comment #3 by piotrunio-2004 — 2022-12-17T20:31:59Z
Another issues is that programs compiled with dmd also have the glitchy PE header in some cases, and as well dub build doesn't work when dependencies are involved. ( Warning Error querying versions for derelict-util, registry at https://code .dlang.org/ (fallbacks registry at https://codemirror.dlang.org/, registry at ht tps://dub.bytecraft.nl/, registry at https://code-mirror.dlang.io/): Failed to d ownload https://code.dlang.org/api/packages/infos?packages=%5B%22derelict-util%2 2%5D&include_dependencies=true&minimize=true Warning Selected package derelict-util 2.0.6 doesn't exist. Using latest ma tching version instead., etc.) and what do file paths like "dub\packages\vibe-d-0.9.5\vibe-d\.dub\build\vibe-core-debug-windows-x86_64-dmd_v2.101.0-dirty-CD36DD0647735C1EAACF783E7A0448766AD1658E87E331D12580966F1A168BE1\vibed.lib" even mean? Because that isn't going to fit in a "C:\Documents and Settings\Administrator.TEST-CF7F6CF2B7\Local Settings\Application Data\" (an actual path I got in a Windows Server 2003 VM)
Comment #4 by piotrunio-2004 — 2023-03-21T11:56:52Z
So why can't dmd be a classic Win32 app just like dmc? Are there any licensing issues preventing optlink from being used for certain executable types? In my opinion introducing artificial requirements implicitly encourages e-waste. I can't move on from C++98 if dmd is going to be like this.
Comment #5 by robert.schadek — 2024-12-13T19:16:21Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19925 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB