bug-libtool
[Top][All Lists]
Advanced

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

fast_install=yes not taking effect


From: Hiroto Shibuya
Subject: fast_install=yes not taking effect
Date: Thu, 5 Jun 2003 15:20:12 -0400

 Hi,

I'm trying to install this package which includes multiple shared
libraries built by libtool which are dependent to each other.  I want
to have the build configured so that "make" will link the library to
be installable to the target location so "make install" will not
cause relinking of those libraries.

Looking at the result of ./configure of this package, libtool seems to
be properly configured in this mode by default:

   # Whether or not to optimize for fast installation.
   fast_install=yes

   # Is shlibpath searched before the hard-coded library search path?
   shlibpath_overrides_runpath=no

   # How to hardcode a shared library path into an executable.
   hardcode_action=immediate

   # Whether we should hardcode library paths into libraries.
   hardcode_into_libs=yes

(Those are what I believe relevant but let me know if I'm missing
something).

But resulting .la of a couple libraries which has dependency to
uninstalled shared library within the package insist on having non nil
"relink_command" which forces it to relinked during the "make
install".

I traced through libtool for the variable $relink_command, and it
seems to be properly set to "" most of the way, but then set to non
null when it comes all the way down to here:

    # Now create the libtool archive.
    case $output in
    *.la)

        ...

      # Preserve any variables that may affect compiler behavior
      for var in $variables_saved_for_relink; do
         ...
      done
      # Quote the link command for shipping.
      relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args
@inst_prefix_dir@)"
      relink_command=`$echo "X$relink_command" | $Xsed -e
      "$sed_quote_subst"`

I think this logic fails for two reasons:

1) It generates relink_command if anything is in
   $variables_saved_for_relink disregarding all the option evaluation
   regarding the relinking.

2) Even if there were nothing in $variables_saved_for_relink, 
   after '# Quote the link command ...'  $relink_command is quoted
   even if it is empty.  

Thus this ends up creating non null $relink_command and ends up
relinking during the installation phase.  I think the fix is to simply
enclose the section below "# Preserve any ..." with:

      if test -n "$relink_command"; then
         ..
      fi

Is this the right diagnosis?  If so, attached is a patch (without
changing
indentation for the clarity of the change) against ltmain.in (1.327).

            Hiroto

--

--- ltmain.in.~1.327.~  Mon Mar 17 12:07:13 2003
+++ ltmain.in   Thu Jun  5 15:05:35 2003
@@ -4934,6 +4934,7 @@
       test "$build_old_libs" = yes && old_library="$libname.$libext"
       $show "creating $output"
 
+      if test -n "$relink_command"; then
       # Preserve any variables that may affect compiler behavior
       for var in $variables_saved_for_relink; do
        if eval test -z \"\${$var+set}\"; then
@@ -4948,6 +4949,7 @@
       # Quote the link command for shipping.
       relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args
@inst_prefix_dir@)"
       relink_command=`$echo "X$relink_command" | $Xsed -e
"$sed_quote_subst"`
+      fi
 
       # Only create the output if not a dry run.
       if test -z "$run"; then


   




reply via email to

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