threads / discuss / 28707

Compiling on Windows

Subject: Compiling on Windows

## tl;dr

12 messages between Oct 18, 2011 and Oct 21, 2011.

replies: 11people: 8as markdown or json

Andrew Ardill· Oct 18, 2011, 04:08 UTC · lore

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· Oct 18, 2011, 05:41 UTC · re: Andrew Ardill · lore

Re: Compiling on Windows

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· Oct 18, 2011, 06:17 UTC · re: Frans Klaver · lore

Re: Compiling on Windows

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
Erik Faye-Lund· Oct 18, 2011, 14:02 UTC · re: Andrew Ardill · lore

Re: Compiling on Windows

On Tue, Oct 18, 2011 at 8:17 AM, Andrew Ardill <andrew.ardill@gmail.com> wrote:
Show 6 quoted lines
> 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· Oct 18, 2011, 16:07 UTC · re: Erik Faye-Lund · lore

Re: Compiling on Windows

On 18.10.2011 16:02, Erik Faye-Lund wrote:
Show 5 quoted lines
>> 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
Alexey Shumkin· Oct 18, 2011, 06:39 UTC · re: Andrew Ardill · lore

Re: Compiling on Windows

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)

Show 12 quoted lines
> 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
Vincent van Ravesteijn· Oct 19, 2011, 07:49 UTC · re: Andrew Ardill · lore

Re: Compiling on Windows

Op 18-10-2011 6:08, Andrew Ardill schreef:
Show 8 quoted lines
> 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· Oct 19, 2011, 21:46 UTC · re: Vincent van Ravesteijn · lore

Re: Compiling on Windows

From: "Vincent van Ravesteijn" <vfr@lyx.org>
Show 14 quoted lines
> 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.

Show 8 quoted lines
>
> 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· Oct 19, 2011, 23:17 UTC · re: Philip Oakley · lore

Re: [msysGit] Re: Compiling on Windows

Hi,
On Wed, 19 Oct 2011, Philip Oakley wrote:
Show 6 quoted lines
> 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· Oct 20, 2011, 07:06 UTC · re: Johannes Schindelin · lore

Re: [msysGit] Re: Compiling on Windows

From: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>
Sent: Thursday, October 20, 2011 12:17 AM
Show 12 quoted lines
> 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· Oct 20, 2011, 21:38 UTC · re: Philip Oakley · lore

Re: Compiling on Windows

Show 7 quoted lines
>> 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· Oct 21, 2011, 11:41 UTC · re: Vincent van Ravesteijn · lore

Re: Compiling on Windows

On Thu, Oct 20, 2011 at 11:38 PM, Vincent van Ravesteijn <vfr@lyx.org> wrote:
Show 11 quoted lines
>
>>> 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.

Show 11 quoted lines
> 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 :)

← back to recent threads