Reply to topic

Script to Compile Krita & Karbon for You v1.1.2 -Oneiric Edn

User avatar Kubuntiac
Registered Member
Posts
769
Karma
2
OS
Finally! After many hours over many months, the build script I wish someone had given *me* when I started with Krita! My hope is that with 3 quick cut and paste operations and waiting for a bit, that you'll have a fresh-from-the-bleeding-edge-code version of Krita and Karbon installed on your system without having to know *any* compiling-fu. I want more *artists* and *hobbyists* using Krita, in addition to the coders!

So, without further ado, I give you the long awaited Calligra Builder Script v1.1.4 (Lcms Armageddon):


Features:
* Auto-updates itself (never download again!)
* Builds and updates the latest TRUNK (instant changes, bleeding-edge code) version of Krita and Karbon from Git
* Automatically uses all CPU cores to build as fast as possible (threads can be set manually with the _threads variable at the top).
* Tells you your version / commit number for when you report bugs (and you *are* going to report them, given you're running trunk... right? ;P )
* Designed for people who know nothing about compiling, should all just be copy, paste and go.
* Creates menu items on Gnome and KDE. Unity seems problematic, but apps can still be run direct from the bin folder mentioned when you run the script. (I'm open to supporting XFCE with some help)
* Installs dependencies on supported distros:

Supported Distro's:
Should compile on any distro if you install the dependencies yourself and set _autodependencies at the start of the script to false. On the following distro's the script will install them for you without changing a thing:
Tested (and worked last I checked):
  • (K)ubuntu 11.04-12.04 - Requires the Universe repository to be enabled
  • Mint 11
  • Fedora 15
  • OpenSUSE 11.04
  • Chakra

Not tested but I'm guessing it'll work:
  • Derivatives of the above distro's excepting versions of Linux Mint other than 11.
  • Other versions of Fedora
  • Other versions of openSUSE

Currently doesn't work:
  • Versions of Mint other than 11

Not tested. Probably doesn't work:
  • (K)ubuntu 10.04 - Missing lcms2-utils which is needed by Krita
  • Other distros not listed above (you can install your own dependencies and turn off autodependencies and the script should still do the rest for you)


To get your preferred distro supported just let me know the equivalent command to install *all* build dependencies for a package and be prepared to try the script with a vanilla install of the distro. :)


Known Issues:
* Users of Ubuntu 12.04 with FGLRX downloaded manually and installed may have problems compiling. These can be fixed by installing FGLRX from the Ubuntu repositories.
* Applications need to be run from the menu (under graphics) or by running the binary in ./calligra/calligra-inst/bin If you just type "krita" at the command line, it won't work.
* By default, the only major application the script builds is Krita and Karbon.
* Requires root password for installing dependencies and menu items on Gnome
* Older versions of *Ubuntu do not have lcms2, which Krita requires, breaking compiling. This will be fixed in a future (the next?) version of the script, by compiling those, too.

Troubleshooting:
  • If you are running a version of *ubuntu before 11.10, you need to find a PPA to install liblcms2-dev from.
  • Occasionally, there is something in the latest source code which doesn't compile. If you hit a problem, try waiting a few hours and trying again before reporting an issue here.
  • Sometimes, somewhere a long the way your install may get in a slightly broken state, due to no fault of the source code or this script. You can test this by deleting the contents inside the calligra/calligra-build/ folder and running the script again. Unless there is an obvious error message about something missing, this is always recommended before reporting problems here.



WARNING!
UNINSTALLS ALL PREVIOUS VERSIONS OF KOFFICE / CALLIGRA.
This is necessesary as they cause conflicts.

Run / Update:
1. In the command line, navigate to where you want Calligra installed and paste (ctrl+shift+V):
Code: Select all
wget http://krita.org/builder/calligra-creative_build-script.sh.tar.gz && tar -xzvf calligra-creative_build-script.sh.tar.gz && rm ./calligra-creative_build-script.sh.tar.gz

2. Run by typing the following (will take a long time, just the first time):
Code: Select all
./calligra-creative_build-script.sh

3. Update your install by repeating step 2 (much, much faster, especially when you update regularly).


Support comments for this version begin at:
This post. Please post the calligra-builder.log file along with what distro you're using (name, version and architecture eg Ubuntu 11.10, 64 bit)

Please help by:
Posting your art in the gallery here, when it works and when it doesn't posting the calligra-creative-builder.log file if you have a problem along with the version of the script (under the Calligra logo when you run it) and your distro version (eg OpenSuse 11.3, Fedora 14, Kubuntu 10.10 etc) and I'll add them to this post and eventually into the script itself. If you really want to say thanks, go pick yourself up a copy of the latest Krita training DVD from http://Krita.org ;P




Thanks to:
Boud for the updated instructions on getting the git goodness, bcooksley for last minute bugfix suggestions, my victims beta testers and all the people on #bash who answered all my questions patiently :)

Last edited by Kubuntiac on Thu Mar 22, 2012 4:17 am, edited 26 times in total.


Krita - All the cool kids are painting with it!
User avatar bcooksley
Administrator
Posts
18607
Karma
83
OS
I note that despite defining the tarball in the script, you never download it.

Also, all anongit's provide the tarball service now. If you find one with issues, please report it to KDE Sysadmin.

Additionally, you shouldn't pull from git:// on git.kde.org, but rather from anongit.kde.org. This reduces the load on KDE's infrastructure, although you may be up to 5 minutes out of date.

Sysadmin may firewall off access to git:// on git.kde.org at some point, allowing only the anongit's and other infrastructure to use it directly, which would break this script.

Finally, you should set your directories to be first, before existing system-wide directories, as otherwise system wide installations will override your locally installed components.


System Settings and Device Actions KCM maintainer
Image
User avatar Kubuntiac
Registered Member
Posts
769
Karma
2
OS
D'oh! Nice catch bcooksley!

After it taking an age to download the tar.gz the first time, I didn't feel like doing it again everytime I tested my script, so I took it out...and forgot to put it back in for the release! *facepalm*

Should be fixed now!


Krita - All the cool kids are painting with it!
User avatar bcooksley
Administrator
Posts
18607
Karma
83
OS
Did you see the other issues, especially those about tarball locations and git protocol access?


System Settings and Device Actions KCM maintainer
Image
User avatar Kubuntiac
Registered Member
Posts
769
Karma
2
OS
bcooksley wrote:I note that despite defining the tarball in the script, you never download it.


Fixed.

Also, all anongit's provide the tarball service now. If you find one with issues, please report it to KDE Sysadmin.

Additionally, you shouldn't pull from git:// on git.kde.org, but rather from anongit.kde.org. This reduces the load on KDE's infrastructure, although you may be up to 5 minutes out of date.

Um, the url it's pulling from is http://anongit1.kde.org/calligra/calligra-latest.tar.gz Isn't that at anongit as requested?

Finally, you should set your directories to be first, before existing system-wide directories, as otherwise system wide installations will override your locally installed components.


By this do you mean to set the export variables at the start?


Krita - All the cool kids are painting with it!
User avatar bcooksley
Administrator
Posts
18607
Karma
83
OS
Thanks for looking into these issues.

anongit1 is one of three anongit mirrors (anongit1, anongit2, anongit3). To spread the load among the three mirrors, I recommend using the form: http://anongit.kde.org/calligra/calligra-latest.tar.gz instead. This also means that if anongit1 goes down, your script will continue to work as anongit.kde.org will always point towards systems that are operational (or at least, should be)

With regards to the git:// access, I am referring to this line:
Code: Select all
git remote set-url origin git://git.kde.org/calligra


The environment variables i'm referring to are these ones:
Code: Select all
    export KDEDIRS=$(kde4-config --prefix)
    export KDEDIRS=$KDEDIRS:`pwd`
    export KDEDIR=$KDEDIRS
    export PATH=$PATH:`pwd`/bin
    export XDG_DATA_DIRS=$XDG_DATA_DIRS:`pwd`/share
    export XDG_DATA_HOME=$XDG_DATA_HOME:`pwd`/share


System Settings and Device Actions KCM maintainer
Image
User avatar Kubuntiac
Registered Member
Posts
769
Karma
2
OS
Soooo....

Code: Select all
git remote set-url git://anongit.kde.org/calligra/


Does that look right? This part was just adapted from boud's post on Krita.org, so I'm not familiar at all with the workings of git.kde.org... (or even git at all, really)

Thanks for your help with cleaning this up! I just tinkered until I had something that worked for me™. Hoping it can become something that works for everyone!


Krita - All the cool kids are painting with it!
User avatar bcooksley
Administrator
Posts
18607
Karma
83
OS
Yes, that's correct.


System Settings and Device Actions KCM maintainer
Image
User avatar Kubuntiac
Registered Member
Posts
769
Karma
2
OS
K. Thanks bcooksley! Updated with your suggestions and edited in the first post.


Krita - All the cool kids are painting with it!
valerievk
Registered Member
Posts
170
Karma
1
OS
Thank you so much for making a script for us! I still didn't manage to get it working, but it's still the furthest I've managed to achieve since Krita moved to git (I could compile it before, but since it moved to git I'm at a loss).

