Bug 76056

Summary: /usr/lib entry in hier(7) man page
Product: Documentation Reporter: Enrique Matías Sánchez <cronopios>
Component: Books & ArticlesAssignee: Giorgos Keramidas <keramida>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Enrique Matías Sánchez 2005-01-10 14:40:20 UTC
      [N.B.: I am not a native English speaker, so this might actually be my problem].

I don't really understand the /usr/lib entry in the hier man page:
 
    lib/	  archive libraries

Fix: 

The FHS explanation seems more clear:

    /usr/lib : Libraries for programming and packages

/usr/lib includes object files, libraries, and internal binaries that are not intended to be executed directly by users or shell scripts.
Comment 1 Giorgos Keramidas 2005-01-10 15:15:06 UTC
On 2005-01-10 14:33, Enrique Matías Sánchez <cronopios@gmail.com> wrote:
>
> [N.B.: I am not a native English speaker, so this might actually be my problem].
>
> I don't really understand the /usr/lib entry in the hier man page:
>
>     lib/	  archive libraries

Libraries *are* 'archives'.  Archives of object files.

> The FHS explanation seems more clear:
>
> /usr/lib : Libraries for programming and packages
>
> /usr/lib includes object files, libraries, and internal binaries
> that are not intended to be executed directly by users or shell
> scripts.

``object files and libraries'' matches the state of /usr/lib in
FreeBSD.  There are AFAIK _no_ binaries that are "not intented to be
executed by users or shell scripts".

The object files are, indeed, not what the every day user may want to
use, but they *are* used indirectly when a C program is linked:

$ find /usr/lib | \
  grep -v '\.a$' | grep -v '\.so$' | grep -v '\.so.[0-9][0-9]*$' | \
  xargs ls -ld
drwxr-xr-x  4 root  wheel  8704 Jan 10 16:38 /usr/lib
drwxr-xr-x  2 root  wheel   512 Jul 21 18:41 /usr/lib/aout
drwxr-xr-x  3 root  wheel   512 Oct 12 12:56 /usr/lib/compat
drwxr-xr-x  2 root  wheel  2048 Oct 11 14:30 /usr/lib/compat/aout
-r--r--r--  1 root  wheel  1360 Jan 10 16:35 /usr/lib/crt1.o
-r--r--r--  1 root  wheel  1856 Jan 10 16:36 /usr/lib/crtbegin.o
-r--r--r--  1 root  wheel  2220 Jan 10 16:36 /usr/lib/crtbeginS.o
-r--r--r--  1 root  wheel  1212 Jan 10 16:36 /usr/lib/crtend.o
-r--r--r--  1 root  wheel  1260 Jan 10 16:36 /usr/lib/crtendS.o
-r--r--r--  1 root  wheel   876 Jan 10 16:35 /usr/lib/crti.o
-r--r--r--  1 root  wheel   832 Jan 10 16:35 /usr/lib/crtn.o
-r--r--r--  1 root  wheel  1524 Jan 10 16:35 /usr/lib/gcrt1.o
-r--r--r--  1 root  wheel  8410 Jan 10 16:37 /usr/lib/kgzldr.o
$

The description of hier(7) is a bit terse, but it is true IMHO.

- Giorgos
Comment 2 Enrique Matías Sánchez 2005-01-10 15:37:36 UTC
On Mon, 10 Jan 2005 17:15:06 +0200, Giorgos Keramidas
<keramida@ceid.upatras.gr> wrote:

> > I don't really understand the /usr/lib entry in the hier man page:
> >
> >     lib/        archive libraries
> 
> Libraries *are* 'archives'.  Archives of object files.

I just found a webpage
(http://docs.hp.com/en/B2355-90655/ch05s01.html) about HP-UX
explaining that there are two types of libraries: shared and archive
libraries.
Archive libraries are indeed archives of object files created with the
ar command.

I am not a programmer, and didn't know about that; therefore my confusion.


> The description of hier(7) is a bit terse, but it is true IMHO.
 
Absolutelly.

Maybe it should be explained somewhere what an archive library is? The
handbook does not explain about it.

Thanks for your time and reply,
 Quique
 
-- 
It's never too late to have a happy childhood.
Comment 3 Giorgos Keramidas freebsd_committer freebsd_triage 2005-01-10 15:46:01 UTC
On 2005-01-10 16:37, "Enrique Mat?as S?nchez (Quique)" <cronopios@gmail.com> wrote:
>On Mon, 10 Jan 2005 17:15:06 +0200, Giorgos Keramidas wrote:
>>> I don't really understand the /usr/lib entry in the hier man page:
>>>
>>>     lib/        archive libraries
>>
>> Libraries *are* 'archives'.  Archives of object files.
>
> I just found a webpage
> (http://docs.hp.com/en/B2355-90655/ch05s01.html) about HP-UX
> explaining that there are two types of libraries: shared and archive
> libraries.  Archive libraries are indeed archives of object files
> created with the ar command.
>
> I am not a programmer, and didn't know about that; therefore my confusion.
>
>> The description of hier(7) is a bit terse, but it is true IMHO.
>
> Absolutelly.
>
> Maybe it should be explained somewhere what an archive library is? The
> handbook does not explain about it.

I can change the description of /usr/lib to:

	lib/	   shared and archive ar(1)-type libraries

Does this seem a good way to point the reader to ar(1) -- where a good
explanation of what archive libraries are can be found?
Comment 4 Enrique Matías Sánchez 2005-01-10 15:58:16 UTC
On Mon, 10 Jan 2005 17:46:01 +0200, Giorgos Keramidas
<keramida@freebsd.org> wrote:
 
> >> Libraries *are* 'archives'.  Archives of object files.
> >
> > I just found a webpage
> > (http://docs.hp.com/en/B2355-90655/ch05s01.html) about HP-UX
> > explaining that there are two types of libraries: shared and archive
> > libraries.  Archive libraries are indeed archives of object files
> > created with the ar command.
> >
> > I am not a programmer, and didn't know about that; therefore my confusion.
 
> > Maybe it should be explained somewhere what an archive library is? The
> > handbook does not explain about it.
> 
> I can change the description of /usr/lib to:
> 
>         lib/       shared and archive ar(1)-type libraries
> 
> Does this seem a good way to point the reader to ar(1) -- where a good
> explanation of what archive libraries are can be found?

Yes! That sounds just nice :-)

Thank you,
 Quique

-- 
It's never too late to have a happy childhood.
Comment 5 Giorgos Keramidas freebsd_committer freebsd_triage 2005-01-10 16:06:30 UTC
State Changed
From-To: open->patched

I committed a nicer description to CURRENT.  Thanks :-) 


Comment 6 Giorgos Keramidas freebsd_committer freebsd_triage 2005-01-10 16:06:30 UTC
Responsible Changed
From-To: freebsd-doc->keramida

I will MFC this to RELENG_5 in a few days.
Comment 7 Giorgos Keramidas freebsd_committer freebsd_triage 2005-01-17 11:56:10 UTC
State Changed
From-To: patched->closed

Merged to RELENG_5 in revision 1.110.2.1.