msysGit and SCons: broken?
Hello,
I'm using Git for Windows (1.6.3.2.1299.gee46c) and *used to use* SCons as a build tool. Since my last Git-update (from 1.6.1.9.g97c34 to 1.6.3.2.1299.gee46c) SCons doesn't work an longer. I'm not exactly sure that the Git upgrade made things worse, but I didn't upgrade neither SCons (0.98) nor Python (ActivePython 2.4) and now they cease to work.
When running in git-bash, SCons tells me "TypeError: listdir() argument 1 must be (buffer overflow), not str:" and some stack trace.
When running in native Windows' cmd.exe it works fine.
Is it somehow possible that the Git upgrade broke python scripts? By setting certain ENV vars or something? I don't want to blame someone for this, really, I'm just trying to track down my problem.
Dirk
Hi,
Quoted 1 line · Dirk Süsserott
I'm using Git for Windows (1.6.3.2.1299.gee46c)
I suspect the appropriate mailing list would have been the msysGit list, then.
Quoted 2 lines
and *used to use* SCons as a build tool. Since my last Git-update (from 1.6.1.9.g97c34 to 1.6.3.2.1299.gee46c) SCons doesn't work an longer.
We do not have any SCons (or Python) support in msysGit. If you want it officially supported, I invite you to provide patches to compile and install Python (see the recent work on Perl and Subversion).
Quoted 4 lines
I'm not exactly sure that the Git upgrade made things worse, but I didn't upgrade neither SCons (0.98) nor Python (ActivePython 2.4) and now they cease to work.
Quoted 8 lines
When running in git-bash, SCons tells me "TypeError:
listdir()argument 1 must be (buffer overflow), not str:" and some stack trace.When running in native Windows' cmd.exe it works fine.
Is it somehow possible that the Git upgrade broke python scripts? By setting certain ENV vars or something? I don't want to blame someone for this, really, I'm just trying to track down my problem.
How does your SCons call relate to Git? Do you call it from the Git Bash? Do you call it from cmd.exe directly? Is Git/bash in your PATH?
Ciao,
Dscho
Am 04.08.2009 00:13 schrieb Johannes Schindelin:
Quoted 3 lines · Dirk Süsserott
I suspect the appropriate mailing list would have been the msysGit list, then.
Sorry, next time I'll have a look there, but I'm more familiar with this list. :-)
Quoted 1 line
How does your SCons call relate to Git? Do you call it from the Git Bash? Do you call it from cmd.exe directly? Is Git/bash in your PATH?
My SCons call doesn't actually relate to Git. I just use the Git-bash as my favorite shell under Windows. It's by far better than the regular cmd.exe. Despite I'm using Windows, I'm a "shell person" and prefer not to use only my index finger to direct the computer :-). Git-bash gives that opportunity.
I used to call SCons from Git-bash and it worked. After Git's upgrade (or some other unknown change) I did the same and it didn't work from Git-bash, but it still worked from cmd.exe. Git-bash ist not in my PATH when I run cmd.exe.
Don't bother, I just posed the question and hoped someone says "yeah, I faced the same problem and solved it like this: ...". I'll use a workaround and post a solution if I find one.
Dirk
Am 06.08.2009 21:45 schrieb Dirk Süsserott:
Quoted 6 lines
Am 04.08.2009 00:13 schrieb Johannes Schindelin:
Quoted 3 lines · Dirk Süsserott
How does your SCons call relate to Git? Do you call it from the Git Bash? Do you call it from cmd.exe directly? Is Git/bash in your PATH?
I used to call SCons from Git-bash and it worked. After Git's upgrade (or some other unknown change) I did the same and it didn't work from Git-bash, but it still worked from cmd.exe. Git-bash ist not in my PATH when I run cmd.exe.
If someone had the same or a similar problem: I tracked it down and found a solution. The problem was that I tried to run a Windows program from git-bash. The Windows program then faces the bash's $PATH with a different separator (':' vs. ';') and a different root directory ('/c/' vs. 'C:/'). Scons tries to split the PATH apart to figure out which tools are installed. ActivePython thinks ';' is the right separator and then fails. Thus, I wrote a wrapper to call Scons after manipulating the $PATH variable by first exchanging the separator and then exchanging '/c/' with 'c:/'.
Funny, though, that my things worked a few weeks ago *without* this wrapper. Dunno why. At least it hasn't anything to do with my Git update. I proved that by installing earlier versions of Git.
Dirk
Hi,
Quoted 12 lines · Dirk Süsserott
Am 06.08.2009 21:45 schrieb Dirk Süsserott:
Quoted 10 lines
Am 04.08.2009 00:13 schrieb Johannes Schindelin:
Quoted 4 lines · Dirk Süsserott
How does your SCons call relate to Git? Do you call it from the Git Bash? Do you call it from cmd.exe directly? Is Git/bash in your PATH?
I used to call SCons from Git-bash and it worked. After Git's upgrade (or some other unknown change) I did the same and it didn't work from Git-bash, but it still worked from cmd.exe. Git-bash ist not in my PATH when I run cmd.exe.
Quoted 5 lines
If someone had the same or a similar problem: I tracked it down and found a solution. The problem was that I tried to run a Windows program from git-bash. The Windows program then faces the bash's $PATH with a different separator (':' vs. ';') and a different root directory ('/c/' vs. 'C:/').
I cannot believe that. I actually run a Windows program very often, from Git Bash, and PATH is correctly converted all the time.
Ciao,
Dscho
Am 13.08.2009 23:54 schrieb Johannes Schindelin:
Quoted 4 lines
Hi,
On Thu, 13 Aug 2009, Dirk Süsserott wrote:
...
Quoted 6 lines
Quoted 1 line
If someone had the same or a similar problem: I tracked it down and found a solution. The problem was that I tried to run a Windows program from git-bash. The Windows program then faces the bash's $PATH with a different separator (':' vs. ';') and a different root directory ('/c/' vs. 'C:/').
I cannot believe that. I actually run a Windows program very often, from Git Bash, and PATH is correctly converted all the time.
Ciao,
Dscho
Hmm, I wrote a simple "hello $PATH" and it actually DID print the path in Windows' flavour when started from Git Bash, like you said. Dunno why ActivePython ceased to do so as well... Probably I confused my machine by extending PATH in Windows and .bashrc with different PATHs in different order. Or ActivePython is somehow "zickig" (what's that in english? :-)). However, now it works for me and as SCons is the only tool that failed, I see no further need for investigation. Btw., I started scons from Git Bash with
cmd //c C:/Python24/Scripts/scons.bat "$@"
Maybe that's a problem, but I don't care any longer.
Dirk