How build standalone toolchain in windows?

3,406 views
Skip to first unread message

Massimo Belgrano

unread,
Apr 21, 2011, 5:24:11 AM4/21/11
to andro...@googlegroups.com
I need build standalone toolchain in windows
will samebody give me istruction about how do for windows?

my ndk is installed in c:/devl/android/android-ndk-r5b
I need a linux command like follow
build/tools/make-standalone-toolchain.sh --platform=android-9
--install-dir=c:/devl/android-9-toolchain

or like
NDK="c:/devl/android/android-ndk-r5b"
HOST="windows"
PLATFORM="android-9"
TOOLCHAINDIR="c:/devl/$PLATFORM-toolchain"
  $NDK/build/tools/make-standalone-toolchain.sh \
        --platform=$PLATFORM \
        --install-dir=$TOOLCHAINDIR
fi



RLScott

unread,
Apr 21, 2011, 8:00:22 AM4/21/11
to android-ndk
Did you install Cygwin yet? If you install Cygwin according the the
various tutorials it is much easier then doing what you are
suggesting.

Massimo Belgrano

unread,
Apr 21, 2011, 12:56:57 PM4/21/11
to andro...@googlegroups.com
Now I have installed Cygwin 
Please point me to a tutorial for build standalone toolchain for ndk-r5b for Cygwin

mingw android

unread,
Apr 21, 2011, 12:57:44 PM4/21/11
to andro...@googlegroups.com

Read the ndk docs.

> --
> 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.
> To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
>

Massimo Belgrano

unread,
Apr 21, 2011, 1:44:41 PM4/21/11
to andro...@googlegroups.com
From original doc i have found that it not understand the Cygwin path specification

so i need the easy way but How is possible in windows this equivalent?
$NDK/build/tools/make-standalone-toolchain.sh --platform=android-5 --install-dir=/tmp/my-android-toolchai



------docs/STANDALONE-TOOLCHAIN.htm--------------
....
5/ Warnings and Limitations:
5.1/ Windows support:
The Windows binaries do *not* depend on Cygwin. The good news is that they
are thus faster, the bad news is that they do not understand the Cygwin
path specification like /cygdrive/c/foo/bar (instead of C:/foo/bar).

The NDK build system ensures that all paths passed to the compiler from Cygwin
are automatically translated, and deals with other horrors for you. If you have
a custom build system, you may need to deal with the problem yourself.

NOTE: There is no plan to support Cygwin / MSys at the moment, but
      contributions are welcome. Contact the android-ndk forum for details

RLScott

unread,
Apr 24, 2011, 11:11:03 AM4/24/11
to android-ndk


On Apr 21, 11:56 am, Massimo Belgrano <massimo.belgr...@gmail.com>
wrote:
> Now I have installed Cygwin
> Please point me to a tutorial for build standalone toolchain for ndk-r5b
>  for Cygwin

Read this tutorial:

http://mindtherobot.com/blog/452/android-beginners-ndk-setup-step-by-step/

It explains how to set up Cygwin and the ndk-r5b so they work
together.

Massimo Belgrano

unread,
Apr 24, 2011, 1:52:54 PM4/24/11
to andro...@googlegroups.com
Thanks!

Massimo Belgrano

unread,
Apr 26, 2011, 4:43:05 AM4/26/11
to andro...@googlegroups.com
This guide is for ndk-r4

rharya

unread,
Apr 26, 2011, 5:48:41 AM4/26/11
to android-ndk
Hello

You better check there is no space with in the path.... Spaces are
very important in NDK platform.

On Apr 21, 10:44 pm, Massimo Belgrano <massimo.belgr...@gmail.com>
wrote:

RLScott

unread,
Apr 26, 2011, 2:15:06 PM4/26/11
to android-ndk


On Apr 26, 3:43 am, Massimo Belgrano <massimo.belgr...@gmail.com>
wrote:
> This guide is for ndk-r4

Yes, but ndk-r5b is just the same. Just use "ndk-r5b" whenever the
tutorial talks about "ndk-r4"

ccbitz

unread,
Apr 28, 2011, 11:51:32 AM4/28/11
to android-ndk

The link you posted does not cover the 'stand alone toolchain'.
The ndk documentation states that stand alone toolchain is not
supported by windows.

I would be interested to know if anyone has succeeded in porting to
windows, but I gave up after a few days of trying on and off. I now
use Ubuntu. You can also use Ubuntu in VirtualBox just for compiling
with the stand alone toolchain.

Massimo Belgrano

unread,
Apr 28, 2011, 2:07:20 PM4/28/11
to andro...@googlegroups.com

After a complete cygwin setup and ndk installed on c:/devl/android-ndk-r5b  when i try

/cygdrive/c/devl/android-ndk-r5b/build/tools/make-standalone-toolchain.sh --platform=android-9 --install-dir=/cygdrive/c/devl/android-9-toolchain

Copying prebuilt binaries...
Copying sysroot headers and libraries...
Copying libstdc++ headers and libraries...
mkdir: cannot create directory `/tmp/ndk-toolchain/build-BOEd9Q/arm-linux-androi
deabi-4.4.3/arm-linux-androideabi': Permission denied
ERROR: Cannot copy to directory: /tmp/ndk-toolchain/build-BOEd9Q/arm-linux-andro
ideabi-4.4.3/arm-linux-androideabi/include/c++/4.4.3
ERROR: Could not copy libstdc++!

ccbitz

unread,
May 3, 2011, 12:55:42 PM5/3/11
to android-ndk
Even if you figure out how to fix the build script to allow this copy,
it is copying a LINUX binary that will NOT run on Windows.

I found this blog that seems to have a working solution:
http://www.pocketmagic.net/?p=1462

I can't vouch for it personally (like I said, I've switch to Ubuntu
anyway), but I might try it soon because I'm working with some SDKs
that are Windows based now.
Please let all of us on this thread know if it works for you...

Best,
-CC

On Apr 28, 11:07 am, Massimo Belgrano <massimo.belgr...@gmail.com>
wrote:

Massimo Belgrano

unread,
May 3, 2011, 2:05:09 PM5/3/11
to andro...@googlegroups.com
Thank -CC 
The link you posted does not seem cover the 'stand alone toolchain' using Cygwin: 
build/tools/make-standalone-toolchain.sh --platform= --install-di
I have trued unsuccessfully:
/cygdrive/c/devl/android-ndk-r5b/build/tools/make-standalone-toolchain.sh --platform=android-9 --install-dir=/cygdrive/c/devl/android-9-toolchain

ccbitz

unread,
May 4, 2011, 2:27:35 PM5/4/11
to android-ndk
You have to follow their instructions, ignore the make-standalone-
toolchain script and create the makefiles yourself by calling out the
prebuilt windows binaries.

On May 3, 11:05 am, Massimo Belgrano <massimo.belgr...@gmail.com>
wrote:

Massimo Belgrano

unread,
May 5, 2011, 2:19:09 PM5/5/11
to andro...@googlegroups.com
I need only make-standalone-toolchain from windows (using Cygwin) becase need use 
if you know how do please help me with a clear command in 
 windows (using Cygwin)
sorry for my bad english 
Reply all
Reply to author
Forward
0 new messages