Bug 54887 - Liking against an archive doesn't work right.
Summary: Liking against an archive doesn't work right.
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: libtool   
(Show other bugs)
Version: 7.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jens Petersen
QA Contact: Aaron Brown
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-10-22 18:35 UTC by hjl
Modified: 2007-04-18 16:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-12-04 04:17:35 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
A patch (1.06 KB, patch)
2001-10-22 18:35 UTC, hjl
no flags Details | Diff

Description hjl 2001-10-22 18:35:26 UTC
Liking against an archive doesn't work right when building
a shared library.  For example,

# touch foo.c
# gcc -fPIC -c foo.c
# ar rcvs libfoo.a foo.o
# toiuch bar.c
# gcc -fPIC -c foo.c
# /bin/sh ./libtool --mode=link gcc -o -release 1.0 -L. -lfoo.a

will have

dependency_libs='-L..... -lfoo"

in libbar.la . It is complete bogus.

Comment 1 hjl 2001-10-22 18:35:55 UTC
Created attachment 34582 [details]
A patch

Comment 2 Jens Petersen 2001-10-24 08:06:32 UTC
Not sure I understand the problem completely, but it seems to me that the
"dependency_libs='-L..... -lfoo'" is caused purely because of the "-L." passed
through libtool to gcc.
What do you think the expected bahaviour should be?


Comment 3 hjl 2001-10-24 14:25:34 UTC
It is caused by "-L...  -lfoo" and there is libfoo.a, no libfoo.so.
In that case, the stupid tool decides to add

dependency_libs='-L..... -lfoo"

BTW, the libtool people decide to fix it also. See

http://mail.gnu.org/pipermail/libtool/2001-October/005697.html

Comment 4 Jens Petersen 2001-11-01 09:52:35 UTC
Ok. Looks like it needs fixing.  But in order to fix I need to know how to
reproduce it consistently.
Could you give me a working command sequence that reproduces it. I see what
you're saying, but the sequence you originally submitted doesn't work correctly.

Comment 5 hjl 2001-11-01 17:33:22 UTC
Check out binutils from CVS on sourceware. Make sure you use
--enable-shared on Linux. Look for which libiberty.a is used
for ld. We want libiberty/libiberty.a, not libiberty/pic/libiberty.a.
Yes, I have fixed it in my Linux binutils.

Comment 6 Jens Petersen 2001-12-03 10:52:53 UTC
Fixed in next rawhide package release.

Comment 7 Jens Petersen 2001-12-10 07:56:06 UTC
Fixed in libtool-1.4.2-3.

Comment 8 Jens Petersen 2002-02-12 09:14:42 UTC
Following the thread under
http://mail.gnu.org/pipermail/libtool-patches/2002-February/001716.html
(Message-ID: <orlme5davr.fsf@free.redhat.lsd.ic.unicamp.br>).
I'm reverting this too in libtool-1.4.2-5.


Note You need to log in before you can comment on or make changes to this bug.