Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 18 Jan 2020, 09:24
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
Advice request: How to reduce package sizes when compiling?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
paulh177


Joined: 22 Aug 2006
Posts: 973
Location: ST862228

PostPosted: Sat 07 Mar 2009, 12:27    Post subject:  Advice request: How to reduce package sizes when compiling?  

I'm a reasonably competent user, and am able to download and compile packages when needed; and with a bit of application and a lot of swearing I can often sort out dependencies and fix simple compile problems. I've even learned to set the install prefix to /usr.

On very rare occasions I'll even make a .pet and post it here.

However I usually leave it at
Code:
# ./configure --prefix=/usr && make && make install

What I'm not at all sure how to do is to refine things, to reduce the package size for instance.

I know I can use strip on the main executable, but that's about it.

This seems to work for instance
Code:
# ../configure --prefix=/usr && make
# strip executable
# make install

So I'm seeking advice on what us non-programmers can be doing to streamline packages which we are compiling and installing ourselves.

paul
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13647
Location: Karlsruhe, Germany

PostPosted: Sat 07 Mar 2009, 13:30    Post subject:  

I usually do
./configure --prefix=/usr
make
new2dir make install

New2dir creates a folder, that will be used to create a pet.
Before it suggests to create the pet finally, I strip all binaries and libs in that folder.
cd usr/bin
strip *
cd /usr/lib
strip *
Pay attention, not to type by accident:
cd /usr/bin
(so do not use the leading "/").
Libs can be striped, too, just no kernelmodules (that would go to /lib/modules/).

When new2dir asks for options, I usually choose
exe,dev,doc,nls

So it creates 4 pets, a "small" with the program itself, and optional ones for those who need them.
nls has translations, dev has seldom neded headers to compile something that depends on your pet, and doc - who reads documentations? Wink

For very huge binaries (> 2 MB), I also use "upx" to compress them.

Mark

_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
paulh177


Joined: 22 Aug 2006
Posts: 973
Location: ST862228

PostPosted: Sat 07 Mar 2009, 17:50    Post subject:  

thanks Mark that's really helpful

paul
Back to top
View user's profile Send private message 
trapster


Joined: 28 Nov 2005
Posts: 2119
Location: Maine, USA

PostPosted: Sun 08 Mar 2009, 08:09    Post subject:  

Shouldn't the following be used for libs?

strip --strip-unneeded somelib.so


Does
Code:
./configure --prefix=/usr
make
new2dir make install

actually install the program and make the directory for the pet?

For easy uninstall I usually create the pet first from the directories created with.
Code:
make install DESTDIR=/some/place

_________________
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog
Back to top
View user's profile Send private message Visit poster's website 
MU


Joined: 24 Aug 2005
Posts: 13647
Location: Karlsruhe, Germany

PostPosted: Sun 08 Mar 2009, 13:17    Post subject:  

trapster wrote:
Shouldn't the following be used for libs?

strip --strip-unneeded somelib.so


No idea, I always use "strip *".

trapster wrote:
Does
Code:
./configure --prefix=/usr
make
new2dir make install

actually install the program and make the directory for the pet?


yes.

Mark

_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0512s ][ Queries: 11 (0.0030s) ][ GZIP on ]