Installing NDK 1.6

21 views
Skip to first unread message

iki

unread,
Nov 2, 2009, 11:52:36 PM11/2/09
to android-ndk
I've searched the old posts and even the internet.
I'm sure its a quick fix but don't have information to do so.
Any help is appreciated.

Vista 64-bit
Running build/host-setup.sh from the NDK root.
I'm getting this error:

ERROR: Toolchain compiler not found
It seems you do not have the correct arm-eabi-4.2.1 toolchain
binaries.
...

I've downloaded the correct NDK package and successfully unzipped it.
Here is a partial listing of the directory tree
build
-toolchains
-arm-eabi-4.2.1
-config.mk
-setup.mk

If you need more information just ask and I'll post it.

David Turner

unread,
Nov 5, 2009, 4:35:13 PM11/5/09
to andro...@googlegroups.com
do you have build/prebuilt/linux-x86/arm-eabi-4.2.1/bin/arm-eabi-gcc.exe ?
that's what the host-setup.sh script should be looking for. If not, there was a problem in the download / unzipping.


--

You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.



iki

unread,
Nov 7, 2009, 12:14:53 AM11/7/09
to android-ndk
I have
build/prebuilt/windows/arm-eabi-4.2.1/bin/arm-eabi-gcc.exe
as I'm using a Windows (Vista) machine.
I am correct in using the windows package right?

On Nov 5, 4:35 pm, David Turner <di...@android.com> wrote:
> do you have build/prebuilt/linux-x86/arm-eabi-4.2.1/bin/arm-eabi-gcc.exe ?
> that's what the host-setup.sh script should be looking for. If not, there
> was a problem in the download / unzipping.
>

David Turner

unread,
Nov 7, 2009, 12:16:37 PM11/7/09
to andro...@googlegroups.com
Yes, you should run the Windows package.
Can you run build/host-setup.sh with the --verbose option and report its output here ?

thanks in advance

Tom McCurdie

unread,
Nov 7, 2009, 10:49:28 AM11/7/09
to andro...@googlegroups.com

I have exactly the same problem. I downloaded the prebuilt windows package for NDK 1.6 and the setup script gives me the same error.

I have found that if I ignore the error I can build the hello-jni sample package without error. I don't know if what I built actually works, but the compiler is installed exactly where it should be and runs without error.

I believe the script has a problem.

Tom

Tom McCurdie

unread,
Nov 7, 2009, 11:06:47 AM11/7/09
to andro...@googlegroups.com
After a bit more investigation I find that the host-setup.sh script only fails when I've installed the NDK in my "Program Files" directory. After moving the NDK to my /cygdrive/c/home directory it succeeds. I suspect it has to do with spaces in the path name.

I have found that cross compilation on Windows is much more difficult to get right when code and tools are located in directories below "Documents and Settings" or "Program Files" due to the spaces in the path name. I suggest you move the NDK to another location. Android docs say it can be placed anywhere you like.

Tom

-----Original Message-----
From: iki [mailto:qui....@gmail.com]
Sent: Friday, November 06, 2009 9:15 PM
To: android-ndk
Subject: Re: Installing NDK 1.6

byron

unread,
Nov 7, 2009, 12:20:57 PM11/7/09
to android-ndk
I was having the exact same issue. I find that the host-setup.sh
script only fails when I've installed the NDK in my "Program Files"
directory. After moving the NDK to my /cygdrive/c/home directory it
succeeds. I suspect it has to do with spaces in the path name.

iki

unread,
Nov 7, 2009, 11:39:21 PM11/7/09
to android-ndk
running
$ build/host-setup.sh --verbose
I get the following response:
---
Checking host development environment.
NDK Root : C:\android\android-ndk-1.6_r1
looking for GNU Make as 'make'
Found version 3.81
GNU Make : make (version 3.81)
looking for nawk/gawk as 'awk'
Check Pass
Awk : awk
Platform : windows
Generate : out/host/config.mk
Toolchain : Checking for arm-eabi-4.2.1 prebuilt binaries
Toolchain : Cross-compiler in <NDK>/build/prebuilt/windows/arm-
eabi-4.2.1/bin ?

ERROR: Toolchain compiler not found
It seems you do not have the correct arm-eabi-4.2.1 toolchain
binaries.
This may be the result of incorrect unzipping of the NDK archive.
Please go to the official Android NDK web site and download the
appropriate NDK package for your platform (windows).
See http://developer.android.com/sdk/index.html

ABORTING
---
I've moved the unzipped NDK package to C:/android/ so there shouldn't
be any problems with spaces in path names right?

On Nov 7, 12:16 pm, David Turner <di...@android.com> wrote:
> Yes, you should run the Windows package.
> Can you run build/host-setup.sh with the --verbose option and report its
> output here ?
>
> thanks in advance
>

iki

unread,
Nov 12, 2009, 4:20:48 PM11/12/09
to android-ndk
So no one else is having this problem on Vista?

