Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Unsermake and KDE = Faster Compile?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page 1, 2, 3, 4  Next  
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
caleb
Developer
Developer


Joined: 02 Jun 2003
Posts: 404

PostPosted: Wed May 05, 2004 2:51 pm    Post subject: Unsermake and KDE = Faster Compile? Reply with quote

Mod edit: Made this one a sticky - tomk
Unstuck on request by caleb --kallamej


Hi all.

I've added experimental unsermake support for kde builds. Using unsermake should cause long compile times for kde to come down significantly. Support is still very limited, and it's not guaranteed to work.

Here's how to make it happen:

1) Emerge kde-base/unsermake. This will install the unsermake scripts into /usr/kde/unsermake

2) Set your unsermake environment variable:
export UNSERMAKE="/usr/kde/unsermake/unsermake"

3) Try and emerge a kde program. Unsermake should be detected and will be used instead of the regular make system.

4) If for some reason you have a problem, just turn off unsermake support by "unset"ting the environment variable.

*It may take a few hours for the mirrors to grab the unsermake package, so be patient.

Please report successes and failures in this thread.

Caleb


Last edited by caleb on Wed May 05, 2004 9:54 pm; edited 1 time in total
Back to top
View user's profile Send private message
Earthwings
Bodhisattva
Bodhisattva


Joined: 14 Apr 2003
Posts: 7753
Location: Germany

PostPosted: Wed May 05, 2004 9:04 pm    Post subject: Reply with quote

Sounds interesting. I did a quick google search because I never heard of unsermake before and found this page. Anyone knows what's the ugly name standing for?

If I got it right, the key idea is that recursive Makefiles are a bad thing as often they go through each dir to find out nothing has to be done or don't do everything and have to come back (and other problems). unsermake in turn uses one big Makefile. It's said it speeds up especially on SMP and distributed systems (distcc), but also on single CPU systems.

So I'll give it a try right now and tell if it works and if it's faster.

Edit: No, neither emerge sync brings it nor viewcvs.cgi on gentoo.org has it. Got to do it tomorrow...

Edit2: Nobody seems to notice this. You should give it a catchy title like "compile kde in half of the time" or similar :P
Back to top
View user's profile Send private message
caleb
Developer
Developer


Joined: 02 Jun 2003
Posts: 404

PostPosted: Wed May 05, 2004 11:09 pm    Post subject: Reply with quote

Oops - forgot the commit the ebuild to portage. Your bump reminded me, and it should be there now.

I've requested the thread to become sticky, and I've changed the title. Let's see if it takes off...
Back to top
View user's profile Send private message
shm
Advocate
Advocate


Joined: 09 Dec 2002
Posts: 2380
Location: Atlanta, Universe

PostPosted: Wed May 05, 2004 11:12 pm    Post subject: Reply with quote

Earthwings wrote:
Sounds interesting. I did a quick google search because I never heard of unsermake before and found this page. Anyone knows what's the ugly name standing for?


From http://jriddell.org/programs/kde-conference-2003-talk-writeups.html#talk8 :

name is short for unser (replacement for auto)make, German (means "our"-make). The name is as bad as his meinproc he said.
_________________
what up
Back to top
View user's profile Send private message
rfujimoto
Apprentice
Apprentice


Joined: 22 Mar 2004
Posts: 195

PostPosted: Thu May 06, 2004 1:50 am    Post subject: Reply with quote

Giving it a shot... would any app work? I was thinking `time emerge kaffeine` and then `export .... time emerge kaffeine`

Is that a good way to test it?

Edit:
Unfortunately I couldn't test it... something went wrong with the compile while using unsermake. A lot of these errors (replace [...] with a path)

Code:
[...] Makefile.am: install/rm command without DESTDIR in target [...]


Which in turn led to:
Code:
can't open [...]/Makefile.rules.in: No such file or directory
can't open [...]/Makefile.calls.in: No such file or directory


And finally errored out with:
Code:

Good - your configure finished. Start make now

cd . && \
  /bin/sh /var/tmp/portage/kaffeine-0.4.3/work/kaffeine-0.4.3/admin/missing --run automake-1.6 --foreign  Makefile
