LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 01-11-2004, 04:01 PM   #1
graffitici
Member
 
Registered: Jun 2003
Location: Istanbul - Turkey
Distribution: Fedora, Gentoo
Posts: 150

Rep: Reputation: 15
Library Hell? Why not??


Hi,

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.

Thanks for your attention,
bibby
 
Old 01-11-2004, 04:37 PM   #2
phobox
Member
 
Registered: Dec 2003
Location: Columbus, OH USA
Distribution: Debian Knoppix Kanotix Sidux
Posts: 73

Rep: Reputation: 15
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.

Last edited by phobox; 01-11-2004 at 04:39 PM.
 
Old 01-11-2004, 04:53 PM   #3
graffitici
Member
 
Registered: Jun 2003
Location: Istanbul - Turkey
Distribution: Fedora, Gentoo
Posts: 150

Original Poster
Rep: Reputation: 15
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??
 
Old 01-12-2004, 07:57 PM   #4
lyle_s
Member
 
Registered: Jul 2003
Distribution: Slackware
Posts: 389

Rep: Reputation: 52
Re: Library Hell? Why not??

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.

Maybe this will help,
Lyle
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
go to hell.... A-dummy General 10 08-30-2006 09:06 PM
adding a bulit in library to my library lg3 Linux - Software 1 10-17-2004 09:19 AM
loading library hell melinda_sayang Slackware 4 07-05-2004 08:19 PM
howto compile bin with my library using all-static and shared linked standart library stpg Programming 4 06-29-2004 05:20 AM
what is the function library of the basic graphics library in rethat9.0? zerwolve Red Hat 0 04-29-2004 10:18 PM


All times are GMT -5. The time now is 12:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration