Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Howto: DO_NOT_COMPILE for KDE ebuilds! (Super light KDE)
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
Marctraider
Guru
Guru


Joined: 24 Dec 2003
Posts: 387

PostPosted: Thu Jun 10, 2004 10:41 pm    Post subject: Howto: DO_NOT_COMPILE for KDE ebuilds! (Super light KDE) Reply with quote

----------------------------------------------------------------------------------
Before you read this: this has been tested with KDEBASE only, and this how-to was actually for low end systems with lower memory and slow processors so users could benefit from kde apps in the way i did this. Now i re-wrote the how-to and all users can benefit :)

Oh and: this how-to seems difficult but its actually very easy, just a little much explanations.
----------------------------------------------------------------------------------

(READ THE IMPORTANT NOTE AT THE END OF THE HOWTO!)

I really like kde(base) and some stuff of it, but for example kdebase still seems to much bloated, what i mean with that is that some things dont actually belong in the core or 'base' of kde, i mean...

is ksplashml required to start kde? no way.
Is konsole mandatory? cerainly not. (xterm is sufficient :)
What about kscreensaver? what is there to save?
Do we need kpersonalizer? where the heck is kcontrol for?

etc etc and so on...

Now i found a good way to shrink kde's packages, especially for low-end systems or just if you dont want all the unnecessary stuff, and it would be good to settle this once and for all with a how-to.

There are several ways to check what programs can be excluded from certain packages.

1. First look here:
http://webcvs.kde.org/cgi-bin/cvsweb.cgi/

As you can see, there are many directories that are actually named after the packages from kde. in these directories you can find a 'README'.
Open it and you will follow a hyperlink, here are the available versions of README's, ofcourse i assume you take the lastest version, click on download.
Most browsers will open the readme by then, in the readme you should see a full list of available 'programs' you can exclude from the package/ebuild directory you went into.

2. Go and emerge for example 'kdebase' and wait until its done ./configure 'ing.
You should also see a list of what will be compiled, they are default specified as 'yes'
Ok, now go and ctrl+c the emerge to break off the emerge and now you will also know what programs you can exclude.

Before we emerge, we need to specify the DO_NOT_COMPILE="prog1 prog2 prog3" variable before the emerge 'package' command in the command line.


For kdebase (thats the only package i use for my kde :) i used the following:

Code:
 DO_NOT_COMPILE="debian doc drkonqi kappfinder kate kcheckpass kdebugdialog kdeprint kdesu kdm kfind khelpcenter khotkeys kicker klipper kmenuedit konsole kpager kpersonalizer krichtexteditor kscreensaver kdepasswd ksysguard ktip kxkb nsplugins kreadconfig kdialog kstart ksystraycmd l10n legacyimport ksplashml kwin pics" emerge kdebase


This gave me the following:
- kdesktop with icons
- kcontrol (settings for kde/qt programs)
- kioslave (could be handy:)
- konqueror (much faster now)
- and probably some other things

