[Scons-users] 3.0.5 msvc path construction problem
Joseph C. Brill
jbrill at mindspring.com
Wed Mar 27 11:25:39 EDT 2019
On 3/27/19 10:45 AM, Mats Wichmann wrote:
> tools modules add the path in which the underlying tool was found, if
> one was found (thus the JDK, for instance). but it seems unlikely all
> of those should have been added unless your system has all of 32/64 bit
> msys, 32/64bit cygwin, and stuff installed through Chocolatey.
> So it seems like something is letting additional paths sneak in to
Something is definitely letting additional paths sneak into ENV[PATH].
The cygwin path and the jdk path exist. The rest do not.
As for the added paths:
C:\\ProgramData\\chocolatey\\bin; <= does not exist
C:\\msys64; <= does not exist
C:\\msys; <= does not exist
C:\\cygwin64\\bin; <= does not exist
C:\\cygwin\\bin; <= exists
C:/Program Files\\Java\\jdk1.8.0_172\\bin; <= exists
With the exception of the jdk, the remaining paths are "newly added" in 3.0.5 when compared directly to 3.0.4.
In the github issue, there is a fuller description of the local environment and ENV['PATH']:
I still don't understand (yet) why the JDK is added to the ENV[PATH] when running scons. An msvc compile after running vcvarsall.bat from a command line console does not add the JDK to the system path.
I am manually adding the mingw-w64 binary to the path using AppendENVPath() to produce a mingw-w64 compatible import library from a msvc compiled DLL. The location of my mingw-w64 installation is not one of the paths SCons is silently adding. By silently adding the cygwin folder, generating a 64-bit import library from a 64-bit DLL compiled on a 32-bit platform fails (i.e., evidently the cygwin dlltool.exe does not support this or is not configured correctly when run in this context).
My expectation is that the ENV[PATH] would contain only what's necessary for the MSVC compiler tools. Perhaps, my expectation is misguided.
More information about the Scons-users