GNU bug report logs - #71595
error message improvement: "only absolute run-paths are allowed"

Previous Next

Package: libtool;

Reported by: Karl Berry <karl <at> freefriends.org>

Date: Sun, 16 Jun 2024 16:07:02 UTC

Severity: normal

Done: Ileana Dumitrescu <ileanadumitrescu95 <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 71595 in the body.
You can then email your comments to 71595 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-libtool <at> gnu.org:
bug#71595; Package libtool. (Sun, 16 Jun 2024 16:07:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Karl Berry <karl <at> freefriends.org>:
New bug report received and forwarded. Copy sent to bug-libtool <at> gnu.org. (Sun, 16 Jun 2024 16:07:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Karl Berry <karl <at> freefriends.org>
To: bug-libtool <at> gnu.org
Subject: error message improvement: "only absolute run-paths are allowed"
Date: Sun, 16 Jun 2024 10:06:16 -0600
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.




Information forwarded to bug-libtool <at> gnu.org:
bug#71595; Package libtool. (Sat, 29 Jun 2024 12:14:02 GMT) Full text and rfc822 format available.

Message #8 received at 71595 <at> debbugs.gnu.org (full text, mbox):

From: Ileana Dumitrescu <ileanadumitrescu95 <at> gmail.com>
To: Karl Berry <karl <at> freefriends.org>, 71595 <at> debbugs.gnu.org
Subject: Re: bug#71595: error message improvement: "only absolute run-paths
 are allowed"
Date: Sat, 29 Jun 2024 15:12:06 +0300
[Message part 1 (text/plain, inline)]
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
[OpenPGP_0x6570EA01146F7354.asc (application/pgp-keys, attachment)]
[OpenPGP_signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-libtool <at> gnu.org:
bug#71595; Package libtool. (Sat, 29 Jun 2024 21:30:02 GMT) Full text and rfc822 format available.

Message #11 received at 71595 <at> debbugs.gnu.org (full text, mbox):

From: Karl Berry <karl <at> freefriends.org>
To: ileanadumitrescu95 <at> gmail.com
Cc: 71595 <at> debbugs.gnu.org
Subject: Re: bug#71595: error message improvement: "only absolute run-paths
 are allowed"
Date: Sat, 29 Jun 2024 15:28:55 -0600
Hi Ileana,

    Appending the option/argument should be easy to add and better for all, 

Thanks. That's the important thing.

    but the extra spaces seem to be from bootstrap.

Wow. I wonder why there are two spaces there.
And where the third space is coming from.

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

Sure. Or might be easiest to just send the proposed change to
bug-gnulib <at> gnu.org.  They likely have some reason for the way things are.

Thanks again,
Karl




Information forwarded to bug-libtool <at> gnu.org:
bug#71595; Package libtool. (Mon, 01 Jul 2024 15:32:02 GMT) Full text and rfc822 format available.

Message #14 received at 71595 <at> debbugs.gnu.org (full text, mbox):

From: Ileana Dumitrescu <ileanadumitrescu95 <at> gmail.com>
To: Karl Berry <karl <at> freefriends.org>
Cc: 71595 <at> debbugs.gnu.org
Subject: Re: bug#71595: error message improvement: "only absolute run-paths
 are allowed"
Date: Mon, 1 Jul 2024 18:30:18 +0300
[Message part 1 (text/plain, inline)]
On 30/06/2024 00:28, Karl Berry wrote:
> Hi Ileana,
> 
>      Appending the option/argument should be easy to add and better for all,
> 
> Thanks. That's the important thing.

I have applied the change on the development branch:

https://git.savannah.gnu.org/cgit/libtool.git/commit/?h=development&id=33be3e965345ffeb49f22190243ea523c637a1bf

Let me know if you would like me to change it.

>      but the extra spaces seem to be from bootstrap.
> 
> Wow. I wonder why there are two spaces there.
> And where the third space is coming from.

I am not sure. I would have to look into it more.

>      I do not have commit permissions for gnulib-modules/bootstrap, but
>      I could do a pull request for this if you wanted.
> 
> Sure. Or might be easiest to just send the proposed change to
> bug-gnulib <at> gnu.org.  They likely have some reason for the way things are.

Okay, I will ask.

-- 
Ileana Dumitrescu

GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354
[OpenPGP_0x6570EA01146F7354.asc (application/pgp-keys, attachment)]
[OpenPGP_signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-libtool <at> gnu.org:
bug#71595; Package libtool. (Mon, 01 Jul 2024 22:21:02 GMT) Full text and rfc822 format available.

Message #17 received at 71595 <at> debbugs.gnu.org (full text, mbox):

From: Karl Berry <karl <at> freefriends.org>
To: ileanadumitrescu95 <at> gmail.com
Cc: 71595 <at> debbugs.gnu.org
Subject: Re: bug#71595: error message improvement: "only absolute run-paths
 are allowed"
Date: Mon, 1 Jul 2024 16:19:54 -0600
    I have applied the change on the development branch:
    https://git.savannah.gnu.org/cgit/libtool.git/commit/?h=development&id=33be3e965345ffeb49f22190243ea523c637a1bf

Thanks much.

    Let me know if you would like me to change it.

It's a minor point, but my suggested wording of 
  error: argument to -rpath is not absolute: libfoo.lo
feels even clearer to me, since it explains what libtool is parsing
(which is not what the user is intending).

Also, I didn't realize the error message occurred twice. Given that, I
think the best practice would be to make the two cases have different
wording, so that users/debuggers/maintainers can discern which is being
triggered. (I don't know what the second case is, so I don't have a
suggestion, sorry.)

    Okay, I will ask.

Thanks for that too. --all the best, karl.




Information forwarded to bug-libtool <at> gnu.org:
bug#71595; Package libtool. (Tue, 02 Jul 2024 14:00:02 GMT) Full text and rfc822 format available.

Message #20 received at 71595 <at> debbugs.gnu.org (full text, mbox):

From: Ileana Dumitrescu <ileanadumitrescu95 <at> gmail.com>
To: Karl Berry <karl <at> freefriends.org>
Cc: 71595 <at> debbugs.gnu.org
Subject: Re: bug#71595: error message improvement: "only absolute run-paths
 are allowed"
Date: Tue, 2 Jul 2024 16:57:54 +0300
[Message part 1 (text/plain, inline)]
On 02/07/2024 01:19, Karl Berry wrote:
>      I have applied the change on the development branch:
>      https://git.savannah.gnu.org/cgit/libtool.git/commit/?h=development&id=33be3e965345ffeb49f22190243ea523c637a1bf
> 
> Thanks much.
> 
>      Let me know if you would like me to change it.
> 
> It's a minor point, but my suggested wording of
>    error: argument to -rpath is not absolute: libfoo.lo
> feels even clearer to me, since it explains what libtool is parsing
> (which is not what the user is intending).
> 
> Also, I didn't realize the error message occurred twice. Given that, I
> think the best practice would be to make the two cases have different
> wording, so that users/debuggers/maintainers can discern which is being
> triggered. (I don't know what the second case is, so I don't have a
> suggestion, sorry.)

Sorry, I see that I overlooked that. It has been applied now in the
attached patch with a rework of the wording for the second case.

Here is a reference from the manpage for ld:
```
For compatibility with other ELF linkers, if the -R option is followed
by a directory name, rather than a file name, it is treated as the
-rpath option.
```
If I understand it correctly, the new wording should be accurate. Let
me know what you think.

>      Okay, I will ask.
> 
> Thanks for that too. --all the best, karl.

Here is the relevant commit for why the spacing was added:

https://git.savannah.gnu.org/cgit/libtool.git/commit/?h=master&id=eda239d9899e81f616cc34c55c84fd2dddc4f2eb

Here is Gary's further explanation:
  https://github.com/gnulib-modules/bootstrap/issues/33

As I stated in the issue, I do not think there is any good reason to
remove the additional spacing, but if you have one, please continue
this on the thread in gnulib-modules/bootstrap.

-- 
Ileana Dumitrescu

GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354
[0001-ltmain-Further-error-message-improvement.patch (text/x-patch, attachment)]
[OpenPGP_0x6570EA01146F7354.asc (application/pgp-keys, attachment)]
[OpenPGP_signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-libtool <at> gnu.org:
bug#71595; Package libtool. (Tue, 02 Jul 2024 22:25:02 GMT) Full text and rfc822 format available.

Message #23 received at 71595 <at> debbugs.gnu.org (full text, mbox):

From: Karl Berry <karl <at> freefriends.org>
To: ileanadumitrescu95 <at> gmail.com
Cc: 71595 <at> debbugs.gnu.org
Subject: Re: bug#71595: error message improvement: "only absolute run-paths
 are allowed"
Date: Tue, 2 Jul 2024 16:24:39 -0600
    attached patch with a rework of the wording for the second case.

Looks perfect to me.

    Here is the relevant commit for why the spacing was added:
    ...
    https://github.com/gnulib-modules/bootstrap/issues/33

I can see the point, and no improvement is apparent. It still seems an
unfortunate outcome, but certainly not worth any of us spending more
time on it :).

Thanks Ileana! So glad you've started looking after libtool. --best, karl.




Reply sent to Ileana Dumitrescu <ileanadumitrescu95 <at> gmail.com>:
You have taken responsibility. (Wed, 03 Jul 2024 14:02:02 GMT) Full text and rfc822 format available.

Notification sent to Karl Berry <karl <at> freefriends.org>:
bug acknowledged by developer. (Wed, 03 Jul 2024 14:02:02 GMT) Full text and rfc822 format available.

Message #28 received at 71595-done <at> debbugs.gnu.org (full text, mbox):

From: Ileana Dumitrescu <ileanadumitrescu95 <at> gmail.com>
To: 71595-done <at> debbugs.gnu.org, Karl Berry <karl <at> freefriends.org>
Subject: Re: bug#71595: error message improvement: "only absolute run-paths
 are allowed"
Date: Wed, 3 Jul 2024 17:00:15 +0300
[Message part 1 (text/plain, inline)]
On 03/07/2024 01:24, Karl Berry wrote:
>      attached patch with a rework of the wording for the second case.
> 
> Looks perfect to me.

I am glad! I have applied it to development:

https://git.savannah.gnu.org/cgit/libtool.git/commit/?h=development&id=f5a7acee1db1b785ec2506e89026fb46ebd518a8

>      Here is the relevant commit for why the spacing was added:
>      ...
>      https://github.com/gnulib-modules/bootstrap/issues/33
> 
> I can see the point, and no improvement is apparent. It still seems an
> unfortunate outcome, but certainly not worth any of us spending more
> time on it :).
> 
> Thanks Ileana! So glad you've started looking after libtool. --best, karl.

Thank you for your bug reports! I am happy to help and continue to learn
more from experienced hackers :)

-- 
Ileana Dumitrescu

GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354
[OpenPGP_0x6570EA01146F7354.asc (application/pgp-keys, attachment)]
[OpenPGP_signature.asc (application/pgp-signature, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 01 Aug 2024 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 77 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.