ndk-r5 app build problems

746 views
Skip to first unread message

Futumsh

unread,
Dec 6, 2010, 1:15:29 PM12/6/10
to android-ndk
I've got an application with a large ndk component, which builds and
runs fine using the crystax version of ndk-r4b, and am attempting to
get it building using ndk-r5.

Build errors:

On windows, after source files for the first static library build,
when it reaches generating the first static library:
make: execvp: /cygdrive/c/work/android/android-ndk-r5/toolchains/arm-
linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-ar:
Argument list too long

On linux (Ubuntu 8.04.4 x86-64):
/home/user/work/android/android-ndk-r5/toolchains/arm-linux-
androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++: /
lib32/libc.so.6: version `GLIBC_2.11' not found (required by /home/
user/work/android/android-ndk-r5/toolchains/arm-linux-
androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++)

Startup time on windows:

With ndk-r4b, startup time before compiles begin for this project were
on the order of a few seconds. With ndk-r5, it takes about 3 minutes
before the first file starts compiling.

Anyone know how to address these problems offhand, before I look into
them in depth?

David Turner

unread,
Dec 6, 2010, 1:36:15 PM12/6/10
to andro...@googlegroups.com
On Mon, Dec 6, 2010 at 7:15 PM, Futumsh <rdela...@gmail.com> wrote:
I've got an application with a large ndk component, which builds and
runs fine using the crystax version of ndk-r4b, and am attempting to
get it building using ndk-r5.

Build errors:

On windows, after source files for the first static library build,
when it reaches generating the first static library:
make: execvp: /cygdrive/c/work/android/android-ndk-r5/toolchains/arm-
linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-ar:
Argument list too long

Hmmm, you may have a really long argument list here. There are several ways that could help you work around this:

1/ Try installing the NDK and your project in top-level directories to make the final build commands smaller. What I mean would be:
- install the ndk as /cygdrive/c/ndkr5/
- put your project under /cydrive/c/myproj/

2/ Try generating static libraries that contain fewer object files. I.e. instead of generating libfoo.a, try to make libfoo1.a + libfoo2.a + libfoo3.a, where each one only contains a third of the object files. Not ideal, but would help to reduce the size of the static archive command.

 
On linux (Ubuntu 8.04.4 x86-64):
/home/user/work/android/android-ndk-r5/toolchains/arm-linux-
androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++: /
lib32/libc.so.6: version `GLIBC_2.11' not found (required by /home/
user/work/android/android-ndk-r5/toolchains/arm-linux-
androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++)


Yep, we just noticed that the 2.3 SDK Linux binaries were all generated on Ubuntu Lucid machines which come with EGLibc 2.11. In other words, they can't run on Ubuntu Hardy (which provides 2.7 only).

We're currently working on regenerating new Linux binaries,  but it will probably take a few days to appear. Until then, try to run on an Ubuntu Lucid installation, or try regenerating the binaries from scratch:

cd ndk
build/tools/rebuild-all-prebuilts.sh `pwd`

(note: this is long, it takes about 7 minutes on a 2.4GHz 8-core z600, which is a very beefy machine)

See docs/DEVELOPMENT.html for more details about rebuilding the prebuilt binaries from scratch.
 
Startup time on windows:

With ndk-r4b, startup time before compiles begin for this project were
on the order of a few seconds.  With ndk-r5, it takes about 3 minutes
before the first file starts compiling.


This is weird. Do you know if there is disk activity during these 3 minutes or just the CPU burning?
Can you provide the output of "ndk-build NDK_LOG=1 NDK_DEBUG_MODULES=1" too?
 
Anyone know how to address these problems offhand, before I look into
them in depth?

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


Futumsh

unread,
Dec 6, 2010, 4:27:33 PM12/6/10
to android-ndk
Thanks for the prompt response. I'll rebuild the linux toolchain and
that should fix one of my problems. Requested info on the long pause
before compiles is below.

On Dec 6, 12:36 pm, David Turner <di...@android.com> wrote:
> On Mon, Dec 6, 2010 at 7:15 PM, Futumsh <rdelash...@gmail.com> wrote:
> > Startup time on windows:
>
> > With ndk-r4b, startup time before compiles begin for this project were
> > on the order of a few seconds.  With ndk-r5, it takes about 3 minutes
> > before the first file starts compiling.
>
> This is weird. Do you know if there is disk activity during these 3 minutes
> or just the CPU burning?
> Can you provide the output of "ndk-build NDK_LOG=1 NDK_DEBUG_MODULES=1" too?
>

If there's disk access going on during the long pauses, it's
relatively little, indistinguishable from normal activity. It looks
like roughly one cpu core consumed by whatever it's doing at the
time. There's one long pause per APP_ABI specified (we're building
for armeabi and armeabi-v7a), and the pause occurs just after the '---
end of modules list'.

Output follows (source file lists snipped so it's only moderately
long).
command used: ndk-build NDK_LOG=1 NDK_DEBUG_MODULES=1 clean