- a less then half the original kdebase size (8~Mb instead of 20~Mb both tbz2'ed)

Since i use xfwm4 (which is much faster then kwin imho) and since i use gnome's panels and toolbars i excluded kwin and kicker :)

Now i use a bunch of this and that to get my desktop look nice, to run this all i use the .xinitrc file in ~/.xinitrc, you might have to create it:

Code:

gnome-panel &
kdesktop &
exec xfwm4


Please be warned that some programs can cause compile errors and eventually stop compiling if they are excluded, from my experience these packages may not be excluded from kdebase:

- ksmserver
- konqlib (even if you are not gonna use konqueror and put it in DO_NOT_COMPILE)
- applnk (for some reasons dont use it, kde's icons will do weird everywhere)
- kcontrol
- kioslave (i'm not sure but it looks to me its mandatory, please let me know if it isnt and what the results are)


You should experiment if you get compile errors, probably you used a program in DO_NOT_COMPILE that is needed, please be kind and tell me so i can edit the how-to.

This all has been tested on a Toshiba Satellite Pro 480CDT with the above example of mine.
CFLAGS="-march=pentium-mmx -O2 -fomit-frame-pointer -ftracer -ffast-math -pipe"

-----------------------
IMPORTANT NOTE
-----------------------

We discovered that you must WAIT with appying the DO_NOT_COMPILE variable to ebuilds until all depencencies,ghostscript,openmotif,arts,qt,kdelibs are emerged.

Since if you use it (for example) with kdebase and you never had something from kde emerged before, it will apply on ALL depencencies like kdelibs. (kdelibs has some package names that kdebase also has)

This also means you must not put the DO_NOT_COMPILE variable in make.conf, because that will also effect ALL kde packages.
The best way is to:

Code:
emerge kdebase


and if it finally emerges kdebase, ctrl+c to abort the compilation, and at THIS point use the DO_NOT_COMPILE="xxx xxx xxx" flag to apply them on kdebase. and further packages after kdebase.
_________________
MOBO: Maximus II Gene
RAM: DDR2 OCZ 4GB
CPU: E6400 Conroe
GPU: HD2600XT
SATA: 3x 250GB.


Last edited by Marctraider on Thu Oct 21, 2004 11:13 pm; edited 12 times in total
Back to top
View user's profile Send private message
curtis119
Bodhisattva
Bodhisattva


Joined: 10 Mar 2003
Posts: 2160
Location: Toledo, Ohio,USA, North America, Earth, SOL System, Milky Way, The Universe, The Cosmos, and Beyond.

PostPosted: Thu Jun 10, 2004 11:49 pm    Post subject: Reply with quote

Bless you my child. :D

best kde tip ever.
_________________
Gentoo: it's like wiping your ass with silk.
Back to top
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2995
Location: Bay Area, CA

PostPosted: Fri Jun 11, 2004 6:36 am    Post subject: Reply with quote

this is for those who say KDE can't be light...kde CAN BE superlight...thanks dude!!
Back to top
View user's profile Send private message
Marctraider
Guru
Guru


Joined: 24 Dec 2003
Posts: 387

PostPosted: Fri Jun 11, 2004 11:24 am    Post subject: Reply with quote

It sure is great!
I tried to slim down kdelibs but there is not much to slim down there, and this package leads to errors in no-time.
I didnt try other packages so you have to try them yourself!
If you encounter a message you can most probably see what is bugging it.
From there you can conclude what program is mandatory and must be removed from the DO_NOT_COMPILE line.

Good luck to you all :)
_________________
MOBO: Maximus II Gene
RAM: DDR2 OCZ 4GB
CPU: E6400 Conroe
GPU: HD2600XT
SATA: 3x 250GB.
Back to top
View user's profile Send private message
BlindSpy
Apprentice
Apprentice


Joined: 20 Mar 2004
Posts: 263

PostPosted: Fri Jun 11, 2004 3:37 pm    Post subject: Reply with quote

This is an awesome tip! to tell you the truth i hate kde as a dm but its prgrams are great (tho i only use a select few of them). This will allow me to install only the kde stuff i want and not take up all the space that it used to. =) thanks a lot
Back to top
View user's profile Send private message
Marctraider
Guru
Guru


Joined: 24 Dec 2003
Posts: 387

PostPosted: Fri Jun 11, 2004 4:33 pm    Post subject: Reply with quote

I posted a screenshot of how functional it still is, this is done with my progs in the do_not_compile variable:

http://members.lycos.co.uk/TheBlackVortex/pic.jpg

The Mac OS bar can be applied with kcontrol, the little filemanager is rox.
just emerge it, now i dont have konqueror anymore, and it doesnt know how to open things anymore.
For example 'trash', it asks where to open it with, well if you specify 'rox' as executable and check 'Remember application associations for this file of type' or something equivalent it will always open such things with Rox instead of konqueror!
_________________
MOBO: Maximus II Gene
RAM: DDR2 OCZ 4GB
CPU: E6400 Conroe
GPU: HD2600XT
SATA: 3x 250GB.
Back to top
View user's profile Send private message
BlindSpy
Apprentice
Apprentice


Joined: 20 Mar 2004
Posts: 263

PostPosted: Sat Jun 12, 2004 8:14 pm    Post subject: Reply with quote

I tried moving away from all kde progs last night (use rox) and i just couldnt do it. Konqueror, i think, is the best file browswer out there. Too bad they dont distribute that stand alone.

that screenie looks awesome tho.
Back to top
View user's profile Send private message
Marctraider
Guru
Guru


Joined: 24 Dec 2003
Posts: 387

PostPosted: Sun Jun 13, 2004 10:53 am    Post subject: Reply with quote

Mine work :) but you must use it for kdebase only. if you want something that i have in my DO_NOT_COMPILE flags just delete it.
_________________
MOBO: Maximus II Gene
RAM: DDR2 OCZ 4GB
CPU: E6400 Conroe
GPU: HD2600XT
SATA: 3x 250GB.
Back to top
View user's profile Send private message
michael_llewellyn
n00b
n00b


