Re: rm -f

2007-12-21 Thread Patrick Welche
On Thu, Dec 20, 2007 at 06:21:30PM +, Patrick Welche wrote:
> On Sun, Dec 16, 2007 at 10:04:59AM +0100, Ralf Wildenhues wrote:
> > Hello,
> > 
> > * Patrick Welche wrote on Fri, Dec 14, 2007 at 08:58:51PM CET:
> > > On Fri, Dec 14, 2007 at 12:27:48PM -0700, Eric Blake wrote:
> > > > 
> > > > The general idiom for this is 'rm -f dummy $files', so that even if 
> > > > $files
> > > > is empty, you are still passing an argument to rm, and the -f avoids
> > > > failure on the dummy argument.
> > > 
> > > Elegant!
> > 
> > Only if you have a dummy file to remove.  In libtool it's easier to just
> > add
> >   test -z "$files" || $RM $files
> > 
> > as appropriate.  Which tests are failing for you, Patrick?  I assume
> > this is NetBSD?
> 
> In fact it seems to come from line 6202/6203 in libltdl/config/ltmain.m4sh:
> 
>   6194  if ${skipped_export-false}; then
>   6195func_echo "generating symbol list for \`$libname.la'"
>   6196export_symbols="$output_objdir/$libname.exp"
>   6197$opt_dry_run || $RM $export_symbols
>   6198libobjs=$output
>   6199# Append the command to create the export file.
>   6200test -z "$concat_cmds" || concat_cmds=$concat_cmds~
>   6201eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
>   6202if test -n "$output"; then
>   6203  eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
>   6204fi
>   6205  fi
> 
> 
> Do we want to delete $output or $last_robj?

I think that question still stands, but my rm -f is actually from just above
that spot:

  6183# Handle the remaining objects by creating one last
  6184# reloadable object file.  All subsequent reloadable object
  6185# files will link in the last one created.
  6186test -z "$concat_cmds" || concat_cmds=$concat_cmds~
  6187eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist 
$last_robj~\$RM $last_robj\"
  6188delfiles="$delfiles $output"

In line 6187, $last_robj is empty for me. (Why not just add it to delfiles?)

Cheers,

Patrick


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: rm -f

2007-12-21 Thread Ralf Wildenhues
Hi Patrick,

* Patrick Welche wrote on Fri, Dec 21, 2007 at 03:54:37PM CET:
> 
> I think that question still stands, but my rm -f is actually from just above
> that spot:

Sorry, I haven't had time to look at this issue, and it may well be
a few more days.

>   6183# Handle the remaining objects by creating one last
>   6184# reloadable object file.  All subsequent reloadable object
>   6185# files will link in the last one created.
>   6186test -z "$concat_cmds" || concat_cmds=$concat_cmds~
>   6187eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist 
> $last_robj~\$RM $last_robj\"
>   6188delfiles="$delfiles $output"
> 
> In line 6187, $last_robj is empty for me. (Why not just add it to delfiles?)

Adding it to delfiles makes the algorithm use quadratic amount of
disk space, rather than linear.

Try something like
  test -z \"$last_robj\" || \$RM $last_robj

instead of `\$RM $last_robj' (untested).

Cheers,
Ralf


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: rm -f

2007-12-21 Thread Patrick Welche
Hello Ralf!

> > I think that question still stands, but my rm -f is actually from just above
> > that spot:
> 
> Sorry, I haven't had time to look at this issue, and it may well be
> a few more days.

> Adding it to delfiles makes the algorithm use quadratic amount of
> disk space, rather than linear.

Ah!

> Try something like
>   test -z \"$last_robj\" || \$RM $last_robj
> 
> instead of `\$RM $last_robj' (untested).

I did but kept quiet ;-) essentially because I have nothing to offer re the
next hurdle:

> here1
> libtool: link: /usr/bin/grep -E -e "v.*" "sub2/.libs/liba.exp" > 
> "sub2/.libs/liba.expT"
> libtool: link: mv -f "sub2/.libs/liba.expT" "sub2/.libs/liba.exp"
> here2
> here3
> here4
> delfiles: sub2/.libs/liba.la-1.o
> cmds: $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname 
> ${wl}-retain-symbols-file $wl$export_s
ymbols -o $lib
> here5
> libtool: link: gcc -shared sub2/.libs/liba.la-1.o -Wl,-soname 
> -Wl,liba.so.0 -Wl,-retain-symbols-file -Wl,sub2/
.libs/liba.exp -o sub2/.libs/liba.so.0.0
> /stresstest.at:251: exit code was 1, expected 0
> 55. stresstest.at:31: 55. Link option thorough search test 
> (stresstest.at:31): FAILED (stresstest.at:251)

Cheers,

Patrick


___
http://lists.gnu.org/mailman/listinfo/libtool