Donnerstag, 21. Januar 2016

Building Cantor From Git

And why it took me 24x longer than it was meant to

A task I had to do is to build any KDE application from git. As I have mostly worked with Cantor (and even written a blogpost about it) I of course chose this app. As a beginner, compared to other people in the KDE community I had no clue where to download the Cantor source. One question in the Telegram group and I directly got the git link.

From there on, I faced multiple problems I didn't expect.I just installed openSUSE on a virtual machine, so I realized that the software I needed wasn't even preinstalled. I though that git would have been enough popular to be installed directly when getting linux...

I even didn't know where to get git from, apart from the internet. People told me there is a 'software manager' (Yes I'm really a beginner).
So after some research, I found it, got git and cloned the Cantor source – just the very first step of everything. Reading the README for what I had to do then, I thought that it was pretty simple - 5 easy commands!

I just again got errors from the commands that some necessary packages and programs weren't installed like CMake and some other related stuff. Those errors said what is missing – but by the name the errors called it, it wasn't existing in the software manager. After asking the KDE community again, I found out that the names of the packages differ between the linux system used – but the errors don't.
Finding the needed packages and installing all those 'necessary things' took me so long. But (taking me 3 days) I managed to do it, so here to full instruction on building Cantor, and any other KDE application from git on openSUSE:

sudo zypper install git

git clone  git://

cd Cantor

Then follow the commands in the README:

mkdir build
(creates build directory)
cd build

(locate into it)
For the next step you will need to go to your software manager YaST2 and search for and install the following:
(-cmake gui if you want, but not necessary)
-extra cmake modules (ecm)
Then you can keep going:

cmake-DCMAKE_INSTALL_PREFIX=/Another/directory /where/tohave/thefinished/program -DCMAKE_BUILD_TYPE=debugfull

Those are the final two commands:

sudo make install

Keep in mind that sudo gives you administrator permissions and you will have to type in the root password.

And that was it! You can now jsut locate to the directory you set in the cmake -DCMAKE_INSTALL_PREFIX command and start Cantor!

This beginner task is meant to be 'done in 3 hours' – Google. Well, I guess this evaluation might be for more experienced linux users because altogether it took me like 3 days :(.
I was really happy when everything worked: I could just start the program and use this comfortable environment: Because with Cantor, there is no need for setting up some other graphic libraries or something like that. You just type in the few command lines, press the button and everything works :) .

Although I felt like an idiot, not knowing basics of linux (whole life usage of windows) I feel that I'm getting used to it and am glad I accepted this task as it teaches me working with this OS.


  1. ok if you want to learn...
    we already build cantor from git in kde unstable repo

    so look in spec after buildrequires to see what deps are needed
    look into /etc/rpm/macros.* to see what some of the % macros mean.

  2. Getting any program to compile is always time consuming. Did you know, you can use "zypper source-install -d package_name" to install all required packages for building. Usually this saves a lot of time.

    1. Oh wow, yes this really would have saved me a lot of time...
      Thanks, I will know for the future now :)

  3. Cheers - remember that the target is the goal and that you've successfully accomplished it by yourself (the most important part imho!).

    Don't think about the 3 days. You've not only learned a lot during the way (what most people think is most important), but - and this is for me the far more important thing: You've learned it by yourself and achieved your goal without giving up or let someone else do the hard work :)

    Keep it up! :)