Thread (3 messages) 3 messages, 3 authors, 2022-07-26

Re: git not compiling under MSYS2

From: Johannes Schindelin <hidden>
Date: 2022-07-26 21:59:49

Hi Jack,

On Fri, 29 Apr 2022, Jack Adrian Zappa wrote:
I just installed MSYS2, cloned the git repo from
https://github.com/git/git and then tried to build from the "MSYS2
MinGW Clang x64" prompt.  Of course this was a clean MSYS2 install, so
I had to first install for myself vim, git to download the repo and
for the build: make and gcc.  However, after running the make command,
I'm still getting errors:

------------->8------------->8------------->8------------->8------------->8------------->8------------->8-------------
$ make
make: curl-config: No such file or directory
    CC fuzz-commit-graph.o
In file included from git-compat-util.h:219,
                 from commit-graph.h:4,
                 from fuzz-commit-graph.c:1:
compat/win32/dirent.h:13:21: error: ‘MAX_PATH’ undeclared here (not in
a function); did you mean ‘O_PATH’?
   13 |         char d_name[MAX_PATH * 3]; /* file name (* 3 for UTF-8
conversion) */
      |                     ^~~~~~~~
      |                     O_PATH
You most likely installed the `gcc` package, but that would produce an
MSYS version of Git, while you are clearly interested in the MINGW
version. Therefore, you should probably install `mingw-w64-x86_64-gcc`.

To verify that you have the correct `gcc`, run `which gcc`. If it prints
`/usr/bin/git`, you are still stuck with the MSYS variant, what you want
is `/mingw64/bin/git` to be printed.

Ciao,
Johannes
In file included from commit-graph.h:4,
                 from fuzz-commit-graph.c:1:
git-compat-util.h:329: warning: "basename" redefined
  329 | #define basename gitbasename
      |
In file included from git-compat-util.h:209,
                 from commit-graph.h:4,
                 from fuzz-commit-graph.c:1:
/usr/include/string.h:171: note: this is the location of the previous definition
  171 | # define basename basename
      |
In file included from commit-graph.h:4,
                 from fuzz-commit-graph.c:1:
git-compat-util.h:336:10: fatal error: iconv.h: No such file or directory
  336 | #include <iconv.h>
      |          ^~~~~~~~~
compilation terminated.
make: *** [Makefile:2569: fuzz-commit-graph.o] Error 1
-------------8<-------------8<-------------8<-------------8<-------------8<-------------8<-------------8<-------------

Anyone have any idea why it's not building?

Thanks,


A
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help