# Compiling on Windows

12 messages from 2011-10-18 to 2011-10-21. Participants: Andrew Ardill, Frans Klaver, Alexey Shumkin, Erik Faye-Lund, Sebastian Schuberth, Vincent van Ravesteijn, Philip Oakley, Johannes Schindelin.
Thread: https://gitlist.dev/t/28707

## Andrew Ardill, 2011-10-18 04:08

Subject: Compiling on Windows
Message-ID: <CAH5451=7Em7sPzknVx8i2VBSAZxZwg1Awr8s3Nr2W=A6SDEZEw@mail.gmail.com>
URL: https://gitlist.dev/e/CAH5451%3D7Em7sPzknVx8i2VBSAZxZwg1Awr8s3Nr2W%3DA6SDEZEw%40mail.gmail.com

```
Hi list, I have been searching for details on what is required to
compile on Windows, but haven't found anything conclusive. Perhaps
there is something on the wiki, but unfortunately it is down at the
moment.

Can anyone point me in the right direction? I would like to be able to
compile and test topic branches, and perhaps even do some dev work on
my windows machine.

Regards,

Andrew Ardill

```

## Frans Klaver, 2011-10-18 05:41

Subject: Re: Compiling on Windows
Message-ID: <op.v3i8rauz0aolir@keputer.lokaal>
URL: https://gitlist.dev/e/op.v3i8rauz0aolir%40keputer.lokaal
In-Reply-To: <CAH5451=7Em7sPzknVx8i2VBSAZxZwg1Awr8s3Nr2W=A6SDEZEw@mail.gmail.com>

```
On Tue, 18 Oct 2011 06:08:16 +0200, Andrew Ardill  
<andrew.ardill@gmail.com> wrote:

> Hi list, I have been searching for details on what is required to
> compile on Windows, but haven't found anything conclusive. Perhaps
> there is something on the wiki, but unfortunately it is down at the
> moment.

There's this project called msysgit[0]. The website depends on the wiki  
for explanation though.

Cheers,
Frans

[0]http://code.google.com/p/msysgit/

```

## Andrew Ardill, 2011-10-18 06:17

Subject: Re: Compiling on Windows
Message-ID: <CAH5451=VPzkFZyyUUdj+=dXDCHKQbWTTob_=JJFBCwaDsp1n7Q@mail.gmail.com>
URL: https://gitlist.dev/e/CAH5451%3DVPzkFZyyUUdj%2B%3DdXDCHKQbWTTob_%3DJJFBCwaDsp1n7Q%40mail.gmail.com
In-Reply-To: <op.v3i8rauz0aolir@keputer.lokaal>

```
Thanks for the replies all - I think my main issue was that the wiki
is down and msysgit has very little use-able documentation otherwise.
I had cloned the msysgit project, but was lost on what to do from
there. Foolishly, I had glossed over the msysgit installers on the
project home (I think I thought they were Git for Windows installers).

I have now installed everything, and am ready to hack. Perhaps the
first port of call is adding a README to msysgit :D

Thanks again,

Andrew Ardill

```

## Alexey Shumkin, 2011-10-18 06:39

Subject: Re: Compiling on Windows
Message-ID: <20111018103955.1db40b5e@ashu.dyn.rarus.ru>
URL: https://gitlist.dev/e/20111018103955.1db40b5e%40ashu.dyn.rarus.ru
In-Reply-To: <CAH5451=7Em7sPzknVx8i2VBSAZxZwg1Awr8s3Nr2W=A6SDEZEw@mail.gmail.com>

```
Take a look at Cygwin.
On Windows I use Git under Cygwin.
And, of course, Git can be compiled there (with dependencies installed 
like openssl-dev, curl-dev, etc)

> Hi list, I have been searching for details on what is required to
> compile on Windows, but haven't found anything conclusive. Perhaps
> there is something on the wiki, but unfortunately it is down at the
> moment.
> 
> Can anyone point me in the right direction? I would like to be able to
> compile and test topic branches, and perhaps even do some dev work on
> my windows machine.
> 
> Regards,
> 
> Andrew Ardill

```

