Installing NDK on windows with Cygwin

2,021 views
Skip to first unread message

Jonas

unread,
Jun 26, 2009, 8:13:16 AM6/26/09
to android-ndk
Hi,

I have installed the latest SDK and NDK but when running the command:

$ build/host-setup.sh
Detecting host toolchain.

CC : compiler check ok (gcc)
LD : linker check ok (gcc)
CXX : C++ compiler check ok (g++)
Generate : out/host/config.mk
Toolchain : Checking for arm-eabi-4.2.1 prebuilt binaries

ERROR:
It seems you do not have the correct arm-eabi-4.2.1 toolchain
binaries.
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.


jonas@Vaio /cygdrive/c/users/jonas/ANdroid/android-ndk-1.5_r1

I get the above install error?

Regards Jonas.

David Turner

unread,
Jun 26, 2009, 9:43:00 AM6/26/09
to andro...@googlegroups.com
Did you install Cygwin with UNIX or DOS line endings?

Jonas

unread,
Jun 26, 2009, 10:29:16 AM6/26/09
to android-ndk

Hi all,

I found the problem, its the way / and \ in Cygwin are handeld.
Configuring the path to NDK in Windows Vista did not work.
When I explicit entered the following in my Cygwin shell environment
in file .bashrc it worked:

export ANDROID_NDK_ROOT=C:/Users/jonas/Android/android-ndk-1.5_r1

Regards Jonas.

On Jun 26, 3:43 pm, David Turner <di...@android.com> wrote:
> Did you install Cygwin with UNIX or DOS line endings?
>
> On Fri, Jun 26, 2009 at 2:13 PM, Jonas <jonas.hey...@gmail.com> wrote:
>
> > Hi,
>
> > I have installed the latest SDK and NDK but when running the command:
>
> > $ build/host-setup.sh
> > Detecting host toolchain.
>
> > CC         : compiler check ok (gcc)
> > LD         : linker check ok (gcc)
> > CXX        : C++ compiler check ok (g++)
> > Generate   : out/host/config.mk
> > Toolchain  : Checking for arm-eabi-4.2.1 prebuilt binaries
>
> > ERROR:
> > It seems you do not have the correct arm-eabi-4.2.1 toolchain
> > binaries.
> > 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

xu haojie

unread,
Jun 26, 2009, 11:05:17 PM6/26/09
to android-ndk
Thanks. I have the same problem, but can slove it by Jonas's method.

David Turner

unread,
Jun 27, 2009, 8:56:46 AM6/27/09
to andro...@googlegroups.com
Which version of Windows are you running?

OK, just a wild guess, can you tell me the output of "echo $OS" in a Cygwin terminal.

The host-setup.sh script assumes that this will return "Windows_NT" on Win32, but I wouldn't be surprised if it returned something different on Windows 7 or maybe some versions of Vista. That would explain the error.

hrli...@gmail.com

unread,
Jun 29, 2009, 3:32:00 AM6/29/09
to android-ndk
I am using windows xp, and "echo $OS" returns "Windows_NT" ,
i have the same problem as Jonas. how can i get rid of this error?

On Jun 27, 8:56 pm, David Turner <di...@android.com> wrote:
> Which version of Windows are you running?
>
> OK, just a wild guess, can you tell me the output of "echo $OS" in a Cygwin
> terminal.
>
> The host-setup.sh script assumes that this will return "Windows_NT" on
> Win32, but I wouldn't be surprised if it returned something different on
> Windows 7 or maybe some versions of Vista. That would explain the error.
>
>
>
> On Fri, Jun 26, 2009 at 2:13 PM, Jonas <jonas.hey...@gmail.com> wrote:
>
> > Hi,
>
> > I have installed the latest SDK and NDK but when running the command:
>
> > $ build/host-setup.sh
> > Detecting host toolchain.
>
> > CC         : compiler check ok (gcc)
> > LD         : linker check ok (gcc)
> > CXX        : C++ compiler check ok (g++)
> > Generate   : out/host/config.mk
> > Toolchain  : Checking for arm-eabi-4.2.1 prebuilt binaries
>
> > ERROR:
> > It seems you do not have the correct arm-eabi-4.2.1 toolchain
> > binaries.
> > 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
>
> > ABORTING.
>
> > jonas@Vaio /cygdrive/c/users/jonas/ANdroid/android-ndk-1.5_r1
>
> > I get the above install error?
>
> > Regards Jonas.- Hide quoted text -
>
> - Show quoted text -

