I've compiled Libtorrent-rasterbar for Android (arm) using the libtorrent-rasterbar sources (github) but ran into some questionable results. Below i list the steps that i took before compilation:
After setting up a stand-alone toolchain for arm i moved the openssl libs into the toolchains lib folder and the headers into the toolchains include folder etc. I did this with the boost-android libs as well. Next i exported my environment variables as follows:
export SYSROOT=$ANDROIDNDK/platforms/android-16/arch-arm
export PATH=/opt/android/toolchains/gcc-arm/bin:$PATH
export CC=arm-linux-androideabi-gcc
export CXX=arm-linux-androideabi-g++
export CROSSHOST=arm-linux-androideabi
export CROSSHOME=/opt/android/toolchains/gcc-arm
And finally, i configured using the following:
./configure --host=$CROSSHOST --prefix=$CROSSHOME --with-boost=$CROSSHOME --with-boost-libdir=$CROSSHOME/lib --enable-shared --disable-static --enable-debug=yes --enable-loggin-yes --with-openssl=$CROSSHOME
Everything compiles fine but the shared library produced is way larger than it should be. 65mb. I tried changing my CPPFLAGS to include -O2 (optimization setting) but it didn't make a size difference. Is there anybody who has compiled libtorrent-rasterbar as a shared or static library for android? If so, what was the size of your final binary and what steps did you take?
Thanks so much!
UPDATE: I forgot to include what machine i'm compiling on. Here goes:
- CPU i7 4770k
- MEM 16gb 2133mhz
- HDD 400gb SSD partition
- OS OSX Yosemite
- GCC arm-linux-android-gcc (4.9)
- NDK r10e
- TOOLCHAIN arm-linux-androideabi-4.9
- GPU nvidia gtx970 (irrelevant)..
yes, it's a hackintosh.