threads / discuss / 20360

msysGit and SCons: broken?

Subject: msysGit and SCons: broken?

## tl;dr

6 messages between Aug 3, 2009 and Aug 15, 2009.

replies: 5people: 2as markdown or json

Dirk Süsserott· Aug 3, 2009, 18:19 UTC · lore
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
Johannes Schindelin· Aug 3, 2009, 22:13 UTC · re: Dirk Süsserott · lore

Re: msysGit and SCons: broken?

Hi,
On Mon, 3 Aug 2009, Dirk Süsserott wrote:
> 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.

> 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).

Show 12 quoted 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.
> 
> 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

Dirk Süsserott· Aug 6, 2009, 19:45 UTC · re: Johannes Schindelin · lore

Re: msysGit and SCons: broken?

Am 04.08.2009 00:13 schrieb Johannes Schindelin:
> On Mon, 3 Aug 2009, Dirk Süsserott wrote:
> 
> 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. :-)

> 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
Dirk Süsserott· Aug 13, 2009, 19:32 UTC · re: Dirk Süsserott · lore

Re: msysGit and SCons: broken?

Am 06.08.2009 21:45 schrieb Dirk Süsserott:
Show 10 quoted lines
> Am 04.08.2009 00:13 schrieb Johannes Schindelin:
>> On Mon, 3 Aug 2009, Dirk Süsserott wrote:
>>
>> 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
Johannes Schindelin· Aug 13, 2009, 21:54 UTC · re: Dirk Süsserott · lore

Re: msysGit and SCons: broken?

Hi,
On Thu, 13 Aug 2009, Dirk Süsserott wrote:
Show 17 quoted lines
> Am 06.08.2009 21:45 schrieb Dirk Süsserott:
> > Am 04.08.2009 00:13 schrieb Johannes Schindelin:
> > > On Mon, 3 Aug 2009, Dirk Süsserott wrote:
> > >
> > > 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:/').

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

Dirk Süsserott· Aug 15, 2009, 14:04 UTC · re: Johannes Schindelin · lore

Re: msysGit and SCons: broken?

Am 13.08.2009 23:54 schrieb Johannes Schindelin:
> Hi,
> 
> On Thu, 13 Aug 2009, Dirk Süsserott wrote:
> 
...
Show 11 quoted 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

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

← back to recent threads