All of lore.kernel.org
 help / color / mirror / Atom feed
* How to compile Git with NDK?
@ 2014-09-22 19:04 Robert Dailey
  2014-09-22 21:22 ` Stefan Beller
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Dailey @ 2014-09-22 19:04 UTC (permalink / raw)
  To: Git

I run the following on Ubuntu:

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


I have my NDK's prebuilt GCC 4.8 toolchain on PATH (the bin folder).
Can someone help me cross compile Git using Android NDK toolchain?

Thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to compile Git with NDK?
  2014-09-22 19:04 How to compile Git with NDK? Robert Dailey
@ 2014-09-22 21:22 ` Stefan Beller
  2014-09-23 12:47   ` Robert Dailey
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Beller @ 2014-09-22 21:22 UTC (permalink / raw)
  To: Robert Dailey, GIT Mailing-list

On 22.09.2014 21:04, Robert Dailey wrote:
> I run the following on Ubuntu:
> 
> 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
> 
> 
> I have my NDK's prebuilt GCC 4.8 toolchain on PATH (the bin folder).
> Can someone help me cross compile Git using Android NDK toolchain?
> 
> Thanks.

You don't need autoconf, just type 'make' and you'll be fine.

Please read the file INSTALL for installation instructions.

    Stefan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to compile Git with NDK?
  2014-09-22 21:22 ` Stefan Beller
@ 2014-09-23 12:47   ` Robert Dailey
  2014-09-23 12:52     ` Robert Dailey
  2014-09-23 16:11     ` Jeff King
  0 siblings, 2 replies; 6+ messages in thread
From: Robert Dailey @ 2014-09-23 12:47 UTC (permalink / raw)
  To: Stefan Beller; +Cc: GIT Mailing-list

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.

On Mon, Sep 22, 2014 at 4:22 PM, Stefan Beller <stefanbeller@gmail.com> wrote:
> On 22.09.2014 21:04, Robert Dailey wrote:
>> I run the following on Ubuntu:
>>
>> 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
>>
>>
>> I have my NDK's prebuilt GCC 4.8 toolchain on PATH (the bin folder).
>> Can someone help me cross compile Git using Android NDK toolchain?
>>
>> Thanks.
>
> You don't need autoconf, just type 'make' and you'll be fine.
>
> Please read the file INSTALL for installation instructions.
>
>     Stefan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to compile Git with NDK?
  2014-09-23 12:47   ` Robert Dailey
@ 2014-09-23 12:52     ` Robert Dailey
  2014-09-23 16:13       ` Jeff King
  2014-09-23 16:11     ` Jeff King
  1 sibling, 1 reply; 6+ messages in thread
From: Robert Dailey @ 2014-09-23 12:52 UTC (permalink / raw)
  To: Stefan Beller; +Cc: GIT Mailing-list

On Tue, Sep 23, 2014 at 7:47 AM, Robert Dailey <rcdailey.lists@gmail.com> 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.

Sorry for top post earlier, my mistake.

I reviewed the INSTALL file. It doesn't mention anything regarding how
to setup the toolchain for the Git build. Also looks like I'll have to
build the library dependencies with ARM toolchain as well. Looks like
zlib is the only absolute required one. Is that correct?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to compile Git with NDK?
  2014-09-23 12:47   ` Robert Dailey
  2014-09-23 12:52     ` Robert Dailey
@ 2014-09-23 16:11     ` Jeff King
  1 sibling, 0 replies; 6+ messages in thread
From: Jeff King @ 2014-09-23 16:11 UTC (permalink / raw)
  To: Robert Dailey; +Cc: Stefan Beller, GIT Mailing-list

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:

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to compile Git with NDK?
  2014-09-23 12:52     ` Robert Dailey
@ 2014-09-23 16:13       ` Jeff King
  0 siblings, 0 replies; 6+ messages in thread
From: Jeff King @ 2014-09-23 16:13 UTC (permalink / raw)
  To: Robert Dailey; +Cc: Stefan Beller, GIT Mailing-list

On Tue, Sep 23, 2014 at 07:52:32AM -0500, Robert Dailey wrote:

> On Tue, Sep 23, 2014 at 7:47 AM, Robert Dailey <rcdailey.lists@gmail.com> 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.
> 
> Sorry for top post earlier, my mistake.
> 
> I reviewed the INSTALL file. It doesn't mention anything regarding how
> to setup the toolchain for the Git build. Also looks like I'll have to
> build the library dependencies with ARM toolchain as well. Looks like
> zlib is the only absolute required one. Is that correct?

Yes, zlib is the only absolute dependency. However, libcurl is useful if
you want to clone http repositories.

-Peff

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-09-23 16:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-22 19:04 How to compile Git with NDK? Robert Dailey
2014-09-22 21:22 ` Stefan Beller
2014-09-23 12:47   ` Robert Dailey
2014-09-23 12:52     ` Robert Dailey
2014-09-23 16:13       ` Jeff King
2014-09-23 16:11     ` Jeff King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.