Android NDK: NDK installation path auto-detected: '/cygdrive/c/work/
android/android-ndk-r5'
Android NDK: GNU Make version 3.81 detected
Android NDK: Host OS was auto-detected: windows
Android NDK: Host CPU was auto-detected: x86
Android NDK: HOST_TAG set to windows
Android NDK: Host awk tool was auto-detected: awk
Android NDK: Host awk test returned: Pass
Android NDK: This NDK supports the following toolchains and target
ABIs:
Android NDK: arm-eabi-4.4.0: armeabi armeabi-v7a
Android NDK: arm-linux-androideabi-4.4.3: armeabi armeabi-v7a
Android NDK: x86-4.2.1: x86
Android NDK: Found platform root directory: /cygdrive/c/work/android/
android-ndk-r5/platforms
Android NDK: Found supported platforms: android-3 android-4 android-5
android-8 android-9
Android NDK: PLATFORM android-3 supports: arm
Android NDK: ABI arm sysroot is: /cygdrive/c/work/android/android-
ndk-r5/platforms/android-3/arch-arm
Android NDK: PLATFORM android-4 supports: arm
Android NDK: ABI arm sysroot is: /cygdrive/c/work/android/android-
ndk-r5/platforms/android-4/arch-arm
Android NDK: PLATFORM android-5 supports: arm
Android NDK: ABI arm sysroot is: /cygdrive/c/work/android/android-
ndk-r5/platforms/android-5/arch-arm
Android NDK: PLATFORM android-8 supports: arm
Android NDK: ABI arm sysroot is: /cygdrive/c/work/android/android-
ndk-r5/platforms/android-8/arch-arm
Android NDK: PLATFORM android-9 supports: arm
Android NDK: ABI arm sysroot is: /cygdrive/c/work/android/android-
ndk-r5/platforms/android-9/arch-arm
Android NDK: Found stable platform levels: 3 4 5 8 9
Android NDK: Found max platform level: 9
Android NDK: Looking for AndroidManifest.xml in /cygdrive/c/work/
app_name/test/src/build/android
Android NDK: Found it !
Android NDK: Found project path: /cygdrive/c/work/app_name/test/src/
build/android
Android NDK: Parsing /cygdrive/c/work/app_name/test/src/build/android/
jni/Application.mk
Android NDK: Found APP_PLATFORM=android-9 in /cygdrive/c/work/
app_name/test/src/build/android/default.properties
Android NDK: Defaulted to APP_BUILD_SCRIPT=/cygdrive/c/work/app_name/
test/src/build/android/jni/Android.mk
Android NDK: Application 'local' is not debuggable
Android NDK: Selecting release optimization mode (app is not
debuggable)
Android NDK: Adding import directory: /cygdrive/c/work/android/android-
ndk-r5/sources
Android NDK: Building application 'local' for ABI 'armeabi'
Android NDK: Using target toolchain 'arm-linux-androideabi-4.4.3' for
'armeabi' ABI
Android NDK: Looking for imported module with tag 'cxx-stl/gnu-libstdc+
+'
Android NDK: Probing /cygdrive/c/work/android/android-ndk-r5/sources/
cxx-stl/gnu-libstdc++/Android.mk
Android NDK: Module 'clientengine' has C++ sources
Android NDK: Module 'clientproject' has C++ sources
Android NDK: Module 'app_name' has C++ sources
Android NDK: Module 'sharedengine' has C++ sources
Android NDK: Module 'sharedproject' has C++ sources
Modules: clientengine clientproject freetype gnustl_static app_name
sharedengine sharedproject
clientengine:
depends: gnustl_static
MODULE: clientengine
MODULE_FILENAME: libclientengine.a
PATH: /cygdrive/c/work/app_name/test/src/build/android/
jni/../../..
SRC_FILES: << long list of library source files >>
CPP_EXTENSION:
C_INCLUDES: /cygdrive/c/work/app_name/test/src/build/android/
jni/../../../engine/shared/library/sharedEngine/include/public /
cygdrive/c/work/app_name/test/src/build/android/jni/../../../engine/
client/library/clientEngine/include/public /cygdrive/c/work/app_name/
test/src/build/android/jni/../../../engine/client/library/clientEngine/
include/private /cygdrive/c/work/app_name/test/src/build/android/
jni/../../../external/library/freetype/freetype-2.4.2/include
CFLAGS: -fvisibility=hidden -Wall -Wno-psabi -Werror -
DPLATFORM_ANDROID
CXXFLAGS:
CPPFLAGS: -fvisibility-inlines-hidden
STATIC_LIBRARIES: gnustl_static
WHOLE_STATIC_LIBRARIES:
SHARED_LIBRARIES:
LDLIBS:
ALLOW_UNDEFINED_SYMBOLS:
ARM_MODE: arm
ARM_NEON:
DISABLE_NO_EXECUTE:
EXPORT_CFLAGS:
EXPORT_CPPFLAGS:
EXPORT_LDLIBS:
EXPORT_C_INCLUDES:
FILTER_ASM:
MAKEFILE: /cygdrive/c/work/app_name/test/src/build/android/jni/
Android.mk
LDFLAGS:
OBJECTS:
BUILT_MODULE: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi/libclientengine.a
OBJS_DIR: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi/objs/clientengine
INSTALLED:
MODULE_CLASS: STATIC_LIBRARY
clientproject:
depends: gnustl_static
MODULE: clientproject
MODULE_FILENAME: libclientproject.a
PATH: /cygdrive/c/work/app_name/test/src/build/android/
jni/../../..
SRC_FILES: << long list of library source files >>
CPP_EXTENSION:
C_INCLUDES: /cygdrive/c/work/app_name/test/src/build/android/
jni/../../../engine/shared/library/sharedEngine/include/public /
cygdrive/c/work/app_name/test/src/build/android/jni/../../../engine/
client/library/clientEngine/include/public /cygdrive/c/work/app_name/
test/src/build/android/jni/../../../project/shared/library/
sharedProject/include/public /cygdrive/c/work/app_name/test/src/build/
android/jni/../../../project/client/library/clientProject/include/
public /cygdrive/c/work/app_name/test/src/build/android/jni/../../../
project/client/library/clientProject/include/private
CFLAGS: -fvisibility=hidden -Wall -Wno-psabi -Werror -
DPLATFORM_ANDROID
CXXFLAGS:
CPPFLAGS: -fvisibility-inlines-hidden
STATIC_LIBRARIES: gnustl_static
WHOLE_STATIC_LIBRARIES:
SHARED_LIBRARIES:
LDLIBS:
ALLOW_UNDEFINED_SYMBOLS:
ARM_MODE: arm
ARM_NEON:
DISABLE_NO_EXECUTE:
EXPORT_CFLAGS:
EXPORT_CPPFLAGS:
EXPORT_LDLIBS:
EXPORT_C_INCLUDES:
FILTER_ASM:
MAKEFILE: /cygdrive/c/work/app_name/test/src/build/android/jni/
Android.mk
LDFLAGS:
OBJECTS:
BUILT_MODULE: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi/libclientproject.a
OBJS_DIR: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi/objs/clientproject
INSTALLED:
MODULE_CLASS: STATIC_LIBRARY
freetype:
depends:
MODULE: freetype
MODULE_FILENAME: libfreetype.a
PATH: /cygdrive/c/work/app_name/test/src/build/android/
jni/../../..
SRC_FILES: << long list of library source files >>
CPP_EXTENSION:
C_INCLUDES: /cygdrive/c/work/app_name/test/src/build/android/
jni/../../../external/library/freetype/freetype-2.4.2/include
CFLAGS: -DFT2_BUILD_LIBRARY -fvisibility=hidden -Wall -Wno-psabi -
Werror -DPLATFORM_ANDROID
CXXFLAGS:
CPPFLAGS:
STATIC_LIBRARIES:
WHOLE_STATIC_LIBRARIES:
SHARED_LIBRARIES:
LDLIBS:
ALLOW_UNDEFINED_SYMBOLS:
ARM_MODE: arm
ARM_NEON:
DISABLE_NO_EXECUTE:
EXPORT_CFLAGS:
EXPORT_CPPFLAGS:
EXPORT_LDLIBS:
EXPORT_C_INCLUDES:
FILTER_ASM:
MAKEFILE: /cygdrive/c/work/app_name/test/src/build/android/jni/
Android.mk
LDFLAGS:
OBJECTS:
BUILT_MODULE: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi/libfreetype.a
OBJS_DIR: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi/objs/freetype
INSTALLED:
MODULE_CLASS: STATIC_LIBRARY
gnustl_static:
depends:
MODULE: gnustl_static
MODULE_FILENAME: libstdc++
PATH: /cygdrive/c/work/android/android-ndk-r5/sources/cxx-stl/gnu-
libstdc++
SRC_FILES:
CPP_EXTENSION:
C_INCLUDES:
CFLAGS:
CXXFLAGS:
CPPFLAGS:
STATIC_LIBRARIES:
WHOLE_STATIC_LIBRARIES:
SHARED_LIBRARIES:
LDLIBS:
ALLOW_UNDEFINED_SYMBOLS:
ARM_MODE:
ARM_NEON:
DISABLE_NO_EXECUTE:
EXPORT_CFLAGS:
EXPORT_CPPFLAGS: -fexceptions -frtti
EXPORT_LDLIBS:
EXPORT_C_INCLUDES: /cygdrive/c/work/android/android-ndk-r5/sources/
cxx-stl/gnu-libstdc++/include /cygdrive/c/work/android/android-ndk-r5/
sources/cxx-stl/gnu-libstdc++/libs/armeabi/include
FILTER_ASM:
MAKEFILE: /cygdrive/c/work/android/android-ndk-r5/sources/cxx-stl/
gnu-libstdc++/Android.mk
LDFLAGS:
OBJECTS: /cygdrive/c/work/android/android-ndk-r5/sources/cxx-stl/
gnu-libstdc++/libs/armeabi/libstdc++.a
BUILT_MODULE: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi/libstdc++.a
OBJS_DIR: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi/objs/gnustl_static
INSTALLED:
MODULE_CLASS: PREBUILT_STATIC_LIBRARY
app_name:
depends: clientproject sharedproject clientengine sharedengine
freetype gnustl_static
MODULE: app_name
MODULE_FILENAME: libapp_name.so
PATH: /cygdrive/c/work/app_name/test/src/build/android/
jni/../../..
SRC_FILES: << long list of library source files >>
CPP_EXTENSION:
C_INCLUDES: /cygdrive/c/work/app_name/test/src/build/android/
jni/../../../engine/shared/library/sharedEngine/include/public /
cygdrive/c/work/app_name/test/src/build/android/jni/../../../engine/
client/library/clientEngine/include/public /cygdrive/c/work/app_name/
test/src/build/android/jni/../../../project/shared/library/
sharedProject/include/public /cygdrive/c/work/app_name/test/src/build/
android/jni/../../../project/client/library/clientProject/include/
public /cygdrive/c/work/app_name/test/src/build/android/jni/../../../
project/client/library/clientProject/include/private
CFLAGS: -fvisibility=hidden -Wall -Wno-psabi -Werror -
DPLATFORM_ANDROID
CXXFLAGS:
CPPFLAGS: -fvisibility-inlines-hidden
STATIC_LIBRARIES: libclientproject libsharedproject
libclientengine libsharedengine libfreetype gnustl_static
WHOLE_STATIC_LIBRARIES:
SHARED_LIBRARIES:
LDLIBS: -llog -lz -lGLESv1_CM
ALLOW_UNDEFINED_SYMBOLS:
ARM_MODE: arm
ARM_NEON:
DISABLE_NO_EXECUTE:
EXPORT_CFLAGS:
EXPORT_CPPFLAGS:
EXPORT_LDLIBS:
EXPORT_C_INCLUDES:
FILTER_ASM:
MAKEFILE: /cygdrive/c/work/app_name/test/src/build/android/jni/
Android.mk
LDFLAGS:
OBJECTS:
BUILT_MODULE: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi/libapp_name.so
OBJS_DIR: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi/objs/app_name
INSTALLED: /cygdrive/c/work/app_name/test/src/build/android/libs/
armeabi/libapp_name.so
MODULE_CLASS: SHARED_LIBRARY
sharedengine:
depends: gnustl_static
MODULE: sharedengine
MODULE_FILENAME: libsharedengine.a
PATH: /cygdrive/c/work/app_name/test/src/build/android/
jni/../../..
SRC_FILES: << long list of library source files >>
CPP_EXTENSION:
C_INCLUDES: /cygdrive/c/work/app_name/test/src/build/android/
jni/../../../engine/shared/library/sharedEngine/include/public /
cygdrive/c/work/app_name/test/src/build/android/jni/../../../engine/
shared/library/sharedEngine/include/private
CFLAGS: -fvisibility=hidden -Wall -Wno-psabi -Werror -
DPLATFORM_ANDROID
CXXFLAGS:
CPPFLAGS: -fvisibility-inlines-hidden
STATIC_LIBRARIES: gnustl_static
WHOLE_STATIC_LIBRARIES:
SHARED_LIBRARIES:
LDLIBS:
ALLOW_UNDEFINED_SYMBOLS:
ARM_MODE: arm
ARM_NEON:
DISABLE_NO_EXECUTE:
EXPORT_CFLAGS:
EXPORT_CPPFLAGS:
EXPORT_LDLIBS:
EXPORT_C_INCLUDES:
FILTER_ASM:
MAKEFILE: /cygdrive/c/work/app_name/test/src/build/android/jni/
Android.mk
LDFLAGS:
OBJECTS:
BUILT_MODULE: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi/libsharedengine.a
OBJS_DIR: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi/objs/sharedengine
INSTALLED:
MODULE_CLASS: STATIC_LIBRARY
sharedproject:
depends: gnustl_static
MODULE: sharedproject
MODULE_FILENAME: libsharedproject.a
PATH: /cygdrive/c/work/app_name/test/src/build/android/
jni/../../..
SRC_FILES: << long list of library source files >>
CPP_EXTENSION:
C_INCLUDES: /cygdrive/c/work/app_name/test/src/build/android/
jni/../../../engine/shared/library/sharedEngine/include/public /
cygdrive/c/work/app_name/test/src/build/android/jni/../../../project/
shared/library/sharedProject/include/public /cygdrive/c/work/app_name/
test/src/build/android/jni/../../../project/shared/library/
sharedProject/include/private
CFLAGS: -fvisibility=hidden -Wall -Wno-psabi -Werror -
DPLATFORM_ANDROID
CXXFLAGS:
CPPFLAGS: -fvisibility-inlines-hidden
STATIC_LIBRARIES: gnustl_static
WHOLE_STATIC_LIBRARIES:
SHARED_LIBRARIES:
LDLIBS:
ALLOW_UNDEFINED_SYMBOLS:
ARM_MODE: arm
ARM_NEON:
DISABLE_NO_EXECUTE:
EXPORT_CFLAGS:
EXPORT_CPPFLAGS:
EXPORT_LDLIBS:
EXPORT_C_INCLUDES:
FILTER_ASM:
MAKEFILE: /cygdrive/c/work/app_name/test/src/build/android/jni/
Android.mk
LDFLAGS:
OBJECTS:
BUILT_MODULE: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi/libsharedproject.a
OBJS_DIR: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi/objs/sharedproject
INSTALLED:
MODULE_CLASS: STATIC_LIBRARY
--- end of modules list
Android NDK: Building application 'local' for ABI 'armeabi-v7a'
Android NDK: Using target toolchain 'arm-linux-androideabi-4.4.3' for
'armeabi-v7a' ABI
Android NDK: Looking for imported module with tag 'cxx-stl/gnu-libstdc+
+'
Android NDK: Probing /cygdrive/c/work/android/android-ndk-r5/sources/
cxx-stl/gnu-libstdc++/Android.mk
Android NDK: Module 'clientengine' has C++ sources
Android NDK: Module 'clientproject' has C++ sources
Android NDK: Module 'app_name' has C++ sources
Android NDK: Module 'sharedengine' has C++ sources
Android NDK: Module 'sharedproject' has C++ sources
Modules: clientengine clientproject freetype gnustl_static app_name
sharedengine sharedproject
clientengine:
depends: gnustl_static
MODULE: clientengine
MODULE_FILENAME: libclientengine.a
PATH: /cygdrive/c/work/app_name/test/src/build/android/
jni/../../..
SRC_FILES: << long list of library source files >>
CPP_EXTENSION:
C_INCLUDES: /cygdrive/c/work/app_name/test/src/build/android/
jni/../../../engine/shared/library/sharedEngine/include/public /
cygdrive/c/work/app_name/test/src/build/android/jni/../../../engine/
client/library/clientEngine/include/public /cygdrive/c/work/app_name/
test/src/build/android/jni/../../../engine/client/library/clientEngine/
include/private /cygdrive/c/work/app_name/test/src/build/android/
jni/../../../external/library/freetype/freetype-2.4.2/include
CFLAGS: -fvisibility=hidden -Wall -Wno-psabi -Werror -
DPLATFORM_ANDROID
CXXFLAGS:
CPPFLAGS: -fvisibility-inlines-hidden
STATIC_LIBRARIES: gnustl_static
WHOLE_STATIC_LIBRARIES:
SHARED_LIBRARIES:
LDLIBS:
ALLOW_UNDEFINED_SYMBOLS:
ARM_MODE: arm
ARM_NEON:
DISABLE_NO_EXECUTE:
EXPORT_CFLAGS:
EXPORT_CPPFLAGS:
EXPORT_LDLIBS:
EXPORT_C_INCLUDES:
FILTER_ASM:
MAKEFILE: /cygdrive/c/work/app_name/test/src/build/android/jni/
Android.mk
LDFLAGS:
OBJECTS:
BUILT_MODULE: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi-v7a/libclientengine.a
OBJS_DIR: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi-v7a/objs/clientengine
INSTALLED:
MODULE_CLASS: STATIC_LIBRARY
clientproject:
depends: gnustl_static
MODULE: clientproject
MODULE_FILENAME: libclientproject.a
PATH: /cygdrive/c/work/app_name/test/src/build/android/
jni/../../..
SRC_FILES: << long list of library source files >>
CPP_EXTENSION:
C_INCLUDES: /cygdrive/c/work/app_name/test/src/build/android/
jni/../../../engine/shared/library/sharedEngine/include/public /
cygdrive/c/work/app_name/test/src/build/android/jni/../../../engine/
client/library/clientEngine/include/public /cygdrive/c/work/app_name/
test/src/build/android/jni/../../../project/shared/library/
sharedProject/include/public /cygdrive/c/work/app_name/test/src/build/
android/jni/../../../project/client/library/clientProject/include/
public /cygdrive/c/work/app_name/test/src/build/android/jni/../../../
project/client/library/clientProject/include/private
CFLAGS: -fvisibility=hidden -Wall -Wno-psabi -Werror -
DPLATFORM_ANDROID
CXXFLAGS:
CPPFLAGS: -fvisibility-inlines-hidden
STATIC_LIBRARIES: gnustl_static
WHOLE_STATIC_LIBRARIES:
SHARED_LIBRARIES:
LDLIBS:
ALLOW_UNDEFINED_SYMBOLS:
ARM_MODE: arm
ARM_NEON:
DISABLE_NO_EXECUTE:
EXPORT_CFLAGS:
EXPORT_CPPFLAGS:
EXPORT_LDLIBS:
EXPORT_C_INCLUDES:
FILTER_ASM:
MAKEFILE: /cygdrive/c/work/app_name/test/src/build/android/jni/
Android.mk
LDFLAGS:
OBJECTS:
BUILT_MODULE: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi-v7a/libclientproject.a
OBJS_DIR: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi-v7a/objs/clientproject
INSTALLED:
MODULE_CLASS: STATIC_LIBRARY
freetype:
depends:
MODULE: freetype
MODULE_FILENAME: libfreetype.a
PATH: /cygdrive/c/work/app_name/test/src/build/android/
jni/../../..
SRC_FILES: external/library/freetype/freetype-2.4.2/src/base/
ftapi.c external/library/freetype/freetype-2.4.2/src/base/ftbase.c
external/library/freetype/freetype-2.4.2/src/base/ftbbox.c external/
library/freetype/freetype-2.4.2/src/base/ftbdf.c external/library/
freetype/freetype-2.4.2/src/base/ftbitmap.c external/library/freetype/
freetype-2.4.2/src/base/ftcid.c external/library/freetype/
freetype-2.4.2/src/base/ftdebug.c external/library/freetype/
freetype-2.4.2/src/base/ftfstype.c external/library/freetype/
freetype-2.4.2/src/base/ftgasp.c external/library/freetype/
freetype-2.4.2/src/base/ftglyph.c external/library/freetype/
freetype-2.4.2/src/base/ftgxval.c external/library/freetype/
freetype-2.4.2/src/base/ftinit.c external/library/freetype/
freetype-2.4.2/src/base/ftlcdfil.c external/library/freetype/
freetype-2.4.2/src/base/ftmm.c external/library/freetype/
freetype-2.4.2/src/base/ftotval.c external/library/freetype/
freetype-2.4.2/src/base/ftpatent.c external/library/freetype/
freetype-2.4.2/src/base/ftpfr.c external/library/freetype/
freetype-2.4.2/src/base/ftstroke.c external/library/freetype/
freetype-2.4.2/src/base/ftsynth.c external/library/freetype/
freetype-2.4.2/src/base/ftsystem.c external/library/freetype/
freetype-2.4.2/src/base/fttype1.c external/library/freetype/
freetype-2.4.2/src/base/ftwinfnt.c external/library/freetype/
freetype-2.4.2/src/base/ftxf86.c external/library/freetype/
freetype-2.4.2/src/cff/cff.c external/library/freetype/freetype-2.4.2/
src/pshinter/pshinter.c external/library/freetype/freetype-2.4.2/src/
psnames/psnames.c external/library/freetype/freetype-2.4.2/src/raster/
raster.c external/library/freetype/freetype-2.4.2/src/sfnt/sfnt.c
external/library/freetype/freetype-2.4.2/src/smooth/smooth.c external/
library/freetype/freetype-2.4.2/src/truetype/truetype.c
CPP_EXTENSION:
C_INCLUDES: /cygdrive/c/work/app_name/test/src/build/android/
jni/../../../external/library/freetype/freetype-2.4.2/include
CFLAGS: -DFT2_BUILD_LIBRARY -fvisibility=hidden -Wall -Wno-psabi -
Werror -DPLATFORM_ANDROID
CXXFLAGS:
CPPFLAGS:
STATIC_LIBRARIES:
WHOLE_STATIC_LIBRARIES:
SHARED_LIBRARIES:
LDLIBS:
ALLOW_UNDEFINED_SYMBOLS:
ARM_MODE: arm
ARM_NEON:
DISABLE_NO_EXECUTE:
EXPORT_CFLAGS:
EXPORT_CPPFLAGS:
EXPORT_LDLIBS:
EXPORT_C_INCLUDES:
FILTER_ASM:
MAKEFILE: /cygdrive/c/work/app_name/test/src/build/android/jni/
Android.mk
LDFLAGS:
OBJECTS:
BUILT_MODULE: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi-v7a/libfreetype.a
OBJS_DIR: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi-v7a/objs/freetype
INSTALLED:
MODULE_CLASS: STATIC_LIBRARY
gnustl_static:
depends:
MODULE: gnustl_static
MODULE_FILENAME: libstdc++
PATH: /cygdrive/c/work/android/android-ndk-r5/sources/cxx-stl/gnu-
libstdc++
SRC_FILES:
CPP_EXTENSION:
C_INCLUDES:
CFLAGS:
CXXFLAGS:
CPPFLAGS:
STATIC_LIBRARIES:
WHOLE_STATIC_LIBRARIES:
SHARED_LIBRARIES:
LDLIBS:
ALLOW_UNDEFINED_SYMBOLS:
ARM_MODE:
ARM_NEON:
DISABLE_NO_EXECUTE:
EXPORT_CFLAGS:
EXPORT_CPPFLAGS: -fexceptions -frtti
EXPORT_LDLIBS:
EXPORT_C_INCLUDES: /cygdrive/c/work/android/android-ndk-r5/sources/
cxx-stl/gnu-libstdc++/include /cygdrive/c/work/android/android-ndk-r5/
sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include
FILTER_ASM:
MAKEFILE: /cygdrive/c/work/android/android-ndk-r5/sources/cxx-stl/
gnu-libstdc++/Android.mk
LDFLAGS:
OBJECTS: /cygdrive/c/work/android/android-ndk-r5/sources/cxx-stl/
gnu-libstdc++/libs/armeabi-v7a/libstdc++.a
BUILT_MODULE: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi-v7a/libstdc++.a
OBJS_DIR: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi-v7a/objs/gnustl_static
INSTALLED:
MODULE_CLASS: PREBUILT_STATIC_LIBRARY
app_name:
depends: clientproject sharedproject clientengine sharedengine
freetype gnustl_static
MODULE: app_name
MODULE_FILENAME: libapp_name.so
PATH: /cygdrive/c/work/app_name/test/src/build/android/
jni/../../..
SRC_FILES: << long list of library source files >>
CPP_EXTENSION:
C_INCLUDES: /cygdrive/c/work/app_name/test/src/build/android/
jni/../../../engine/shared/library/sharedEngine/include/public /
cygdrive/c/work/app_name/test/src/build/android/jni/../../../engine/
client/library/clientEngine/include/public /cygdrive/c/work/app_name/
test/src/build/android/jni/../../../project/shared/library/
sharedProject/include/public /cygdrive/c/work/app_name/test/src/build/
android/jni/../../../project/client/library/clientProject/include/
public /cygdrive/c/work/app_name/test/src/build/android/jni/../../../
project/client/library/clientProject/include/private
CFLAGS: -fvisibility=hidden -Wall -Wno-psabi -Werror -
DPLATFORM_ANDROID
CXXFLAGS:
CPPFLAGS: -fvisibility-inlines-hidden
STATIC_LIBRARIES: libclientproject libsharedproject
libclientengine libsharedengine libfreetype gnustl_static
WHOLE_STATIC_LIBRARIES:
SHARED_LIBRARIES:
LDLIBS: -llog -lz -lGLESv1_CM
ALLOW_UNDEFINED_SYMBOLS:
ARM_MODE: arm
ARM_NEON:
DISABLE_NO_EXECUTE:
EXPORT_CFLAGS:
EXPORT_CPPFLAGS:
EXPORT_LDLIBS:
EXPORT_C_INCLUDES:
FILTER_ASM:
MAKEFILE: /cygdrive/c/work/app_name/test/src/build/android/jni/
Android.mk
LDFLAGS:
OBJECTS:
BUILT_MODULE: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi-v7a/libapp_name.so
OBJS_DIR: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi-v7a/objs/app_name
INSTALLED: /cygdrive/c/work/app_name/test/src/build/android/libs/
armeabi-v7a/libapp_name.so
MODULE_CLASS: SHARED_LIBRARY
sharedengine:
depends: gnustl_static
MODULE: sharedengine
MODULE_FILENAME: libsharedengine.a
PATH: /cygdrive/c/work/app_name/test/src/build/android/
jni/../../..
SRC_FILES: << long list of library source files >>
CPP_EXTENSION:
C_INCLUDES: /cygdrive/c/work/app_name/test/src/build/android/
jni/../../../engine/shared/library/sharedEngine/include/public /
cygdrive/c/work/app_name/test/src/build/android/jni/../../../engine/
shared/library/sharedEngine/include/private
CFLAGS: -fvisibility=hidden -Wall -Wno-psabi -Werror -
DPLATFORM_ANDROID
CXXFLAGS:
CPPFLAGS: -fvisibility-inlines-hidden
STATIC_LIBRARIES: gnustl_static
WHOLE_STATIC_LIBRARIES:
SHARED_LIBRARIES:
LDLIBS:
ALLOW_UNDEFINED_SYMBOLS:
ARM_MODE: arm
ARM_NEON:
DISABLE_NO_EXECUTE:
EXPORT_CFLAGS:
EXPORT_CPPFLAGS:
EXPORT_LDLIBS:
EXPORT_C_INCLUDES:
FILTER_ASM:
MAKEFILE: /cygdrive/c/work/app_name/test/src/build/android/jni/
Android.mk
LDFLAGS:
OBJECTS:
BUILT_MODULE: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi-v7a/libsharedengine.a
OBJS_DIR: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi-v7a/objs/sharedengine
INSTALLED:
MODULE_CLASS: STATIC_LIBRARY
sharedproject:
depends: gnustl_static
MODULE: sharedproject
MODULE_FILENAME: libsharedproject.a
PATH: /cygdrive/c/work/app_name/test/src/build/android/
jni/../../..
SRC_FILES: << long list of library source files >>
CPP_EXTENSION:
C_INCLUDES: /cygdrive/c/work/app_name/test/src/build/android/
jni/../../../engine/shared/library/sharedEngine/include/public /
cygdrive/c/work/app_name/test/src/build/android/jni/../../../project/
shared/library/sharedProject/include/public /cygdrive/c/work/app_name/
test/src/build/android/jni/../../../project/shared/library/
sharedProject/include/private
CFLAGS: -fvisibility=hidden -Wall -Wno-psabi -Werror -
DPLATFORM_ANDROID
CXXFLAGS:
CPPFLAGS: -fvisibility-inlines-hidden
STATIC_LIBRARIES: gnustl_static
WHOLE_STATIC_LIBRARIES:
SHARED_LIBRARIES:
LDLIBS:
ALLOW_UNDEFINED_SYMBOLS:
ARM_MODE: arm
ARM_NEON:
DISABLE_NO_EXECUTE:
EXPORT_CFLAGS:
EXPORT_CPPFLAGS:
EXPORT_LDLIBS:
EXPORT_C_INCLUDES:
FILTER_ASM:
MAKEFILE: /cygdrive/c/work/app_name/test/src/build/android/jni/
Android.mk
LDFLAGS:
OBJECTS:
BUILT_MODULE: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi-v7a/libsharedproject.a
OBJS_DIR: /cygdrive/c/work/app_name/test/src/build/android/obj/
local/armeabi-v7a/objs/sharedproject
INSTALLED:
MODULE_CLASS: STATIC_LIBRARY
--- end of modules list
Clean: clientengine [armeabi]
Clean: clientproject [armeabi]
Clean: freetype [armeabi]
Clean: gnustl_static [armeabi]
Clean: app_name [armeabi]
Clean: sharedengine [armeabi]
Clean: sharedproject [armeabi]
Clean: clientengine [armeabi-v7a]
Clean: clientproject [armeabi-v7a]
Clean: freetype [armeabi-v7a]
Clean: gnustl_static [armeabi-v7a]
Clean: app_name [armeabi-v7a]
Clean: sharedengine [armeabi-v7a]
Clean: sharedproject [armeabi-v7a]

