On Wed, Jul 02, 2014 at 10:56:25AM -0500, Eldon Nelson wrote:

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

> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to