wilzbach / tools-test

1 stars 0 forks source link

PATH env. var longer than 1022 characters breaks OPTLINK search path #99

Open wilzbach opened 10 years ago

wilzbach commented 10 years ago

Note: the issue was created automatically migrated from https://issues.dlang.org

Original bug ID: BZ#12054 From: Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> Reported version: D2 CC: andrej.mitrovich@gmail.com, bugzilla@digitalmars.com

wilzbach commented 10 years ago

Comment author: Vladimir Panteleev <dlang-bugzilla@thecybershadow.net>

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.

wilzbach commented 10 years ago

Comment author: Andrej Mitrovic <andrej.mitrovich@gmail.com>

Could also be that there's a + or something in PATH (e.g. when GTK+ Runtime is installed). See Issue 4831.

wilzbach commented 10 years ago

Comment author: Vladimir Panteleev <dlang-bugzilla@thecybershadow.net>

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.