The LibreOffice FOSDEM HackFest is no exception; Markus even brought a MacMini with a Linux VM to provide even more building power.
The problem was that I decided to hack on Android-related stuff; and the setup for Icecream was something that I had on my TODO, never achieved, and now it became really paiful. There was a small problem that was confusing me for a while, but finally I have a how-to!
- Make sure you have a recent enough repo that contains this fix
- Create cross-compile package for your environment like this (adapt the paths of course):
/usr/lib/icecc/icecc-create-env --gcc /local/libreoffice/android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc /local/libreoffice/android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ - icecc-create-env will create a tarball with a hash instead of a readable name, rename it to something sensible, let's say
/local/libreoffice/android/arm-linux-androideabi-4.9.tar.gz - Find out how exactly is the compiler called. Just do ./autogen.sh > .log 2>& .log, and search for arm-linux-androideabi-gcc and arm-linux-androideabi-g++. You will need it with all the options that are there, it is quite a long command line!
- Modify your autogen.input to start like (we'll:
CC=icecc [the_command_line_with_options_for_arm-linux-androideabi-gcc]
CXX=icecc [the_command_line_with_options_for_arm-linux-androideabi-g++]
--with-parallelism=10
--enable-icecream
export ICECC_VERSION=/local/libreoffice/android/arm-linux-androideabi-4.9.tar.gz
start the build:
./autogen.sh
make
and enjoy the lightning fast compilation for Android! :-)
Update: Since this commit, it is not necessary to set the ICECC_VERSION in every env any more, the one from the ./autogen.sh time is preserved - it has to be in sync with CC/CXX setting anyway. In other words, you can just add ICECC_VERSION to autogen.input the same way you have added CC/CXX there:
CC=icecc [the_command_line_with_options_for_arm-linux-androideabi-gcc]
CXX=icecc [the_command_line_with_options_for_arm-linux-androideabi-g++]
ICECC_VERSION=/path/to/the/tarball
--with-parallelism=10
--enable-icecream
...your other options...
Hello,
ReplyDeleteI am trying to create sdk of libreoffice for one of my projects. I have make the project successfully using old method but while running on android device the app is crashing as it is trying to access a file present in root folder of device while opening a document. But it is working fine in emulator. Can you help me here in this?