We have moved to a new Sailfish OS Forum. Please start new discussions there.

how to build sailfish-office

asked 2015-01-26 18:33:00 +0300

simonschmeisser gravatar image

updated 2015-02-13 14:30:37 +0300

Jare gravatar image

I would like to contribute some features to sailfish-office (the pdf viewer plugin). So here is how far I progressed on the way, this might apply to eg the sailfish-browser as well

  1. Find the source https://github.com/sailfishos/sailfish-office

  2. fork/clone it

  3. create a checkout (of your fork)

     git clone git@github.com:sailfishos/sailfish-office.git 
  4. open some (new/placeholder) project in the sailfish IDE

  5. start the SDK

  6. ssh into the SDK login in to the mer sdk as user "mersdk":

    ssh -p 2222 -i ~/SailfishOS/vmshare/ssh/private_keys/engine/mersdk mersdk@localhost

  7. go to the checkout dir (your home dir is mounted in ~/share/)

    cd ~/share/path/to/the/code/sailfish-office/

  8. try compiling an rpm

    For the emulator:

    mb2 -t SailfishOS-i486 -s rpm/sailfish-office.spec build 

    For your device:

    mb2 -t SailfishOS-armv7hl -s rpm/sailfish-office.spec build 
  9. Notice missing dependencies

[mersdk@SailfishSDK sailfish-office]$ mb2 -t SailfishOS-i486 -s rpm/sailfish-office.spec build
Package 'libjollasignonuiservice-qt5-devel' not found.
Building target platforms: i486-meego-linux-gnu
Building for target i486-meego-linux-gnu
error: Failed build dependencies:
        libqt5sparql-devel is needed by sailfish-office-1.1.5-1.i486
        poppler-qt5-devel is needed by sailfish-office-1.1.5-1.i486
        poppler-qt5 is needed by sailfish-office-1.1.5-1.i486
        poppler-devel is needed by sailfish-office-1.1.5-1.i486
        cmake is needed by sailfish-office-1.1.5-1.i486
        libjollasignonuiservice-qt5-devel is needed by sailfish-office-1.1.5-1.i486 
  1. install dependencies

    sb2 -t SailfishOS-i486 -m sdk-install -R zypper install cmake poppler-qt5-devel libqt5sparql-devel
  2. compile rpm

mb2 -t SailfishOS-i486 -s rpm/sailfish-office.spec build
  1. copy to Emulator Start the Emulator VM from the IDE. I couldn't manage to use scp or share a folder to the VM, so I use a http server and curl

put the rpm (you can find it in subdir RPMS of your sourcedir) on some webserver (python -m SimpleHTTPServer 8081)

ssh to the Emulator

ssh  -p 2223 -i ~/SailfishOS/vmshare/ssh/private_keys/SailfishOS_Emulator/root root@localhost
Download the package:
curl your_LAN_ip:8081/sailfish-office-1.1.5-1.i486.rpm >> sailfish-office.rpm
[root@SailfishEmul nemo]# rpm -i sailfish-office.rpm 
error: Failed dependencies:
    calligra-components >= 2.7.9+git4 is needed by sailfish-office-1.1.5-1.i486
    calligra-filters >= 2.7.9+git4 is needed by sailfish-office-1.1.5-1.i486
    libpoppler-qt5.so.1 is needed by sailfish-office-1.1.5-1.i486
    sailfish-office-all-translations is needed by sailfish-office-1.1.5-1.i486
pkcon install zypper
zypper in poppler-qt5

Remaining Problems - Need help from Jolla

[root@SailfishEmul nemo]# rpm -i -f sailfish-office.rpm 
error: Failed dependencies:
    calligra-components >= 2.7.9+git4 is needed by sailfish-office-1.1.5-1.i486
    calligra-filters >= 2.7.9+git4 is needed by sailfish-office-1.1.5-1.i486
    sailfish-office-all-translations is needed by sailfish-office-1.1.5-1.i486

Missing Calligra packages in emulator

[root@SailfishEmul nemo]# zypper se calligra
Loading repository data...
Reading installed packages...

S | Name                                     | Summary                                                | Type      
  | calligra-extra-cmake-modules             | Extra CMake modules for Calligra                       | package   
  | calligra-extra-cmake-modules             | Extra CMake modules for Calligra                       | srcpackage
  | calligra-extra-cmake-modules-debugsource | Debug sources for package calligra-extra-cmake-modules | package

So I propably need to add some extra repositories to the emulator? Or maybe the calligra packages need to be added to the repository?

Translations rpm

How do I build the translations rpm? Comment it out/ignore it using rpm --nodeps?

Manuall compilation

mkdir build
cd build
sb2 -t SailfishOS-i486 cmake ../sailfish-office/



How to install packages:



  1. test rpm on emulator
  2. create arm packages to test on device
  3. use open build service to create packages
  4. setup an openrepo for the build from open build service ?
  5. cleanup of this wannabe guide

Can anyone help? @Jolla could someone provide the missing package? I will update this entry as I/we progress

edit retag flag offensive close delete



Great initiative, thanks. Personally i want to see support for password protected files. :) Perhaps you could also post it on IRC and mailing list for better dev. visibility?

anandrkris ( 2015-01-27 04:00:59 +0300 )edit

@simonschmeisser - That's strange since we have received couple of contributions from community so far. I quicly checked the code and sounds like this dependency is not needed at all, I'll look into in later, but in the meantime you can be currently version but removing the references to it:

  • In the spec file inside rpm folder, two references at top (buildrequires and Requires)
  • in the CmakeList file, 3 references
  • the include inside sailfishapplication.cpp
VDVsx ( 2015-02-07 16:02:17 +0300 )edit

@VDVsx: Same problem here. sailfish-office definitely depends on org.kde.calligra module, but it is unclear how to install this dependency. Could you please provide some pointers how to install calligra module?

enikulenkov ( 2015-10-23 03:28:42 +0300 )edit

1 Answer

Sort by » oldest newest most voted

answered 2015-02-09 17:28:26 +0300

VDVsx gravatar image

it's fixed now on github: https://github.com/sailfishos/sailfish-office/commit/c3a557496fb8eb53294dca807f9dd584dd16234b

edit flag offensive delete publish link more


thanks a lot, should have had a look at the code and fix it myself

simonschmeisser ( 2015-02-09 17:39:32 +0300 )edit

@simonschmeisser > Am closing this topic.Hope it is fine with you.

anandrkris ( 2015-02-12 08:03:18 +0300 )edit

@anandrkris I still haven't seen the code running, still need some packages and help from you, so No, it's not fine with me and I'll reopen it :)

simonschmeisser ( 2015-02-12 10:25:09 +0300 )edit

@simonschmeisser - What's the issue now ?

VDVsx ( 2015-02-12 10:26:59 +0300 )edit

@VDVsx I have editet the original post to highlight it more, I cannot install the package in the emulator due to missing calligra packages and also due to a dependency on a translations rpm (which I could easily comment out in the spec).

Thanks for helping :)

simonschmeisser ( 2015-02-12 13:12:34 +0300 )edit
Login/Signup to Answer

Question tools



Asked: 2015-01-26 18:33:00 +0300

Seen: 2,416 times

Last updated: Feb 12 '15