# msysGit and SCons: broken?

6 messages from 2009-08-03 to 2009-08-15. Participants: Dirk Süsserott, Johannes Schindelin.
Thread: https://gitlist.dev/t/20360

## Dirk Süsserott, 2009-08-03 18:19

Subject: msysGit and SCons: broken?
Message-ID: <4A772A43.8070503@dirk.my1.cc>
URL: https://gitlist.dev/e/4A772A43.8070503%40dirk.my1.cc

```
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, 2009-08-03 22:13

Subject: Re: msysGit and SCons: broken?
Message-ID: <alpine.DEB.1.00.0908040010220.8306@pacific.mpi-cbg.de>
URL: https://gitlist.dev/e/alpine.DEB.1.00.0908040010220.8306%40pacific.mpi-cbg.de
In-Reply-To: <4A772A43.8070503@dirk.my1.cc>

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

> 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, 2009-08-06 19:45

Subject: Re: msysGit and SCons: broken?
Message-ID: <4A7B32EA.2080505@dirk.my1.cc>
URL: https://gitlist.dev/e/4A7B32EA.2080505%40dirk.my1.cc
In-Reply-To: <alpine.DEB.1.00.0908040010220.8306@pacific.mpi-cbg.de>

```
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, 2009-08-13 19:32

Subject: Re: msysGit and SCons: broken?
Message-ID: <4A846A5A.4000000@dirk.my1.cc>
URL: https://gitlist.dev/e/4A846A5A.4000000%40dirk.my1.cc
In-Reply-To: <4A7B32EA.2080505@dirk.my1.cc>

```
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:/'). 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, 2009-08-13 21:54

Subject: Re: msysGit and SCons: broken?
Message-ID: <alpine.DEB.1.00.0908132353380.8306@pacific.mpi-cbg.de>
URL: https://gitlist.dev/e/alpine.DEB.1.00.0908132353380.8306%40pacific.mpi-cbg.de
In-Reply-To: <4A846A5A.4000000@dirk.my1.cc>

```
Hi,

On Thu, 13 Aug 2009, Dirk Süsserott wrote:

> 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, 2009-08-15 14:04

Subject: Re: msysGit and SCons: broken?
Message-ID: <4A86C06C.3060409@dirk.my1.cc>
URL: https://gitlist.dev/e/4A86C06C.3060409%40dirk.my1.cc
In-Reply-To: <alpine.DEB.1.00.0908132353380.8306@pacific.mpi-cbg.de>

```
Am 13.08.2009 23:54 schrieb Johannes Schindelin:
> Hi,
> 
> On Thu, 13 Aug 2009, Dirk Süsserott wrote:
> 

...

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

```
