msysgit / git

msysGit-based Git for Windows 1.x is now superseded by Git for Windows 2.x
http://github.com/git-for-windows/git
Other
1.01k stars 316 forks source link

Support 64-bit on Windows #264

Closed dscho closed 9 years ago

dscho commented 10 years ago

This corresponds to v4 of @slonopotamus' patch series, rebased onto msysGit's master.

dscho commented 10 years ago

In the meantime, this PR passed a 32-build on Windows.

dscho commented 10 years ago

For what it's worth, the 64-bit compilation fails here. With the trusty 64-bit setup in /src/mingw-w64/, a build fails thusly:

make CROSS_COMPILE=x86_64-w64-mingw32- NO_OPENSSL=1 NO_ICONV=1
...
    CC compat/poll/poll.c
compat/poll/poll.c: In function 'poll':
compat/poll/poll.c:541:7: warning: implicit declaration of function 'MsgWaitForMultipleObjects' [-Wimplicit-function-declaration]
compat/poll/poll.c:542:26: error 'QS_ALLINPUT' undeclared (first use in this function)
compat/poll/poll.c:542:26: note: each undeclared identifier is reported only once for each function it appears in
make: *** [compat/poll/poll.o] Error 1

(Note: I had to type this out because I VNC'ed into a Windows machine using a VNC client that does not let me copy/paste)

buildhive commented 10 years ago

MSysGit - the development behind Git for Windows » git #252 SUCCESS This pull request looks good (what's this?)

t-b commented 10 years ago

The announcement mail from Marat had this:

Attention: in order to build on MinGW-W64, you need to use 'v1.x', 'v2.x' or 'sf/v3.x' branches from MinGW-W64 repo because MinGW-W64 releases do not yet have a fix for https://sourceforge.net/p/mingw-w64/bugs/397

This looks like it, no?

dscho commented 10 years ago

@t-b I read that bug report as if the linking step failed. But that was not the problem here...

In the meantime, I could actually build something by using

make CROSS_COMPILE=x86_64-w64-mingw32- NO_OPENSSL=1 NO_ICONV=1 \
    CFLAGS=-mwindows\ -DQS_ALLINPUT=0xff NEEDS_LIBICONV= NO_CURL=1

(But the compiled git.exe fails to output anything to the console except when doing the 2>&1 | cat dance.)

t-b commented 10 years ago

@dscho The OP of the bug talked about

Besides MsgWaitForMultipleObjects itself, also these should be moved out from #ifndef NOGDI:

  1. MsgWaitForMultipleObjectsEx
  2. QS_* defines

and as you had also QS_ALLINPUT not defined, I thought maybe...

t-b commented 10 years ago

The test suite passes here. I'v rebased w64-msysgit onto git-for-windows/git as that is what at the moment counts.

linquize commented 10 years ago

looking forward to 64-bit binary!

dscho commented 10 years ago

looking forward to 64-bit binary!

Hmpf. I, for one, would appreciate real help more than cheers from the peanut gallery. Such cheers always feel as if I should be able to charge for the performance I am delivering.

dscho commented 10 years ago

The OP of the bug talked about

Besides MsgWaitForMultipleObjects itself, also these should be moved out from #ifndef NOGDI:
  1. MsgWaitForMultipleObjectsEx
  2. QS_* defines

and as you had also QS_ALLINPUT not defined, I thought maybe...

Ah, I really managed to skip reading the description and got to the linker error right away. Well, I think you're correct, we can easily do something like

#if defined(_WIN32) && !defined(QS_ALLINPUT)
...
#endif
dscho commented 10 years ago

The test suite passes here.

Coooool! I never managed that in my previous 64-bit work.

I'v[e] rebased w64-msysgit onto git-for-windows/git as that is what at the moment counts.

Good. I hoped to get around to test myself using the w64 branch (which I had actually made before the w64-msysgit branch).

@t-b @sschuberth Do we already have scripts to build an installer in git-for-windows/sdk? If so, maybe now would be the time to integrate the 64-bit build?

t-b commented 10 years ago

The test suite passes here.

Coooool! I never managed that in my previous 64-bit work.

Sorry to kill the party, but I was talking about the 32bit build.

@t-b @sschuberth Do we already have scripts to build an installer in git-for-windows/sdk?

Not that I know of.

If so, maybe now would be the time to integrate the 64-bit build?

We definitly can create a mingw64-git package though.

sschuberth commented 10 years ago

Do we already have scripts to build an installer in git-for-windows/sdk?

Not yet. I guess that will be the next thing I'll work on.

dscho commented 10 years ago

We should be able to leverage a ton of work from msysGit's /share/msysGit/WinGit/, right? @sschuberth do you want me to do anything in particular?

sschuberth commented 10 years ago

@dscho No thanks. I'd like to first come up with the foundation how I envision it to be ;-)

dscho commented 9 years ago

Closing this in favor of the already completed work in https://github.com/git-for-windows/git.