Subject: Re: bug#71595: error message improvement: "only absolute run-paths are allowed"

From: Ileana Dumitrescu <[email-masked]>
Date: Sat, 29 Jun 2024 15:12:06 +0300

Hi Karl,

On 16/06/2024 19:06, Karl Berry wrote:
> With a libtool invocation like this (comes from the Automake test
> instdir-ltlib.sh, which is intentionally testing empty directory values):
> 
> /bin/sh ./libtool  --tag=CC   --mode=link cc  -g -O2   -o libfoo.la -rpath  libfoo.lo
> 
> libtool reports:
> 
> libtool:   error: only absolute run-paths are allowed
> 
> I gather the problem is a missing argument to -rpath, which I see
> reported in several places over the years.
> 
> I suggest that it would be clearer if the error message included the
> offending option and argument, as in:
> 
> libtool: error: argument to -rpath is not absolute: libfoo.lo
> 
> (I also don't understand why there are three spaces
> after "libtool:" instead of one, but whatever.) --thanks, karl.
> 

Thank you for your report! Appending the option/argument should be
easy to add and better for all, but the extra spaces seem to be
from bootstrap.

This code block should be the source:
```
# func_error ARG...
# -----------------
# Echo program name prefixed message to standard error.
func_error ()
{
     $debug_cmd

     $require_term_colors

     func_echo_infix_1 "  $tc_standout${tc_red}error$tc_reset" "$*" >&2
}

# func_fatal_error ARG...
# -----------------------
# Echo program name prefixed message to standard error, and exit.
func_fatal_error ()
{
     $debug_cmd

     func_error "$*"
     exit $EXIT_FAILURE
}
```

I do not have commit permissions for gnulib-modules/bootstrap, but
I could do a pull request for this if you wanted.

-- 
Ileana Dumitrescu

GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354