[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
libtool, cygwin: static archives have duplicate .o's
From: |
Charles Wilson |
Subject: |
libtool, cygwin: static archives have duplicate .o's |
Date: |
Thu, 02 May 2002 12:54:44 -0400 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2 |
So I was building automake-1.6.1 and ran its self tests, which uncovered
a bug in libtool (CVS 20020316).
Automake's pr300-ltlib test:
Fails in 'make install-strip' because 'strip --strip-debug' on a
static library goes berzerk when the library contains two copies
of the same object file. Due to a bug in libtool-20020316,
the test statlib DOES contain two copies of "a.o":
ar cru subdir/.libs/libb.a .libs/a.o a.o
The fix is to correct libtool so that it doesn't include bot
PIC and nonPIC object files...or to make 'strip.exe' tolerant
of the problem.
How strip fails: it unpacks the static archive into a
temporary directory. However, somehow during the process, because
there are two files with the same name (pathnames are not
preserved), the unpacked object file gets created without a
security descriptor (CYGWIN=ntsec, using NTFS filesystem) --
and "permission denied" to even 'ls' the file...
I think the problem in libtool is here: line 4259 in
ltmain.in (4758 in libtool):
oldobjs="$oldobjs$old_deplibs $non_pic_objects"
well, $non_pic_objects=a.o, but $oldobjs=.libs/a.o
so both object files get ar'ed into the static lib. I'm not sure
what the problem is: should we prevent .libs/a.o (the PIC object)
from getting added to $oldobjs, or should this line actually read:
oldobjs="$non_pic_objects"
and nothing else? If the former, how??
--Chuck
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- libtool, cygwin: static archives have duplicate .o's,
Charles Wilson <=