Skip to main content
Welcome guest. | Register | Login | Post

library and runtime library

6 replies [Last post]
whisper's picture
Offline
Joined: 2006-09-06

On my quest on building my own linux distribuition reading the LFS book, i have to install "libraries" and "runtime libraries". What are the diferences between them?

libervisco's picture
Offline
Joined: 2006-05-04
Wikipedia has an entry on

Wikipedia has an entry on the meaning of runtime in computer science: http://en.wikipedia.org/wiki/Runtime_library

The way I understand it's basically a library which allows for a certain program to run and is neede while it is running.

I'm not sure how to explain the other kind of libraries. I suppose it's the rest of it, possibly compilation libraries. I'm not a programmer and there are people here who definitely know more on the subject, but there, until they reply. Eye

whisper's picture
Offline
Joined: 2006-09-06
Thank you for helping

Thank you for helping Smiling

free-zombie's picture
Offline
Joined: 2006-03-08
basically, libraries can be

basically, libraries can be used in three basic ways:

  1. They can be statically linked at compile time. This means that the libraries are completely contained in the executable. Due to the large resulting size, this is actually only done when creating binaries for people who might not have the libraries installed - not in distro packages or usually custom compiled software.
  2. If they are dynamically linked, they are needed both at compile and runtime. The bonus is that the operating system takes care of the getting-the-code-where-it's-needed, but the binaries don't get bloated. By far the most common way.
  3. Libraries can also be linked at runtime, by the program itself. This is usually done only for plugins/modules, as e.g. XMMS supports them. Also used in libdvdread to load libdvdcss if and only if present, but as that is criminal ignoring of DRM we don't talk about that.
whisper's picture
Offline
Joined: 2006-09-06
So runtime libraries are

So runtime libraries are libraries that are dynamicaly loaded by programs using functions provided
by linux like dlsym(), dlopen and dlclose right? Can those libraries loaded at runtime be used as normal ones
which are needed at run and compile time? Are their structure anyhow diferent from normal ones?

free-zombie's picture
Offline
Joined: 2006-03-08
I don't know how LFS uses

I don't know how LFS uses the terms, but types 2 and 3 both needs shared objects *.so (and yes, no. 3 is with dlopen - didn't remeber the function name at the time). Libraries to be statically linked are named *.a. you usually have both of everything

a thing's picture
Offline
Joined: 2005-12-20
not everywhere
free-zombie wrote:

that is criminal ignoring of DRM we don't talk about that.

It's not criminal everywhere.

Comment viewing options