Joined: 13 May 2004
Posts: 32

PostPosted: Sun Jun 13, 2004 11:22 am    Post subject: Reply with quote

Is there any performance gain from this or does it just cut down on compile time?
Back to top
View user's profile Send private message
Marctraider
Guru
Guru


Joined: 24 Dec 2003
Posts: 387

PostPosted: Sun Jun 13, 2004 2:44 pm    Post subject: Reply with quote

Well for me on my 233mhz it sure is a performance gain. And also more free memory.
_________________
MOBO: Maximus II Gene
RAM: DDR2 OCZ 4GB
CPU: E6400 Conroe
GPU: HD2600XT
SATA: 3x 250GB.
Back to top
View user's profile Send private message
p0w4h
n00b
n00b


Joined: 12 Jun 2004
Posts: 2
Location: Gouda, The Netherlands

PostPosted: Sun Jun 13, 2004 3:04 pm    Post subject: Reply with quote

wow.. nice done boy ! 8)
hope your system runs nice and soft. keep the good mood up :D
Back to top
View user's profile Send private message
Marctraider
Guru
Guru


Joined: 24 Dec 2003
Posts: 387

PostPosted: Sun Jun 13, 2004 3:32 pm    Post subject: Reply with quote

Quote:

_________________
MOBO: Maximus II Gene
RAM: DDR2 OCZ 4GB
CPU: E6400 Conroe
GPU: HD2600XT
SATA: 3x 250GB.


Last edited by Marctraider on Mon Jul 19, 2004 3:56 pm; edited 1 time in total
Back to top
View user's profile Send private message
BlindSpy
Apprentice
Apprentice


Joined: 20 Mar 2004
Posts: 263

PostPosted: Mon Jun 14, 2004 1:24 am    Post subject: Reply with quote

I'm just wondering if every possible package to not install was shown in the example. Like: is that all the things you can DO_NOT_COMPILE that you have shown?
Back to top
View user's profile Send private message
Marctraider
Guru
Guru


Joined: 24 Dec 2003
Posts: 387

PostPosted: Tue Jun 15, 2004 12:40 pm    Post subject: Reply with quote

Well almost everything for kdebase, but as showen in the how-to, you can figure out your own things you dont want, not only with kdebase, but also with other mutimedia packages.
_________________
MOBO: Maximus II Gene
RAM: DDR2 OCZ 4GB
CPU: E6400 Conroe
GPU: HD2600XT
SATA: 3x 250GB.
Back to top
View user's profile Send private message
thepi
Guru
Guru


Joined: 06 Jan 2004
Posts: 352
Location: Tokyo, Japan

PostPosted: Mon Jun 28, 2004 6:00 pm    Post subject: Reply with quote

nice tip, although it didn't work for me at first

as i didn't want to retype all packet names i saved them to a file (the ones i didn't want).
then i used
Code:
bash # DO_NOT_COMPILE="$(cat packlist.txt)" emerge kdebase
.

as you can imagine i was surprised that the full kdebase was built anyway. it turns out you have to write
Code:
bash # DO_NOT_COMPILE="$(cat packlist.txt)"; emerge kdebase


i did some tests, the ; seems to be obligatory for the flags to take effect.

