[NTLUG:Discuss] file types in /usr/lib
Richard Geoffrion
ntlug at rain4us.net
Tue Nov 28 14:40:10 CST 2006
Chris Cox wrote:
>> Richard Geoffrion wrote:
>>
>>> What does one call files in the /usr/lib directory that end in ".a"?
>>> What kind of files are they?
>>>
>>> I know that .so files are Shared Object files.. but what are .a files?
>>>
> Archive libraries in Linux are usually used to store .o's for the
> purpose of statically linking a library into an executable. Ideally,
> only the .o's needed are statically bound in vs. the whole library.
>
> Most programs don't use this style of binding to libraries anymore
> and now prefer dynamically linking to shared objects (mistakenly
> also called shared libraries). The advantage is that the same
> function could be used across multiple programs loaded in memory.
> Binding can be done at program load time or dynamically by the
> program itself (can do symbol lookups, calls, etc).
>
> So .a's are usually not preferred unless you are wanting to build
> a program that will run on a platform without the need of the library
> being present (which can be a very useful thing when necessary).
> Back before Motif was open... people would statically bind their
> motif programs (e.g. the popular Mosaic web browser).
>
>
>
In my case, I was trying to compile libnewt on Slackware 11. Here's my
documentation blurb on the incident that took up my day today!
===================================
"To compile the Zaptel drivers for the Asterisk PBX on Slackware 11, one
must have libnewt installed
(See:http://www.voip-info.org/wiki/view/Asterisk+astman&view_comment_id=12433).
HOWEVER, installing libnewt requires that slang (www.s-lang.org) also be
installed. Specifically the libslang.a library file needs to be
available. The slang-2.0.6 package that comes with Slackware 11 does not
include this file. The libslang.a library file is explicitly removed by
the instructions in the 'slang.SlackBuild' package file.
To fix the issue, download the slang 2.0.6 source package files, edit
the slang.SlackBuild file to remove the lines...
' --disable-static \'
and
'rm -f $PKG/usr/lib/*.a'
Make the new package ( . slang.SlackBuild) as root, remove the old one
and install the rebuilt one.
==================
--
Richard
More information about the Discuss
mailing list