Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build git on windows?

I am trying to build Git from this repository: git-for-windows, which is supposedly last version of git with windows-specific changes. I am working in MinGw32 environment on Windows.

I have run into the following problem: when I try to build git, I get:

compat/mingw.h:134:25: fatal error: openssl/ssl.h: 
No such file or directory  #include <openssl/ssl.h>

Why is that? I have openssl built an installed from source in the same environment, using make -> make install sequence.
In particular, ssl.h was installed into /usr/local/ssl/include/openssl/ssl.h and /local/ssl/include/openssl/ssl.h.

How can I resolve this problem?

like image 328
Srv19 Avatar asked Mar 04 '15 07:03

Srv19


1 Answers

Install MSYS2 with MinGW-w64.

Open Mingw64 shell, add the following packages:

$ pacman -Sy mingw64/mingw-w64-x86_64-openssl \
  mingw64/mingw-w64-x86_64-pcre2 \
  mingw64/mingw-w64-x86_64-zlib

Clone and build Git (if you don't have Git yet, you can download a .zip instead)

$ git clone https://github.com/git-for-windows/git.git
$ cd git
$ make
like image 123
rustyx Avatar answered Oct 01 '22 02:10

rustyx