[Scons-users] Help regarding IOError(stderr.decode("mbcs"))
Aseem Shakuntal
kri80vt at outlook.com
Tue Feb 4 08:52:22 EST 2014
Hi Gary,
As for the scons version is concerned, I have been getting the same error even with 2.3.0 and hence, decided to step down a bit on version to see it that works.
IMHO, you are right, it might be nothing related to mbcs. I took a look in the files and found that popen.wait doesn't return success code, which inturn, raises IOError(stderr.decode("mbcs")). Any pointers?
Apparently, it points me to "vcvarsall.bat" which is called with arguments amd64. When I run the file from cmd.exe with amd64 as the argument, it seems like working just fine!
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>vcvarsall.bat amd64Setting environment for using Microsoft Visual Studio 2010 x64 tools.
Below is the debug information from scons..
E:\scons-test>set SCONS_MSCOMMON_DEBUG=-
E:\scons-test>sconsscons: Reading SConscript files ...trying to find VC 11.0find_vc_dir(): no VC registry key 'Software\\Wow6432Node\\Microsoft\\VisualStudio\\11.0\\Setup\\VC\\ProductDir'find_vc_pdir return None for ver 11.0trying to find VC 11.0Expfind_vc_dir(): no VC registry key 'Software\\Wow6432Node\\Microsoft\\VCExpress\\11.0\\Setup\\VC\\ProductDir'find_vc_pdir return None for ver 11.0Exptrying to find VC 10.0find_vc_dir(): found VC in registry: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\found VC 10.0trying to find VC 10.0Expfind_vc_dir(): no VC registry key 'Software\\Wow6432Node\\Microsoft\\VCExpress\\10.0\\Setup\\VC\\ProductDir'find_vc_pdir return None for ver 10.0Exptrying to find VC 9.0find_vc_dir(): no VC registry key 'Software\\Wow6432Node\\Microsoft\\VisualStudio\\9.0\\Setup\\VC\\ProductDir'find_vc_pdir return None for ver 9.0trying to find VC 9.0Expfind_vc_dir(): no VC registry key 'Software\\Wow6432Node\\Microsoft\\VCExpress\\9.0\\Setup\\VC\\ProductDir'find_vc_pdir return None for ver 9.0Exptrying to find VC 8.0find_vc_dir(): no VC registry key 'Software\\Wow6432Node\\Microsoft\\VisualStudio\\8.0\\Setup\\VC\\ProductDir'find_vc_pdir return None for ver 8.0trying to find VC 8.0Expfind_vc_dir(): no VC registry key 'Software\\Wow6432Node\\Microsoft\\VCExpress\\8.0\\Setup\\VC\\ProductDir'find_vc_pdir return None for ver 8.0Exptrying to find VC 7.1find_vc_dir(): no VC registry key 'Software\\Wow6432Node\\Microsoft\\VisualStudio\\7.1\\Setup\\VC\\ProductDir'find_vc_pdir return None for ver 7.1trying to find VC 7.0find_vc_dir(): no VC registry key 'Software\\Wow6432Node\\Microsoft\\VisualStudio\\7.0\\Setup\\VC\\ProductDir'find_vc_pdir return None for ver 7.0trying to find VC 6.0find_vc_dir(): no VC registry key 'Software\\Wow6432Node\\Microsoft\\VisualStudio\\6.0\\Setup\\Microsoft Visual C++\\ProductDir'find_vc_pdir return None for ver 6.0msvc_setup_env()get_default_version()get_default_version(): msvc_version:None msvs_version:Noneinstalled_vcs:['10.0']msvc_setup_env: using default installed MSVC version '10.0'
msvc_setup_env: using specified MSVC version '10.0'
vc.py:msvc_find_valid_batch_script()vc.py:get_host_target()vc.py:get_host_target() req_target_platform:x86_64vc.py:msvc_find_valid_batch_script() trying target_platform:amd64find_vc_dir(): found VC in registry: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vc.py: find_batch_file() pdir:C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\sdk.py:get_installed_sdks()MSCommon/sdk.py: trying to find SDK 7.0find_sdk_dir(): checking registry:Software\Microsoft\Microsoft SDKs\Windows\v7.0\InstallationFolderfind_sdk_dir(): no SDK registry key 'Software\\Microsoft\\Microsoft SDKs\\Windows\\v7.0\\InstallationFolder'MSCommon/sdk.py: trying to find SDK 6.1find_sdk_dir(): checking registry:Software\Microsoft\Microsoft SDKs\Windows\v6.1\InstallationFolderfind_sdk_dir(): no SDK registry key 'Software\\Microsoft\\Microsoft SDKs\\Windows\\v6.1\\InstallationFolder'MSCommon/sdk.py: trying to find SDK 6.0Afind_sdk_dir(): checking registry:Software\Microsoft\Microsoft SDKs\Windows\v6.0A\InstallationFolderfind_sdk_dir(): no SDK registry key 'Software\\Microsoft\\Microsoft SDKs\\Windows\\v6.0A\\InstallationFolder'MSCommon/sdk.py: trying to find SDK 6.0find_sdk_dir(): checking registry:Software\Microsoft\Microsoft SDKs\Windows\v6.0\InstallationFolderfind_sdk_dir(): no SDK registry key 'Software\\Microsoft\\Microsoft SDKs\\Windows\\v6.0\\InstallationFolder'MSCommon/sdk.py: trying to find SDK 2003R2find_sdk_dir(): checking registry:Software\Microsoft\MicrosoftSDK\InstalledSDKS\D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1\Install Dirfind_sdk_dir(): no SDK registry key 'Software\\Microsoft\\MicrosoftSDK\\InstalledSDKS\\D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1\\Install Dir'MSCommon/sdk.py: trying to find SDK 2003R1find_sdk_dir(): checking registry:Software\Microsoft\MicrosoftSDK\InstalledSDKS\8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3\Install Dirfind_sdk_dir(): no SDK registry key 'Software\\Microsoft\\MicrosoftSDK\\InstalledSDKS\\8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3\\Install Dir'vc.py:msvc_find_valid_batch_script() vc_script:C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat sdk_script:Nonevc.py:msvc_find_valid_batch_script() use_script 2 u'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\vcvarsall.bat', args:amd64
Calling 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat amd64'ADDED BY ASEEM: RAISE IOERROR, popen.wait != 0IOError: : File "E:\scons-test\SConstruct", line 1: env = Environment() File "C:\Python27\Scripts\..\Lib\site-packages\scons-2.3.0\SCons\Environment.py", line 1002: apply_tools(self, tools, toolpath) File "C:\Python27\Scripts\..\Lib\site-packages\scons-2.3.0\SCons\Environment.py", line 106: env.Tool(tool) File "C:\Python27\Scripts\..\Lib\site-packages\scons-2.3.0\SCons\Environment.py", line 1786: tool(self) File "C:\Python27\Scripts\..\Lib\site-packages\scons-2.3.0\SCons\Tool\__init__.py", line 183: self.generate(env, *args, **kw) File "C:\Python27\Scripts\..\Lib\site-packages\scons-2.3.0\SCons\Tool\default.py", line 41: SCons.Tool.Tool(t)(env) File "C:\Python27\Scripts\..\Lib\site-packages\scons-2.3.0\SCons\Tool\__init__.py", line 183: self.generate(env, *args, **kw) File "C:\Python27\Scripts\..\Lib\site-packages\scons-2.3.0\SCons\Tool\mslink.py", line 303: msvc_setup_env_once(env) File "C:\Python27\Scripts\..\Lib\site-packages\scons-2.3.0\SCons\Tool\MSCommon\vc.py", line 351: msvc_setup_env(env) File "C:\Python27\Scripts\..\Lib\site-packages\scons-2.3.0\SCons\Tool\MSCommon\vc.py", line 444: d = msvc_find_valid_batch_script(env,version) File "C:\Python27\Scripts\..\Lib\site-packages\scons-2.3.0\SCons\Tool\MSCommon\vc.py", line 398: d = script_env(vc_script, args=arg) File "C:\Python27\Scripts\..\Lib\site-packages\scons-2.3.0\SCons\Tool\MSCommon\vc.py", line 299: stdout = common.get_output(script, args) File "C:\Python27\Scripts\..\Lib\site-packages\scons-2.3.0\SCons\Tool\MSCommon\common.py", line 176: raise IOError(stderr.decode("mbcs"))
Date: Tue, 4 Feb 2014 08:35:47 -0500
From: garyo at oberbrunner.com
To: scons-users at scons.org
Subject: Re: [Scons-users] Help regarding IOError(stderr.decode("mbcs"))
OK, try setting the system environment variable SCONS_MSCOMMON_DEBUG=- (that's a dash as the value) before running SCons; it should spit out a bunch of stuff. Whatever the last thing it says it's calling there (should be a Visual Studio bat file) is probably the thing causing the trouble. Looking at the code, it may not be anything to do with multibyte decoding; it may be the bat file subprocess returning an error.
Also I think you may be running a slightly older SCons, given the line numbers in your original post. Make sure you're running 2.3.0 and it still happens there.
On Tue, Feb 4, 2014 at 7:26 AM, Aseem Shakuntal <kri80vt at outlook.com> wrote:
Hi Gary,
My system locale is: en-us;
E:\>systeminfo /FO LIST | find "System Locale"System Locale: en-us;English (United States)
Br, AseemDate: Tue, 4 Feb 2014 07:14:45 -0500
From: garyo at oberbrunner.com
To: scons-users at scons.org
Subject: Re: [Scons-users] Help regarding IOError(stderr.decode("mbcs"))
What is your locale? Looks like it's trying to decode a multibyte string coming from stderr.
--
Gary Oberbrunner
(sent from my Android)
On Feb 4, 2014 7:08 AM, "Aseem Shakuntal" <kri80vt at outlook.com> wrote:
Hello,
In order to get started with scons, I created a simple "hello.c" and a SConstruct file which does this:
env = Environment()hello = Program(["hello.c"])
When I run scons from my folder which contains these files, I get this error:
$ sconsscons: Reading SConscript files ...IOError: : File "E:\scons-test\SConstruct", line 1:
env = Environment() File "c:\Python27\scons-2.0.1\SCons\Environment.py", line 991: apply_tools(self, tools, toolpath) File "c:\Python27\scons-2.0.1\SCons\Environment.py", line 105:
env.Tool(tool) File "c:\Python27\scons-2.0.1\SCons\Environment.py", line 1692: tool(self) File "c:\Python27\scons-2.0.1\SCons\Tool\__init__.py", line 180:
self.generate(env, *args, **kw) File "c:\Python27\scons-2.0.1\SCons\Tool\default.py", line 41: SCons.Tool.Tool(t)(env) File "c:\Python27\scons-2.0.1\SCons\Tool\__init__.py", line 180:
self.generate(env, *args, **kw) File "c:\Python27\scons-2.0.1\SCons\Tool\mslink.py", line 242: msvc_setup_env_once(env) File "c:\Python27\scons-2.0.1\SCons\Tool\MSCommon\vc.py", line 343:
msvc_setup_env(env) File "c:\Python27\scons-2.0.1\SCons\Tool\MSCommon\vc.py", line 436: d = msvc_find_valid_batch_script(env,version) File "c:\Python27\scons-2.0.1\SCons\Tool\MSCommon\vc.py", line 390:
d = script_env(vc_script, args=arg) File "c:\Python27\scons-2.0.1\SCons\Tool\MSCommon\vc.py", line 292: stdout = common.get_output(script, args) File "c:\Python27\scons-2.0.1\SCons\Tool\MSCommon\common.py", line 173:
raise IOError(stderr.decode("mbcs"))
I am using windows 7, 64 bit. I have python 2.7 installed (and also python 3.2).
Can anyone point me to fixing this? Any help / pointers are highly appreciated!
Br, Aseem--i must dream, to make my dreams come true!
_______________________________________________
Scons-users mailing list
Scons-users at scons.org
http://four.pairlist.net/mailman/listinfo/scons-users
_______________________________________________
Scons-users mailing list
Scons-users at scons.org
http://four.pairlist.net/mailman/listinfo/scons-users
_______________________________________________
Scons-users mailing list
Scons-users at scons.org
http://four.pairlist.net/mailman/listinfo/scons-users
--
Gary
_______________________________________________
Scons-users mailing list
Scons-users at scons.org
http://four.pairlist.net/mailman/listinfo/scons-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20140204/89e1e061/attachment-0001.html
More information about the Scons-users
mailing list