Futumsh

unread,
Dec 6, 2010, 8:08:00 PM12/6/10
to android-ndk
A little further info on this, now that I've rebuild the toolchain for
linux: startup time prior to compiles is about 4 seconds on linux, as
opposed to 3 minutes on windows, so whatever is causing this is likely
cygwin-related.

drodin

unread,
Dec 8, 2010, 5:56:44 AM12/8/10
to android-ndk


On Dec 7, 1:15 am, Futumsh <rdelash...@gmail.com> wrote:

> Startup time on windows:
>
> With ndk-r4b, startup time before compiles begin for this project were
> on the order of a few seconds.  With ndk-r5, it takes about 3 minutes
> before the first file starts compiling.
>
> Anyone know how to address these problems offhand, before I look into
> them in depth?

problem is due to hundreds of executions of 'cygpath' from build
system

dirty hack:

seek for
build/core/definitions.mk (in android ndk root folder)

change string
host-path = $(if $(strip $1),$(shell cygpath -m $1),)

to
host-path = $(if $(strip $1),$(patsubst /cygdrive/c/%,C:/%,$1),)

watch for the drive letter...

David Turner

unread,
Dec 8, 2010, 9:22:38 AM12/8/10
to andro...@googlegroups.com
On Wed, Dec 8, 2010 at 11:56 AM, drodin <rodin....@gmail.com> wrote:


