Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This is one is more of a theoretical question. Now that I am on my way of becoming a more advanced linux user, I think I gotta have a deeper understanding of the internal machinery of the os. An issue that has been bugging for a long time is about the libraries. I am coming from a windows background, and there everything is done with DLLs. The counterpart of these under linux is AFAIK the libraries, found under /lib. However there are only some fixed number of them. Does every program install its own libraries under /lib? If not, where do they install them?
Also, in windows, when many programs use the same dll but with different version, the disparate versions clash. I am aware that this doesn't happen under linux. But why not? Can't two different apps install their libraries under /lib? Are all these libraries backward compatible?
Despite the wide availability of beginner documentations, I think the linux community lacks advanced information. I have made an exhaustive search about libraries on google, on the Linux Wiki for no avail. If you know such documentation, I would like to have it.
AFAIK, when you run ./configure, it checks what version of libraries you have and if you don't have the right version it errors out, and you have to figure out what to do about it. This applies to compiling apps from source, obviously.
In other words, the libraries don't come with the apps you install, they have standard versions that apps have to conform to.
But what if your program needs to create his own libraries for the simple sake of abstraction? Just to make functions available in external files so that the future versions may use them, similar to the dlls in windows.
Does it still installs the libraries under /lib??
Just the minimum libaries needed to boot and administer the machine are in /lib. Look in /usr/lib to see most of the libraries. Depending on your distribution, you might have /opt/kde/lib and/or /opt/gnome/lib as well. Unless you specify otherwise, libraries compiled with the "./configure && make && make install" sequence wind up in /usr/local/lib.
Regarding library versioning, I think the major reason the Linux approach is considered better than the Windows approach is the library version is part of the filename in Linux. Start reading the gcc-HOWTO here: http://tldp.org/HOWTO/GCC-HOWTO/x575.html for some insight on this.
In reality, libraries on Linux aren't perfect either. I upgraded a library and it caused a program to stop working. It was because the programmer of the library changed the interface of the library without incrementing the version properly. If libraries were versioned as described here: http://sources.redhat.com/autobook/a...tobook_91.html and ldconfig was tweaked to understand this method more deeply, libraries would be perfect on Linux.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.