On Nov 7, 11:39 pm, iki <qui.af...@gmail.com> wrote:
> running
> $ build/host-setup.sh --verbose
> I get the following response:
> ---
> Checking host development environment.
> NDK Root : C:\android\android-ndk-1.6_r1
>    looking for GNU Make as 'make'
>       Found version 3.81
> GNU Make : make (version 3.81)
>    looking for nawk/gawk as 'awk'
>       Check Pass
> Awk : awk
> Platform : windows
> Generate : out/host/config.mk
> Toolchain : Checking for arm-eabi-4.2.1 prebuilt binaries
> Toolchain : Cross-compiler in <NDK>/build/prebuilt/windows/arm-
> eabi-4.2.1/bin ?
>
> ERROR: Toolchain compiler not found
> It seems you do not have the correct arm-eabi-4.2.1 toolchain
> binaries.
> This may be the result of incorrect unzipping of the NDK archive.
> Please go to the official Android NDK web site and download the
> appropriate NDK package for your platform (windows).
> Seehttp://developer.android.com/sdk/index.html

Dušan Živkov

unread,
Nov 16, 2009, 6:22:30 AM11/16/09
to android-ndk
My problem was that ANDROID_NDK_ROOT was interpreted in Cygwin as C:/
android-ndk-1.5-r1 when I changed ANDROID_NDK_ROOT in /cygdrive/c/
android-ndk-1.5_r1 host-setup.sh was passing

On Nov 12, 10:20 pm, iki <qui.af...@gmail.com> wrote:
> So no one else is having this problem on Vista?
>
> On Nov 7, 11:39 pm, iki <qui.af...@gmail.com> wrote:
>
> > running
> > $ build/host-setup.sh --verbose
> > I get the following response:
> > ---
> > Checking host development environment.
> >NDKRoot : C:\android\android-ndk-1.6_r1
> >    looking for GNU Make as 'make'
> >       Found version 3.81
> > GNU Make : make (version 3.81)
> >    looking for nawk/gawk as 'awk'
> >       Check Pass
> > Awk : awk
> > Platform : windows
> > Generate : out/host/config.mk
> > Toolchain : Checking for arm-eabi-4.2.1 prebuilt binaries
> > Toolchain : Cross-compiler in <NDK>/build/prebuilt/windows/arm-
> > eabi-4.2.1/bin ?
>
> > ERROR: Toolchain compiler not found
> > It seems you do not have the correct arm-eabi-4.2.1 toolchain
> > binaries.
> > This may be the result of incorrect unzipping of theNDKarchive.
> > Please go to the official AndroidNDKweb site and download the
> > appropriateNDKpackage for your platform (windows).
> > Seehttp://developer.android.com/sdk/index.html
>
> > ABORTING
> > ---
> > I've moved the unzippedNDKpackage to C:/android/ so there shouldn't
> > > > > > I've downloaded the correctNDKpackage and successfully unzipped it.

iki

unread,
Nov 16, 2009, 4:05:40 PM11/16/09
to android-ndk
My ANDROID_NDK_ROOT is set to c:/android/android-ndk-1.5_r1
I've also tried placing the android-ndk-1.5_r1 directory in the cygwin/
home and cygwin/cygdrive directories, still doesn't work.

Going to compile hello world program later and see if this error even
matters.

David Turner

unread,
Nov 16, 2009, 9:03:43 PM11/16/09
to andro...@googlegroups.com
Can you unset ANDROID_NDK_ROOT ? I don't think it's needed at all with recent versions of the NDK on Cygwin.
Otherwise, try to define it to something like /cygdrive/c/android/android-ndk-1.5_r1 as suggested by someone else.

Please update to 1.6_r1 too

For more options, visit this group at http://groups.google.com/group/android-ndk?hl=.



iki

unread,
Nov 16, 2009, 10:05:14 PM11/16/09
to android-ndk
I feel stupid. Don't really understand what I did different this time
but it worked.
I removed the ANDROID_NDK_ROOT environment variable but that shouldn't
have mattered right?
Either way it worked.
Let me outline the procedure for anyone else who might run into the
same problem.

Windows Vista
Install Cygwin in the root of your C drive.
From the command prompt, run the Cygwin bash with:
C:/cygwin/Cygwin
Assuming you have extracted (placed) the android ndk into the C:
\android\android-ndk-1.6_r1\ directory
run the command /cygdrive/c/android/android-ndk-1.6_r1/build/host-
setup.sh
Or you can change to the directory
cd /cygdrive/c/android/android-ndk-1.6_r1/
and run the command
build/host-setup.sh

It should say Host setup complete ...

A huge thanks to everyone for their suggestions above.
Now I can start writing native android programs!!!!
I know, its bad practice but if I can master it, my apps will be
lightning fast.

On Nov 16, 9:03 pm, David Turner <di...@android.com> wrote:
> Can you unset ANDROID_NDK_ROOT ? I don't think it's needed at all with
> recent versions of the NDK on Cygwin.
> Otherwise, try to define it to something like
> /cygdrive/c/android/android-ndk-1.5_r1 as suggested by someone else.
>
> Please update to 1.6_r1 too
>

Sami

unread,
Jan 4, 2010, 3:17:15 AM1/4/10
to android-ndk
I noticed that having spaces in the installation folder causes
problems. Remove spaces and installation should go OK.
Reply all
Reply to author
Forward
0 new messages