CompilingKoffice2
Caveats: This page describes the steps to take to compile Koffice2 (the unstable, development version of) KDE's Office & Creativity Suite. It assumes that you are running Kubuntu 9.10 (Karmic Koala). Currently it doesn't seem to work with Lucid because of packaging issues. These instructions may well work for earlier versions, and will probably work on Ubuntu / Xubuntu, but have not been tested. If you do, please update this page! It also assumes you have a vanilla (default) install of Kubuntu with none of the required packages. If you have any of these packages installed already however, it should still work fine.
Now, with the caveats out of the way, lets get started! By the way, if you just want a "copy and paste one command without understanding what I'm doing." type thing, just skip to the "Fasttrack" section at the end.
Installing the Necessary Packages & Creating Necessary Directories
Copy and paste the following into a Konsole / terminal (one line at a time): Note:
sudo apt-get build-dep koffice-kde4 sudo apt-get install subversion cmake-curses-gui libeigen2-dev libqimageblitz-dev libexiv2-dev mkdir ~/source mkdir ~/Apps mkdir ~/Apps/koffice mkdir ~/Apps/koffice/build mkdir ~/Apps/koffice/install
Get the Latest Source Code
This is why we love open source. You can just grab the latest code, whenever you want. No passwords. No fees. Get the Koffice code by copying and pasting the following into a Konsole / terminal (one line at a time):
cd ~/source svn co svn://anonsvn.kde.org/home/kde/trunk/koffice
Say Where Everything Is And Build It!
Got A Multi-Core CPU?: Speed things up by allowing 2 threads per core. Just change the third line below ("make") to "make -j " and then two times your number of cores. eg If you have a dual core the third line is "make -j 4", if you have a quad core it's "make -j 8", 8 core is "make -j 16" etc. If you're not sure, leave it how it is below!
cd ~/Apps/koffice/build cmake -DCMAKE_INSTALL_PREFIX=~/Apps/koffice/install ~/source/koffice -DCMAKE_BUILD_TYPE=RelWithDebInfo make make install
Run it!
Each time you reboot you'll either need to run:
cd ~/Apps/koffice/install/bin export KDEDIRS=$KDEDIRS:~/Apps/koffice/install export PATH=$PATH:~/Apps/koffice/install/bin export LD_LIBRARY_PATH=~/Apps/koffice/install:$LD_LIBRARY_PATH kbuildsycoca4
or (just once) permanently switch to the compiled version of Koffice by editing ~/.bashrc to add at the end:
export KDEDIRS=$KDEDIRS:~/Apps/koffice/install export PATH=$PATH:~/Apps/koffice/install/bin export LD_LIBRARY_PATH=~/Apps/koffice/install:$LD_LIBRARY_PATH
You can run any app by going to ~/Apps/koffice/install/bin and typing (in the Konsole / Terminal) ./krita or ./karbon or ./kword or ./kspread and so on (ie ./{appname}.)
Enjoy!
Updating to the Latest and Greatest
You can update anytime, by copying and pasting in the Konsole / terminal:
cd ~/source/koffice && svn up && cd ~/Apps/koffice/build && make install
Troubleshooting
If you're getting a crash either on first opening a Koffice app, or just after you choose to open / create a file, there's a good chance you just need to run kbuildsycoca4 in the command line one more time. From time to time this may need to be repeated.
Fasttrack: All the Above in One Copy & Paste Command
Note: This version will only use one core of your computer and may take longer to compile than the version above where you enter the right value for you.
sudo apt-get build-dep koffice-kde4 && sudo apt-get install subversion cmake-curses-gui && mkdir ~/source && mkdir ~/Apps && mkdir ~/Apps/koffice && mkdir ~/Apps/koffice/build && mkdir ~/Apps/koffice/install && cd ~/source && svn co svn://anonsvn.kde.org/home/kde/trunk/koffice && cd ~/Apps/build && cmake -DCMAKE_INSTALL_PREFIX=~/Apps/koffice/install mkdir ~/source/koffice && make && make install && cd ~/Apps/koffice/install/bin && export KDEDIRS=$KDEDIRS:~/Apps/koffice/install && export PATH=$PATH:~/Apps/koffice/install/bin && kbuildsycoca4
CompilingKoffice2 (last edited 2010-02-23 23:35:41 by 65)