[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug#193163: building in directory names with SPC fail
From: |
Scott James Remnant |
Subject: |
Re: Bug#193163: building in directory names with SPC fail |
Date: |
Sun, 02 Nov 2003 19:48:03 +0000 |
package libtool
severity 193163 wishlist
tags 193163 help
thanks
On Tue, 2003-05-13 at 11:24, Simon Josefsson wrote:
(wishlist because it's a
> Libtool do not seem to be able to build a project in a directory name
> containing SPC:
>
This is replicable in 1.5, and my test suite shows up another problem;
when inter-dependant libraries are in the same source file, libtool
breaks dependency_libs at spaces so things get reversed.
I've snipped irrelevant portions of output here to show the problem:
----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<----
$ elite:~/libtool test# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/root/libtool: /root/libtool: No such file or directory
configure: WARNING: `missing' script is too old or missing
*snip*
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
elite:~/libtool test# make
make all-am
make[1]: Entering directory `/root/libtool test'
*snip*
ar cru .libs/libtest2.a libtest2.o
ranlib .libs/libtest2.a
creating libtest2.la
/bin/sed: can't read test/libtest1.la: No such file or directory
libtool: link: `test/libtest1.la' is not a valid libtool archive
make[1]: *** [libtest2.la] Error 1
make[1]: Leaving directory `/root/libtool test'
make: *** [all] Error 2
elite:~/libtool test# grep ^dependency_libs libtest2.la
dependency_libs=' test/libtest1.la /root/libtool '
---->8-------->8-------->8-------->8-------->8-------->8-------->8-------->8----
> The libtool generated script for the binaries doesn't work, they
> contain:
>
> relink_command="(cd /home/jas/src/foo bar; { test -z \"\${LIBRARY_...
>
This kind of problem can be solved fairly easily using the patch
attached (which is against a 'libtool' script, not ltmain.in -- because
it's incomplete).
The patch would turn that line into:
relink_command="(cd \"/root/libtool test\"; /bin/sh ./libtool --mode=relink
gcc -g -O2 -o libtest2.la -rpath /usr/local/lib libtest2.lo libtest1.la
@inst_prefix_dir@)"
But it doesn't fix the dependency_libs problem, sadly. To fix that
problem would involve a major change to libtool, perhaps changing IFS to
some random character and using that to break dependency_libs up. That
wouldn't be a backward compatible change.
Unfortunately this is a side-effect of libtool being a shell script,
shell breaks arguments on spaces.
Of course, another possibility would be to add a check to see whether
`pwd` contains a space, and if so cowardly exit with an error message.
Maybe in configure?
This could do the trick, I guess you'd call it from AC_LIBTOOL_SETUP
----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<----
# _LT_AC_PWD_SPACE_FREE
# ---------------------
# Make sure that the working directory does not contain spaces, as these
# confuse libtool.
AC_DEFUN([_LT_AC_PWD_SPACE_FREE],
[
case "`pwd`" in
*" "*)
AC_MSG_ERROR([[directory name cannot contain spaces]])
;;
esac
])# _LT_AC_PWD_SPACE_FREE
---->8-------->8-------->8-------->8-------->8-------->8-------->8-------->8----
If you're wondering whether you can build from a different location,
even autoconf can't handle that!
Anyway, open for discussion about the best way forward here...
Scott
--
Have you ever, ever felt like this?
Had strange things happen? Are you going round the twist?
--- libtool~ 2003-11-02 19:10:26.000000000 +0000
+++ libtool 2003-11-02 19:11:01.000000000 +0000
@@ -1206,7 +1206,7 @@
compiler_flags=
linker_flags=
dllsearchpath=
- lib_search_path=`pwd`
+ lib_search_path="`pwd`"
inst_prefix_dir=
avoid_version=no
@@ -3982,7 +3982,7 @@
# Extract the objects.
case $xlib in
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
- *) xabs=`pwd`"/$xlib" ;;
+ *) xabs="`pwd`/$xlib" ;;
esac
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
xdir="$gentop/$xlib"
@@ -4267,7 +4267,7 @@
# Extract the objects.
case $xlib in
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
- *) xabs=`pwd`"/$xlib" ;;
+ *) xabs="`pwd`/$xlib" ;;
esac
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
xdir="$gentop/$xlib"
@@ -4825,7 +4825,7 @@
relink_command="$var=\"$var_value\"; export $var; $relink_command"
fi
done
- relink_command="(cd `pwd`; $relink_command)"
+ relink_command="(cd \"`pwd`\"; $relink_command)"
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
fi
@@ -4833,7 +4833,7 @@
if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
case $0 in
[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
- *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
+ *) qecho="$SHELL \"`pwd`/$0\" --fallback-echo";;
esac
qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
else
@@ -5281,7 +5281,7 @@
# Extract the objects.
case $xlib in
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
- *) xabs=`pwd`"/$xlib" ;;
+ *) xabs="`pwd`/$xlib" ;;
esac
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
xdir="$gentop/$xlib"
@@ -5424,7 +5424,7 @@
fi
done
# Quote the link command for shipping.
- relink_command="(cd `pwd`; $SHELL $0 $preserve_args --mode=relink
$libtool_args @inst_prefix_dir@)"
+ relink_command="(cd \"`pwd`\"; $SHELL $0 $preserve_args --mode=relink
$libtool_args @inst_prefix_dir@)"
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
if test "$hardcode_automatic" = yes ; then
relink_command=
@@ -5481,7 +5481,7 @@
for lib in $dlfiles; do
case $lib in
[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
- *) abs=`pwd`"/$lib" ;;
+ *) abs="`pwd`/$lib" ;;
esac
newdlfiles="$newdlfiles $abs"
done
@@ -5490,7 +5490,7 @@
for lib in $dlprefiles; do
case $lib in
[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
- *) abs=`pwd`"/$lib" ;;
+ *) abs="`pwd`/$lib" ;;
esac
newdlprefiles="$newdlprefiles $abs"
done
signature.asc
Description: This is a digitally signed message part
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Bug#193163: building in directory names with SPC fail,
Scott James Remnant <=