Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, April 2008
How to free up disk space from the Qt source tree?


Message 1 in thread

Hi all,

In the hope to spare some disk space, I installed Qt 4.2.2. with the following configure command:
$> ./configure -prefix-install -prefix /usr/local/Qt-4.2.2 -nomake examples
So the installation is within the source tree.
The whole tree takes about one gigabyte on the disk. 

What are the safe ways to slim down this tree ?
I removed some obj files by hand. I don't want to wreck it all.
Is there a make target for that purpose ?
Can some library files be stripped ?

Thanks in advance,










--
 [ signature omitted ] 

Message 2 in thread

After you do a make, do a make install, then blow away the source
tree....

It will get much smaller

Scott

> -----Original Message-----
> From: Alexandre Oberlin [mailto:alxobr@xxxxxxxxx]
> Sent: Wednesday, April 02, 2008 4:40 AM
> To: qt-interest@xxxxxxxxxxxxx
> Subject: How to free up disk space from the Qt source tree?
> 
> Hi all,
> 
> In the hope to spare some disk space, I installed Qt 4.2.2. with the
> following configure command:
> $> ./configure -prefix-install -prefix /usr/local/Qt-4.2.2 -nomake
> examples
> So the installation is within the source tree.
> The whole tree takes about one gigabyte on the disk.
> 
> What are the safe ways to slim down this tree ?
> I removed some obj files by hand. I don't want to wreck it all.
> Is there a make target for that purpose ?
> Can some library files be stripped ?
> 
> Thanks in advance,
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/

--
 [ signature omitted ] 

Message 3 in thread

Hi Scott,

Thank you for your suggestion. So I understand that the -prefix-install does not preclude a normal installation. Still one problem with this approach is that my disk will get full during the process of copying the files. Actually that was the reason why I chose to install within the source tree.
A full disk is one of the trickiest ways I know to lose data, as I already experienced.
So I'll have to find a way to retrieve room elsewhere before the "make install" and the subsequent investment in hardware ;-)

Cheers,

AO

Scott Aron Bloom écrivit:
> After you do a make, do a make install, then blow away the source
> tree....
> 
> It will get much smaller
> 
> Scott
> 
>> -----Original Message-----
>> From: Alexandre Oberlin [mailto:alxobr@xxxxxxxxx]
>> Sent: Wednesday, April 02, 2008 4:40 AM
>> To: qt-interest@xxxxxxxxxxxxx
>> Subject: How to free up disk space from the Qt source tree?
>>
>> Hi all,
>>
>> In the hope to spare some disk space, I installed Qt 4.2.2. with the
>> following configure command:
>> $> ./configure -prefix-install -prefix /usr/local/Qt-4.2.2 -nomake
>> examples
>> So the installation is within the source tree.
>> The whole tree takes about one gigabyte on the disk.
>>
>> What are the safe ways to slim down this tree ?
>> I removed some obj files by hand. I don't want to wreck it all.
>> Is there a make target for that purpose ?
>> Can some library files be stripped ?
>>
>> Thanks in advance,
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
>> "unsubscribe" in the subject or the body.
>> List archive and information: http://lists.trolltech.com/qt-interest/
> 
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/

--
 [ signature omitted ] 

Message 4 in thread

On Thursday 03 April 2008 16:50:36 Alexandre Oberlin wrote:
> Hi Scott,
>
> Thank you for your suggestion. So I understand that the -prefix-install
> does not preclude a normal installation. Still one problem with this
> approach is that my disk will get full during the process of copying the
> files. Actually that was the reason why I chose to install within the
> source tree. A full disk is one of the trickiest ways I know to lose data,
> as I already experienced. So I'll have to find a way to retrieve room
> elsewhere before the "make install" and the subsequent investment in
> hardware ;-)

Do an in-source build without installation and then build/clean in parts:

./configure -prefix $PWD [other options]
cd src
make && make clean
cd ../tools
make && make clean

That's for Unix. For Windows builds, there's no need for the -prefix $PWD 
since it's the only allowed option anyways. And you should use nmake instead 
of make if you're using Microsoft tools.

If that's still not enough, you can also try:
1) build QtCore first:
	cd src
	make sub-corelib && make clean
then build and clean each of the other modules individually by cd'ing into the 
appropriate dir and typing make && make clean there. For webkit, cd into 
src/3rdparty/webkit/WebCore

