Reply to topic

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

User avatar API-Beast
Registered Member
Posts
24
Karma
0
OS
Ugh, that script is ugly. (Not ugly visually, but ugly technically)

Try the following two lines.
Code: Select all
echo "export KDEDIRS=\$KDEDIRS:\$HOME/source-to-compile/Krita/calligra/calligra-inst" >> ~/.profile
echo "export PATH=\$PATH:\$HOME/source-to-compile/Krita/calligra/calligra-inst/bin" >> ~/.profile


After that you need to login/logout once and then you should be able to start krita by typing "krita" into the console.

Last edited by API-Beast on Mon Feb 21, 2011 12:49 pm, edited 1 time in total.


Twitter: @API_Beast
User avatar API-Beast
Registered Member
Posts
24
Karma
0
OS
I now made an own script for setting up an build environment, and compiling krita/calligra.

http://pastebin.com/KkT9SvTs

It's quite simple:

calligrabuildsystem.sh setup - will setup the build environment and get the calligra source
calligrabuildsystem.sh build - will compile Krita
calligrabuildsystem.sh update - will update your repo to the newest version and compiles again

After the compilation you can run Krita simply by typing "krita" into the konsole. Or alternativly use the Krita item in the KMenu. No need for rerunning the script between multiple sessions.

Last edited by API-Beast on Mon Feb 21, 2011 12:49 pm, edited 1 time in total.


Twitter: @API_Beast
User avatar Animtim
Registered Member
Posts
254
Karma
0
OS
THank you Speel for the script. I'll probably use it if I become tired of doing it manually.

For the record I just switched to Debian Squeeze, Krita works very good on it (for what I've tried yet).
There is more missing optional dependencies in the repositories than in Ubuntu, like OpenGTL/libQtGtl, hopefully I could build/install 0.9.13 to get HDR support.

To Deevad: I can't much help, just to let you know on Ubuntu 10.10 you don't need updated libraries from kubuntu-ppa, I could build Krita without it. Also,once, I've tried to add this ppa to get newer version of libraries, thinking Krita would work better. but it didn't (I would even say it did the contrary..), so I did a ppa-purge to get back to distro packages, but then I couldn't launch any calligra apps, always had a "floating point exception error", that I could solve only by re-installing ubuntu (tried many things before, but with no luck).

EDIT: In the end back to Ubuntu 10.10 for now.. it works a little better than on Squeeze :P


User avatar Deevad
Registered Member
Posts
391
Karma
1
OS
@Spell: Thanks a lot ! it works ( the 2 'echo' lines ). I just try it now because I had a hard week.
[edit: I still use the build script of Kubuntiac. Your script looks good also, but when 'it works' it makes me affraid to try a different method ) ]

@Animtim: Good to know, thanks.


User avatar Deevad
Registered Member
Posts
391
Karma
1
OS
@kubuntiac : The script is broken here on Linux Mint 10.10 (maverick ) it ask to compile all calligra. I compiled yesterday without it and the precious help of Lukas. Maybe the script could be updated with the new flag introduced few time ago by Cyrille : 'CREATIVEONLY ' ?


User avatar Kubuntiac
Registered Member
Posts
786
Karma
2
OS
Hey Deevad,

Thanks for letting me know, and for the hint about Cyrille's new flag.

When you say it's broken, do you mean that because it doesn't compile at all, or because it compiles everything (and not just Krita)?

I'll take a look into it.


Krita - All the cool kids are painting with it!
User avatar Deevad
Registered Member
Posts
391
Karma
1
OS
Hi :)
In fact , it attempt to compile all, but for that it require a lot of libraries, and fail to build. So, sorry for my word 'broken' because it's not :)


User avatar Deevad
Registered Member
Posts
391
Karma
1
OS
Hi,
I added '-DCREATIVEONLY=ON' at the cmake option of the Kubuntiac script , and it made the script work again without asking me a lot of librairies for other calligra packages. Cool !Thanks Cyrille and Lukas on Irc for the help.

the line .103 look like this now :

Code: Select all
 cmake ../$_gitdir-src -DCREATIVEONLY=ON -DBUILD_words=$make_words -DBUILD_tables=$make_tables -DBUILD_stage=$make_stage  -DBUILD_kthesaurus=$make_kthesaurus -DBUILD_kexi=$make_kexi  -DBUILD_plan=$make_plan -DBUILD_flow=$make_flow -DBUILD_braindump=$make_braindump -DBUILD_krita=$make_krita -DBUILD_karbon=$make_karbon -DBUILD_koconverter=$make_koconverter -DCMAKE_INSTALL_PREFIX=../$_gitdir-inst -DBUILD_cstester=OFF -DBUILD_koabstraction=OFF -DBUILD_f-office=OFF -DCMAKE_BUILD_TYPE=RELWITHDEBINFO


User avatar YAFU
Registered Member
Posts
50
Karma
0
OS
Spell wrote:I now made an own script for setting up an build environment, and compiling krita/calligra.

http://pastebin.com/KkT9SvTs



Thanks for the script!

Could you modify the script to generate a simple package with Checkinstall instead of installing?

I do not know anything about programming, but I think that you should first add a line to install Checkinstall and then replace:

Code: Select all
make install -j$numThreads


For something like:

