Compiling QT - need expert's advices

discuss compiling applications for Puppy
Post Reply
Message
Author
simargl8

Compiling QT - need expert's advices

#1 Post by simargl8 »

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: Select all

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?

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#2 Post by amigo »

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!

User avatar
Q5sys
Posts: 1105
Joined: Thu 11 Dec 2008, 19:49
Contact:

Re: Compiling QT - need expert's advices

#3 Post by Q5sys »

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: Select all

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?

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#4 Post by disciple »

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.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

simargl8

Re: Compiling QT - need expert's advices

#5 Post by simargl8 »

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 :wink:

simargl8

#6 Post by simargl8 »

Here are the results:
compile time 1 hour 50 mins
package size 19.5MB :D
That means reduced iso size for 8.5 MB :shock:
Also I have tested compiling qpdfview against new qt and it worked, nice!
I'm very pleased with this process outcome!

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#7 Post by disciple »

Interesting. Have you compared the two packages to see where the saving is?
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

simargl8

#8 Post by simargl8 »

I also think It's interesting to see what are the differences, so here they are
Arch Package

Code: Select all

[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: Select all

[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
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
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

scsijon
Posts: 1596
Joined: Thu 24 May 2007, 03:59
Location: the australian mallee
Contact:

#9 Post by scsijon »

Code: Select all

 --as-needed 
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.

Post Reply