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 Fri 25 Jul 2014, 07:36
All times are UTC - 4
 Forum index » Taking the Puppy out for a walk » Misc
Lib's, Lib's and more Lib's
Moderators: Flash, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
NathanO

Joined: 22 Feb 2007
Posts: 196
Location: San Antonio, TX

PostPosted: Tue 22 Jan 2013, 11:26    Post_subject:  Lib's, Lib's and more Lib's  

I have just sent this out to the SATLUG mail list and I thought I would also put it here for people to think about:

I was looking in the Debian Package Manager at the Libraries section. Doing a quick count I came up with about 2,900 of them. Yes, I know that not all of them are part of every installation, but I have probably 300 of them installed.

Windows has many .dll packages. On my Windows 7 machine I have over 10,700 of them on the disk.

I do not have a MAC so I do not know what they have.

Has there ever been a group that has looked at all the different .lib packages to see if there are two or more .lib's doing the same thing or very close to the same thing?

How much memory and disk space could we save if we just cut the number of .lib's by 10% to 15%?

How much faster would Linux run if it did not have to jump from .lib to .lib?

How much time could we save doing 'Up Dates'?

Nathan
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5009
Location: Arizona, U.S.A.

PostPosted: Tue 22 Jan 2013, 22:19    Post_subject:  

Or as I`ve said many times. Library statistics to get a handle on all of this.
I`d like to know how commonly used libs. are. I know most are seldom used.
Complete dependency trees for the "better" apps. would show lib. usage.
And also what group of apps. are the libs. used by? Audio, Video, Office, etc.

# It seems to me that this data is critical to the proper design of an O.S.
.
Back to top
View user's profile Send_private_message 
goingnuts

Joined: 07 Dec 2008
Posts: 779

PostPosted: Wed 23 Jan 2013, 12:51    Post_subject:  

Or kick all libs out and start supply static linked applications where ever possible? This also makes the apps usable between puppy versions even usable on other linux-es...
Once found an 5 year old mplayer compiled static with diet libc - worked out of the box in puppy. Recent packages compiled on the new Puppy versions wont run in my P412 as glibc version has changed.

The packages with static linked apps might be bigger than the dynamic linked counterparts - but storage space and ram is normally not a restricted resource these days.

Some interesting visualization tools here - view the firefox chart...
Back to top
View user's profile Send_private_message Visit_website 
greengeek

Joined: 20 Jul 2010
Posts: 2406
Location: New Zealand

PostPosted: Wed 23 Jan 2013, 14:33    Post_subject:  

