From amjudge@dsg.cs.tcd.ie  Thu Dec  8 06:53:32 1994
Received: from longvalley.dsg.cs.tcd.ie (longvalley.dsg.cs.tcd.ie [134.226.36.37]) by freefall.cdrom.com (8.6.8/8.6.6) with SMTP id GAA09122 for <FreeBSD-gnats-submit@freebsd.org>; Thu, 8 Dec 1994 06:51:42 -0800
Received: from janis.dsg.cs.tcd.ie by longvalley.dsg.cs.tcd.ie id aa02991;
          8 Dec 94 14:51 GMT
Received: (from amjudge@localhost) by janis.dsg.cs.tcd.ie (8.6.9/8.6.9) id OAA02281; Thu, 8 Dec 1994 14:51:14 GMT
Message-Id: <199412081451.OAA02281@janis.dsg.cs.tcd.ie>
Date: Thu, 8 Dec 1994 14:51:14 GMT
From: Alan Judge <amjudge@dsg.cs.tcd.ie>
Reply-To: amjudge@dsg.cs.tcd.ie
To: FreeBSD-gnats-submit@freebsd.org
Cc: amjudge@dsg.cs.tcd.ie
Subject: ranlib doesn't like long file names in archives
X-Send-Pr-Version: 3.2

>Number:         45
>Category:       bin
>Synopsis:       ranlib gives bizarre error message if long filenames are used
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    core (FreeBSD core team)
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec  8 07:00:01 1994
>Closed-Date:    Sun Mar 19 22:05:08 PST 1995
>Last-Modified:
>Originator:     Alan Judge
>Release:        FreeBSD 2.0-RELEASE i386
>Organization:
Trinity College, Dublin
>Environment:


>Description:

	If you create an archive with long file names (that match in the first 
	characters) and _don't_ use the T flag on ar, ranlib complains
	rather bogusly:

ranlib: foo.a: Inappropriate file type or format


>How-To-Repeat:

janis:/tmp 598$ ls *.o
Foo_Bar_Baz_Bam_Blat.o          Foo_Bar_Baz_Bam_Blat2.o
janis:/tmp 599$ ar rc foo.a *.o
janis:/tmp 600$ ranlib foo.a
ranlib: foo.a: Inappropriate file type or format

janis:/tmp 601$ rm foo.a
janis:/tmp 602$ ar rcT foo.a *.o
ar: warning: Foo_Bar_Baz_Bam_Blat.o truncated to Foo_Bar_Baz_Bam
ar: warning: Foo_Bar_Baz_Bam_Blat2.o truncated to Foo_Bar_Baz_Bam
janis:/tmp 603$ ranlib foo.a
janis:/tmp 604$ ar tv foo.a
rw-r--r--     650/0           127 Dec  8 14:36 1994 Foo_Bar_Baz_Bam
rw-r--r--     650/0           126 Dec  8 14:38 1994 Foo_Bar_Baz_Bam

>Fix:
	
	Using the T flag on ar seems to work, even if the file
	names match in the first 15 chars.  But you have to create
	the entire archive in one go.  If you go a file at a time,
	ranlib will overwrite.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ache 
State-Changed-When: Sun Mar 19 22:05:08 PST 1995 
State-Changed-Why:  
Fixed. 
>Unformatted:



