[Top][All Lists]

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

Re: incorrect "cannot install xxx to a directory not ending in yyy" erro

From: Ralf Wildenhues
Subject: Re: incorrect "cannot install xxx to a directory not ending in yyy" error
Date: Wed, 2 Dec 2009 08:05:46 +0100
User-agent: Mutt/1.5.20 (2009-08-09)

Hi Patrick,

* Patrick Ohly wrote on Mon, Nov 30, 2009 at 06:41:03PM CET:
> $ /bin/sh ../../../libtool   --mode=install /usr/bin/install -c   syncecal.la 
> syncebook.la 
> '/work/runtests/head-gcc-4.3-i386/install/usr/lib/syncevolution/backends/'
> libtool: install: error: cannot install `syncecal.la' to a directory not 
> ending in /usr/lib/syncevolution/backends/
> Clearly my install directory *does* end in the expected path, so what
> the heck?

Yeah, that looks like a bug.  Which libtool version are you looking at?
I'd like to have a test to expose it, but the following testsuite
addition passes just fine for me; OTOH, I don't recall us fixing this
yet, so there's probably something missing.

Can you show more of your build log so we can inspect it, or try out git
Libtool plus the patch?


    Installation target file/directory naming variations.
    * tests/install.at (Install with mode override): Rename from ...
    (Install tests): ... this.
    (Install with target directory): New test.
    * THANKS: Update.
    Report by Patrick Ohly.

diff --git a/tests/install.at b/tests/install.at
index 5e15555..f0e6c1e 100644
--- a/tests/install.at
+++ b/tests/install.at
@@ -22,7 +22,7 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-AT_SETUP([Install tests])
+AT_SETUP([Install with mode override])
 # Ensure that install_override_mode overrides the mode of the shared
@@ -50,3 +50,40 @@ AT_CHECK([grep ' -m 755' stdout], [], [ignore])
 AT_CHECK([grep ' -m 644.*liba.la' stdout], [], [ignore])
+AT_SETUP([Install with target directory])
+# Ensure that we can install to a directory with or without trailing slash,
+# and that we can specify a target file or directory name, with or without
+# a destdir.
+mkdir -p inst/bin inst/lib "$dest$libdir" "$dest$bindir"
+echo 'int a () { return 0; }' > a.c
+$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c
+# Automake may cause the number of trailing slashes to differ between
+# --mode=link and --mode=install.
+for ldir in $libdir $libdir/; do
+  for idir in $libdir $libdir/; do
+    AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo ]dnl
+            [-rpath $ldir -no-undefined], [], [ignore], [ignore])
+    for destdir in '' $dest; do
+      for target in $idir $idir/liba.la; do
+       AT_CHECK([$LIBTOOL --mode=install $lt_INSTALL liba.la $destdir$target],
+                [], [ignore], [ignore])
+       AT_CHECK([test -f $destdir$ldir/liba.la])
+       AT_CHECK([$LIBTOOL --mode=uninstall $destdir$ldir/liba.la],
+                [], [ignore], [ignore])
+      done
+    done
+  done

reply via email to

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