## Erik Faye-Lund, 2011-10-18 14:02

Subject: Re: Compiling on Windows
Message-ID: <CABPQNSZhWOa5wken4vh6Hcza8EM4VnekE3VUFJNmaEJvWME=ew@mail.gmail.com>
URL: https://gitlist.dev/e/CABPQNSZhWOa5wken4vh6Hcza8EM4VnekE3VUFJNmaEJvWME%3Dew%40mail.gmail.com
In-Reply-To: <CAH5451=VPzkFZyyUUdj+=dXDCHKQbWTTob_=JJFBCwaDsp1n7Q@mail.gmail.com>

```
On Tue, Oct 18, 2011 at 8:17 AM, Andrew Ardill <andrew.ardill@gmail.com> wrote:
> Thanks for the replies all - I think my main issue was that the wiki
> is down and msysgit has very little use-able documentation otherwise.
> I had cloned the msysgit project, but was lost on what to do from
> there. Foolishly, I had glossed over the msysgit installers on the
> project home (I think I thought they were Git for Windows installers).
>

Yeah, the installer sets up a fully self-contained MSYS-based
development environment to hack on Git for Windows.

> I have now installed everything, and am ready to hack. Perhaps the
> first port of call is adding a README to msysgit :D

Not at all a bad idea!

It'd be awesome if it even worked with the GitHub markup-stuff as
well, since we moved the project there :)

```

## Sebastian Schuberth, 2011-10-18 16:07

Subject: Re: Compiling on Windows
Message-ID: <4E9DA438.2020903@gmail.com>
URL: https://gitlist.dev/e/4E9DA438.2020903%40gmail.com
In-Reply-To: <CABPQNSZhWOa5wken4vh6Hcza8EM4VnekE3VUFJNmaEJvWME=ew@mail.gmail.com>

```
On 18.10.2011 16:02, Erik Faye-Lund wrote:

>> there. Foolishly, I had glossed over the msysgit installers on the
>> project home (I think I thought they were Git for Windows installers).
> 
> Yeah, the installer sets up a fully self-contained MSYS-based
> development environment to hack on Git for Windows.

I keep advertizing my mingwGitDevEnv [1] project which aims to become an alternative to the current msysGit net installer [2]. The advantage of mingwGitDevEnv will be that it comes with an mingw-get based environment, i.e. you can very easily update / add new MinGW / MSYS tools directly from upstream.

Just today I reached a state were mingwGitDevEnv can successfully build git.exe, but git-gui etc. are still missing due to a lack of mingw-get compatible Tcl/Tk packages.

[1] https://github.com/sschuberth/mingwGitDevEnv
[2] http://msysgit.googlecode.com/files/msysGit-netinstall-1.7.7-preview20111014.exe

-- 
Sebastian Schuberth

```

## Vincent van Ravesteijn, 2011-10-19 07:49

Subject: Re: Compiling on Windows
Message-ID: <4E9E811C.10205@lyx.org>
URL: https://gitlist.dev/e/4E9E811C.10205%40lyx.org
In-Reply-To: <CAH5451=7Em7sPzknVx8i2VBSAZxZwg1Awr8s3Nr2W=A6SDEZEw@mail.gmail.com>

```
Op 18-10-2011 6:08, Andrew Ardill schreef:
> Hi list, I have been searching for details on what is required to
> compile on Windows, but haven't found anything conclusive. Perhaps
> there is something on the wiki, but unfortunately it is down at the
> moment.
>
> Can anyone point me in the right direction? I would like to be able to
> compile and test topic branches, and perhaps even do some dev work on
> my windows machine.

I once wrote a little step-by-step tutorial on how to compile the native 
Windows Git with MSVC (Express).

http://blog.vfrconsultancy.nl/#post0

Be aware that git runs without apparent problems, but that all 
functionality written in shell scripts can't be used.

HTH,

Vincent

```

