bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A minor libtool problem


From: Ralf Wildenhues
Subject: Re: A minor libtool problem
Date: Sat, 22 Apr 2006 20:51:53 +0200
User-agent: Mutt/1.5.11+cvs20060403

Hi Peter,

Sorry for the long delay.

* Peter Breitenlohner wrote on Tue, Mar 28, 2006 at 05:05:43PM CEST:
> 
> When building packages using libtool there frequently are (lots of) warnings
> such as (edited to avoid overlong lines):
> 
> libtool: link: warning: \
>       `/usr/lib/gcc/ix86-linux-gnu/3.4.5/../../..//libgmodule-2.0.la' \
>       seems to be moved
> 
> whereas in fact
>       /usr/lib/gcc/ix86-linux-gnu/3.4.5/../../..
> is the same as
>       /usr/lib
> where libgmodule-2.0.la was installed.
> 
> Would it be possible to avoid this noise by checking that the two paths are
> actually the same

Hmm.  

> (or maybe that's already in the CVS)?

No, that is not fixed.

The problem with fixing this is that the warning is trivial albeit a bit
runtime-expensive to fix, for example with the patch below[1], but the
underlying problems these non-normalized paths cause are much more
difficult to fix.  Consider what should happen with an rpath entry, if
that path happens not to be not one of the default-searched ones?  What
if then that path does not exist yet (which may very well be the case)?
How do you go about cross compilation, or a DESTDIR install?

If the path does not exist, then path normalization is very difficult or
impossible to do.  So, even if in the case you are seeing this was easy
to fix, we are actually just hiding the fact that there is more trouble
we are just not thinking of at the moment.  So no, I don't think it is
a good idea to apply this patch.

Cheers,
Ralf

Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/ltmain.in,v
retrieving revision 1.334.2.125
diff -u -r1.334.2.125 ltmain.in
--- ltmain.in   20 Mar 2006 20:41:11 -0000      1.334.2.125
+++ ltmain.in   28 Mar 2006 16:07:33 -0000
@@ -2930,7 +2930,10 @@
                    $echo "$modename: \`$deplib' is not a valid libtool 
archive" 1>&2
                    exit $EXIT_FAILURE
                  fi
-                 if test "$absdir" != "$libdir"; then
+                 if test "$absdir" != "$libdir" && (
+                       wd_abs=`(cd "$absdir" && pwd) 2>/dev/null || echo 
/nowhere1`
+                       wd_lib=`(cd "$libdir" && pwd) 2>/dev/null || echo 
/nowhere2`
+                       test "$wd_abs" != "$wd_lib" ); then
                    $echo "$modename: warning: \`$deplib' seems to be moved" 
1>&2
                  fi
                  path="$absdir"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]