configure.in:173: required file `./Makefile.rules.in' not found
configure.in:173: required file `./Makefile.calls.in' not found
make: *** [Makefile.in] Error 1

!!! ERROR: media-video/kaffeine-0.4.3 failed.
!!! Function kde_src_compile, Line 129, Exitcode 2
!!! died running emake, kde_src_compile:make
Back to top
View user's profile Send private message
norvillebarnes
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jun 2003
Posts: 116
Location: Sudbury, ON Canada

PostPosted: Thu May 06, 2004 12:06 pm    Post subject: Reply with quote

I gave this a spin last night with kdebase-3.2.2. It successfully compiled in just over an hour on my P4 1.8 256MB machine. I'm not sure how long it usually takes, but that seems like a fairly good improvment to me.
I especially like the supressed emerge output that came with this feature. kdebase compiling looked just like a 2.6 kernel compile, you could always tell exactly what was being done, and any warnings really stand out.
Thanks for a cool new tool caleb.

Al
Back to top
View user's profile Send private message
AlterEgo
Veteran
Veteran


Joined: 25 Apr 2002
Posts: 1619

PostPosted: Thu May 06, 2004 12:44 pm    Post subject: Reply with quote

Code:

>>> Source unpacked.
*** YOU'RE USING UNSERMAKE.
*** GOOD LUCK!! :)
*** Creating acinclude.m4


8O :D

Testing now: time emerge -u arts kdelibs kdebase (from 3.2.1 to 3.2.2).

With Unsermake:
real 165m34.785s
user 140m35.671s
sys 20m26.427s

Without unsermake:
real 178m36.239s
user 145m39.298s
sys 25m10.662s

=> 7 % improvement.
That's nice, considering you get it for free :D


Last edited by AlterEgo on Thu May 06, 2004 6:37 pm; edited 2 times in total
Back to top
View user's profile Send private message
Earthwings
Bodhisattva
Bodhisattva


Joined: 14 Apr 2003
Posts: 7753
Location: Germany

PostPosted: Thu May 06, 2004 1:06 pm    Post subject: Reply with quote

@shm: Thanks for pointing this out. In fact I'm german but couldn't believe they meant the german word "unser"...

Tried unsermake in the meantime. No real improvement without SMP/distcc:
Code:

$ genlop -t kde-base/kdeaddons-3.2.2
 * kde-base/kdeaddons

     Fri Apr 23 00:22:42 2004 --> kde-base/kdeaddons-3.2.2
       merge time: 18 minutes and 30 seconds.

     Thu May  6 11:00:18 2004 --> kde-base/kdeaddons-3.2.2
       merge time: 20 minutes and 22 seconds.

The latter is with unsermake. I'll try other ones and update this if it brings better results. Maybe I'll test with distcc, too.
I get the same error like rfujimoto with kaffeine, is it just the path messed up?
Back to top
View user's profile Send private message
j-kidd
Apprentice
Apprentice


Joined: 20 Feb 2003
Posts: 213

PostPosted: Thu May 06, 2004 5:39 pm    Post subject: Reply with quote

Successfully built kdeaccessibility, kdeaddons, kdeadmin, kdeartwork, kdeedu, kdegraphics, kdenetwork, kdepim, kdetoys, and kdeutils. Results of splat show definite reduction in build time (5% ~ 25%).

kdegames failed to compile with unsermake though.
Back to top
View user's profile Send private message
Ian
l33t
l33t


Joined: 28 Oct 2002
Posts: 834
Location: Somerville, MA

PostPosted: Thu May 06, 2004 8:42 pm    Post subject: Reply with quote

I don't know how much of a task this is, but how possible is it for make to be entirely replaced by unsermake?

I haven't tested it yet, but it sounds like this may be the start of some of the bigger projects getting 100% unsermake support (not right away of course, but as new versions come out). It'd be nice if everything could benefit from a 5 - 10% reduction in compiling time, because over a whole system, that's quite a bit of time.

I'm going to try this unsermake thing out when I get a chance, hopefully as soon as I'm done writing this :).
Back to top
View user's profile Send private message
kevmille
Guru
Guru


Joined: 26 Jul 2003
Posts: 311
Location: Ho Chi Minh City (Saigon), Vietnam

PostPosted: Fri May 07, 2004 12:57 am    Post subject: Reply with quote

