git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Compiling on Windows

From
Erik Faye-Lund <kusmabite@gmail.com>
Date
Oct 21, 2011, 11:41 UTC
Message-ID
<CABPQNSYkBg9pc15kCgzcoqhHFVom48zxYmT4N1GbyRsdLvC9iA@mail.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:
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 :)

Previous: Vincent van Ravesteijn
Message 12 of 12 in “Compiling on Windows”
  1. Andrew ArdillOct 18, 2011
  2. Frans KlaverOct 18, 2011
  3. Andrew ArdillOct 18, 2011
  4. Erik Faye-LundOct 18, 2011
  5. Sebastian SchuberthOct 18, 2011
  6. Alexey ShumkinOct 18, 2011
  7. Vincent van RavesteijnOct 19, 2011
  8. Philip OakleyOct 19, 2011
  9. Johannes SchindelinOct 19, 2011
  10. Philip OakleyOct 20, 2011
  11. Vincent van RavesteijnOct 20, 2011
  12. Erik Faye-LundOct 21, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.