## Philip Oakley, 2011-10-19 21:46

Subject: Re: Compiling on Windows
Message-ID: <2015B7F2CEAE4B449EA4EF744F9B8FD9@PhilipOakley>
URL: https://gitlist.dev/e/2015B7F2CEAE4B449EA4EF744F9B8FD9%40PhilipOakley
In-Reply-To: <4E9E811C.10205@lyx.org>

```
From: "Vincent van Ravesteijn" <vfr@lyx.org>
> Op 18-10-2011 6:08, Andrew Ardill schreef:
>> Hi list, I have been searching for details on what is required to
>> compile on Windows, but haven't found anything conclusive. Perhaps
>> there is something on the wiki, but unfortunately it is down at the
>> moment.
>>
>> Can anyone point me in the right direction? I would like to be able to
>> compile and test topic branches, and perhaps even do some dev work on
>> my windows machine.
>
> I once wrote a little step-by-step tutorial on how to compile the native 
> Windows Git with MSVC (Express).
>
> http://blog.vfrconsultancy.nl/#post0

The blog post filled in a few gaps in the Msysgit README instructions about 
where to place the various downloads described.

>
> Be aware that git runs without apparent problems, but that all 
> functionality written in shell scripts can't be used.
>
> HTH,
>
> Vincent
> --

Many thanks, it saved me asking.
Philip 

```

## Johannes Schindelin, 2011-10-19 23:17

Subject: Re: [msysGit] Re: Compiling on Windows
Message-ID: <alpine.DEB.1.00.1110191816500.32316@s15462909.onlinehome-server.info>
URL: https://gitlist.dev/e/alpine.DEB.1.00.1110191816500.32316%40s15462909.onlinehome-server.info
In-Reply-To: <2015B7F2CEAE4B449EA4EF744F9B8FD9@PhilipOakley>

```
Hi,

On Wed, 19 Oct 2011, Philip Oakley wrote:

> From: "Vincent van Ravesteijn" <vfr@lyx.org>
> > Op 18-10-2011 6:08, Andrew Ardill schreef:
> > > Hi list, I have been searching for details on what is required to 
> > > compile on Windows, but haven't found anything conclusive. Perhaps 
> > > there is something on the wiki, but unfortunately it is down at the 
> > > moment.

The quickest way to get Git for Windows compiled is to download & run
msysGit-netinstall from http://msysgit.googlecode.com/.

Ciao,
Johannes

```

## Philip Oakley, 2011-10-20 07:06

Subject: Re: [msysGit] Re: Compiling on Windows
Message-ID: <A055FD803312493896025A226B6D6E29@PhilipOakley>
URL: https://gitlist.dev/e/A055FD803312493896025A226B6D6E29%40PhilipOakley
In-Reply-To: <alpine.DEB.1.00.1110191816500.32316@s15462909.onlinehome-server.info>

```
From: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>
Sent: Thursday, October 20, 2011 12:17 AM
> On Wed, 19 Oct 2011, Philip Oakley wrote:
>
>> From: "Vincent van Ravesteijn" <vfr@lyx.org>
>> > Op 18-10-2011 6:08, Andrew Ardill schreef:
>> > > Hi list, I have been searching for details on what is required to
>> > > compile on Windows, but haven't found anything conclusive. Perhaps
>> > > there is something on the wiki, but unfortunately it is down at the
>> > > moment.
>
> The quickest way to get Git for Windows compiled is to download & run
> msysGit-netinstall from http://msysgit.googlecode.com/.
>
Johannes,
I've got the msysGit-netinstall, which is excellent, however it was the 
additional setting up of MSVC (Microsoft Visual Studio) that I was trying to 
get going as an IDE tool - Its a tool I have to use at work so I'm familiar 
with it. I know that an MSVC compilation is not perfect..., but it would 
allow me easier development before a proper gcc compilation.

The C:\msysgit\git\compat\vcbuild\README gave details of the extra parts to 
download but it wasn't clear to me where I should put them within the C:\ or 
C:\msysgit\ directory.

The msysGit-netinstall already includes git (C:\msysgit\git), so I wasn't 
sure if I should download it a second time as instructed in the README. With 
the improvements in msysGit-netinstall I expect that the README is slightly 
out of date for the case where the netinstall was used. The blog post gave 
an indication of _where_ the downloads were to be placed, but was otherwise 
very similar to the README instructions.

regards
Philip

```

