Collabora Android Build

Hello,

I am trying to build Collabora from source for Android. I’ve built the LibreOffice core for armeabi-v7a and arm64-v8a successfully and built the corresponding collabora application versions using the LO core. But when I use the application, I notice a few problems:

  • The text is not visible, although the document is loaded properly
  • The application crashes when I try to open a second document. The first document open goes well, I close the document and on the second try the app crashes with error:
    A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x28 in tid 9171 (kitbroker_002), pid 3246 (main)

I am using the master branches from both collabora-online and libre-office core and ndk 20.0.5594570.
Am I doing something wrong, or am I missing something?
I see the APK from the play store works correctly, so there must be something causing this problem.

Thank you in advance.
Regards

1 Like

Hello, danielID! Did you manage to cope with the problem? Please, write me to email immortalalexsan@mail.ru. I have similar problem…

Hi,

Yes, I did manage to resolve the problem. It turned out it was caused by using the outdated documentation on the collabora website. Try using this content in your autogen file

 --build=x86_64-unknown-linux-gnu
--with-jdk-home=/usr/lib/jvm/java-11-openjdk-amd64/
--with-android-ndk=/home/$USER/Android/Sdk/ndk-bundle
--with-android-sdk=/home/$USER/Android/Sdk
--with-distro=CPAndroid
--enable-sal-log

The important option is “–with-distro=CPAndroid”. In the documentation it was --with-distro=LibreOfficeAndroid. Checkout cp-6.4 branch and build from there.

This worked for me, I hope it helps you.

Regards
.

1 Like

Hello! DanielD! I have the same problem as you, should we switch CollaboraOnline to the 6.4 branch for compilation?

It should work with Collabora master, as well, the LibreOffice distro is the more important part. But if you are having problems with the master branch on Collabora, switch to branch 6.4 and build rom there.

1 Like

My LibreOffice core has been compiled and is working properly. It can also be debugged in AndroidStudio. The configuration for compiling LibreOffice core autogen.input is as follows:

--with-distro=LibreOfficeAndroid
--with-android-sdk={user}/Android/Sdk
--with-android-ndk={user}/Android/Sdk/ndk/20.1.5948944
--with-jdk-home=/usr/lib/jvm/java-11-openjdk-amd64
--enable-android-editing
--enable-odk
--with-build-platform-configure-options=--without-system-libxml
--with-external-tar=/LibreOffice/lo-externalsrc

So when I compiled CollaboraOffice Android, I switched the branch to CP-6.4.10-1 and the NDK configuration was also 20.1.5948944, the latest version for POCOs. The switch to POCO-1.10.1 has not been made as stated in the official documentation. Please let me know if POCO will be switched to the POCO-1.10.1 branch, whether CollaboraOffice Android is CP-6.4.10-1, Does the NDK version need to be consistent with LibreOffice Core? Thank you very much!

Not sure about the NDK, I used the ndk-bundle from Android studio to build LibreOffice and then used the same for building Collabora.
For POCO I built from the ‘poco-1.10.1’ branch, as stated in the Build for Android instructions

I hope this helps :slight_smile:

1 Like

I have compiled the CollaboraOffice CP-6.4 branch based on this article. Currently, I have seen many branches of CollaboraOffice CP-6.4. Which branch did you successfully build on?


Thank you very much!

I have successfully compiled it from ‘master’ branch

1 Like

Much!!! The package I compiled from the master branch is flashback. Could you please help me to check whether there is a problem with my configuration?

./configure  --enable-androidapp \
--with-lo-builddir=/LibreOffice/core-armv7 \
--with-poco-includes=/opt/poco-android/include \
--with-poco-libs=/opt/poco-android/lib \
CC={user}/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang \
CXX={user}/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang++ \
--host=arm-linux-androideabi  \
--disable-setcap --enable-silent-rules  --enable-debug

This is my configuration for building 32 bit and 64 bit version of Collabora

.

/autogen.sh && ./configure \
CC=~/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang \
CXX=~/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang++ \
--host=arm-linux-androideabi --enable-androidapp \
--with-lo-builddir=/home/{user}/Desktop/libreoffice/core:/home/{user}/Desktop/libre-64 \
--with-poco-includes=/opt/poco-android/include:/opt/poco-android-64bit/include \
--with-poco-libs=/opt/poco-android/lib:/opt/poco-android-64bit/lib \
--disable-setcap --enable-silent-rules --enable-debug

I don’t see anything wrong in your config but from my experience it might be something with the NDK version, although I am not sure.

1 Like

I also assumed that it was related to the NDK version. I tried using the default NDK version in AndroidStudio. I downgraded Node.js to
V10.15.2, will it have any effect? I made the changes based on the README file on GitHub.

I don’t think downgrading Node.js will have any effect (I didn’t have to do that). I’d try installing ndk-bundle from Android Studio and use that for compiling Collabora. If that fails, maybe recompile the whole LibreOffice with it and try again. Really not sure how and if that will help, but it’s worth a try. Maybe use the configurations I provided and hopefully it will work for you too.

1 Like

OK, thank you very much!

Hello! DanielD! Sorry to trouble you again. After last communication, I recompiled LibreOffice core, but it still failed during compilation. My autogen.input configuration is as follows:

--build=x86_64-unknown-linux-gnu
--with-jdk-home=/usr/lib/jvm/java-11-openjdk-amd64
--with-android-ndk=/home/$USER/Android/Sdk/ndk-bundle
--with-android-sdk=/home/$USER/Android/Sdk
--with-distro=CPAndroid
--enable-sal-log

Execution ./autogen.sh&make error as follows:

Could you please share your configuration “autogen. input” information with me?
Looking forward to your reply!

Hi,
No worries. Sorry to hear you are still having problems with it.
I am not sure what’s causing this error, I haven’t encountered it before. Here’s my autogen.input, I hope it helps (this one is for building the 64-bit version):

--build=x86_64-unknown-linux-gnu
--with-jdk-home=/usr/lib/jvm/java-11-openjdk-amd64/
--with-android-ndk=/home/$USER/Android/Sdk/ndk/android-ndk-r20b
--with-android-sdk=/home/$USER/Android/Sdk
--with-distro=CPAndroidAarch64
--enable-sal-log

Can you share the AndroidStudio version with me?

Of course, here you go:
Capture

Can you give me your contact information? Where are you from?

Sorry, but I don’t see how my contact information or country are relevant.