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

Re: How to compile Git with NDK?

From
Jeff King <peff@peff.net>
Date
Sep 23, 2014, 16:11 UTC
Message-ID
<20140923161107.GB20624@peff.net>
In-Reply-To
<CAHd499C0XJDwNa3n3bzK7hu6iRunV1d=nvbqi+2pyoB8uSzDFA@mail.gmail.com>
On Tue, Sep 23, 2014 at 07:47:11AM -0500, Robert Dailey wrote:
> But if I type just 'make', I don't see how it will know where my ARM
> toolchain is. I'll read the INSTALL file in the meantime.

It won't. If you are cross-compiling you'll have to specify CC and LD manually, plus a host of other settings. We usually pick pretty sane defaults (which is why you can get away without running autoconf), but they're not going to be reasonable for cross-compiling. If you do go the non-autoconf route, you'd probably want to try building with "make uname_S=whatever" to override our defaults (see config.mak.uname for an idea of which uname variables we look at).

In your original report:
Show 11 quoted lines
> >> fe@BLD01:~/code/git$ autoconf
> >> fe@BLD01:~/code/git$ ./configure --prefix=/home/fe/git-arm
> >> --build=x86_64-linux-gnu --host=arm-linux-androideabi
> >> configure: Setting lib to 'lib' (the default)
> >> configure: Will try -pthread then -lpthread to enable POSIX Threads.
> >> configure: CHECKS for site configuration
> >> checking for arm-linux-androideabi-gcc... arm-linux-androideabi-gcc
> >> checking whether the C compiler works... no
> >> configure: error: in `/home/fe/code/git':
> >> configure: error: C compiler cannot create executables
> >> See `config.log' for more details

Autoconf couldn't even build a simple hello-world with the compiler you specified. So the first step would probably be to figure that out. What does config.log say?

-Peff
Previous: Jeff King
Message 6 of 6 in “How to compile Git with NDK?”
  1. Robert DaileySep 22, 2014
  2. Stefan BellerSep 22, 2014
  3. Robert DaileySep 23, 2014
  4. Robert DaileySep 23, 2014
  5. Jeff KingSep 23, 2014
  6. Jeff KingSep 23, 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.