[PATCH 0/4] Cygwin MSVC patches

5 messages Options
Embed this post
Permalink
Ramsay Jones

[PATCH 0/4] Cygwin MSVC patches

Reply Threaded More More options
Print post
Permalink
Hi Junio,

I've had these patches "hanging around" in my queue, for a few
weeks, with every intention of adding several more to fix up
some problems... Hmm, well I haven't got to those yet, so I
thought I may as well pass these on.

[PATCH 1/4] MSVC: Fix an "unresolved symbol" linker error on cygwin
[PATCH 2/4] Makefile: merge two Cygwin configuration sections into one
[PATCH 3/4] Makefile: keep MSVC and Cygwin configuration separate
[PATCH 4/4] win32: Improve the conditional inclusion of WIN32 API code

I think they are all pretty safe (famous last words), but it would be
a good idea for someone with an MSYS/MinGW installation to test them
(particularly patch #4; it's really the only one I'm slightly worried
about :D).

With these patches, the msvc build on cygwin seems to be working fine.

At first it looked bad; an ./git-status showed a shed-load of "Changed
but not updated" files along with many "Untracked files" which should
have been ignored (eg editor backup files).

In order to fix the ignored files problem, I had to make a change to
~/.gitconfig. The core.excludesfile was set to /home/ramsay/.gitignore,
which (being a cygwin path) the msvc build could not read.  However,
setting this to C:/cygwin/home/ramsay/.gitignore fixed the problem
since both the cygwin and msvc builds can read that path.

When ./git-diff showed that most of the "Changed" files differed only
in the mode, in particular only the execute bit, it was easy to fix
that also; set core.filemode to false.

This left only the symlink RelNotes, which was shown as deleted and an
RelNotes.lnk file as untracked. This is to be expected on a cygwin
git repo (and is an example of the "white-lies" that cygwin tells you
when it iterates over the filesystem).

ATB,
Ramsay Jones

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Johannes Sixt-2

Re: [PATCH 0/4] Cygwin MSVC patches

Reply Threaded More More options
Print post
Permalink
Ramsay Jones schrieb:

> Hi Junio,
>
> I've had these patches "hanging around" in my queue, for a few
> weeks, with every intention of adding several more to fix up
> some problems... Hmm, well I haven't got to those yet, so I
> thought I may as well pass these on.
>
> [PATCH 1/4] MSVC: Fix an "unresolved symbol" linker error on cygwin
> [PATCH 2/4] Makefile: merge two Cygwin configuration sections into one
> [PATCH 3/4] Makefile: keep MSVC and Cygwin configuration separate
> [PATCH 4/4] win32: Improve the conditional inclusion of WIN32 API code
>
> I think they are all pretty safe (famous last words), but it would be
> a good idea for someone with an MSYS/MinGW installation to test them
> (particularly patch #4; it's really the only one I'm slightly worried
> about :D).
>
> With these patches, the msvc build on cygwin seems to be working fine.

What is "the msvc build on cygwin"?

Is it "git built with msvc, then run in cygwin"?

-- Hannes

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ramsay Jones

Re: [PATCH 0/4] Cygwin MSVC patches

Reply Threaded More More options
Print post
Permalink
Johannes Sixt wrote:
> Ramsay Jones schrieb:
>> With these patches, the msvc build on cygwin seems to be working fine.
>
> What is "the msvc build on cygwin"?

The same as the msvc build on msys-MinGW, but replace msys-MinGW
with Cygwin ;-)

> Is it "git built with msvc, then run in cygwin"?

Yes, but... *in theory* the cygwin msvc-built binaries could be transferred
to an msys system and they should work (exactly as the msvc build on msys).
Since I don't have an msys installation, I can't test that... so I won't
guarantee it will work!

Any git needs a (bash-like) shell, perl, Tcl/Tk, ... etc.

Note the difference in the cygcheck output on the (cygwin) msvc-built git:

    $ cygcheck ./git.exe
    .\git.exe
      C:\WINDOWS\system32\ADVAPI32.dll
        C:\WINDOWS\system32\ntdll.dll
        C:\WINDOWS\system32\KERNEL32.dll
        C:\WINDOWS\system32\RPCRT4.dll
          C:\WINDOWS\system32\Secur32.dll
      C:\WINDOWS\system32\SHELL32.dll
        C:\WINDOWS\system32\GDI32.dll
          C:\WINDOWS\system32\USER32.dll
        C:\WINDOWS\system32\msvcrt.dll
        C:\WINDOWS\system32\SHLWAPI.dll
      C:\WINDOWS\system32\WS2_32.dll
        C:\WINDOWS\system32\WS2HELP.dll
      C:\WINDOWS\system32\zlib1.dll
    $

rather than the cygwin git:

    $ cygcheck ./git.exe
    .\git.exe
      C:\cygwin\bin\cygcrypto-0.9.8.dll
        C:\cygwin\bin\cygwin1.dll
          C:\WINDOWS\system32\ADVAPI32.DLL
            C:\WINDOWS\system32\ntdll.dll
            C:\WINDOWS\system32\KERNEL32.dll
            C:\WINDOWS\system32\RPCRT4.dll
              C:\WINDOWS\system32\Secur32.dll
      C:\cygwin\bin\cygiconv-2.dll
      C:\cygwin\bin\cygz.dll
    $

[Actually, one difference between the msys and cygwin msvc builds
is that I have dynamically linked to the zlib1.dll rather than
using the static library from the msvcgit.git dependencies repo.]

ATB,
Ramsay Jones


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Johannes Sixt-2

Re: [PATCH 0/4] Cygwin MSVC patches

Reply Threaded More More options
Print post
Permalink
Ramsay Jones schrieb:

> Johannes Sixt wrote:
>> Ramsay Jones schrieb:
>>> With these patches, the msvc build on cygwin seems to be working fine.
>> What is "the msvc build on cygwin"?
>
> The same as the msvc build on msys-MinGW, but replace msys-MinGW
> with Cygwin ;-)
>
>> Is it "git built with msvc, then run in cygwin"?
>
> Yes, but... *in theory* the cygwin msvc-built binaries could be transferred
> to an msys system and they should work (exactly as the msvc build on msys).
> Since I don't have an msys installation, I can't test that... so I won't
> guarantee it will work!
>
> Any git needs a (bash-like) shell, perl, Tcl/Tk, ... etc.

Just to check I understand correctly: you are running "make MSVC=1" on
cygwin, and then you are using the resulting binaries with the POSIX tools
from cygwin.

-- Hannes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ramsay Jones

Re: [PATCH 0/4] Cygwin MSVC patches

Reply Threaded More More options
Print post
Permalink
Johannes Sixt wrote:
> Just to check I understand correctly: you are running "make MSVC=1" on
> cygwin, and then you are using the resulting binaries with the POSIX tools
> from cygwin.

Yes.

    $ uname -a
    CYGWIN_NT-5.1 toshiba 1.5.22(0.156/4/2) 2006-11-13 17:01 i686 Cygwin
    $ pwd
    /home/ramsay/git
    $ make clean
    [...output snipped...]
    $ make MSVC=1
    [...975 lines of output snipped; built OK...]
    $ ./git --version
    git version 1.6.5.4.g57e8c.MSVC
    $

See original [PATCH 0/4] email for more...

ATB,
Ramsay Jones


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html