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

Re: Compile Error on Git 2.0.1 on Redhat 5.9 with Fix

From
Jeff King <peff@peff.net>
Date
Jul 2, 2014, 16:29 UTC
Message-ID
<20140702162947.GA14404@sigill.intra.peff.net>
In-Reply-To
<CAH5EwqY8D=CGxB+rZvwPH5115r9qmRCBBvJMG_o0962d4Uquxw@mail.gmail.com>
On Wed, Jul 02, 2014 at 10:56:25AM -0500, Eldon Nelson wrote:
Show 16 quoted lines
> When compiling Git 2.0.1 on RedHat 5.9 as a non-root user I get the
> following error:
> 
> BUILD ERROR
> 
> ```
> make prefix=/home/eldon/local all doc info
> ...
>     CC zlib.o
>     CC unix-socket.o
>     CC thread-utils.o
>     CC compat/strlcpy.o
>     AR libgit.a
> /bin/sh: gar: command not found
> make: *** [libgit.a] Error 127
> ```
The Makefile defines AR as:
  $ git grep ^AR Makefile
  Makefile:AR = ar

so it should already do what you want by default. But that make variable can be overridden. Can you show us the contents of your config.mak and config.mak.autogen files (if either exists)?

It's also possible that you have AR set in your environment (show us "echo $AR"), but that would usually not override the Makefile unless "make -e" is used (and that is not in your command-line above, but it's possible that make is a shell alias or something).

Show 7 quoted lines
> My fix was to make a symlink below:
> 
> SYMLINK
> 
> ```
> gar -> /usr/bin/ar
> ```
A simpler workaround is probably:
  make AR=ar ...

but probably the "right" solution is to eliminate whatever is providing the bogus override in the first place.

-Peff
Previous: Matthieu MoyNext: Eldon Nelson
Message 3 of 4 in “Compile Error on Git 2.0.1 on Redhat 5.9 with Fix”
  1. Eldon NelsonJul 2, 2014
  2. Matthieu MoyJul 2, 2014
  3. Jeff KingJul 2, 2014
  4. Eldon NelsonJul 3, 2014

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.