{"thread":{"id":"57819","subject":"git not compiling under MSYS2","startedAt":"2022-04-29T18:41:02Z","lastAt":"2022-07-26T21:59:49Z","messageCount":3,"participants":["Jack Adrian Zappa","Carlo Marcelo Arenas Belón","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"454629","messageId":"CAKepmajpJ0Nhr0SPNicg6djhH36f+dT_SHrb7pOEK7J0eXYuFA@mail.gmail.com","threadId":"57819","inReplyTo":null,"subject":"git not compiling under MSYS2","fromName":"Jack Adrian Zappa","fromEmail":"adrianh.bsc@gmail.com","sentAt":"2022-04-29T18:40:14Z","receivedAt":"2022-04-29T18:41:02Z","isPatch":false,"sender":{"key":"adrianh.bsc@gmail.com","avatar":null},"body":"Hi all,\n\nI just installed MSYS2, cloned the git repo from\nhttps://github.com/git/git and then tried to build from the \"MSYS2\nMinGW Clang x64\" prompt.  Of course this was a clean MSYS2 install, so\nI had to first install for myself vim, git to download the repo and\nfor the build: make and gcc.  However, after running the make command,\nI'm still getting errors:\n\n------------->8------------->8------------->8------------->8------------->8------------->8------------->8-------------\n$ make\nmake: curl-config: No such file or directory\n    CC fuzz-commit-graph.o\nIn file included from git-compat-util.h:219,\n                 from commit-graph.h:4,\n                 from fuzz-commit-graph.c:1:\ncompat/win32/dirent.h:13:21: error: ‘MAX_PATH’ undeclared here (not in\na function); did you mean ‘O_PATH’?\n   13 |         char d_name[MAX_PATH * 3]; /* file name (* 3 for UTF-8\nconversion) */\n      |                     ^~~~~~~~\n      |                     O_PATH\nIn file included from commit-graph.h:4,\n                 from fuzz-commit-graph.c:1:\ngit-compat-util.h:329: warning: \"basename\" redefined\n  329 | #define basename gitbasename\n      |\nIn file included from git-compat-util.h:209,\n                 from commit-graph.h:4,\n                 from fuzz-commit-graph.c:1:\n/usr/include/string.h:171: note: this is the location of the previous definition\n  171 | # define basename basename\n      |\nIn file included from commit-graph.h:4,\n                 from fuzz-commit-graph.c:1:\ngit-compat-util.h:336:10: fatal error: iconv.h: No such file or directory\n  336 | #include <iconv.h>\n      |          ^~~~~~~~~\ncompilation terminated.\nmake: *** [Makefile:2569: fuzz-commit-graph.o] Error 1\n-------------8<-------------8<-------------8<-------------8<-------------8<-------------8<-------------8<-------------\n\nAnyone have any idea why it's not building?\n\nThanks,\n\n\nA\n"},{"id":"454639","messageId":"20220429203155.ve5iemdgr6mualvp@carlos-mbp.lan","threadId":"57819","inReplyTo":"CAKepmajpJ0Nhr0SPNicg6djhH36f+dT_SHrb7pOEK7J0eXYuFA@mail.gmail.com","subject":"Re: git not compiling under MSYS2","fromName":"Carlo Marcelo Arenas Belón","fromEmail":"carenas@gmail.com","sentAt":"2022-04-29T20:31:55Z","receivedAt":"2022-04-29T20:32:03Z","isPatch":false,"sender":{"key":"carenas@gmail.com","avatar":"https://avatars.githubusercontent.com/u/76036?v=4"},"body":"On Fri, Apr 29, 2022 at 02:40:14PM -0400, Jack Adrian Zappa wrote:\n> Anyone have any idea why it's not building?\n\nbecause the codebase doesn't support that environment yet AFAIK.\n\nI'd been successful building git in windows with MinGW64 gcc (both 64\nand 32 bit), Visual Studio's cl and even the clang that comes as an option\nin that last one (which uses the clang-cl interface)\n\nIf you want to build it in an MSYS2 like environment the best option is to\nuse the Git for Windows SDK[1] which AFAIK is based on one of the MSYS2\nvariants (most likely the one with gcc and the old crt)\n\nCarlo\n\n[1] https://github.com/git-for-windows/build-extra/releases/tag/git-sdk-1.0.8\n"},{"id":"460003","messageId":"s3p5rspo-641r-0960-rnsr-518o8p1rso97@tzk.qr","threadId":"57819","inReplyTo":"CAKepmajpJ0Nhr0SPNicg6djhH36f+dT_SHrb7pOEK7J0eXYuFA@mail.gmail.com","subject":"Re: git not compiling under MSYS2","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2022-07-26T21:59:47Z","receivedAt":"2022-07-26T21:59:49Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Jack,\n\nOn Fri, 29 Apr 2022, Jack Adrian Zappa wrote:\n\n> I just installed MSYS2, cloned the git repo from\n> https://github.com/git/git and then tried to build from the \"MSYS2\n> MinGW Clang x64\" prompt.  Of course this was a clean MSYS2 install, so\n> I had to first install for myself vim, git to download the repo and\n> for the build: make and gcc.  However, after running the make command,\n> I'm still getting errors:\n>\n> ------------->8------------->8------------->8------------->8------------->8------------->8------------->8-------------\n> $ make\n> make: curl-config: No such file or directory\n>     CC fuzz-commit-graph.o\n> In file included from git-compat-util.h:219,\n>                  from commit-graph.h:4,\n>                  from fuzz-commit-graph.c:1:\n> compat/win32/dirent.h:13:21: error: ‘MAX_PATH’ undeclared here (not in\n> a function); did you mean ‘O_PATH’?\n>    13 |         char d_name[MAX_PATH * 3]; /* file name (* 3 for UTF-8\n> conversion) */\n>       |                     ^~~~~~~~\n>       |                     O_PATH\n\nYou most likely installed the `gcc` package, but that would produce an\nMSYS version of Git, while you are clearly interested in the MINGW\nversion. Therefore, you should probably install `mingw-w64-x86_64-gcc`.\n\nTo verify that you have the correct `gcc`, run `which gcc`. If it prints\n`/usr/bin/git`, you are still stuck with the MSYS variant, what you want\nis `/mingw64/bin/git` to be printed.\n\nCiao,\nJohannes\n\n> In file included from commit-graph.h:4,\n>                  from fuzz-commit-graph.c:1:\n> git-compat-util.h:329: warning: \"basename\" redefined\n>   329 | #define basename gitbasename\n>       |\n> In file included from git-compat-util.h:209,\n>                  from commit-graph.h:4,\n>                  from fuzz-commit-graph.c:1:\n> /usr/include/string.h:171: note: this is the location of the previous definition\n>   171 | # define basename basename\n>       |\n> In file included from commit-graph.h:4,\n>                  from fuzz-commit-graph.c:1:\n> git-compat-util.h:336:10: fatal error: iconv.h: No such file or directory\n>   336 | #include <iconv.h>\n>       |          ^~~~~~~~~\n> compilation terminated.\n> make: *** [Makefile:2569: fuzz-commit-graph.o] Error 1\n> -------------8<-------------8<-------------8<-------------8<-------------8<-------------8<-------------8<-------------\n>\n> Anyone have any idea why it's not building?\n>\n> Thanks,\n>\n>\n> A\n>\n"}]}