NDK r5b build that supports cygwin paths and symlinks?

325 views
Skip to first unread message

Ross Bencina

unread,
Mar 9, 2011, 11:01:16 PM3/9/11
to android-ndk
Hi All

The NDK r5 tools (gcc etc) seem to no longer support cygwin paths and
symlinks. It seems that Google is moving the Windows NDK toolchain
away from cygwin. Could someone please confirm that this is correct?
Does anyone have a link to Google documentation that confirms this
change in strategy? Will the NDK eventually not depend on cygwin at
all?

I am building a project (Necessitas) that uses qmake and generates
makefiles that then invoke the NDK toolchain directly (ie doesn't use
Google's build system). This creates some issues trying to mix cygwin
paths (used by qmake) and Windows paths (used by NDK toolchain).

I have successfully written wrapper scripts for the NDK tools so that
they work with cygwin include paths from qmake, and I can build a few
shared libraries. But now I have another problem: symlinks. The NDK
toolchain obviously also doesn't understand cygwin symlinks so asking
gcc to reference cygwin symlinked .so librarys fails.

Is it possible to build the NDK tools from source to work properly
with cygwin like r4 did? Where should I start? Has anyone done this
already? Or will the r4 tools work OK with r5b out of the box?

I have also explored using the mingw/MSYS environment to compile with
NDK however at this stage the Necessitas configuration system appears
to only support cross-compilation/configuration using a Unix like
environment (ie cygwin). If cygwin is not part of Windows NDK's future
at all then I will consider fixing Necessitas to build using mingw but
at this stage (after 3 days banging my head against this) it seems
easier for me to roll back the NDK to use cygwin.

Any thoughts?

Thank you

Ross.



alan

unread,
Mar 10, 2011, 4:23:44 AM3/10/11
to andro...@googlegroups.com
building in a linux vm would be another option

David Turner

unread,
Mar 10, 2011, 4:30:05 AM3/10/11
to andro...@googlegroups.com, Ross Bencina
Hello,

I'm sorry but it is not possible, and we are removing Cygwin support from the NDK so it clearly isn't part of its future.

Regards




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


Ross Bencina

unread,
Mar 10, 2011, 5:02:26 AM3/10/11
to android-ndk
Thank you for the clear answer David.

Can you share any info about why this decision was made? What's the
future of the NDK on Windows? I'm wondering whether it's worth
continuing to put energy into Windows NDK development or to switch to
a Linux VM environment as many people suggest these days.

Ross.

Tim Mensch

unread,
Mar 10, 2011, 11:55:45 AM3/10/11
to andro...@googlegroups.com
On 3/10/2011 2:30 AM, David Turner wrote:
> I'm sorry but it is not possible, and we are removing Cygwin support
> from the NDK so it clearly isn't part of its future.
And many of us are very happy about this decision. :)

Tim

David Turner

unread,
Mar 10, 2011, 12:18:57 PM3/10/11
to andro...@googlegroups.com, Ross Bencina
On Thu, Mar 10, 2011 at 11:02 AM, Ross Bencina <ro...@audiomulch.com> wrote:
Thank you for the clear answer David.

Can you share any info about why this decision was made?

Because Cygwin is a pain to deal with. From the extreme slowness, to the bad interactions with anti-viruses, Windows permissions, it is a support burden we don't want to have.
 
What's the
future of the NDK on Windows?

We plan to split the NDK distributions into a "tools" part and a "platform" part.
The tools part will simply become part of the SDK Tools distribution (so no longer will be a separate download).
The platform part will simply come with each SDK platform image that you can download with the "android" tool.

To do this properly, we need to get rid of Cygwin entirely, which means providing Windows executables for Make, Awk, Bash and a few others.
There are already several implementations available, and we haven't selected which ones we're going to use yet.
All binaries will be built from sources (just like the toolchain ones) though. We can't rely on liberal binary downloads from third-party sites.
 
I'm wondering whether it's worth
continuing to put energy into Windows NDK development or to switch to
a Linux VM environment as many people suggest these days.


I would recommend going the Linux VM way if you care about build performance today. Cygwin is slow.

mingw android

unread,
Mar 10, 2011, 8:44:20 PM3/10/11
to andro...@googlegroups.com
I'm working on porting Necessitas to Windows. It should be available soon(ish).

I'm maintaining a project that will allow you to use the NDK from Windows cmd.exe. I do use binaries of make and awk (bash isn't needed) but they're from reputable sources. Everything else is built from scratch. It works well enough and there's also a very recent GDB with Python support available:

http://code.google.com/p/mingw-and-ndk/

All this work can be found in source form on:

http://gitorious.org/~mingwandroid

Cheers,

mingw.android.

David Turner

unread,
Mar 14, 2011, 7:48:40 PM3/14/11
to andro...@googlegroups.com, mingw android
Hello mingw android,

On Fri, Mar 11, 2011 at 2:44 AM, mingw android <mingw....@gmail.com> wrote:
I'm working on porting Necessitas to Windows. It should be available soon(ish).

I'm maintaining a project that will allow you to use the NDK from Windows cmd.exe. I do use binaries of make and awk (bash isn't needed) but they're from reputable sources. Everything else is built from scratch. It works well enough and there's also a very recent GDB with Python support available:

http://code.google.com/p/mingw-and-ndk/

All this work can be found in source form on:

http://gitorious.org/~mingwaLast time I have looked at your contributionndroid

I'm aware of your work, and I'm impressed, though I haven't looked at it in a very long time :)
How could I convince you to submit your improvements to the NDK through r.android.com?

Generally speaking, we can't accept patches that download files, and especially binaries, from
arbitrary third-party servers, even reputable ones. My goal is to host *any* sources we need on
android.git.kernel.org (either with git or simple tarballs downloadable through http), and rebuild
everything from scratch.

Regards

- Digit
Reply all
Reply to author
Forward
0 new messages