pi~
_________________
Violence is the last resort of the incompetent --Isaac Asimov
Gentoo on Acer TM800 | Help! | Vote! | Get FF!
Back to top
View user's profile Send private message
Marctraider
Guru
Guru


Joined: 24 Dec 2003
Posts: 387

PostPosted: Mon Jun 28, 2004 7:26 pm    Post subject: Reply with quote

Mhh thats most unusual though, because after the ; a new command executes.
For most people the normal method will work :)
_________________
MOBO: Maximus II Gene
RAM: DDR2 OCZ 4GB
CPU: E6400 Conroe
GPU: HD2600XT
SATA: 3x 250GB.
Back to top
View user's profile Send private message
georgz
Tux's lil' helper
Tux's lil' helper


Joined: 06 Dec 2002
Posts: 137
Location: Munich, Germany

PostPosted: Tue Jun 29, 2004 10:28 am    Post subject: Reply with quote

Has anyone tried if that works with subdirectories, e.g kioslaves/nfs??
Back to top
View user's profile Send private message
Kioshen
Tux's lil' helper
Tux's lil' helper


Joined: 23 Sep 2003
Posts: 109
Location: Montreal, PQ

PostPosted: Tue Jun 29, 2004 2:56 pm    Post subject: Reply with quote

I have to agree best kde tip ever 8O ... we learn everyday I guess.

Thanks a lot :)

/me bookmarks this in a safe place for later use :D
_________________
-= United we share =-

Adopt an unanswered post today!
Why emerge -U will kill your Gentoo
Back to top
View user's profile Send private message
dmitrio
Tux's lil' helper
Tux's lil' helper


Joined: 10 Dec 2002
Posts: 115
Location: Pago Pago

PostPosted: Wed Jun 30, 2004 1:45 pm    Post subject: :. copied to gentoo-wiki.com Reply with quote

I have copied this HOWTO, with permission of Marctraider and thepi, to gentoo-wiki.com
http://gentoo-wiki.com/HOWTO_Super_Light_KDE
If you see anything that should be added or changed, feel free to do so.

Thank you for a great HOWTO.
_________________

... Leaving ground, destination is unknown,
into the darkness and far away from home,
Will your dream come true and what will you find,
when fate is your guide ...


Last edited by dmitrio on Wed Jun 30, 2004 3:38 pm; edited 1 time in total
Back to top
View user's profile Send private message
Marctraider
Guru
Guru


Joined: 24 Dec 2003
Posts: 387

PostPosted: Wed Jun 30, 2004 2:02 pm    Post subject: Reply with quote

Nice site by the way ;)
_________________
MOBO: Maximus II Gene
RAM: DDR2 OCZ 4GB
CPU: E6400 Conroe
GPU: HD2600XT
SATA: 3x 250GB.
Back to top
View user's profile Send private message
Nylle
Guru
Guru


Joined: 05 May 2002
Posts: 308
Location: Uppsala, Sweden

PostPosted: Wed Jun 30, 2004 2:21 pm    Post subject: Reply with quote

An easier way of finding out which programs to include in the DO_NOT_COMPILE is going to http://docs.kde.org and look at what is included in the packages. The downside is that you might miss some smaller programs, but on the other hand you have direct access to the documentation and can go through the programs and see what they actually do.

DO_NOT_COMPILE has cropped up on these forums a number of times, but it's great to see that someone finally had the sense to post it in the Documentation, Tips & Tricks forum.

Of course, it is a bit of a hassle, and when this was discussed about a year ago, subpackages for kde were promised, but I guess they never happened.
_________________
"Do you hear that sound your Highness?"
"Those are the shrieking eels, they always grow louder when they are about to feed on human flesh."
Back to top
View user's profile Send private message
thepi
Guru
Guru


Joined: 06 Jan 2004
Posts: 352
Location: Tokyo, Japan

PostPosted: Thu Jul 01, 2004 12:28 pm    Post subject: Reply with quote

Marctraider wrote:
Mhh thats most unusual though, because after the ; a new command executes.
For most people the normal method will work :)


yeah but try out for example
Code:
bash # DO_NOT_COMPILE="test" echo $DO_NOT_COMPILE