## Vincent van Ravesteijn, 2011-10-20 21:38

Subject: Re: Compiling on Windows
Message-ID: <4EA094D2.7050807@lyx.org>
URL: https://gitlist.dev/e/4EA094D2.7050807%40lyx.org
In-Reply-To: <2015B7F2CEAE4B449EA4EF744F9B8FD9@PhilipOakley>

```

>> I once wrote a little step-by-step tutorial on how to compile the 
>> native Windows Git with MSVC (Express).
>>
>> http://blog.vfrconsultancy.nl/#post0
>
> The blog post filled in a few gaps in the Msysgit README instructions 
> about where to place the various downloads described.

I updated the post a little so that it actually works again. I somehow 
like to have a real native Windows compilation of Git.

To successfully compile Git, we also need to change
> #include <sys/resource.h>
into
> #include <io.h>

I have seen some communication about this in the past, but nobody cared 
enough to fix this.

Shall I sent a patch that adds a file "compat/win32/sys/resource.h" 
which just includes "io.h" ? Or is there another more prefered way to 
fix this ?

Vincent

```

## Erik Faye-Lund, 2011-10-21 11:41

Subject: Re: Compiling on Windows
Message-ID: <CABPQNSYkBg9pc15kCgzcoqhHFVom48zxYmT4N1GbyRsdLvC9iA@mail.gmail.com>
URL: https://gitlist.dev/e/CABPQNSYkBg9pc15kCgzcoqhHFVom48zxYmT4N1GbyRsdLvC9iA%40mail.gmail.com
In-Reply-To: <4EA094D2.7050807@lyx.org>

```
On Thu, Oct 20, 2011 at 11:38 PM, Vincent van Ravesteijn <vfr@lyx.org> wrote:
>
>>> I once wrote a little step-by-step tutorial on how to compile the native
>>> Windows Git with MSVC (Express).
>>>
>>> http://blog.vfrconsultancy.nl/#post0
>>
>> The blog post filled in a few gaps in the Msysgit README instructions
>> about where to place the various downloads described.
>
> I updated the post a little so that it actually works again. I somehow like
> to have a real native Windows compilation of Git.

Git for Windows is a "real native Windows compilation of Git". You
don't need a MSVC-compiled binary for that.

> To successfully compile Git, we also need to change
>>
>> #include <sys/resource.h>
>
> into
>>
>> #include <io.h>
>
> I have seen some communication about this in the past, but nobody cared
> enough to fix this.
>

There's been some patches dealing with this recently on the msysgit
mailing list. Look for the patches prefixed with "MSVC" in Karsten
Blees' Unicode series. They will be kicked out of the next iteration
of the Unicode series, but if you want to pick them up, clean up the
issues pointed out and re-submit them, that'd be very welcome.

> Shall I sent a patch that adds a file "compat/win32/sys/resource.h" which
> just includes "io.h" ? Or is there another more prefered way to fix this ?

I would prefer <io.h> to be included from compat/msvc.h instead,
because <io.h> isn't a <sys/resource.h> replacement.

As for the missing <sys/resource.h>, I'm not so sure. We don't have
<sys/resource.h> in msysGit either, and I personally don't like the
whole adding-stub-headers approach too much, but it does seem to be
the precedence set for the MSVC-build...

In general I'd say that no-one have worked the MSVC-support in a
while, patches would be welcome :)

```