No improvements here:

Code:
bash-2.05b# genlop -t kde-base/kdelibs-3.2.2
 * kde-base/kdelibs

     Wed Apr 21 14:13:46 2004 --> kde-base/kdelibs-3.2.2
       merge time: 2 hours, 1 minute, and 15 seconds.

     Thu May  6 17:56:57 2004 --> kde-base/kdelibs-3.2.2
       merge time: 2 hours, 11 minutes, and 22 seconds.


 merged totally 2 ebuilds in 4 hours, 12 minutes, and 37 seconds.
 average merge time: 2 hours, 6 minutes, and 18 seconds.

_________________
My Company: Hakata Consulting
Back to top
View user's profile Send private message
yngwin
Retired Dev
Retired Dev


Joined: 19 Dec 2002
Posts: 4572
Location: Suzhou, China

PostPosted: Fri May 07, 2004 11:59 am    Post subject: Reply with quote

Success here. But I don't know what to make of these times, I suspect different loads...
Code:
blackmetal / # genlop -t qt kdelibs kdebase kdenetwork quanta koffice
 * x11-libs/qt

     Mon Mar 15 04:38:59 2004 >>> x11-libs/qt-3.3.1-r1
       merge time: 49 minutes and 6 seconds.

     Wed Apr 21 20:31:05 2004 >>> x11-libs/qt-3.3.1-r2
       merge time: 1 hour, 23 minutes and 45 seconds.

     Fri May  7 05:40:43 2004 >>> x11-libs/qt-3.3.2
       merge time: 1 hour, 21 minutes and 9 seconds.

 * kde-base/kdelibs

     Mon Mar 15 09:24:40 2004 >>> kde-base/kdelibs-3.2.1
       merge time: 1 hour, 25 minutes and 28 seconds.

     Thu Apr 22 02:18:16 2004 >>> kde-base/kdelibs-3.2.2
       merge time: 3 hours, 10 minutes and 39 seconds.

     Fri May  7 06:49:19 2004 >>> kde-base/kdelibs-3.2.2
       merge time: 1 hour, 8 minutes and 36 seconds.

 * kde-base/kdebase

     Mon Mar 15 11:29:29 2004 >>> kde-base/kdebase-3.2.1
       merge time: 2 hours, 4 minutes and 49 seconds.

     Thu Apr 22 07:45:33 2004 >>> kde-base/kdebase-3.2.2
       merge time: 5 hours, 27 minutes and 17 seconds.

     Fri May  7 08:06:46 2004 >>> kde-base/kdebase-3.2.2
       merge time: 1 hour, 17 minutes and 27 seconds.

 * kde-base/kdenetwork

     Mon Mar 15 12:27:52 2004 >>> kde-base/kdenetwork-3.2.1
       merge time: 53 minutes and 55 seconds.

     Thu Apr 22 18:46:31 2004 >>> kde-base/kdenetwork-3.2.2
       merge time: 2 hours, 31 minutes and 15 seconds.

     Fri May  7 08:43:21 2004 >>> kde-base/kdenetwork-3.2.2
       merge time: 36 minutes and 35 seconds.

 * app-editors/quanta

     Mon Mar 15 19:29:19 2004 >>> app-editors/quanta-3.2.1
       merge time: 36 minutes and 40 seconds.

     Fri Apr 23 00:14:28 2004 >>> app-editors/quanta-3.2.2
       merge time: 27 minutes and 39 seconds.

     Fri May  7 09:15:53 2004 >>> app-editors/quanta-3.3_pre20040506
       merge time: 32 minutes and 32 seconds.

 * app-office/koffice

     Tue Mar 16 19:34:51 2004 >>> app-office/koffice-1.3
       merge time: 1 hour, 38 minutes and 29 seconds.

     Fri May  7 10:33:36 2004 >>> app-office/koffice-1.3.1
       merge time: 1 hour, 17 minutes and 43 seconds.

_________________
"Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF
Back to top
View user's profile Send private message
jstuart
n00b
n00b


Joined: 03 Dec 2002
Posts: 57

PostPosted: Fri May 07, 2004 2:34 pm    Post subject: Reply with quote