On Dec 7, 1:15 am, Futumsh <rdelash...@gmail.com> wrote:

> Startup time on windows:
>
> With ndk-r4b, startup time before compiles begin for this project were
> on the order of a few seconds.  With ndk-r5, it takes about 3 minutes
> before the first file starts compiling.
>
> Anyone know how to address these problems offhand, before I look into
> them in depth?

problem is due to hundreds of executions of 'cygpath' from build
system

Ah yes, that would be a likely explanation. I didn't realize cygpath was so slow, but I should have known better, it's cygwin after all :-(
 
dirty hack:

seek for
build/core/definitions.mk (in android ndk root folder)

change string
host-path = $(if $(strip $1),$(shell cygpath -m $1),)

to
host-path = $(if $(strip $1),$(patsubst /cygdrive/c/%,C:/%,$1),)

watch for the drive letter...

Nice. Note: this only works if your NDK installation *and* project path are located on the C: drive, and if you are using the default cygwin drive mapping (e.g. C:/ <-> /cygwin/c/)
Anything else is going to be a bit more tricky to handle.

Historical point: The GCC toolchain doesn't support cygwin anymore but we still depend on it to run ndk-build / ndk-gdb.
I hope to get rid of this dependency in a future release completely (which will involve providing prebuilt binaries for GNU Make, awk, sh and a few other Unix utils); the calls to "cygpath -m" will disappear completely then.

Chris

unread,
Dec 9, 2010, 9:57:28 AM12/9/10
to android-ndk, di...@android.com
Hi and thanks for pinpointing the source of that problem that haunted
me.

On Dec 8, 11:56 am, drodin <rodin.dmi...@gmail.com> wrote:
> problem is due to hundreds of executions of 'cygpath' from build
> system

That's exactly what I was observing using cygwin too.

> to
> host-path = $(if $(strip $1),$(patsubst /cygdrive/c/%,C:/%,$1),)
>
> watch for the drive letter...

I also add to correct the android NDK path (mounted in /android under
cygwin), which for me is in C:/dev/android doing the following:
host-path = $(if $(strip $1),$(patsubst /android/%,C:/dev/android/%,$
(patsubst /cygdrive/c/%,C:/%,$1)),)

I also noticed that the NDK does not tolerate anymore include paths
provided through LOCAL_CFLAGS.

Leaving aside the problem of proper QC from google (I wonder how such
a problem didn't appear), would the NDK team have sufficient man-power
to offer more frequent updates or at least "hotfixes" elsewhere than
deep inside groups?

Best regards,
Christophe

Doug K

unread,
Dec 14, 2010, 2:58:41 PM12/14/10
to android-ndk


On Dec 6, 10:36 am, David Turner <di...@android.com> wrote:
> On Mon, Dec 6, 2010 at 7:15 PM, Futumsh <rdelash...@gmail.com> wrote:
> > I've got an application with a large ndk component, which builds and
> > runs fine using the crystax version of ndk-r4b, and am attempting to
> > get it building using ndk-r5.
>
> > Build errors:
>
> > On windows, after source files for the first static library build,
> > when it reaches generating the first static library:
> > make: execvp: /cygdrive/c/work/android/android-ndk-r5/toolchains/arm-
> > linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-ar:
> > Argument list too long
>
> > Hmmm, you may have a really long argument list here. There are several ways
>
> that could help you work around this:
>
> 1/ Try installing the NDK and your project in top-level directories to make
> the final build commands smaller. What I mean would be:
> - install the ndk as /cygdrive/c/ndkr5/
> - put your project under /cydrive/c/myproj/

FWIW, I had exactly the same problem as Futumsh with NDK5 (whereas
NDKr4b worked fine). The first of these two suggested workarounds
(shortening the NDK directory path) alone didn't fix my problem, but
adding the second workaround (shortening the project path) did. In my
case, I was building ffmpeg libraries.

Leith

unread,
Dec 15, 2010, 4:10:20 PM12/15/10
to android-ndk
Can someone please upload a tar.gz of the prebuilt tool binaries built
on 9.10?
Reply all
Reply to author
Forward
0 new messages