bug-libtool
[Top][All Lists]
Advanced

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

relinking fails


From: Dan Grayson
Subject: relinking fails
Date: Sun, 23 Mar 2003 14:23:12 -0600 (CST)

I've found with libtool 1.4.3 that relinking against uninstalled libraries
can fail because -L$DIR/.libs is not added to the path gcc command line.  The
first part of the patch below seems to fix it, but it may not be the right
fix.  

I was compiling imlib2 at the time, and installed it like this:
      make  prefix=/opt/imlib2-1.0.6 LIBTOOL=libtool install
The relinking was provoked by using a different prefix at install time than
at compile time.

Why isn't there a way to install like this without relinking?  The libraries
will be visible in the right locations eventually.

Also, there are two cases where errors are ignored by libtool, in my case,
inappropriately, allowing a build blithely an dincorrectly to proceed.  Hence
the other parts of the patch below.

-----------------------------------------------------------------------------

diff -ur 
/opt/capybara-0.5/share/capybara/packages/libtool/tmp/./libtool-1.4.3/ltmain.in 
./libtool-1.4.3/ltmain.in
--- 
/opt/capybara-0.5/share/capybara/packages/libtool/tmp/./libtool-1.4.3/ltmain.in 
    2002-10-13 11:21:39.000000000 -0500
+++ ./libtool-1.4.3/ltmain.in   2003-03-23 14:00:44.000000000 -0600
@@ -1638,6 +1638,8 @@
        else
          dir="$ladir/$objdir"
          absdir="$abs_ladir/$objdir"
+         deplibs="$deplibs -L$dir"
+         lib_search_path="$lib_search_path $dir"
          # Remove this search path later
          notinst_path="$notinst_path $abs_ladir"
        fi # $installed = yes
@@ -4233,6 +4235,7 @@
          $show "$relink_command"
          if $run eval "$relink_command"; then :
          else
+           exit 1
            $echo "$modename: error: relink \`$file' with the above command 
before installing it" 1>&2
            continue
          fi
@@ -4411,6 +4414,7 @@
              $show "$relink_command"
              if $run eval "$relink_command"; then :
              else
+               exit 1
                $echo "$modename: error: relink \`$file' with the above command 
before installing it" 1>&2
                ${rm}r "$tmpdir"
                continue




reply via email to

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