[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24657: Autoconf macro GUILE_PROGS only looks for guile without versi
From: |
Freja Nordsiek |
Subject: |
bug#24657: Autoconf macro GUILE_PROGS only looks for guile without version suffix even if given version - patch included |
Date: |
Tue, 14 Mar 2017 15:25:42 +0100 |
Found a bug in the modifications you made. Sorry for not catching this
before it got included into the Guile 2.1.8 release.
When constructing the candidates for the guile executable
(_guile_candidates), the version numbers essentially get reverse. This
is not noticeable for 2.2 since 2.2 reversed is still 2.2. But it is a
major issue for Guile 2.0.x and 1.8.x where 0.2 and 8.1 get generated
meaning the right executables could be missed. For the current version
of GUILE_PROGS, looking for 2.0 results in the following candidates
guile-0.2 guile0.2 guile-2 guile2 guile
and for 1.8
guile-8.1 guile8.1 guile-1 guile1 guile
The fix is luckily pretty trivial. A patch is attached.
For convenience of anyone trying to reproduce this bug, here are two
shell scripts that will take the version as the first input argument
and return the generated guile executable candidates.
The version with the bug is
#!/bin/sh
_guile_required_version=$1
_guile_candidates=guile
_tmp=
for v in `echo "$_guile_required_version" | tr . ' '`; do
if test -n "$_tmp"; then _tmp=.$_tmp; fi
_tmp=$v$_tmp
_guile_candidates="guile-$_tmp guile$_tmp $_guile_candidates"
done
echo $_guile_candidates
And the version with the fix is
#!/bin/sh
_guile_required_version=$1
_guile_candidates=guile
_tmp=
for v in `echo "$_guile_required_version" | tr . ' '`; do
if test -n "$_tmp"; then _tmp=$_tmp.; fi
_tmp=$_tmp$v
_guile_candidates="guile-$_tmp guile$_tmp $_guile_candidates"
done
echo $_guile_candidates
On Thu, Feb 23, 2017 at 10:43 AM, Andy Wingo <address@hidden> wrote:
> Hi Freja,
>
> Thanks for this bug report and the patch, and sorry for the delay :)
>
> On Mon 10 Oct 2016 11:45, Freja Nordsiek <address@hidden> writes:
>
>> While trying to build a package that uses guile with autotools, I
>> found a problem in the provided GUILE_PROGS macro.
>>
>> The macro searches for the executables guile, guild, guile-config, and
>> guile-tools. The problem is that even if the macro is given the
>> version, it only looks for guile, guild, etc. with no version suffix.
>
> Applied your patch with some small modifications; attached. Let me know
> if it works for you!
>
> Andy
>
0001-Fixed-reversed-version-order-bug-in-GUILE_PROGS-Auto.patch
Description: Text Data
- bug#24657: Autoconf macro GUILE_PROGS only looks for guile without version suffix even if given version - patch included,
Freja Nordsiek <=