2) build in release mode and/or strip the libraries. By default, the Qt/X11 
build process moves the debug symbols into a separate file, if it finds 
objcopy. If it does that, just rm lib/*.debug. If it doesn't, simply strip 
lib/*.so.4.?.?.
On MacOS, strip is dangerous. Use strip --strip-debug. Also, use the DWARF 
debug format (default on Leopard) or don't build in debug-and-release mode. 
The 4.4 debug libraries in Stabs (Tiger's default) are VERY large.

For reference, a full Qt 4.4.0 build in debug mode creates 2.1GB worth of 
files.

-- 
 [ signature omitted ] 

Attachment: signature.asc
Description: This is a digitally signed message part.


Message 5 in thread

Thank you Thiago.  With some of those extra steps I'm now well below 500M, so it will do the trick.

BTW I noticed the 'make install' actually performed the stripping but also needed the obj files -- which I already deleted ;-(

AO

Thiago Macieira écrivit:
> Do an in-source build without installation and then build/clean in parts:
> 
> ./configure -prefix $PWD [other options]
> cd src
> make && make clean
> cd ../tools
> make && make clean
> 
> That's for Unix. For Windows builds, there's no need for the -prefix $PWD 
> since it's the only allowed option anyways. And you should use nmake instead 
> of make if you're using Microsoft tools.
> 
> If that's still not enough, you can also try:
> 1) build QtCore first:
> 	cd src
> 	make sub-corelib && make clean
> then build and clean each of the other modules individually by cd'ing into the 
> appropriate dir and typing make && make clean there. For webkit, cd into 
> src/3rdparty/webkit/WebCore
> 
> 2) build in release mode and/or strip the libraries. By default, the Qt/X11 
> build process moves the debug symbols into a separate file, if it finds 
> objcopy. If it does that, just rm lib/*.debug. If it doesn't, simply strip 
> lib/*.so.4.?.?.
> On MacOS, strip is dangerous. Use strip --strip-debug. Also, use the DWARF 
> debug format (default on Leopard) or don't build in debug-and-release mode. 
> The 4.4 debug libraries in Stabs (Tiger's default) are VERY large.
> 
> For reference, a full Qt 4.4.0 build in debug mode creates 2.1GB worth of 
> files.
> 

--
 [ signature omitted ] 

Message 6 in thread

You might try this....  

Do a make, without the install...

Then do a rm -rf `find . -name \*.o -or -name moc_\*` to clean out the generated files..

Then do a make install.

Scott

> -----Original Message-----
> From: Alexandre Oberlin [mailto:alxobr@xxxxxxxxx]
> Sent: Thursday, April 03, 2008 7:51 AM
> To: qt-interest@xxxxxxxxxxxxx
> Subject: Re: How to free up disk space from the Qt source tree?
> 
> Hi Scott,
> 
> Thank you for your suggestion. So I understand that the -prefix-install
> does not preclude a normal installation. Still one problem with this
> approach is that my disk will get full during the process of copying
> the files. Actually that was the reason why I chose to install within
> the source tree.
> A full disk is one of the trickiest ways I know to lose data, as I
> already experienced.
> So I'll have to find a way to retrieve room elsewhere before the "make
> install" and the subsequent investment in hardware ;-)
> 
> Cheers,
> 
> AO
> 
> Scott Aron Bloom écrivit:
> > After you do a make, do a make install, then blow away the source
> > tree....
> >
> > It will get much smaller
> >
> > Scott
> >
> >> -----Original Message-----
> >> From: Alexandre Oberlin [mailto:alxobr@xxxxxxxxx]
> >> Sent: Wednesday, April 02, 2008 4:40 AM
> >> To: qt-interest@xxxxxxxxxxxxx
> >> Subject: How to free up disk space from the Qt source tree?
> >>
> >> Hi all,
> >>
> >> In the hope to spare some disk space, I installed Qt 4.2.2. with the
> >> following configure command:
> >> $> ./configure -prefix-install -prefix /usr/local/Qt-4.2.2 -nomake
> >> examples
> >> So the installation is within the source tree.
> >> The whole tree takes about one gigabyte on the disk.
> >>
> >> What are the safe ways to slim down this tree ?
> >> I removed some obj files by hand. I don't want to wreck it all.
> >> Is there a make target for that purpose ?
> >> Can some library files be stripped ?
> >>
> >> Thanks in advance,
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> --
> >> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
> with
> >> "unsubscribe" in the subject or the body.
> >> List archive and information: http://lists.trolltech.com/qt-
> interest/
> >
> > --
> > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
> with "unsubscribe" in the subject or the body.
> > List archive and information: http://lists.trolltech.com/qt-interest/
> 
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/

--
 [ signature omitted ]