Add a New Comment (Rich Markup)
Comment Type & Canned Response: None None > Multiple Canned Responses Version Omitted
( Jump to the original submission )
This was fixed in 1.4.(something) and remains fixed in current cvs.
Okay to close this.
Peter
I just posted a new fix for the convenience library double-linking bug on Darwin. Patch #111 applies to 1.4.2, but I've tested it with libtool 1.4 through 1.4.2, and it has worked with three separate Darwin programs (gdk-pixbuf, nautilus and audiofile). All tests still pass on RH Linux 7.2 with the patch.
Both of these patches cause the cdemo tests to FAILin their respective branches, so I cannot apply them.
I've posted cleaned-up versions of the patch for HEAD and branch-1-4 in the patch tracker, item #31 and #32. Explanations are attached to #31. Errr.. were attached.. were lost by the site... Okay, I'll try to recall what I wrote.
The problem is that convenience libraries are added to both $convenience and $deplibs. That causes the library to be listed twice on the final link command line. That's a problem on platforms with pedantic linkers like Darwin, which complain about duplicate symbols as a result. Note that at the core this actually affects all platforms, not just Darwin. (There may be some that rely on the current errenous behaviour, though. whole_archive_flag_spec=' ' cough)
Hope this helps, -chrisp
I can verify this problem happening using latest libtool CVS (just made a fresh checkout). I was able to solve it using this fix based on what fjf posted. But I must admit I have no real idea why it works =)
--- ltmain.sh Sun Sep 9 19:06:13 2001+++ ltmain.sh.patched Sun Sep 9 19:58:44 2001@@ -1876,7 +1876,9 @@ if test "$pass" = conv; then # Only check for convenience libraries- deplibs="$lib $deplibs"+ if test "$libdir"; then+ deplibs="$lib $deplibs"+ fi if test -z "$libdir"; then if test -z "$old_library"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
Sorry, your patch doesn't apply -- and has no context =(O|
Please resubmit a patch generated with `diff -u' or `diff -c', and supply a ChangeLog entry so that we can evaluate the patch properly.
Cheers, Gary.
Here's a patch against ltmain.sh to solve the problem on Darwin/MacOSX (watch the tabs). I have no idea whether this will screw other platforms, however...
1523c1523,1525 < deplibs="$lib $deplibs" ---
> if test "$libdir"; then > deplibs="$lib $deplibs" > fi
I am learning to use libtool and its cohorts from the GNU autoconf book by Vaughan et al, and am trying to follow the simple examples in chapter 9 for Using Convenience LIbraries. I run into this odd behavior under Darwin:
When I try to build a library with a dependency on my convenience library, using the command (which I copied from the book):
glibtool cc -rpath `pwd`/_inst -o libhello.la hello.lo libtrim.la
I notice the output:
cc -dynamiclib -undefined suppress -o .libs/ libhello.0.0.0.dylib hello.lo -all_load ./.libs/ libtrim.al ./.libs/libtrim.al -lc -install_name /Users/ kfitz/Gumballs/hello-1.0/intro-hello/_inst/ libhello.0.dylib -compatibility_version 1 - current_version 1.0
which, not surprisingly, fails to link, because libtrim.al appears twice on the link line.
Why is libtool causing libtrim.la to appear twice on the link line? That cannot be correct.
I am using libtool1.4, built from source, and I am copying the commands verbatim from the book, except that I change "libtool" to "glibtool" to avoid name conflicts with Apple's libtool.
Any insight will be apreciated. -kel
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Only logged-in users can vote.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 4 latest changes.
Copyright © 2023 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.10