libtorrent-rasterbar.so - file very large (60mb+)

448 views Asked by At

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:

  1. CPU i7 4770k
  2. MEM 16gb 2133mhz
  3. HDD 400gb SSD partition
  4. OS OSX Yosemite
  5. GCC arm-linux-android-gcc (4.9)
  6. NDK r10e
  7. TOOLCHAIN arm-linux-androideabi-4.9
  8. GPU nvidia gtx970 (irrelevant)..

yes, it's a hackintosh.

0

There are 0 answers