Code: Select all
checkinstall --pkgname=krita --pkgversion="`date +%Y%m%d-git`" --backup=no --default --deldoc=yes make install -j$numThreads


Thanks.
User avatar Kubuntiac
Registered Member
Posts
786
Karma
2
OS
An interesting idea... I'm kind of hesitant to put in by default as I'm really trying to make something that Just Works(tm) for everyone, and as far as I can see checkinstall only works on RPM / DEB / Slackware based systems. Granted this covers most people, but I'd rather the script didn't just break for everyone else.

If anyone who knows more about packaging / checkinstall than me (not hard) would like to add an opinion, I'd be curious to hear it.


Krita - All the cool kids are painting with it!
User avatar YAFU
Registered Member
Posts
50
Karma
0
OS
@Kubuntiac, I agree. The idea was to have a variant of the script, for example might be called: calligrabuildsystem_pkg.sh
Or include an option: calligrabuildsystem.sh buildpkg

Another issue. In the script appears to build deps:

Code: Select all
sudo apt-get build-dep koffice2 calligra


In Natty no packages called "koffice2" and "calligra". Should work only with:

Code: Select all
sudo apt-get build-dep koffice

?

Greetings.
User avatar Kubuntiac
Registered Member
Posts
786
Karma
2
OS
Good catch. I'm actually working on an updated version right now (a change in the naming format of calligras tarballs broke some stuff). I'll work this in, although it will probably have to be next week as this change depends on the distro being used. I'm adding in some distro dependant stuff at the sprint (ie auto-install of dependencies), but can't get around to it right now.

Thanks for the info, though. I'll put it to good use! :)


Krita - All the cool kids are painting with it!
User avatar YAFU
Registered Member
Posts
50
Karma
0
OS
Some considerations:

Checkinstall from [k]ubuntu Natty has a bug:
https://bugs.launchpad.net/ubuntu/+sour ... bug/599163

Workaround, edit "/etc/checkinstallrc" and change:
Code: Select all
TRANSLATE=1

for:
Code: Select all
TRANSLATE=0


I used Checkinstal in the script as I had previously mentioned. But I can not test if it generates the package because I get an error. It's similar to the error obtained by "valerievk" (Page 1)

Code: Select all
[ 53%] Building CXX object krita/image/CMakeFiles/kritaimage.dir/recorder/kis_recorded_node_action.o                       
Linking CXX executable calligramobile                                                                                       
[ 53%] Building CXX object krita/image/CMakeFiles/kritaimage.dir/recorder/kis_recorded_paint_action.o                       
/usr/bin/ld: cannot find -lkoabstraction                                                                                   
/usr/bin/ld: cannot find -lwordsprivate
/usr/bin/ld: cannot find -lcalligratablescommon
/usr/bin/ld: cannot find -lkoabstraction
/usr/bin/ld: cannot find -lwordsprivate
/usr/bin/ld: cannot find -lcalligratablescommon
collect2: ld returned 1 exit status
make[2]: *** [tools/mobile/calligramobile] Error 1
make[1]: *** [tools/mobile/CMakeFiles/calligramobile.dir/all] Error 2


I do not know if it is related to "calligramobile" but, is there any way to skip the building for "mobile " or "calligramobile?

Obviously I can not purge "everything that smelled of kde" as "valerievk" says (page 2). I am a Kubuntu user, not ubuntu :)

I'll try to see tomorrow if I find the solution.
User avatar YAFU
Registered Member
Posts
50
Karma
0
OS
Success!
I modified the script to not build the following items:
mobile, kpresenter, kplato, kformula

Code: Select all
        makeMobile=off
    makeKpresenter=off
        makeKplato=off
      makeKformula=off


Code: Select all
-DBUILD_mobile=$makeMobile -DBUILD_kpresenter=$makeKpresenter -DBUILD_kplato=$makeKplato -DBUILD_kformula=$makeKformula


The package was created in "~/Buildsystem/build/calligra/" and the line for this would be:

Code: Select all
checkinstall --pkgname=krita-git --pkgversion="`date +%Y%m%d-git`" --backup=no --default --deldoc=yes --fstrans=no make install -j$numThreads


"BUT".... I see the script install Krita on my home (/home/My_User/Buildsystem/inst), so that the package only works for me, and not to share. It would be nice to be installed in the system, root permissions will be needed. In fact, all these are assumptions and I don't know how it would be possible to create a simple package to share.

A small concern about "$numThreads". The formula usually I see is "cores+1" and the script uses "cores*cores" Anyway, I've replaced "numThreads=$(($numCores*$numCores))" for "numThreads=$(($numCores+1))".
I think in this way the CPU usage and the temperature decreased a bit, I'm not sure.

Greetings.
User avatar Kubuntiac
Registered Member
Posts
786
Karma
2
OS
Thanks YAFU. Some useful information there. I'll take it into account when I update the script next week. I have a vague memory of being told that the whole "checkinstall makes a package you can only use on your system" is the norm, and why there's more to packaging. I'm no packaging expert (by a long shot) though, so I may be remembering wrong... but I don't think I am :)


Krita - All the cool kids are painting with it!

 
Reply to topic

Bookmarks



Who is online

Registered users: albenson, alex_091, Baidu [Spider], Bing [Bot], Exabot [Bot], gfielding, Google [Bot], kappclark, oskark, philippv, smankowski, trickyricky26, Yahoo [Bot]