From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Freja Nordsiek Newsgroups: gmane.lisp.guile.bugs 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 Message-ID: References: <87bmttw8cv.fsf@pobox.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=94eb2c0c2fc26067ef054ab19a96 X-Trace: blaine.gmane.org 1489501579 8825 195.159.176.226 (14 Mar 2017 14:26:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 14 Mar 2017 14:26:19 +0000 (UTC) Cc: 24657-done@debbugs.gnu.org To: Andy Wingo Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Mar 14 15:26:09 2017 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cnnOo-00014Y-In for guile-bugs@m.gmane.org; Tue, 14 Mar 2017 15:26:06 +0100 Original-Received: from localhost ([::1]:59762 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnnOt-0003Vc-5Z for guile-bugs@m.gmane.org; Tue, 14 Mar 2017 10:26:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnnOn-0003VW-17 for bug-guile@gnu.org; Tue, 14 Mar 2017 10:26:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cnnOk-0000vb-CJ for bug-guile@gnu.org; Tue, 14 Mar 2017 10:26:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57578) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cnnOk-0000vW-8c for bug-guile@gnu.org; Tue, 14 Mar 2017 10:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cnnOk-0001DH-2p for bug-guile@gnu.org; Tue, 14 Mar 2017 10:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Freja Nordsiek Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 14 Mar 2017 14:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24657 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 24657-done@debbugs.gnu.org id=D24657.14895015514645 (code D ref 24657); Tue, 14 Mar 2017 14:26:02 +0000 Original-Received: (at 24657-done) by debbugs.gnu.org; 14 Mar 2017 14:25:51 +0000 Original-Received: from localhost ([127.0.0.1]:55777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cnnOY-0001Cq-VS for submit@debbugs.gnu.org; Tue, 14 Mar 2017 10:25:51 -0400 Original-Received: from mail-wm0-f45.google.com ([74.125.82.45]:38702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cnnOX-0001Cd-1R for 24657-done@debbugs.gnu.org; Tue, 14 Mar 2017 10:25:49 -0400 Original-Received: by mail-wm0-f45.google.com with SMTP id t189so340195wmt.1 for <24657-done@debbugs.gnu.org>; Tue, 14 Mar 2017 07:25:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=83Yk7iHVqdj38dhTapvbKyzbrJ9HUCdKrtA6yfJ9aM4=; b=n3GJrIJX+LjALkvbkiKeGB3lPW7VOlvdigaSA6O/zgQRkpBjwcfXc73YjiI1iO3haF MBHgBr3rn5bYfybNhSqa7xSOSSKQ3/9l0Sug+BBKqcRsoHCiJ6QkQBwzYN6z0fL5sXU/ nJtPxuukucZeWQyRlAHHjyV1c936ZhWgKmubjHJ0wZfpmzz3n1rOHNSDz7YgMMsX4ToU ELymiqVMsl6kOITfYKlrv29iG9bumLNGchSlMuNnomMWHi+PMZdUMFE8aKMCmsMCDewH SQaekgxmvHnuNLNd1i8XQ4Gz80trdfr5/FUnjVha7DQFYFdbzRBGdgepSOio08nOpRzP Yveg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=83Yk7iHVqdj38dhTapvbKyzbrJ9HUCdKrtA6yfJ9aM4=; b=NDxnjUmbW778hngoqDwUg4sU03kyAcOmPr+BgaAals07bV3Cnstkv78LCgBaRIjPbN nKMqSMzlfT/Pmh+0gXXMmTqzVMAH7sQC1QMexYgqPV+D/JLmG5gZTxIq4ym9QbHAFmHo ZRLH5/yRe/qyQ1h7DYC2Ac8GAArmivJHBjyJJ9xAcexUIjsi/SgOnIYocCHu9SgGns27 7m35HACMG62ssge7TWb0zoP+RgM/StrYN/9n1A0p2yVOujJOfvDlFzUTgy4H4o8VzsyY wVDX8rHEx1asPGyjibXi5VDzQRnwsEzJdhso8n2VJvzx8Cz27DN8VgOKOhRP+LibCJX2 fSPw== X-Gm-Message-State: AFeK/H3DqIr2mFuelV/6x1gUwMaYDJLIx+oPMPGp3itxg+RTI+5YazwWVD1t+z7K7fGPgbAcvz+nivSScN0pSQ== X-Received: by 10.28.208.7 with SMTP id h7mr33533wmg.79.1489501543220; Tue, 14 Mar 2017 07:25:43 -0700 (PDT) Original-Received: by 10.28.234.73 with HTTP; Tue, 14 Mar 2017 07:25:42 -0700 (PDT) In-Reply-To: <87bmttw8cv.fsf@pobox.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:8682 Archived-At: --94eb2c0c2fc26067ef054ab19a96 Content-Type: text/plain; charset=UTF-8 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 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 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 > --94eb2c0c2fc26067ef054ab19a96 Content-Type: text/x-patch; charset=US-ASCII; name="0001-Fixed-reversed-version-order-bug-in-GUILE_PROGS-Auto.patch" Content-Disposition: attachment; filename="0001-Fixed-reversed-version-order-bug-in-GUILE_PROGS-Auto.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_j09mmjme1 RnJvbSAyMDVmNDFkNDFiOTRmMTI2NzAzOTRlYzUyNmRkZGVhZjE0MTZkNzQwIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBGcmVqYSBOb3Jkc2llayA8Zm5vcmRzaWVAZ21haWwuY29tPgpE YXRlOiBUdWUsIDE0IE1hciAyMDE3IDE1OjE0OjQ3ICswMTAwClN1YmplY3Q6IFtQQVRDSF0gRml4 ZWQgcmV2ZXJzZWQgdmVyc2lvbiBvcmRlciBidWcgaW4gR1VJTEVfUFJPR1MgQXV0b2NvbmYKIG1h Y3JvLgoKLS0tCiBtZXRhL2d1aWxlLm00IHwgNCArKy0tCiAxIGZpbGUgY2hhbmdlZCwgMiBpbnNl cnRpb25zKCspLCAyIGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL21ldGEvZ3VpbGUubTQgYi9t ZXRhL2d1aWxlLm00CmluZGV4IDRhMmUyODUuLjUwMWEyMWMgMTAwNjQ0Ci0tLSBhL21ldGEvZ3Vp bGUubTQKKysrIGIvbWV0YS9ndWlsZS5tNApAQCAtMjM0LDggKzIzNCw4IEBAIEFDX0RFRlVOKFtH VUlMRV9QUk9HU10sCiAgIF9ndWlsZV9jYW5kaWRhdGVzPWd1aWxlCiAgIF90bXA9CiAgIGZvciB2 IGluIGBlY2hvICIkX2d1aWxlX3JlcXVpcmVkX3ZlcnNpb24iIHwgdHIgLiAnICdgOyBkbwotICAg IGlmIHRlc3QgLW4gIiRfdG1wIjsgdGhlbiBfdG1wPS4kX3RtcDsgZmkKLSAgICBfdG1wPSR2JF90 bXAKKyAgICBpZiB0ZXN0IC1uICIkX3RtcCI7IHRoZW4gX3RtcD0kX3RtcC47IGZpCisgICAgX3Rt cD0kX3RtcCR2CiAgICAgX2d1aWxlX2NhbmRpZGF0ZXM9Imd1aWxlLSRfdG1wIGd1aWxlJF90bXAg JF9ndWlsZV9jYW5kaWRhdGVzIgogICBkb25lCiAKLS0gCjIuOS4zCgo= --94eb2c0c2fc26067ef054ab19a96--