We're glad to announce the release of CrystaX NDK 10.2.0!
We're moving further as promised, and in this release, we've fixed many
bugs and implemented many improvements. See the list below for the main features
introduced in this version.
Objective-C v2
We've added support of Objective-C v2
runtime (i.e., compatible with Apple's Objective-C runtime) and initial Cocoa-compatible frameworks
(Foundation and CoreFoundation).
We'd like say thank you to GNUstep and the Cocotron community -
without these awesome open source projects, adding Objective-C v2 support to CrystaX NDK would have been much more difficult.
Thank God (and RMS), nowadays, we have many open source projects
around helping each other, so overall efficiency is just great in the FOSS world!
This is the first step on a long path, but we aim to continue working on Objective-C support, and invite
all interested parties that can help us. We're happy to take any kind of help to make Objective-C a first-class citizen
on Android!
Here
is a small example of how to start using Objective-C v2 on Android.
Boost 1.58.0
We've included two versions of pre-built Boost libraries in this release - 1.57.0 and 1.58.0.
Just use Boost on Android and forget about compilation problems!
Remember, we're running regular regression testing of Boost libraries, so you can always see how specific Boost libraries
work on Android: master and
develop.
Clang 3.6
We've added a new clang-3.6 toolchain, with backporting of all fixes we did in clang-3.4 and clang-3.5.
This is default "clang" toolchain now; in other words, if you specify "NDK_TOOLCHAIN_VERSION := clang"
in your Application.mk, clang-3.6 will be chosen.
Also, we've updated LLVM libc++ to release_36 upstream branch, so it's the most up-to-date version.
PNG, JPEG and TIFF libraries
We've added pre-built libpng-1.6.17,
libjpeg-9a and
libtiff-4.0.4beta,
so there is no need to build them anymore on your own; just use something like that in your Android.mk:
Android.mk
include $(CLEAR_VARS)
LOCAL_MODULE := test-static
LOCAL_SRC_FILES := $(SRCFILES)
LOCAL_STATIC_LIBRARIES := \
libpng_static \
libjpeg_static \
libtiff_static
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := test-shared
LOCAL_SRC_FILES := $(SRCFILES)
LOCAL_SHARED_LIBRARIES := \
libpng_shared \
libjpeg_shared \
libtiff_shared
include $(BUILD_SHARED_LIBRARY)
$(call import-module,libpng/1.6.17)
$(call import-module,libjpeg/9a)
$(call import-module,libtiff/4.0.4beta)
These libraries are also included in the auto-generated standalone toolchain, so it becomes much easier to use Android
toolchains for autotools-enabled builds:
Example
$ /opt/android/crystax-ndk-10.2.0/build/tools/make-standalone-toolchain.sh \
--toolchain=arm-linux-androideabi-4.9 --platform=android-9 \
--install-dir=$HOME/android-arm-toolchain
Auto-config: --arch=arm
Copying prebuilt binaries...
Copying sysroot headers and libraries...
Copying crystax headers and libraries...
Copying libpng headers and libraries...
Copying libjpeg headers and libraries...
Copying libtiff headers and libraries...
Copying libobjc headers and libraries...
Copying c++ runtime headers and libraries...
Copying files to: /Users/crystax/android-arm-toolchain
Cleaning up...
Done.
$ ls -FAl $HOME/android-arm-toolchain/arm-linux-androideabi/include
total 340
-rw-r--r-- 1 crystax wheel 1757 Jun 19 09:04 jconfig.h
-rw-r--r-- 1 crystax wheel 14580 Jun 19 09:04 jerror.h
-rw-r--r-- 1 crystax wheel 14925 Jun 19 09:04 jmorecfg.h
-rw-r--r-- 1 crystax wheel 49281 Jun 19 09:04 jpeglib.h
drwxr-xr-x 5 crystax wheel 170 Jun 19 03:40 libpng16/
drwxr-xr-x 12 crystax wheel 408 Jun 19 02:10 objc/
-rw-r--r-- 1 crystax wheel 146763 Jun 19 09:04 png.h
-rw-r--r-- 1 crystax wheel 22841 Jun 19 09:04 pngconf.h
-rw-r--r-- 1 crystax wheel 7256 Jun 19 09:04 pnglibconf.h
-rw-r--r-- 1 crystax wheel 35987 Jun 19 09:04 tiff.h
-rw-r--r-- 1 crystax wheel 3442 Jun 19 09:04 tiffconf.h
-rw-r--r-- 1 crystax wheel 23003 Jun 19 09:04 tiffio.h
-rw-r--r-- 1 crystax wheel 1702 Jun 19 09:04 tiffio.hxx
-rw-r--r-- 1 crystax wheel 414 Jun 19 09:04 tiffvers.h
-rw-r--r-- 1 crystax wheel 2923 Jun 19 09:04 unwind.h
$ ls -FAl $HOME/android-arm-toolchain/arm-linux-androideabi/lib/armv7-a
total 30684
drwxr-xr-x 20 crystax wheel 680 Jun 23 13:50 hard/
-rw-r--r-- 1 crystax wheel 411780 Jun 19 09:04 libatomic.a
-rw-r--r-- 1 crystax wheel 6053520 Jun 19 09:03 libcrystax.a
-rwxr-xr-x 1 crystax wheel 3296588 Jun 19 09:03 libcrystax.so*
-rwxr-xr-x 1 crystax wheel 289192 Jun 19 09:04 libgnuobjc_shared.so*
-rwxr-xr-x 1 crystax wheel 5951764 Jun 19 09:03 libgnustl_shared.so*
-rw-r--r-- 1 crystax wheel 515224 Jun 19 09:04 libgomp.a
-rw-r--r-- 1 crystax wheel 153 Jun 19 09:04 libgomp.spec
-rw-r--r-- 1 crystax wheel 288912 Jun 19 09:04 libjpeg.a
-rwxr-xr-x 1 crystax wheel 285780 Jun 19 09:04 libjpeg.so*
-rw-r--r-- 1 crystax wheel 375692 Jun 19 09:04 libobjc.a
-rw-r--r-- 1 crystax wheel 248606 Jun 19 09:04 libpng.a
-rwxr-xr-x 1 crystax wheel 246116 Jun 19 09:04 libpng.so*
-rw-r--r-- 1 crystax staff 11190794 Jun 19 09:03 libstdc++.a
-rw-r--r-- 1 crystax wheel 1171236 Jun 19 09:03 libsupc++.a
-rw-r--r-- 1 crystax wheel 546726 Jun 19 09:04 libtiff.a
-rwxr-xr-x 1 crystax wheel 485408 Jun 19 09:04 libtiff.so*
-rw-r--r-- 1 crystax wheel 14502 Jun 19 09:04 libtiffxx.a
-rwxr-xr-x 1 crystax wheel 12724 Jun 19 09:04 libtiffxx.so*
drwxr-xr-x 21 crystax wheel 714 Jun 23 13:50 thumb/
$ cat test.c
#include <stdio.h>
#include <png.h>
#include <jpeglib.h>
#include <tiffio.h>
void test_libjpeg()
{
printf("libjpeg version: %d.%d\n\n",
JPEG_LIB_VERSION_MAJOR,
JPEG_LIB_VERSION_MINOR);
}
void test_libpng()
{
printf("libpng version: (%lu):%s\n",
(unsigned long)png_access_version_number(),
png_get_header_version(NULL));
}
void test_libtiff()
{
printf("TIFF version: %s\n", TIFFGetVersion());
}
int main()
{
test_libpng();
test_libjpeg();
test_libtiff();
return 0;
}
$ $HOME/android-arm-toolchain/bin/arm-linux-androideabi-gcc \
-march=armv7-a -mthumb -mfloat-abi=softfp -mfpu=vfpv3-d16 \
-fPIE -pie -o test test.c \
-Wl,-Bstatic -lpng -ltiff -ljpeg -Wl,-Bdynamic -lz
$ adb push $HOME/android-arm-toolchain/arm-linux-androideabi/lib/armv7-a/libcrystax.so /data/local/tmp
6133 KB/s (3296588 bytes in 0.524s)
$ adb push test /data/local/tmp
6713 KB/s (243976 bytes in 0.035s)
$ adb shell chmod 0700 /data/local/tmp/test
$ adb shell 'cd /data/local/tmp && LD_LIBRARY_PATH=/data/local/tmp ./test'
libpng version: (10617): libpng version 1.6.17 - March 26, 2015
libjpeg version: 9.1
TIFF version: LIBTIFF, Version 4.0.4beta
Copyright (c) 1988-1996 Sam Leffler
Copyright (c) 1991-1996 Silicon Graphics, Inc.
Other
And last but not least, there have been numerous bug fixes and small improvements, leading to better behavior of CrystaX NDK.
Here is a full list of tickets we've closed in 10.2.0.
Download
Download CrystaX NDK 10.2.0 here and enjoy!
Alternatively, if you're on OS X and use the Homebrew, just type:
brew install crystax-ndk