Unsermake will REALLY shine if you're using distcc and make -j. If you're doing a single CPU compile.. well.. you won't get as much benifit from it as if you were doing a parallel compile.
_________________
Jeff Stuart
JAHGU (Just another happy Gentoo User)
Back to top
View user's profile Send private message
asimon
l33t
l33t


Joined: 27 Jun 2002
Posts: 979
Location: Germany, Old Europe

PostPosted: Fri May 07, 2004 5:05 pm    Post subject: Reply with quote

Ian wrote:
I don't know how much of a task this is, but how possible is it for make to be entirely replaced by unsermake?


I suppose you mean automake and not make.
There are features in automake which unsermake doesn't support (for example conditional substitution), thus it can't replace automake, at least not until someone cares enough and adds the missing features.

Apart from bugs, the missing features are the reason why some KDE modules don't build with unsermake. Those modules use features which unsermake doesn't support.
Back to top
View user's profile Send private message
Ian
l33t
l33t


Joined: 28 Oct 2002
Posts: 834
Location: Somerville, MA

PostPosted: Fri May 07, 2004 7:47 pm    Post subject: Reply with quote

asimon wrote:
Ian wrote:
I don't know how much of a task this is, but how possible is it for make to be entirely replaced by unsermake?


I suppose you mean automake and not make.
There are features in automake which unsermake doesn't support (for example conditional substitution), thus it can't replace automake, at least not until someone cares enough and adds the missing features.

Apart from bugs, the missing features are the reason why some KDE modules don't build with unsermake. Those modules use features which unsermake doesn't support.


Err, yeah, I guess I did mean automake.

I don't have much (ok, any) programming experience in Linux, and barely any in anything else (basic console programming in Windows and some extremely basic embedded programming), so I don't really know much about this, but I'd like to learn sometime soonish.

How hard is it to make this unsermake project 100% compatible with automake? I mean, is it something trival like "porting" code from one project to the other, or does it need huge changes that'll take some time and experience to do?

I think for Gentoo users especially, and anyone else who compiles a lot of code, this could be a very useful project, and even though I personally can't contribute (yet, at least), it might be a good idea if some people in the Gentoo community can start adding features to this project (or making other projects work without the special features, but that sounds harder).
Back to top
View user's profile Send private message
shm
Advocate
Advocate


Joined: 09 Dec 2002
Posts: 2380
Location: Atlanta, Universe

PostPosted: Sat May 08, 2004 4:39 am    Post subject: Reply with quote

Has anyone tried unsermake with icecream yet?

(I suppose this would be most applicable to current distcc users)
_________________
what up


Last edited by shm on Sun May 09, 2004 1:00 pm; edited 1 time in total
Back to top
View user's profile Send private message
asimon
l33t
l33t


Joined: 27 Jun 2002
Posts: 979
Location: Germany, Old Europe

PostPosted: Sat May 08, 2004 8:44 am    Post subject: Reply with quote

Ian wrote:

How hard is it to make this unsermake project 100% compatible with automake? I mean, is it something trival like "porting" code from one project to the other, or does it need huge changes that'll take some time and experience to do?


This autostuff is very messy. I don't think it would be an easy job. But I don't know enough about automake/unsermake etc. to make an educated guess.

But an idea would be to make the kde eclass use unsermake automatically for every KDE module where it is known to work.
Back to top
View user's profile Send private message
svyatogor
Retired Dev
Retired Dev


Joined: 13 Feb 2003
Posts: 186
Location: Kingdom of Kells

PostPosted: Sat May 08, 2004 3:37 pm    Post subject: Reply with quote

Tried today updating kdelibs to 3.2.2. On my 2.6 GHz P4 with HyperThreading anf 1024 MB RAM it took it 60 minutes to compile, which is at least twice quicker than before.

Great job!
Back to top
View user's profile Send private message
SpeedPhreek
n00b
n00b


Joined: 02 Feb 2003
Posts: 3
Location: Grand Junction, CO

PostPosted: Sun May 09, 2004 5:35 am    Post subject: Reply with quote

I just tried unsermake with distcc and emerged kdelibs-3.2.2:

