D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 12054 - PATH env. var longer than 1022 characters breaks OPTLINK search path
Summary: PATH env. var longer than 1022 characters breaks OPTLINK search path
Status: RESOLVED DUPLICATE of issue 1327
Alias: None
Product: D
Classification: Unclassified
Component: tools (show other issues)
Version: D2
Hardware: x86 Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: link-failure, Optlink
Depends on:
Blocks:
 
Reported: 2014-01-31 20:47 UTC by Vladimir Panteleev
Modified: 2020-04-09 03:59 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Vladimir Panteleev 2014-01-31 20:47:29 UTC
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 Andrej Mitrovic 2014-02-01 06:18:09 UTC
Could also be that there's a + or something in PATH (e.g. when GTK+ Runtime is installed). See Issue 4831.
Comment 2 Vladimir Panteleev 2014-02-01 10:39:10 UTC
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 Mathias LANG 2020-04-09 03:59:19 UTC
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 ***