Bug 12054 – PATH env. var longer than 1022 characters breaks OPTLINK search path

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
tools
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2014-01-31T20:47:29Z
Last change time
2020-04-09T03:59:19Z
Keywords
link-failure, Optlink
Assigned to
No Owner
Creator
Vladimir Panteleev

Comments

Comment #0 by dlang-bugzilla — 2014-01-31T20:47:29Z
If the system PATH variable is longer than 1022 characters, OPTLINK will fail to find phobos.lib and link D programs. My guess is that the PATH variable contents is clobbering the LIB variable's, which happens to be adjacent in memory. It's possible that the order of variables within the environment block also matters.
Comment #1 by andrej.mitrovich — 2014-02-01T06:18:09Z
Could also be that there's a + or something in PATH (e.g. when GTK+ Runtime is installed). See Issue 4831.
Comment #2 by dlang-bugzilla — 2014-02-01T10:39:10Z
I don't think so. The problem manifests if the PATH is over 1022 characters, but not when it's exactly 1022 characters long. The number is very close 1024, which I doubt is a coincidence.
Comment #3 by pro.mathias.lang — 2020-04-09T03:59:19Z
Looks very much like a duplicate of 1327 which you seem to have found later on. Marking as such, if not, please re-open an issue on OPTLINK's Github (https://github.com/DigitalMars/optlink/issues), I am cleaning up OPTLINK-only issues. *** This issue has been marked as a duplicate of issue 1327 ***