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

Re: "fatal: Not a git repository" issued during 'make' from source code

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 11, 2023, 20:44 UTC
Message-ID
<xmqqmsyxqpg7.fsf@gitster.g>
In-Reply-To
<xmqqr0o9qpon.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 16 quoted lines
> <rsbecker@nexbridge.com> writes:
>
>> On Friday, August 11, 2023 3:57 PM, Mun Johl wrote:
>>>I am new to git and am trying to compile git-2.41.0 on RHEL7.  When I run
>> 'make
>>>prefix=/usr/local all doc', I get the following error:
>>>
>>>fatal: Not a git repository (or any parent up to mount point /tools)
>>>
>>>Which I infer means that I need to do the build within a git repo.  Is that
>> correct?  Or
>>>have I missed some basic step in the build process?
>>
>> Yes, you must be in the cloned git repository in order to run the build.
>
> Shouldn't we be able to build out of a tarball?
In other words,
    $ mkdir -p /var/tmp/x
    $ cd /var/tmp/x
    $ wget http://www.kernel.org/pub/software/scm/git/testing/git-2.42.0.rc1.tar.xz
    $ tar xf git-2.42.0.rc1.tar.xz
    $ cd git-2.42.0.rc1
    $ make prefix=/var/tmp/local all doc
    $ sudo make prefix=/var/tmp/local install

is what I just did to make sure that a build from our tarball extract does not require a git repository (it would be a bug to require one, as it would make it impossible to bootstrap).

Previous: Junio C HamanoNext: rsbecker@nexbridge.com
Message 7 of 21 in “"fatal: Not a git repository" issued during 'make' from source code”
  1. Mun JohlAug 11, 2023
  2. rsbecker@nexbridge.comAug 11, 2023
  3. Mun JohlAug 11, 2023
  4. Mun JohlAug 11, 2023
  5. rsbecker@nexbridge.comAug 11, 2023
  6. Junio C HamanoAug 11, 2023
  7. Junio C HamanoAug 11, 2023
  8. rsbecker@nexbridge.comAug 11, 2023
  9. Mun JohlAug 11, 2023
  10. Junio C HamanoAug 11, 2023
  11. Mun JohlAug 12, 2023
  12. rsbecker@nexbridge.comAug 11, 2023
  13. Junio C HamanoAug 11, 2023
  14. rsbecker@nexbridge.comAug 11, 2023
  15. Mun JohlAug 12, 2023
  16. rsbecker@nexbridge.comAug 14, 2023
  17. Mun JohlAug 15, 2023
  18. rsbecker@nexbridge.comAug 15, 2023
  19. Mun JohlAug 16, 2023
  20. Todd ZullingerAug 12, 2023
  21. Mun JohlAug 12, 2023

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.