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

Re: git not compiling under MSYS2

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 26, 2022, 21:59 UTC
Message-ID
<s3p5rspo-641r-0960-rnsr-518o8p1rso97@tzk.qr>
In-Reply-To
<CAKepmajpJ0Nhr0SPNicg6djhH36f+dT_SHrb7pOEK7J0eXYuFA@mail.gmail.com>
Hi Jack,
On Fri, 29 Apr 2022, Jack Adrian Zappa wrote:
Show 20 quoted lines
> 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

Show 27 quoted lines
> 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
>
Previous: Carlo Marcelo Arenas Belón
Message 3 of 3 in “git not compiling under MSYS2”
  1. Jack Adrian ZappaApr 29, 2022
  2. Carlo Marcelo Arenas BelónApr 29, 2022
  3. Johannes SchindelinJul 26, 2022

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.