The compilation reached 50% and then stopped with a:

Linking CXX shared library ../../lib/libkoabstraction.so
/usr/bin/ld: cannot find -lwordsprivate
/usr/bin/ld: cannot find -lcalligratablescommon
collect2: ld returned 1 exit status
make[2]: *** [lib/libkoabstraction.so.8.0.0] Error 1
make[1]: *** [tools/koabstraction/CMakeFiles/koabstraction.dir/all] Error 2
make: *** [all] Error 2
Turbines to speed...

It's not the only part where there were errors, there were also:

/usr/bin/ld: cannot find -lcalligratablescommon
/usr/bin/ld: cannot find -lwordsprivate
collect2: ld returned 1 exit status
make[2]: *** [tools/cstester/cstester] Error 1
make[1]: *** [tools/cstester/CMakeFiles/cstester.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

[ 50%] Built target textshape
make: *** [all] Error 2

And so forth (I couldn't scroll to earlier).

So, any ideas as to what could be going on? Is it just a dependency problem?
User avatar Kubuntiac
Registered Member
Posts
769
Karma
2
OS
Hey Valeri!

Thanks for giving my script a try. It seems that some stuff was committed just in the last few days that is breaking compiling. Boud asked me to mention in to the folks over at #calligra on IRC, so hopefully it should be fixed soon. Just run the script occasionally and it should resolve itself. Also make sure that you're running at least version 0.8.3 of the script (just released a day or two ago) as there was a bug in 0.8.2 with setting stuff up the first time through.


Krita - All the cool kids are painting with it!
User avatar Kubuntiac
Registered Member
Posts
769
Karma
2
OS
It looks like whatever the problem was has been fixed. Just go in and delete everything inside the calligra/calligra-build folder, replace your build script with the new 0.8.4 version in the first post and you should be good to go.

Have fun and remember, we love seeing new entries posted in the Gallery! :D


Krita - All the cool kids are painting with it!
valerievk
Registered Member
Posts
170
Karma
1
OS
That was fast! Thank you! :) I've managed to compile Krita now! But I got a segmentation fault upon starting.

Executable: krita PID: 17664 Signal: 11 (Segmentation fault)


Log:

Application: Krita (krita), signal: Segmentation fault
[Current thread is 1 (Thread 0xb61bd720 (LWP 17770))]

Thread 2 (Thread 0xb5ea7b70 (LWP 17771)):
#0 0x009bd416 in __kernel_vsyscall ()
#1 0x054efdf6 in poll () from /lib/libc.so.6
#2 0x014b6a1b in g_poll () from /lib/libglib-2.0.so.0
#3 0x014a943c in ?? () from /lib/libglib-2.0.so.0
#4 0x014a9ba7 in g_main_loop_run () from /lib/libglib-2.0.so.0
#5 0x0536c6b4 in ?? () from /usr/lib/libgio-2.0.so.0
#6 0x014d048f in ?? () from /lib/libglib-2.0.so.0
#7 0x00b7cba8 in ?? () from /usr/lib/nvidia-current/libGL.so.1

Thread 1 (Thread 0xb61bd720 (LWP 17770)):
[KCrash Handler]
#7 0x0028680e in QObjectPrivate::deleteChildren() () from /usr/lib/libQtCore.so.4
#8 0x0028df30 in QObject::~QObject() () from /usr/lib/libQtCore.so.4
#9 0x002582ec in QPluginLoader::~QPluginLoader() () from /usr/lib/libQtCore.so.4
#10 0x0140714b in KPluginLoader::~KPluginLoader() () from /usr/lib/libkdecore.so.5
#11 0x0099cce5 in createInstance<QObject> (this=0xa13c398, serviceType=..., versionString=..., config=...) at /usr/include/kservice.h:542
#12 createInstance<QObject> (this=0xa13c398, serviceType=..., versionString=..., config=...) at /usr/include/kservice.h:509
#13 KoPluginLoader::load (this=0xa13c398, serviceType=..., versionString=..., config=...) at /home/valerie/Calligra/calligra/calligra-src/libs/koplugin/KoPluginLoader.cpp:120
#14 0x00803a9a in KisPaintOpRegistry::instance () at /home/valerie/Calligra/calligra/calligra-src/krita/image/brushengine/kis_paintop_registry.cc:62
#15 0x005bcf0d in KisFactory2::componentData () at /home/valerie/Calligra/calligra/calligra-src/krita/ui/kis_factory2.cc:118
#16 0x005bdb82 in KisFactory2::KisFactory2 (this=0xa124958, parent=0x0) at /home/valerie/Calligra/calligra/calligra-src/krita/ui/kis_factory2.cc:60
#17 0x00c8d723 in qt_plugin_instance () from /usr/lib/kde4/kritapart.so
#18 0x002581d4 in QPluginLoader::instance() () from /usr/lib/libQtCore.so.4
#19 0x01406b70 in KPluginLoader::factory() () from /usr/lib/libkdecore.so.5
#20 0x00a20bc8 in createInstance<KoDocument> (this=0xbfa85c64, errorMsg=0xbfa85c20, parent=0x0) at /usr/include/kservice.h:530
#21 createInstance<KoDocument> (this=0xbfa85c64, errorMsg=0xbfa85c20, parent=0x0) at /usr/include/kservice.h:509
#22 KoDocumentEntry::createDoc (this=0xbfa85c64, errorMsg=0xbfa85c20, parent=0x0) at /home/valerie/Calligra/calligra/calligra-src/libs/main/KoDocumentEntry.cpp:58
#23 0x00a0937a in KoApplication::start (this=0xbfa85cb0) at /home/valerie/Calligra/calligra/calligra-src/libs/main/KoApplication.cpp:140
#24 0x00cef6aa in kdemain (argc=1, argv=0xbfa85dc4) at /home/valerie/Calligra/calligra/calligra-src/krita/main.cc:46
#25 0x080487fb in main (argc=1, argv=0xbfa85dc4) at /home/valerie/Calligra/calligra/calligra-build/krita/krita_dummy.cpp:3

Is this a case of "I have to purge all traces of koffice before compiling Krita", or is it something else? Thanks! :)
User avatar Kubuntiac
Registered Member
Posts
769
Karma
2
OS
I find that the most common fix to these kind of things is to run kbuildsycoca4 in the terminal / konsole. Version 0.8.4 of the script should be doing that for you automatically though (unless you've rebooted, in which case just run the script again). What version are you running? (you can see at the top of the script, or if you run it it says just underneath the Calligra logo.)


Krita - All the cool kids are painting with it!
valerievk
Registered Member
Posts
170
Karma
1
OS
Hmm, I just tried running the script again (yes, 0.8.4). Same problem. I'll try it again later in case it's some other problem. Thanks! :)

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Exabot [Bot], Google [Bot], google01103, Hans, koriun, La Ninje, MSNbot Media, north, odysseus-art, pesto, SecretCode, Sentynel, Yahoo [Bot], z-uo