On Wed, Apr 25, 2001 at 04:13:13PM -0500, [EMAIL PROTECTED] wrote:
> The test to determine if a compiler supports -c and -o creates a
> non-writable directory and performs a test compile sending stderr to a
> file. If the file is non-empty, even if the object file was written
> (CWD is a non-writable directory while -o points to a file in a
> writable directory), the test fails. Is this correct?
>
> The IBM xlC compiler complains that the current directory is not
> writable (because it's using temporary files?) but still saves the
> object file to the path specified with -o. Do we want to assume
> success if the object file was created and has non-empty size?
>
> Anyway, if libtool runs and $need_locks="yes", should there be *any*
> lock files after libtool completes? If so, why don't you add:
> trap "$run $rm $removelist; exit 0" 0
> to:
> if test "$compiler_c_o" = no; then
> output_obj=`$echo "X$srcfile" | \
> $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
> lockfile="$output_obj.lock"
> removelist="$removelist $output_obj $lockfile"
> trap "$run $rm $removelist; exit 1" 1 2 15
> in ltmain.in?
Ok, I think I found the problem. In ltmain.in from 1.4 we have:
baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
# Now arrange that obj and lo_libobj become the same file
$show "(cd $xdir && $LN_S $baseobj $libobj)"
if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
exit 0
else
Shouldn't it be:
baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
# Now arrange that obj and lo_libobj become the same file
$show "(cd $xdir && $LN_S $baseobj $libobj)"
if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
# Unlock the critical section if it was locked
if test "$need_locks" != no; then
$run $rm "$lockfile"
fi
exit 0
else
This is the only non-zero exit before '$run $rm "$lockfile"' later on.
--
albert chin ([EMAIL PROTECTED])
_______________________________________________
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool