{"thread":{"id":"37615","subject":"How to compile Git with NDK?","startedAt":"2014-09-22T19:04:12Z","lastAt":"2014-09-23T16:13:20Z","messageCount":6,"participants":["Robert Dailey","Stefan Beller","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"249747","messageId":"CAHd499C3iwpcGf+Zt+jDJfqW41P=6Uu=b8VGZKJpFZCtw56beg@mail.gmail.com","threadId":"37615","inReplyTo":null,"subject":"How to compile Git with NDK?","fromName":"Robert Dailey","fromEmail":"rcdailey.lists@gmail.com","sentAt":"2014-09-22T19:04:12Z","receivedAt":"2014-09-22T19:04:12Z","isPatch":false,"sender":{"key":"rcdailey.lists@gmail.com","avatar":null},"body":"I run the following on Ubuntu:\n\nfe@BLD01:~/code/git$ autoconf\nfe@BLD01:~/code/git$ ./configure --prefix=/home/fe/git-arm\n--build=x86_64-linux-gnu --host=arm-linux-androideabi\nconfigure: Setting lib to 'lib' (the default)\nconfigure: Will try -pthread then -lpthread to enable POSIX Threads.\nconfigure: CHECKS for site configuration\nchecking for arm-linux-androideabi-gcc... arm-linux-androideabi-gcc\nchecking whether the C compiler works... no\nconfigure: error: in `/home/fe/code/git':\nconfigure: error: C compiler cannot create executables\nSee `config.log' for more details\n\n\nI have my NDK's prebuilt GCC 4.8 toolchain on PATH (the bin folder).\nCan someone help me cross compile Git using Android NDK toolchain?\n\nThanks.\n"},{"id":"249756","messageId":"54209333.7090300@gmail.com","threadId":"37615","inReplyTo":"CAHd499C3iwpcGf+Zt+jDJfqW41P=6Uu=b8VGZKJpFZCtw56beg@mail.gmail.com","subject":"Re: How to compile Git with NDK?","fromName":"Stefan Beller","fromEmail":"stefanbeller@gmail.com","sentAt":"2014-09-22T21:22:59Z","receivedAt":"2014-09-22T21:22:59Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On 22.09.2014 21:04, Robert Dailey wrote:\n> I run the following on Ubuntu:\n> \n> fe@BLD01:~/code/git$ autoconf\n> fe@BLD01:~/code/git$ ./configure --prefix=/home/fe/git-arm\n> --build=x86_64-linux-gnu --host=arm-linux-androideabi\n> configure: Setting lib to 'lib' (the default)\n> configure: Will try -pthread then -lpthread to enable POSIX Threads.\n> configure: CHECKS for site configuration\n> checking for arm-linux-androideabi-gcc... arm-linux-androideabi-gcc\n> checking whether the C compiler works... no\n> configure: error: in `/home/fe/code/git':\n> configure: error: C compiler cannot create executables\n> See `config.log' for more details\n> \n> \n> I have my NDK's prebuilt GCC 4.8 toolchain on PATH (the bin folder).\n> Can someone help me cross compile Git using Android NDK toolchain?\n> \n> Thanks.\n\nYou don't need autoconf, just type 'make' and you'll be fine.\n\nPlease read the file INSTALL for installation instructions.\n\n    Stefan\n"},{"id":"249785","messageId":"CAHd499C0XJDwNa3n3bzK7hu6iRunV1d=nvbqi+2pyoB8uSzDFA@mail.gmail.com","threadId":"37615","inReplyTo":"54209333.7090300@gmail.com","subject":"Re: How to compile Git with NDK?","fromName":"Robert Dailey","fromEmail":"rcdailey.lists@gmail.com","sentAt":"2014-09-23T12:47:11Z","receivedAt":"2014-09-23T12:47:11Z","isPatch":false,"sender":{"key":"rcdailey.lists@gmail.com","avatar":null},"body":"But if I type just 'make', I don't see how it will know where my ARM\ntoolchain is. I'll read the INSTALL file in the meantime.\n\nOn Mon, Sep 22, 2014 at 4:22 PM, Stefan Beller <stefanbeller@gmail.com> wrote:\n> On 22.09.2014 21:04, Robert Dailey wrote:\n>> I run the following on Ubuntu:\n>>\n>> fe@BLD01:~/code/git$ autoconf\n>> fe@BLD01:~/code/git$ ./configure --prefix=/home/fe/git-arm\n>> --build=x86_64-linux-gnu --host=arm-linux-androideabi\n>> configure: Setting lib to 'lib' (the default)\n>> configure: Will try -pthread then -lpthread to enable POSIX Threads.\n>> configure: CHECKS for site configuration\n>> checking for arm-linux-androideabi-gcc... arm-linux-androideabi-gcc\n>> checking whether the C compiler works... no\n>> configure: error: in `/home/fe/code/git':\n>> configure: error: C compiler cannot create executables\n>> See `config.log' for more details\n>>\n>>\n>> I have my NDK's prebuilt GCC 4.8 toolchain on PATH (the bin folder).\n>> Can someone help me cross compile Git using Android NDK toolchain?\n>>\n>> Thanks.\n>\n> You don't need autoconf, just type 'make' and you'll be fine.\n>\n> Please read the file INSTALL for installation instructions.\n>\n>     Stefan\n"},{"id":"249786","messageId":"CAHd499CUrKqY26eA2QwK4EpWOjum-NBXi==E8GwtjOty3ZYYeA@mail.gmail.com","threadId":"37615","inReplyTo":"CAHd499C0XJDwNa3n3bzK7hu6iRunV1d=nvbqi+2pyoB8uSzDFA@mail.gmail.com","subject":"Re: How to compile Git with NDK?","fromName":"Robert Dailey","fromEmail":"rcdailey.lists@gmail.com","sentAt":"2014-09-23T12:52:32Z","receivedAt":"2014-09-23T12:52:32Z","isPatch":false,"sender":{"key":"rcdailey.lists@gmail.com","avatar":null},"body":"On Tue, Sep 23, 2014 at 7:47 AM, Robert Dailey <rcdailey.lists@gmail.com> wrote:\n> But if I type just 'make', I don't see how it will know where my ARM\n> toolchain is. I'll read the INSTALL file in the meantime.\n\nSorry for top post earlier, my mistake.\n\nI reviewed the INSTALL file. It doesn't mention anything regarding how\nto setup the toolchain for the Git build. Also looks like I'll have to\nbuild the library dependencies with ARM toolchain as well. Looks like\nzlib is the only absolute required one. Is that correct?\n"},{"id":"249795","messageId":"20140923161107.GB20624@peff.net","threadId":"37615","inReplyTo":"CAHd499C0XJDwNa3n3bzK7hu6iRunV1d=nvbqi+2pyoB8uSzDFA@mail.gmail.com","subject":"Re: How to compile Git with NDK?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-09-23T16:11:07Z","receivedAt":"2014-09-23T16:11:07Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Sep 23, 2014 at 07:47:11AM -0500, Robert Dailey wrote:\n\n> But if I type just 'make', I don't see how it will know where my ARM\n> toolchain is. I'll read the INSTALL file in the meantime.\n\nIt won't. If you are cross-compiling you'll have to specify CC and LD\nmanually, plus a host of other settings. We usually pick pretty sane\ndefaults (which is why you can get away without running autoconf), but\nthey're not going to be reasonable for cross-compiling. If you do go the\nnon-autoconf route, you'd probably want to try building with \"make\nuname_S=whatever\" to override our defaults (see config.mak.uname for an\nidea of which uname variables we look at).\n\nIn your original report:\n\n> >> fe@BLD01:~/code/git$ autoconf\n> >> fe@BLD01:~/code/git$ ./configure --prefix=/home/fe/git-arm\n> >> --build=x86_64-linux-gnu --host=arm-linux-androideabi\n> >> configure: Setting lib to 'lib' (the default)\n> >> configure: Will try -pthread then -lpthread to enable POSIX Threads.\n> >> configure: CHECKS for site configuration\n> >> checking for arm-linux-androideabi-gcc... arm-linux-androideabi-gcc\n> >> checking whether the C compiler works... no\n> >> configure: error: in `/home/fe/code/git':\n> >> configure: error: C compiler cannot create executables\n> >> See `config.log' for more details\n\nAutoconf couldn't even build a simple hello-world with the compiler you\nspecified. So the first step would probably be to figure that out. What\ndoes config.log say?\n\n-Peff\n"},{"id":"249796","messageId":"20140923161320.GC20624@peff.net","threadId":"37615","inReplyTo":"CAHd499CUrKqY26eA2QwK4EpWOjum-NBXi==E8GwtjOty3ZYYeA@mail.gmail.com","subject":"Re: How to compile Git with NDK?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-09-23T16:13:20Z","receivedAt":"2014-09-23T16:13:20Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Sep 23, 2014 at 07:52:32AM -0500, Robert Dailey wrote:\n\n> On Tue, Sep 23, 2014 at 7:47 AM, Robert Dailey <rcdailey.lists@gmail.com> wrote:\n> > But if I type just 'make', I don't see how it will know where my ARM\n> > toolchain is. I'll read the INSTALL file in the meantime.\n> \n> Sorry for top post earlier, my mistake.\n> \n> I reviewed the INSTALL file. It doesn't mention anything regarding how\n> to setup the toolchain for the Git build. Also looks like I'll have to\n> build the library dependencies with ARM toolchain as well. Looks like\n> zlib is the only absolute required one. Is that correct?\n\nYes, zlib is the only absolute dependency. However, libcurl is useful if\nyou want to clone http repositories.\n\n-Peff\n"}]}