it will produce the following output:
Code:
bash # DO_NOT_COMPILE="test" echo $DO_NOT_COMPILE

bash #
.

in contrast to that:
Code:
bash # DO_NOT_COMPILE="test"; echo $DO_NOT_COMPILE
test
bash #


anyway, i get the expected output if i try the following:
Code:
bash # emerge -pv k3b
[ebuild    U ] app-cdr/k3b-0.11.11 [0.11.10] -debug -dvdr (etc.)

bash # USE="dvdr" emerge -pv k3b
[ebuild N   ] app-cdr/dvd+rw-tools-5.17-4-8-6
[ebuild    U ] app-cdr/k3b-0.11.11 [0.11.10] -debug +dvdr (etc.)


so in this case it seems to work - no idea why it wouldn't work for DO_NOT_COMPILE.
ideas, anyone? maybe a bash issue?

btw, wikis rock! :D

regards
pi~
_________________
Violence is the last resort of the incompetent --Isaac Asimov
Gentoo on Acer TM800 | Help! | Vote! | Get FF!
Back to top
View user's profile Send private message
Dolio
l33t
l33t


Joined: 17 Jun 2002
Posts: 650

PostPosted: Thu Jul 01, 2004 1:02 pm    Post subject: Reply with quote

It's not unique to bash. I'm using zsh and the test case performs the same way. Note:

Code:
FOO='test' echo $FOO


$FOO is interpreted before the line is processed (I think) so '' is substituted for $FOO and then FOO is set. Try this:

Code:
FOO='test' zsh -c 'echo $FOO'


(Substitute whatever bash uses to run a command for 'zsh -c'). This will print test, since FOO has been set before the $FOO is interpreted.

I don't know why the DO_NOT_COMPILE doesn't work, though. It should be the same case as the second test.
_________________
They don't have a good bathroom to do coke in.
Back to top
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2995
Location: Bay Area, CA

PostPosted: Thu Jul 01, 2004 4:57 pm    Post subject: Reply with quote

thepi wrote:


yeah but try out for example
Code:
bash # DO_NOT_COMPILE="test" echo $DO_NOT_COMPILE

it will produce the following output:
Code:
bash # DO_NOT_COMPILE="test" echo $DO_NOT_COMPILE

bash #
.

in contrast to that:
Code:
bash # DO_NOT_COMPILE="test"; echo $DO_NOT_COMPILE
test
bash #


this creates variable DO_NOT_COMPILE in current shell and hence echo displays it. This variable won't be seen by child shells. Only way for child shells to see this variable is without the ';' in the middle or if you explicitly export it with "export". Try this:

Code:
cat > /tmp/tmper.sh << EOF
#!/bin/bash
echo \$DO_NOT_COMPILE
EOF

chmod +x /tmp/tmper.sh
#execute script in its own shell
DO_NOT_COMPILE="test" /tmp/tmper.sh
#execute script in its own shell
DO_NOT_COMPILE="test"; /tmp/tmper.sh
# by now set in current shell
echo $DO_NOT_COMPILE
# excute script in current shell
. /tmp/tmper.sh
DO_NOT_COMPILE="test" /tmp/tmper.sh


second one doesn't print it, rest do.

emerge uses python and has a different way of handling env. vars, but essentially the same mechanism works.

I would say you double check if ';' really did do it.
Back to top
View user's profile Send private message
thepi
Guru
Guru


Joined: 06 Jan 2004
Posts: 352
Location: Tokyo, Japan

PostPosted: Thu Jul 01, 2004 9:40 pm    Post subject: Reply with quote

well it did work with both the ; thing and the export command, but not without the ;
unless i didn't do something wrong.

however, i still wish the kde team would publish their brilliant konqueror as a stand-alone packet. :? there's still too much extra-stuff installed (who needs startkde?)
i like my wm (xfce4), and if i change it, certainly not for kde or gnome or any of those. just too bloated for me. but trying out all the filemanagers out there (including rox & nautilus), konqueror proved to be the best.

pi~
_________________
Violence is the last resort of the incompetent --Isaac Asimov
Gentoo on Acer TM800 | Help! | Vote! | Get FF!
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum