Having trouble initializing vc2008 build environment.

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
ggodw000
Member
Member
Posts: 396
Joined: Wed Nov 18, 2015 3:04 pm
Location: San Jose San Francisco Bay Area
Contact:

Having trouble initializing vc2008 build environment.

Post by ggodw000 »

Here is my path environment variable under windows:

Code: Select all

%SystemRoot%\system32;
%SystemRoot%;
%SystemRoot%\System32\Wbem;
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;
C:\OpenSSL-Win32\bin;C:\Python27\;
"C:\Program Files (x86)\Git\cmd";
"c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\";
"C:\Program Files (x86)\GnuWin32\bin";
"C:\Program Files (x86)\Microsoft Visual Studio 9.0\Vc\bin\";
"C:\Program Files\SlikSvn\bin";
"C:\MyWorkSpace\BaseTools\Bin\Win32"
Any path with space is enclosed in double parenthesis. But when i initialize the VC2008 build environment by launching vcvarsall.bat, it is throwing following error message:

Code: Select all

\Git\cmd";"c:\Program was unexpected at this time.
I am not sure if this is causing the build to fail, but definitely, something is not working. I traced down to very point where it fails:
it is in c

Code: Select all

:\program files (x86)\visual studio 9.0\vc\bin\amd64\vcvarsamd64.bat
Inside this file, following causes it to fail:

Code: Select all

PATH=%WindowsSdkDir%bin\x64;%WindowsSdkDir%bin\win64\x64;%WindowsSdkDir%bin;%PATH%

It looks like it is trying to append the path, and is not liking the part that contain git.
suspecting it might not be liking the double quote (although i usually have seen it is the other way around), i removed all double quotes and makes no difference. I am lost here.

But then, If I do that line causing the error message manually from DOS prompt directly, it works, it is just if it is executed from batch file it then throws that error. I am lost.

Code: Select all

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>echo %PATH%
C:\Windows\system32;C:\Windows;
C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0\;
C:\OpenSSL-Win32\bin;
C:\Python27\;
"C:\Program Files (x86)\Git\cmd";
"c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\";
"C:\Program Files (x86)\GnuWin32\bin";
"C:\Program Files (x86)\Microsoft Visual Studio 9.0\Vc\bin\";
"C:\Program Files\SlikSvn\bin";
"C:\MyWorkSpace\BaseTools\Bin\Win32";
C:\Program Files (x86)\Git\cmd;
c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;
C:\Program Files (x86)\GnuWin32\bin;
C:\Program Files (x86)\Microsoft Visual Studio 9.0\Vc\bin\;
C:\Program Files\SlikSvn\bin;
C:\MyWorkSpace\BaseTools\Bin\Win32

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>echo %WindowsSdkDir%
C:\Program Files\\Microsoft SDKs\Windows\v6.0A\

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>PATH=%WindowsSdkDir%;%PATH%

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>echo %PATH%
C:\Program Files\\Microsoft SDKs\Windows\v6.0A\;
C:\Windows\system32;
C:\Windows;
C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0\;
C:\OpenSSL-Win32\bin;
C:\Python27\;
"C:\Program Files (x86)\Git\cmd";
"c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\";
"C:\Program Files (x86)\GnuWin32\bin";"C:\Program Files (x86)\Microsoft Visual Studio 9.0\Vc\bin\";
"C:\Program Files\SlikSvn\bin";
"C:\MyWorkSpace\BaseTools\Bin\Win32";
C:\Program Files(x86)\Git\cmd;
c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;
C:\Program Files (x86)\GnuWin32\bin;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Vc\bin\;C:\Program Files\SlikSvn\bin;
C:\MyWorkSpace\BaseTools\Bin\Win32

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>PATH=%WindowsSdkDir%bin\x64;%WindowsSdkDir%bin\win64\x64;%Win
dowsSdkDir%bin;%PATH%

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>echo %PATH%
C:\Program Files\\Microsoft SDKs\Windows\v6.0A\bin\x64;
C:\Program Files\\Microsoft SDKs\Windows\v6.0A\bin\win64\x64
;C:\Program Files\\Microsoft SDKs\Windows\v6.0A\bin;
C:\Program Files\\Microsoft SDKs\Windows\v6.0A\;C:\Windows\syst
em32;
C:\Windows;
C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0\;
C:\OpenSSL-Win32\bin;
C:\Python27\;
"C:\Program Files (x86)\Git\cmd";
"c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\";
"C:\Program Files (x86)\GnuWin32\bin";
"C:\Program Files (x86)\Microsoft Visual Studio 9.0\Vc\bin\";
"C:\Program Files\SlikSvn\bin";
"C:\MyWorkSpace\BaseTools\Bin\Win32";
C:\Program Files (x86)\Git\cmd;
c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;
C:\Program Files (x86)\GnuWin32\bin;
C:\Program Files (x86)\Microsoft Visual Studio 9.0\Vc\bin\;
C:\Program Files\SlikSvn\bin;C:\MyWorkSpace\BaseTools\Bin\Win32

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>
key takeaway after spending yrs on sw industry: big issue small because everyone jumps on it and fixes it. small issue is big since everyone ignores and it causes catastrophy later. #devilisinthedetails
jnc100
Member
Member
Posts: 775
Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:

Re: Having trouble initializing vc2008 build environment.

Post by jnc100 »

This seems relevant.

Regards,
John.
User avatar
~
Member
Member
Posts: 1228
Joined: Tue Mar 06, 2007 11:17 am
Libera.chat IRC: ArcheFire

Re: Having trouble initializing vc2008 build environment.

Post by ~ »

You could add the paths one by one.

Also, instead of using automatic system PATH variables and the like, you could add the precise directories you want and remove the rest, after taking note of your original configuration, of course.

Start by the ones you suspect that are giving you trouble and find a way to fix or rename them.

Then you can easily find the problems gradually, individually.
Post Reply