libtool-patches
[Top][All Lists]
Advanced

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

Re: Libtool fails to build working binary when -no-install is used


From: Ralf Wildenhues
Subject: Re: Libtool fails to build working binary when -no-install is used
Date: Tue, 3 Apr 2007 21:09:01 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

Hi Simon,

* Simon Josefsson wrote on Sun, Apr 01, 2007 at 11:17:20AM CEST:
> Ralf Wildenhues <address@hidden> writes:
> >
> > I think you should be able to work around it by adding
> >   -R ../src
> >
> > to the link flags for `simple' (untested, please try it!  self: also put
> > in testsuite), that should be more efficient than dropping -no-install
> > and thus having the wrapper everywhere.

> I think removing the -no-install is a better workaround until libtool
> is fixed.  Won't adding -R../src break on other platforms that doesn't
> know what -R is?

Several comments: first, yes of course removing -no-install is a fine
workaround.  Second, I was wrong (at least I said `untested', which is
probably somewhat of a guarantee that it will turn out to be wrong) in
that it needs to be
  -R `pwd`/../src/.libs

(the space after -R is optional).  Of course the above is already mildly
ugly, as it requires knowledge of the .libs internal.  Third, with
libtool, -R will work even on platforms that do not know what it is:
libtool will translate it to the right flag (and also to nothing useful,
on w32).

> > Please also note that on w32 you'll get (a warning and) a wrapper
> > regardless, as there's no way to hardcode there.
> 
> Right, and that's fine.  Possibly the documentation should be changed
> here though.  For example, change:
[...]
> into:
> 
> `-no-install'
>      Declare that OUTPUT-FILE won't be installed, and therefor (on
>      some platforms) can do without a wrapper script.  Useful if the
>      program is only used in the build tree, e.g., for testing or
>      generating other files.

Yep.  I'm applying the patches below to HEAD and branch-1-5, and putting
you in THANKS.  (I hope this is trivial enough to not warrant 72hrs?)

Cheers,
Ralf

HEAD:
2007-04-03  Ralf Wildenhues  <address@hidden>

        * doc/libtool.texi (Link mode) <-no-install>: Mention that this
        still generates a wrapper script on systems without hardcoding.
        * tests/stresstest.at: Test `-no-install'.
        * THANKS: Update.
        Report by Simon Josefsson.

Index: doc/libtool.texi
===================================================================
RCS file: /cvsroot/libtool/libtool/doc/libtool.texi,v
retrieving revision 1.225
diff -u -r1.225 libtool.texi
--- doc/libtool.texi    24 Feb 2007 16:11:21 -0000      1.225
+++ doc/libtool.texi    3 Apr 2007 19:00:28 -0000
@@ -1384,8 +1384,9 @@
 
 @item -no-install
 Link an executable @var{output-file} that can't be installed and
-therefore doesn't need a wrapper script.  Useful if the program is only
-used in the build tree, e.g., for testing or generating other files.
+therefore doesn't need a wrapper script on systems that allow hardcoding
+of library paths.  Useful if the program is only used in the build tree,
+e.g., for testing or generating other files.
 
 @item -no-undefined
 Declare that @var{output-file} does not depend on any other libraries.
Index: tests/stresstest.at
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/stresstest.at,v
retrieving revision 1.15
diff -u -r1.15 stresstest.at
--- tests/stresstest.at 25 Mar 2007 12:12:43 -0000      1.15
+++ tests/stresstest.at 3 Apr 2007 19:01:37 -0000
@@ -250,7 +250,7 @@
       do
        LT_AT_CHECK([eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o 
"$rel"sub2/liba.la "$rel"sub/a.lo' $linkargs],
                 [0],[ignore],[ignore])
-       for st in '' '-static'
+       for st in '' '-static' '-no-install'
        do
           case $st,$l3 in
           ,-rpath*) mst= ;;


branch-1-5:
2007-04-03  Ralf Wildenhues  <address@hidden>

        * doc/libtool.texi (Link mode) <-no-install>: Mention that this
        still generates a wrapper script on systems without hardcoding.
        * THANKS: Update.
        Report by Simon Josefsson.

Index: doc/libtool.texi
===================================================================
RCS file: /cvsroot/libtool/libtool/doc/libtool.texi,v
retrieving revision 1.134.2.20
diff -u -r1.134.2.20 libtool.texi
--- doc/libtool.texi    11 Feb 2007 11:11:45 -0000      1.134.2.20
+++ doc/libtool.texi    3 Apr 2007 19:03:08 -0000
@@ -1273,8 +1273,9 @@
 
 @item -no-install
 Link an executable @var{output-file} that can't be installed and
-therefore doesn't need a wrapper script.  Useful if the program is only
-used in the build tree, e.g., for testing or generating other files.
+therefore doesn't need a wrapper script on systems that allow hardcoding
+of library paths.  Useful if the program is only used in the build tree,
+e.g., for testing or generating other files.
 
 @item -no-undefined
 Declare that @var{output-file} does not depend on any other libraries.




reply via email to

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