git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git not compiling under MSYS2
@ 2022-04-29 18:40 Jack Adrian Zappa
  2022-04-29 20:31 ` Carlo Marcelo Arenas Belón
  2022-07-26 21:59 ` Johannes Schindelin
  0 siblings, 2 replies; 3+ messages in thread
From: Jack Adrian Zappa @ 2022-04-29 18:40 UTC (permalink / raw)
  To: git-mailing-list

Hi all,

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
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: git not compiling under MSYS2
  2022-04-29 18:40 git not compiling under MSYS2 Jack Adrian Zappa
@ 2022-04-29 20:31 ` Carlo Marcelo Arenas Belón
  2022-07-26 21:59 ` Johannes Schindelin
  1 sibling, 0 replies; 3+ messages in thread
From: Carlo Marcelo Arenas Belón @ 2022-04-29 20:31 UTC (permalink / raw)
  To: Jack Adrian Zappa; +Cc: git-mailing-list

On Fri, Apr 29, 2022 at 02:40:14PM -0400, Jack Adrian Zappa wrote:
> Anyone have any idea why it's not building?

because the codebase doesn't support that environment yet AFAIK.

I'd been successful building git in windows with MinGW64 gcc (both 64
and 32 bit), Visual Studio's cl and even the clang that comes as an option
in that last one (which uses the clang-cl interface)

If you want to build it in an MSYS2 like environment the best option is to
use the Git for Windows SDK[1] which AFAIK is based on one of the MSYS2
variants (most likely the one with gcc and the old crt)

Carlo

[1] https://github.com/git-for-windows/build-extra/releases/tag/git-sdk-1.0.8

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: git not compiling under MSYS2
  2022-04-29 18:40 git not compiling under MSYS2 Jack Adrian Zappa
  2022-04-29 20:31 ` Carlo Marcelo Arenas Belón
@ 2022-07-26 21:59 ` Johannes Schindelin
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Schindelin @ 2022-07-26 21:59 UTC (permalink / raw)
  To: Jack Adrian Zappa; +Cc: git-mailing-list

[-- Attachment #1: Type: text/plain, Size: 2481 bytes --]

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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-26 21:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29 18:40 git not compiling under MSYS2 Jack Adrian Zappa
2022-04-29 20:31 ` Carlo Marcelo Arenas Belón
2022-07-26 21:59 ` Johannes Schindelin

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).