| Author |
Message |
simargl8
Joined: 06 Feb 2013 Posts: 35
|
Posted: Thu 07 Feb 2013, 03:55 Post subject:
Compiling QT - need expert's advices |
|
I'm planning to recompile Qt for ArchPup in attempt to reduce package size
Currently:
qt package from arch = 20.6 MB
converted to spkg (wich uses tar.bz2 compression) = 28 MB
This is what is used for all packages in ArchPup
| Code: | CFLAGS="-march=i686 -Os -pipe -fomit-frame-pointer"
CXXFLAGS="$CFLAGS"
LDFLAGS="-Wl,--as-needed" |
I'm hoping optimize for size in CFLAGS, would reduce it for couple of MB.
Anyone tried this? What is your experience, is it worth to try?
|
|
Back to top
|
|
 |
amigo
Joined: 02 Apr 2007 Posts: 1759
|
Posted: Thu 07 Feb 2013, 15:26 Post subject:
|
|
Let's see, it's gonna take about 40 hours for that to compile -just hope that it doesn't go 38 hours and then end in an error... If you think it's worth doing it, tehn go right ahead.
For me, I've found a great way to avoid the problem -I don't use anything that needs QT! Works great, every time!
|
|
Back to top
|
|
 |
Q5sys

Joined: 11 Dec 2008 Posts: 844
|
Posted: Thu 07 Feb 2013, 19:57 Post subject:
Re: Compiling QT - need expert's advices |
|
| simargl8 wrote: | I'm planning to recompile Qt for ArchPup in attempt to reduce package size
Currently:
qt package from arch = 20.6 MB
converted to spkg (wich uses tar.bz2 compression) = 28 MB
This is what is used for all packages in ArchPup
| Code: | CFLAGS="-march=i686 -Os -pipe -fomit-frame-pointer"
CXXFLAGS="$CFLAGS"
LDFLAGS="-Wl,--as-needed" |
I'm hoping optimize for size in CFLAGS, would reduce it for couple of MB.
Anyone tried this? What is your experience, is it worth to try? |
You using 4.8 or are you trying to compile qt5?
_________________
My PC is for sale
|
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6179 Location: Auckland, New Zealand
|
Posted: Fri 08 Feb 2013, 00:48 Post subject:
|
|
Personally, if I need QT (I do these days) I'm quite happy to put up with a "couple of MB" extra. And isn't the whole point in Arch that it's a rolling release? Are you going to build your QT package on a regular basis to keep it up-to-date?
BTW good on you for creating ArchPup - I would be using it if I hadn't already converted to Arch proper.
_________________ DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
|
|
Back to top
|
|
 |
simargl8
Joined: 06 Feb 2013 Posts: 35
|
Posted: Fri 08 Feb 2013, 03:15 Post subject:
Re: Compiling QT - need expert's advices |
|
| Q5sys wrote: | | You using 4.8 or are you trying to compile qt5? |
Plan is to use the same qt version as in Arch (4.8.4)
| disciple wrote: | | isn't the whole point in Arch that it's a rolling release? Are you going to build your QT package on a regular basis to keep it up-to-date? |
I would add qt in IgnoreList in pacman.conf, as already done with pango and menu-cache.
To avoid big dependency (on icu) I used older version of pango, without that every gtk2 application
would require icu (7MB) to be present at compile time.
Also openbox dynamic menu is buggy with new menu-cache (0.4), so I used older version (0.3.3)
Later today will try to compile Qt... You'll be informed about the result
|
|
Back to top
|
|
 |
simargl8
Joined: 06 Feb 2013 Posts: 35
|
Posted: Fri 08 Feb 2013, 10:38 Post subject:
|
|
Here are the results:
compile time 1 hour 50 mins
package size 19.5MB
That means reduced iso size for 8.5 MB
Also I have tested compiling qpdfview against new qt and it worked, nice!
I'm very pleased with this process outcome!
|
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6179 Location: Auckland, New Zealand
|
Posted: Fri 08 Feb 2013, 18:14 Post subject:
|
|
Interesting. Have you compared the two packages to see where the saving is?
_________________ DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
|
|
Back to top
|
|
 |
simargl8
Joined: 06 Feb 2013 Posts: 35
|
Posted: Fri 08 Feb 2013, 18:39 Post subject:
|
|
I also think It's interesting to see what are the differences, so here they are
Arch Package
| Code: | [root@archpup sources]# du -sh qt-4.8.4-2-i686.pkg/usr/*
18M qt-4.8.4-2-i686.pkg/usr/bin
19M qt-4.8.4-2-i686.pkg/usr/include
45M qt-4.8.4-2-i686.pkg/usr/lib
11M qt-4.8.4-2-i686.pkg/usr/share |
spkg package
| Code: | [root@archpup qt]# du -sh install/usr/*
13M install/usr/bin
18M install/usr/include
31M install/usr/lib
3.7M install/usr/share |
You see that main difference is in /usr/lib, bellow are compared 10 largest libraries:
Arch
| Quote: | 1012K libQtOpenGL.so.4.8.4
972K libQtCLucene.so.4.8.4
720K libQtScriptTools.so.4.8.4
532K libQtHelp.so.4.8.4
504K libQtDBus.so.4.8.4
336K libQtSvg.so.4.8.4
256K libQtXml.so.4.8.4
248K libQtSql.so.4.8.4
160K libQtMultimedia.so.4.8.4
148K libQtTest.so.4.8.4 |
spkg
| Quote: | 876K libQtUiTools.a
872K libQtNetwork.so.4.8.4
832K libQtCLucene.so.4.8.4
780K libQtOpenGL.so.4.8.4
548K libQtScriptTools.so.4.8.4
360K libQtHelp.so.4.8.4
344K libQtDBus.so.4.8.4
240K libQtSvg.so.4.8.4
192K libQtXml.so.4.8.4
184K libQtSql.so.4.8.4 |
|
|
Back to top
|
|
 |
scsijon
Joined: 23 May 2007 Posts: 923 Location: the australian mallee
|
Posted: Fri 08 Feb 2013, 19:49 Post subject:
|
|
if I understand correctly, basically means that the compiler will look at your system and only create the bits it needs to work with your system, rather than the full set that works with anything.
I suspect the origonal build was built to deal with every combination and therefore will of course be larger.
|
|
Back to top
|
|
 |
|