[TIMOB-2427] Scons fails on win7 64bit
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Trivial |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2011-04-15T03:19:29.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | build, compile, git, scons |
Reporter | Opie Cyrus |
Assignee | Reggie Seagraves |
Created | 2011-04-15T03:19:28.000+0000 |
Updated | 2017-03-09T23:18:17.000+0000 |
Description
Environment:
Windows 7 64bit
Scons v1.2.0.r3842
Git for Windows 1.7.3.1
Python 2.6.6 (win32)
When running scons you get the following error:
c:\dev\appcelerator\titanium_mobile>scons
scons: Reading SConscript files ...
WindowsError: [Error 2] The system cannot find the file
specified:
File "C:\dev\appcelerator\titanium_mobile\SConstruct", line 6:
import package
File "c:\dev\appcelerator\titanium_mobile\site_scons\package.py", line 25:
p = subprocess.Popen(["git","show","--abbrev-commit"],stderr=subprocess.PIPE
, stdout=subprocess.PIPE) File "C:\Python26\lib\subprocess.py", line 623:
errread, errwrite)
File "C:\Python26\lib\subprocess.py", line 833:
startupinfo)
If you add the shell=True argument to the Popen() call in both site_scons\package.py and Sconstruct the error does not present itself and the build will run.
The reason should be that git.exe is not in your system PATH. So just add /path_to_git.exe/ to your path. The problem should be solved.
Resolved - user error. Path was pointing to \cmd directory rather than \bin directory and thus causing the python call to fail but still allowing "git" command to be used without issue on the command line.
Opie
It is not quite a user error, but admittedly it's not a Titanium error.
The
msysGit
installer adds the git directorypath\to\git\cmd
to the %PATH% system variable automatically. Modifying this path topath\to\git\bin
does indeed allow scons to reach a more advanced position, although I still haven't got it working. :/For other users experiencing this issue, here is the solution.
The path in my post above must be corrected as I have explained.
Furthermore, the following system variables need to be set (I use my own actual paths as an example, but obviously they will be different on your system):
Having spoken to one of the scons developers, contrary to what may have been said on the appcel website, spaces in paths to the python libs and JDK should not cause problems. If it does, it's important to file a bug with scons, as windows is one of their primary supported platforms.
Hope this helps someone!
By the way, just one more thing to add. The Scons installer did not find 64bit python on my system, so I uninstalled python and installed the 32bit version, and it installed successfully. I mention this for completeness's sake.
Closing ticket as invalid.