goingnuts wrote:
The packages with static linked apps might be bigger than the dynamic linked counterparts - but storage space and ram is normally not a restricted resource these days.
But I would think that it would still be valuable to use this approach even on a system with low resources wouldn't it? If I am trying to make some use of an older laptop with little ram I would think it would be possible to load only the one static app I needed, and ignore all the other thousands of shared libs I don't want. (If my old laptop can only be run as a fileserver at least it's still being useful...)
Back to top
View user's profile Send_private_message 
goingnuts

Joined: 07 Dec 2008
Posts: 779

PostPosted: Wed 23 Jan 2013, 16:08    Post_subject:  

greengeek: I agree - but I am no expert here. I think that doing apps small and static make them more usable in time and space - although some programs are "impossible" to link static without severe rebuilding of the source...and then you have to live without or accept the libraries.
Back to top
View user's profile Send_private_message Visit_website 
starhawk

Joined: 22 Nov 2010
Posts: 2755
Location: Everybody knows this is nowhere...

PostPosted: Wed 23 Jan 2013, 16:53    Post_subject:  

goingnuts, just curious, what are some of those programs that "can't" be static-linked?
_________________
Loving X-Slacko 1.1! Get the PetGet patch on pg8; it's important.
Next system will be an HP MOCA-AR + Core2Duo in an innovative case... if I ever get off my butt and build it Razz
Back to top
View user's profile Send_private_message 
goingnuts

Joined: 07 Dec 2008
Posts: 779

PostPosted: Wed 23 Jan 2013, 17:00    Post_subject:  

starhawk wrote:
goingnuts, just curious, what are some of those programs that "can't" be static-linked?

I have two on which I gave up: xrdp-v0.7.0 which works by dynamic load of the appropriate library one is going to use. And the gtk1-theme engines seems also to use this technique. Might be that there are ways around but I haven't found any.
Back to top
View user's profile Send_private_message Visit_website 
starhawk

Joined: 22 Nov 2010
Posts: 2755
Location: Everybody knows this is nowhere...

PostPosted: Wed 23 Jan 2013, 18:45    Post_subject:  

Just a thought... have those programs look in a special directory for their stuff, rather than in /lib -- so, for example, xrdp-v0.7.0 might be in

/usr/share/xrdp-v0.7.0

...and its lib files might be in...

/usr/share/libs/xrdp-v0.7.0-libs

Bit of a WAG there as to where xRDP might belong Wink Similarly, GTK-1 (if it's still relevant at all for anything outside of pUPnGO and *maybe* DSL...) would probably be...

/etc/gtk1

...and therefore have libs in...

/etc/gtk1-libs

...or...

/usr/share/libs/gtk1-libs

But whatever. Filesystem-wise, I'm half talking out my *** -- I still don't know the dang thing by heart. Oops!

_________________
Loving X-Slacko 1.1! Get the PetGet patch on pg8; it's important.
Next system will be an HP MOCA-AR + Core2Duo in an innovative case... if I ever get off my butt and build it Razz
Back to top
View user's profile Send_private_message 
NathanO

Joined: 22 Feb 2007
Posts: 196
Location: San Antonio, TX

PostPosted: Wed 23 Jan 2013, 22:29    Post_subject:  

The idea behind a .lib file is to have something that several programs can use rather then having to have one .lib for each program.

They are the equivalent of a subroutine in a program, you use the sub rather then using the same code over and over adding to the size of the program.

My Post was: are there DUPLICATE .lib's where they do the same or very close to the same and can number of needed .lib's be reduced?
Back to top
View user's profile Send_private_message 
lmemsm

Joined: 27 Jun 2012
Posts: 11

PostPosted: Thu 24 Jan 2013, 08:50    Post_subject: Re: Lib's, Lib's and more Lib's  

NathanO wrote:
Has there ever been a group that has looked at all the different .lib packages to see if there are two or more .lib's doing the same thing or very close to the same thing?

How much memory and disk space could we save if we just cut the number of .lib's by 10% to 15%?

How much faster would Linux run if it did not have to jump from .lib to .lib?


When you compile applications yourself you become keenly aware of how many libraries do very similar things. Distributions often have multiple libraries for the same function that do things their own way or more than one version of the same library because certain programs require a particular version.

I haven't seen any official counts, but I've been building a lot of applications from scratch and have been attempting to limit number of dependencies. Here are some examples. Should you use openssl, gnutls or nss? There are differences in licensing for these three communications libraries, plus some are easier to build than others. Should you use jpegsrc from IJG or libjpeg-turbo. What about expat or libxml2? What about gnu readline or editline? Also, which GUI libraries (SDL, ncurses, fltk, wx widgets, fox toolkit, qt3, qt4, qt5, gtk+ 2, gtk+ 3) should one use? Each takes up room. Can you get all the applications you need with one library or do you need several and which can you do without? If you can find applications that work on more lightweight GUI libraries, you can save a lot of room by leaving out some of the heavyweights.

Many distributions seem to have packages with dependencies that one doesn't necessarily need. They try to supply everything any user could need, not optimize for a specific uses. Sometimes multiple libraries with similar function are needed because specific applications may only work with one of the many libraries that provide that function. If two applications using different libraries for the same function are needed, you're stuck needing both libraries if you want both applications. That or rewrite the application to use another library. (I'm personally looking at rewriting command line program sdcv to avoid needing the GTK GUI library.)

I don't think cutting down on libraries would necessarily make the applications run any faster. It may simplify install and update though.

Also, someone mentioned static linking. It doesn't necessarily take up more more memory to static link. Some interesting information on static linking is available at http://sta.li/faq

It's difficult trying to figure out just which libraries are a necessary minimum. Every user will have his or her own opinion. Issues such as wanting to stick with certain types of licenses can greatly affect decisions. For instance, one cannot use openssl (Apache 1.0 and BSD 4 clause licenses) in a GPL licensed program without some waiver in the program licensing to use it or you are violating the GPL license. You just can't satisfy every user. I love the idea of optimizing one's system to use minimal dependencies and try to remove redundant libraries. However, I haven't run across any useful resources on how best to accomplish that. Would love to compare notes on this subject if anyone's interested in discussing it further.
Back to top
View user's profile Send_private_message 
amigo

Joined: 02 Apr 2007
Posts: 2217

PostPosted: Thu 24 Jan 2013, 10:20    Post_subject:  

"xrdp-v0.7.0 which works by dynamic load of the appropriate library one is going to use. And the gtk1-theme engines seems also to use this technique."

These programs are dl-loading shared objects -just like plugins. It is usually possible to do otherwise, but lots of works for each and every application.
Back to top
View user's profile Send_private_message 
goingnuts

Joined: 07 Dec 2008
Posts: 779

PostPosted: Fri 25 Jan 2013, 18:52    Post_subject:  

@amigo: Does the engines bring other than font & color settings?

For the identification/reduction of shared libs the "mklibs" can be used - but probably not applicable on a standard Puppy. Some information here
Back to top
View user's profile Send_private_message Visit_website 
tallboy


Joined: 21 Sep 2010
Posts: 438
Location: Oslo, Norway

PostPosted: Sat 26 Jan 2013, 02:18    Post_subject:  

I would guess that the large number of Linux libs, is because they are made to comply with the general Linux philosophy:

A command/program/application should be made to do one thing very well, instead of being made to compromise, by doing many things not so well.

tallboy

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Taking the Puppy out for a walk » Misc
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0813s ][ Queries: 12 (0.0044s) ][ GZIP on ]