Code:
faust ~/ # genlop -t kdelibs
 * kde-base/kdelibs

     Sat Apr 17 03:12:27 2004 --> kde-base/kdelibs-3.2.1
       merge time: 52 minutes and 5 seconds.

     Sat May  8 21:23:41 2004 --> kde-base/kdelibs-3.2.2
       merge time: 20 minutes and 57 seconds.


The first time (3.2.1) was without unsermake and without distcc, the second with both. During the compile I was using my system normally, that is, listening to a radio stream, wordprocessing, browsing the web, etc.

The system the above was compiled on:
Dual AthlonXP 2400's, 1Gig RAM and one Athlon-tbird 1100 with 512 Megs RAM.

Now I wonder if it would be worth it to figure out setting up cygwin and distcc on my wife's Windows XP Athlon 1900 . . .

--
Phreek
Back to top
View user's profile Send private message
shm
Advocate
Advocate


Joined: 09 Dec 2002
Posts: 2380
Location: Atlanta, Universe

PostPosted: Sun May 09, 2004 1:04 pm    Post subject: Reply with quote

Ian wrote:

How hard is it to make this unsermake project 100% compatible with automake? I mean, is it something trival like "porting" code from one project to the other, or does it need huge changes that'll take some time and experience to do


It is meant to be a drop-in replacement for automake, but it doesn't support all of automake's features yet.

The main author of unsermake has been the main maintainer of KDE's build scripts (using automake) for six years, so I think he knows how messy automake is :-)
_________________
what up
Back to top
View user's profile Send private message
Turiya
n00b
n00b


Joined: 12 Mar 2003
Posts: 24

PostPosted: Mon May 10, 2004 7:45 am    Post subject: Reply with quote

Everything except arts (1.2.2) and kdegames (3.2.2) work fine with unsermake.
I didn't take times though.
Back to top
View user's profile Send private message
int2str
Guru
Guru


Joined: 29 Sep 2003
Posts: 362

PostPosted: Tue May 11, 2004 4:18 pm    Post subject: Reply with quote

arts 1.2.2 worked fine for me. But not kdegames-3.2.2. Though I dont even know if it compiles with automake yet.

Here's the error:
Code:
linking ./kasteroids/kasteroids
/bin/sh ./libtool --silent --mode=link --tag=CXX g++ -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -O2 -fomit-frame-pointer -march=athlon-xp -pipe -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -o kasteroids/kasteroids -L/usr/X11R6/lib -L/usr/qt/3/lib -L/usr/kde/3.2/lib -R /usr/kde/3.2/lib -R /usr/qt/3/lib -R /usr/X11R6/lib ./libkdegames/libkdegames.la -lsoundserver_idl -lqtmcop ./kasteroids/main.o ./kasteroids/view.o ./kasteroids/ledmeter.o ./kasteroids/toplevel.o ./kasteroids/settings.o
libtool: link: cannot find the library `./libkdegames/libkdegames.la'
make: *** [kasteroids/kasteroids] Error 1
make: *** Waiting for unfinished jobs....

!!! ERROR: kde-base/kdegames-3.2.2 failed.
!!! Function kde_src_compile, Line 129, Exitcode 2
!!! died running emake, kde_src_compile:make

_________________
Adpot an unanswered post today!
Back to top
View user's profile Send private message
int2str
Guru
Guru


Joined: 29 Sep 2003
Posts: 362

PostPosted: Tue May 11, 2004 6:11 pm    Post subject: Reply with quote

Update: Yes, kdegames 3.2.2 compiles fine with automake.
_________________
Adpot an unanswered post today!
Back to top
View user's profile Send private message
Cottonee
n00b
n00b


Joined: 23 Sep 2003
Posts: 73
Location: Palmerston North, New Zealand

PostPosted: Thu May 13, 2004 7:26 am    Post subject: Reply with quote

int2str wrote:
Update: Yes, kdegames 3.2.2 compiles fine with automake.


Same here.. I have to disable unsermake when compile kdegame.
Back to top
View user's profile Send private message
teedog
Apprentice
Apprentice


Joined: 09 Mar 2004
Posts: 211

PostPosted: Tue May 18, 2004 8:25 am    Post subject: Reply with quote

Read about Unsermake here:
http://www.csh.rit.edu/slashdot/distcc.html

Sounds excellent. Hope it will work with other packages in the future.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 
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