David Turner

unread,
Jun 29, 2009, 8:10:04 AM6/29/09
to andro...@googlegroups.com
On Mon, Jun 29, 2009 at 9:32 AM, hrli...@gmail.com <hrli...@gmail.com> wrote:

I am using windows xp, and "echo $OS" returns "Windows_NT" ,
i have the same problem as Jonas. how can i get rid of this error?

hmm, this is strange. The script is complaining because it didn't find a known file
under prebuilt/windows/arm-eabi-4.2.1/bin. Did you properly unzip the NDK package,
and do you have files there?
 

hrli...@gmail.com

unread,
Jun 30, 2009, 2:37:47 AM6/30/09
to android-ndk
After I changed the path to NDK from C:\Users\Android\android-
ndk-1.5_r1
to C:/Users/Android/android-ndk-1.5_r1 , I can execute build/host-
setup.sh successfully.


On Jun 29, 8:10 pm, David Turner <di...@android.com> wrote:
> > > - Show quoted text -- Hide quoted text -

Raji Reddy Kandi

unread,
Jun 30, 2009, 2:56:22 AM6/30/09
to andro...@googlegroups.com
hi,
can you pls tell me where did you change the path? is there any env variable?
 
regards,

hrli...@gmail.com

unread,
Jun 30, 2009, 9:26:39 PM6/30/09
to android-ndk
Yes, it is your windows environment variables, you need to change the
valiable : ANDROID_NDK_ROOT
you can find it in your System properties->Advanced->Environment
Variables.

On Jun 30, 2:56 pm, Raji Reddy Kandi <k.rajire...@gmail.com> wrote:
> hi,
> can you pls tell me where did you change the path? is there any env
> variable?
>
> regards,
>
> On Tue, Jun 30, 2009 at 12:07 PM, hrlixi...@gmail.com
> <hrlixi...@gmail.com>wrote:

Raji Reddy Kandi

unread,
Jul 1, 2009, 1:07:06 AM7/1/09
to andro...@googlegroups.com
I am still getting the problem.
 
------------------------------------------------------------------------------------------------
your C compiler does not seem to work:
build/core/ndk-common.sh: line 351: C:\make-3.81: command not found
 
------------------------------------------------------------------------------------------------

looks like it is not able to fine the gcc.
 
but i have gcc at C:\gcc-4.4.0
 
pls  help me out.
 
Regards,

krr_android

unread,
Jul 1, 2009, 1:48:42 AM7/1/09
to android-ndk
Now, I tried the same NDK(Linux version) installation in Linux and I
am getting the following error

------------------------------------------------------------------------------------------------------------
user@ubuntu810desktop:/android/android-ndk-1.5_r1$ build/host-
setup.sh
build/host-setup.sh: 23: source: not found
Detecting host toolchain.

build/host-setup.sh: 57: force_32bit_binaries: not found
build/host-setup.sh: 58: setup_toolchain: not found
build/host-setup.sh: 60: cannot create : Directory nonexistent
Can't create directory for host config file: out/host
user@ubuntu810desktop:/android/android-ndk-1.5_r1$
------------------------------------------------------------------------------------------------------------

Pls help me out.

Regards,


On Jul 1, 1:07 am, Raji Reddy Kandi <k.rajire...@gmail.com> wrote:
> I am still getting the problem.
>
> ------------------------------------------------------------------------------------------------
> your C compiler does not seem to work:
> build/core/ndk-common.sh: line 351: C:\make-3.81: command not found
>
> ------------------------------------------------------------------------------------------------
>
> looks like it is not able to fine the gcc.
>
> but i have gcc at C:\gcc-4.4.0
>
> pls  help me out.
>
> Regards,
>

David Turner

unread,
Jul 1, 2009, 2:33:09 AM7/1/09
to andro...@googlegroups.com
different bug, try to run "bash build/host-setup.sh" instead, and it will work. :-(

Raji Reddy Kandi

unread,
Jul 1, 2009, 3:27:21 AM7/1/09
to andro...@googlegroups.com
Thanks..its workinng..its pretty straight forward in Linux...Its still not working in Windows..
Reply all
Reply to author
Forward
0 new messages