GNU bug report logs - #51144
GNU grep 3.7 fails to build on FreeBSD

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: grep; Reported by: Alexey Dokuchaev <danfe@HIDDEN>; dated Tue, 12 Oct 2021 03:13:02 UTC; Maintainer for grep is bug-grep@HIDDEN.

Message received at 51144 <at> debbugs.gnu.org:


Received: (at 51144) by debbugs.gnu.org; 16 Oct 2021 21:54:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 16 17:54:27 2021
Received: from localhost ([127.0.0.1]:43206 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mbrdL-00018k-JE
	for submit <at> debbugs.gnu.org; Sat, 16 Oct 2021 17:54:27 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:50780)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1mbrdK-00018W-Bf
 for 51144 <at> debbugs.gnu.org; Sat, 16 Oct 2021 17:54:26 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id C326B1600BB;
 Sat, 16 Oct 2021 14:54:20 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id aFy0DV08yhsN; Sat, 16 Oct 2021 14:54:19 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 183481600C2;
 Sat, 16 Oct 2021 14:54:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id n5BsizriHG-j; Sat, 16 Oct 2021 14:54:18 -0700 (PDT)
Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com
 [172.91.119.151])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id C90011600BB;
 Sat, 16 Oct 2021 14:54:18 -0700 (PDT)
Subject: Re: bug#51144: GNU grep 3.7 fails to build on FreeBSD
To: noloader@HIDDEN
References: <20211012025300.GA43189@HIDDEN>
 <a24e453e-9e54-b5f2-61df-2fe64bb49aec@HIDDEN>
 <20211013040258.GA99982@HIDDEN>
 <d449ea50-a5a2-1d86-8011-ca38467eb4d1@HIDDEN>
 <20211014140254.GA35593@HIDDEN>
 <594312a4-d474-d2f0-1358-e4ff19f8b4e7@HIDDEN>
 <20211015073254.GA82090@HIDDEN> <20211016184017.11daf496@HIDDEN>
 <9f102510-fe6a-8156-8a00-962538bfef24@HIDDEN>
 <CAH8yC8=6jwUmqjoJfJZwuq3qVyPTsNBm7gZ_xoHx=ceJ5Yj2WA@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
Message-ID: <95f3a678-80dd-955c-b8d0-90e5b692d366@HIDDEN>
Date: Sat, 16 Oct 2021 14:54:18 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.13.0
MIME-Version: 1.0
In-Reply-To: <CAH8yC8=6jwUmqjoJfJZwuq3qVyPTsNBm7gZ_xoHx=ceJ5Yj2WA@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.4 (--)
X-Debbugs-Envelope-To: 51144
Cc: Alexey Dokuchaev <danfe@HIDDEN>,
 =?UTF-8?Q?T=c4=b3l_Coosemans?= <tijl@HIDDEN>,
 Gnulib bugs <bug-gnulib@HIDDEN>, Bruno Haible <bruno@HIDDEN>,
 51144 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.4 (---)

On 10/16/21 2:06 PM, Jeffrey Walton wrote:
> Related, that may affect Solaris, too. I believe Sun prefers the amd64 prefix.

We should be OK there. I just did a "pkg install editor/gnu-emacs" on 
Solaris 11.4, and its (emacs-version) returns "GNU Emacs 25.2.1 
(x86_64-pc-solaris2.11, X toolkit, Xaw scroll bars)" which means it's 
using x86_64. (Though, eeeeuuuw, Xaw? Really?)


> And there's no telling what some of the other lesser known distros are doing.

Sure, but distros can put any string they want there; we can't possibly 
support them all, and it's good to promote a common standard.




Information forwarded to bug-grep@HIDDEN:
bug#51144; Package grep. Full text available.

Message received at 51144 <at> debbugs.gnu.org:


Received: (at 51144) by debbugs.gnu.org; 16 Oct 2021 21:07:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 16 17:07:19 2021
Received: from localhost ([127.0.0.1]:43163 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mbqtj-0008Qf-O8
	for submit <at> debbugs.gnu.org; Sat, 16 Oct 2021 17:07:19 -0400
Received: from mail-pj1-f54.google.com ([209.85.216.54]:53875)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <noloader@HIDDEN>) id 1mbqth-0008QR-7K
 for 51144 <at> debbugs.gnu.org; Sat, 16 Oct 2021 17:07:17 -0400
Received: by mail-pj1-f54.google.com with SMTP id ls18so9621291pjb.3
 for <51144 <at> debbugs.gnu.org>; Sat, 16 Oct 2021 14:07:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:references:in-reply-to:reply-to:from:date:message-id
 :subject:to:cc:content-transfer-encoding;
 bh=UHQHLjOtwQTQGtCG0ppBNNLaicIs7mwcm0865YQ4LTo=;
 b=RuA9oXLRCC6Tk70eTwvMUp/zAM5I981/i96JZgQTlYlC1EmtJrkuE31a0iNSXf2Dj2
 7prjaVIVnCa9dkLDtUjo45kcPJvdsU1FX+oM72CKGuTBIqE67Rwacw4dxZmyoNFG9gMf
 NqarbIaMFJ6T+NVBuquKK0bO6y5EhGC/8AAGzafw0mACzoL1MWBPQ52VpUeD5kYGBju6
 nnYM+t5YxGSZd8SkEDuDzStaDSJn7YHhTDpwopEoxMSHsSuR9hZEM2erQ4YZDTJr8P/a
 XmqdezZctSSzYvQOc04/ngnvnzw/sKVjAsJAAIAUL80IObRTHQPWy4biUt9JEvKzwGzV
 MjPA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:reply-to
 :from:date:message-id:subject:to:cc:content-transfer-encoding;
 bh=UHQHLjOtwQTQGtCG0ppBNNLaicIs7mwcm0865YQ4LTo=;
 b=2lAse90tamAynboUsrsHT3jyBwHJIy+nR302NAVsnms686XevzmGotxte/s5hfPoZR
 caOCWGuxtsFPW0MC6VlaotIqCC331jWhVAMtLoFU7UV04YMZM+SkjKnmt9vMeln4x2k+
 iEGNSsO/h82fueOgGZAyuq7nqh+vsvaRCFnoPldfCvexstOkim8k4U0oi5p56D515YSi
 EZz99Y9RU6zhd23PQMJUuW+XABt+njN1RL8/xH5vtm25/8s1MzSN3YThArfbqB79cpgP
 4O6W017JxnFZtFSCOfn1z+mp1lEjjKgXGXx/3bEB03yqUH3OdmXVTmwjDvxLk+sAm2y2
 x6eg==
X-Gm-Message-State: AOAM532D39GfZFRG9NBjWtl9Du8S+6ksQdtv+SU9A69RJUTBsiQ2zX9Y
 qCHIv9MYtWV039FG2R3Zu2Xu0bU5/vgW7617pL0=
X-Google-Smtp-Source: ABdhPJyNF4EVnFqz9EITpiLcqgLeV5OoTVZcIhvZnRucbKgVQ1yG/AA+Aq9LZAucfBkYETNRz/dQqe2dq45Blg5KPUs=
X-Received: by 2002:a17:90b:696:: with SMTP id
 m22mr37470170pjz.108.1634418431460; 
 Sat, 16 Oct 2021 14:07:11 -0700 (PDT)
MIME-Version: 1.0
References: <20211012025300.GA43189@HIDDEN>
 <a24e453e-9e54-b5f2-61df-2fe64bb49aec@HIDDEN>
 <20211013040258.GA99982@HIDDEN>
 <d449ea50-a5a2-1d86-8011-ca38467eb4d1@HIDDEN>
 <20211014140254.GA35593@HIDDEN>
 <594312a4-d474-d2f0-1358-e4ff19f8b4e7@HIDDEN>
 <20211015073254.GA82090@HIDDEN> <20211016184017.11daf496@HIDDEN>
 <9f102510-fe6a-8156-8a00-962538bfef24@HIDDEN>
In-Reply-To: <9f102510-fe6a-8156-8a00-962538bfef24@HIDDEN>
From: Jeffrey Walton <noloader@HIDDEN>
Date: Sat, 16 Oct 2021 17:06:56 -0400
Message-ID: <CAH8yC8=6jwUmqjoJfJZwuq3qVyPTsNBm7gZ_xoHx=ceJ5Yj2WA@HIDDEN>
Subject: Re: bug#51144: GNU grep 3.7 fails to build on FreeBSD
To: Paul Eggert <eggert@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 51144
Cc: Alexey Dokuchaev <danfe@HIDDEN>,
 =?UTF-8?Q?T=C4=B3l_Coosemans?= <tijl@HIDDEN>,
 Gnulib bugs <bug-gnulib@HIDDEN>, Bruno Haible <bruno@HIDDEN>,
 51144 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: noloader@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sat, Oct 16, 2021 at 12:53 PM Paul Eggert <eggert@HIDDEN> wrote:
>
> On 10/16/21 9:40 AM, T=C4=B3l Coosemans wrote:
> > Where
> > necessary we simply pass --build=3Dx64_64-portbld-freebsd$(version).  A=
n
> > example is gcc.
>
> Could you pass --build=3Dx64_64-portbld-freebsd$(version) to every
> 'configure' invocation, not just gcc's and a few others?
>
> If I understand you correctly, doing that would have avoided this
> particular problem, and it would avoid other potential problems with
> gnulib/m4's float_h.m4, host-cpu-c-abi.m4, lib-prefix.m4, multiarch.m4,
> printf.m4, as well as in GNU projects other than Gnulib (I haven't tried
> to catalog them).

Related, that may affect Solaris, too. I believe Sun prefers the amd64 pref=
ix.

And there's no telling what some of the other lesser known distros are doin=
g.

Jeff




Information forwarded to bug-grep@HIDDEN:
bug#51144; Package grep. Full text available.

Message received at 51144 <at> debbugs.gnu.org:


Received: (at 51144) by debbugs.gnu.org; 16 Oct 2021 17:06:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 16 13:06:43 2021
Received: from localhost ([127.0.0.1]:42954 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mbn8q-0002XS-0R
	for submit <at> debbugs.gnu.org; Sat, 16 Oct 2021 13:06:43 -0400
Received: from mailsec117.isp.belgacom.be ([195.238.20.113]:64544)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tijl@HIDDEN>) id 1mbmjU-00084c-38
 for 51144 <at> debbugs.gnu.org; Sat, 16 Oct 2021 12:40:28 -0400
IronPort-SDR: D8bz/fI905AlN+oK3QbfatBgm4lOVjcV5ZTX+051gzcvEmmuycDklMlFs9SSBIx/zlabBPtKfo
 VUmthbNLzRDXm1fRGsk4WA+ri28uxhyrnWFj9EVSArqPdmcHA6UmjgIFw44Dz/YcX2teog3hpn
 BHGQi3v/UEW4becor2ktMKX3jaJl0/7ZErYp7Bc3ssNoHZSrpau6UZyrh95v4drbXMilN+rXHL
 woYmQ6WuPDE0UFnBEgrvw0liZNqAaBAyh1p2ibFQSsoEn7y6eHWHzjqp6HAJFjSLfhAGICy95J
 5gc=
X-IPAS-Result: =?us-ascii?q?A2AHAACi/2ph/wSs8lFaGgEBAQEBAQEBAQEDAQEBARIBA?=
 =?us-ascii?q?QEBAgIBAQEBQAmBPQQBAQEBCwGDChVWAWuNSoVpAYIkAzgBiQyCOZAiFIFoC?=
 =?us-ascii?q?wEBAQEBAQEBATYUBAEBhQACgk0mNQgOAQIEAQEBAQMCAwEBAQEFAQEGAQEBA?=
 =?us-ascii?q?QEBBQQBgSOFLzkNgjUpAYNjAQEBAQIBOjEOEAsOBAYuSQ4GE4JygmYlq2t4g?=
 =?us-ascii?q?TOBAYhRgSeBOgGOFUOBS0KEPz6EEAESAYYeBIwcLByBAhMBgUslgTKRKo5eg?=
 =?us-ascii?q?geZcoIdgl9cikqUEEuFMpA1kTKWC6d8AYEhcE0wCDuCaQlIGQ+OLBaBQYxvP?=
 =?us-ascii?q?wMwOAIGCwEBAwmCPJBkAQE?=
IronPort-PHdr: A9a23:5A/RRhafjknyb+iJ9woOK2f/LTFB14qcDmcuAnoPtbtCf+yZ8oj4O
 wSHvLMx1gePB9yFoKsc0qL/iOPJYSQ4+5GPsXQPItRndiQuroEopTEmG9OPEkbhLfTnPGQQF
 cVGU0J5rTngaRAGUMnxaEfPrXKs8DUcBgvwNRZvJuTyB4Xek9m72/q99pHNfwlEniSxba5zI
 Rm5sAndqtQaipZ+J6gszRfEvmFGcPlMy2NyIlKTkRf85sOu85Nm7i9dpfEv+dNeXKvjZ6g3Q
 qBWAzogM2Au+c3krgLDQheV5nsdSWoZjBxFCBXY4R7gX5fxtiz6tvdh2CSfIMb7Q6w4VSik4
 qx2UxLjljsJOCAl/2HWksxwjbxUoBS9pxxk3oXYZJiZOOdicq/BeN8XQ3dKUMRMWCxbGo6yY
 YsBAfQcM+hbrYb9qVQBogexCwS3GOPiyCVFimPq0aEmzegsFxzN0gw6H9IJtXTZtMv7NqIWU
 euo0qTIyjLDb+hI1jf48ofIdAshquyLULJscMrRy00vGhjFgFWKt4PqIS6Y2PkDvWSB6OpgT
 +2vhnchpgpsrTeh2t0ihZPVhoIJ1F/E7yN5zZ4rKdC4SkN2bsCpHZheuSyZKoZ7QN4vTn1mt
 SokzrALpJ22cTQUxJg6yBPSd/OKfoiG7B79WuicISl0iXB7db6hgRu57Eauyur5Vsau0VZKq
 DJIktzDu3wX1hzT7M6KQeZ+8Ee5wTuC1B3f5vtaLU07i6bXMYMtz7wumpYJvknOGDL9ll/sg
 6+MbEok//Cl6+HgYrr7uJCRL5R0igTiMqQ2ncy/HPg4PhAOX2eF/eS806Xu/U7jT7VOj/02l
 7fWsIrdJcgBuq65Ag1V0oI55xmjCDem188YkmcCLF1ffhKHlJLlO1bUIPD3Ffu/glKsnyl3x
 /3ePbDtH4/BImbMnbv/Z7px9kxRxBQpwd1Q/55UD6sOIPP3Wk//rtzYCRo5PhSow+bmCtV90
 pgTWWyVAqCHLqzdqkSI6f81L+mLfo8Vty7xK+I56P72kX85hVgdcLGy0psNdXC4GPNmLl6Fb
 nrog9cBCn8KshA5TOzwh12ISSRTaGqqX6Ig+jE7D5qrAIfeSoywj7GM0zy2EYBIaW9dEV+MD
 Hjod56eV/cDbiKSP9VtkjseVbiuU4Uhzw2htBfmy7p7KerZ4jMXtZ3s1Ndr/e3TiQo/+iBvD
 8iHzmGCU2V0kXkSSzAowa9/vFR3yk2f3qhgn/xYCdtT6utUXQggM57cwfJ1Bsv0WgLaY9eFU
 kymQsj1SQ02G/s1zs8Dcg5RHNa/hRDK0jTiV7MckbKGLJov7+TGwi6iCdx6ziP6M61ppF4hW
 cZKPGu9zvpj9grXL6DTnkizrIrscr4Tin2evFyfxHaD6RkLGDV7Vr/ICDVGPhO+kA==
IronPort-Data: A9a23:bWZnT6x0DNbWL1rOfEx6t+dhxyrEfRIJ4+MujC+fZmUNrF6WrkUFz
 DYcWz+OOKnYM2b3Loh0bYvi8UsC7JfSm9NgT1Rv/1hgHilAwSbn6XR1DatR0we6dJCroJdPt
 p1GAjX4wUNdokb0/n9BCJC4xZVH/fzOFueU5NLsYHgrHFY8EXl503qPpsZg6mJWqYnha++yk
 Y6qyyHvEAfNN+lcaz98Bwqr8XuDjdyq0N8qlgVWicNj4Dcyo0Io4Kc3fsldGZdXrr58RYZWT
 86bpF2wE/iwEx0FUrtJmZ6jGqEGryK70QWm0hJrt6aebhdq9xIA77llH+IgMUp1om6nufVz+
 txDjMnlIespFvWkdOU1UBBcEiRzJ6oA5L7FJT60tsuIwkjPdWCqxO9hZK00Fd1BvLwrWycXq
 qZedFjhbTja7w6y6K66SO1EiN4uIcPwMMUYoH4IITTxVKx6Gc+eH/mQjTNe9DwKpJhoO9TTW
 /RHWyptSU/JfzMIAVhCXfrSm8/t3BETaQZwokiIo60f6GzS1xQ316LiWPKII4XWGe1Zk0ySu
 23duWv/H1cdLtP34TeK/X+2msfEhmXmU4YbUrC065ZCjFSVyGE7DgYLE0GmycRVkWbiHYsAc
 QlOpnBr/fF0/UCwSpzxThv+oWWc+BQRX9VZGOo/rguAokbJ3zuk6qE/ZmYpQLQbWAUeHFTGC
 nfhcxjV6fCDfVFbpb9xNltZkN9qBRUoEA==
IronPort-HdrOrdr: A9a23:kuJxdqB8d+/z93/lHemX55DYdb4zR+YMi2TDsHoBKiC9E/b5qy
 nKpp8mPHDP5gr5J0tQ/OxoVJPtfZqkz+8T3WBJB8bFYOCEggqVxeNZnPLfKlTbckWVygc378
 hdmsZFZeEZ2TBB/KLHCPTRKadD/OW6
X-IronPort-Anti-Spam-Filtered: true
X-ProximusIPWarmup: true
Received: from 4.172-242-81.adsl-dyn.isp.belgacom.be (HELO
 kalimero.tijl.coosemans.org) ([81.242.172.4])
 by relay.proximus.be with ESMTP; 16 Oct 2021 18:40:21 +0200
Received: from localhost (localhost [127.0.0.1])
 by kalimero.tijl.coosemans.org (8.16.1/8.16.1) with ESMTP id 19GGeI1I002090;
 Sat, 16 Oct 2021 18:40:19 +0200 (CEST)
 (envelope-from tijl@HIDDEN)
Date: Sat, 16 Oct 2021 18:40:17 +0200
From: =?UTF-8?B?VMSzbA==?= Coosemans <tijl@HIDDEN>
To: Alexey Dokuchaev <danfe@HIDDEN>
Subject: Re: bug#51144: GNU grep 3.7 fails to build on FreeBSD
Message-ID: <20211016184017.11daf496@HIDDEN>
In-Reply-To: <20211015073254.GA82090@HIDDEN>
References: <20211012025300.GA43189@HIDDEN>
 <a24e453e-9e54-b5f2-61df-2fe64bb49aec@HIDDEN>
 <20211013040258.GA99982@HIDDEN>
 <d449ea50-a5a2-1d86-8011-ca38467eb4d1@HIDDEN>
 <20211014140254.GA35593@HIDDEN>
 <594312a4-d474-d2f0-1358-e4ff19f8b4e7@HIDDEN>
 <20211015073254.GA82090@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 51144
X-Mailman-Approved-At: Sat, 16 Oct 2021 13:06:38 -0400
Cc: Gnulib bugs <bug-gnulib@HIDDEN>, Paul Eggert <eggert@HIDDEN>,
 51144 <at> debbugs.gnu.org, Bruno Haible <bruno@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On Fri, 15 Oct 2021 14:32:54 +0700 Alexey Dokuchaev <danfe@HIDDEN> wrote:
> On Thu, Oct 14, 2021 at 10:34:55AM -0700, Paul Eggert wrote:
> > On 10/14/21 7:02 AM, Alexey Dokuchaev wrote:  
> > > On Wed, Oct 13, 2021 at 11:47:34AM -0700, Paul Eggert wrote:  
> > > > On 10/12/21 9:02 PM, Alexey Dokuchaev wrote:  
> > > > > Ports framework does several things which affect GNU configure
> > > > > scripts, particularly, it replaces build-aux/config.guess file
> > > > > with our own, where host/build tuples are derived from.
> > > > > 
> > > > > x86_64 is spelled as amd64 in FreeBSD  
> > > > 
> > > > Ouch. When porting, does this mean you need to look for places where
> > > > GNU source code says "x86_64" and replace many of these places with
> > > > "amd64" before building? That sounds error-prone.  
> > > 
> > > No, of course not, typically we don't replace anything.  All we do is
> > > use our pre-built templates for config.{guess,site,sub} and pass the
> > > --build=amd64-portbld-freebsd$(version) argument to configure scripts
> > > if they are generated by GNU autotools.  
> > 
> > Surely this doesn't work if there's a configure.ac or m4/*.m4 file that
> > does something like this:
> > 
> >   if "$host_os" = x86_64; then
> >     ...
> >   fi
> > 
> > and I see examples of this in gnulib/m4's float_h.m4, host-cpu-c-abi.m4,
> > lib-prefix.m4, multiarch.m4, printf.m4, stack-direction.m4. In general
> > don't you need to also edit these files and re-run Autoconf?  
> 
> In general, we don't edit those files, and typically we only run autoconf
> when there's no pre-generated configure script, or there's something so
> very wrong about it, or generated Makefiles, that patching isn't feasible
> and we have to rebootstrap the whole thing.
> 
> About why this x86_64 vs amd64 thing does not cause massive fallout for
> us, I better ask our Autotools expert.  Tijl, can you shed some light
> here?  I've added back omitted context to the quoted parts of this email,
> I hope Paul wouldn't mind.

It is error prone, but it's rare for configure scripts to test the
architecture so no one has bothered to fix this properly.  Where
necessary we simply pass --build=x64_64-portbld-freebsd$(version).  An
example is gcc.

> > > I can't remember when was the last time I've been bitten by this. :-)  
> > 
> > Often Gnulib code will guess the right value anyway. Not always, though.
> > You ran into a case where Gnulib didn't guess and aborted. Some other
> > times, the guess may differ from what it would be if you did a plain
> > 'configure; make' from a tarball. You might want to test for that, given
> > the above list of potential problem files.
> > 
> > There may well be similar problems in configure.ac or *.m4 files
> > maintained in GNU projects other than Gnulib. Autoconf itself has
> > "x86_64" hardwired into AC_C_BIGENDIAN; I don't know whether this
> > affects FreeBSD compilers.  

This one seems to be used when testing Apple C compilers, so it doesn't
affect us.




Information forwarded to bug-grep@HIDDEN:
bug#51144; Package grep. Full text available.

Message received at 51144 <at> debbugs.gnu.org:


Received: (at 51144) by debbugs.gnu.org; 16 Oct 2021 16:53:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 16 12:53:19 2021
Received: from localhost ([127.0.0.1]:42946 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mbmvv-0008T1-Cg
	for submit <at> debbugs.gnu.org; Sat, 16 Oct 2021 12:53:19 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:51678)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1mbmvu-0008Sq-He
 for 51144 <at> debbugs.gnu.org; Sat, 16 Oct 2021 12:53:18 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id F21B6160068;
 Sat, 16 Oct 2021 09:53:12 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id DxsMtAK1oI2z; Sat, 16 Oct 2021 09:53:12 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 485E916010F;
 Sat, 16 Oct 2021 09:53:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id scQfxqBtvqfv; Sat, 16 Oct 2021 09:53:12 -0700 (PDT)
Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com
 [172.91.119.151])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 08CC7160068;
 Sat, 16 Oct 2021 09:53:12 -0700 (PDT)
Subject: Re: bug#51144: GNU grep 3.7 fails to build on FreeBSD
To: =?UTF-8?Q?T=c4=b3l_Coosemans?= <tijl@HIDDEN>,
 Alexey Dokuchaev <danfe@HIDDEN>
References: <20211012025300.GA43189@HIDDEN>
 <a24e453e-9e54-b5f2-61df-2fe64bb49aec@HIDDEN>
 <20211013040258.GA99982@HIDDEN>
 <d449ea50-a5a2-1d86-8011-ca38467eb4d1@HIDDEN>
 <20211014140254.GA35593@HIDDEN>
 <594312a4-d474-d2f0-1358-e4ff19f8b4e7@HIDDEN>
 <20211015073254.GA82090@HIDDEN> <20211016184017.11daf496@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
Message-ID: <9f102510-fe6a-8156-8a00-962538bfef24@HIDDEN>
Date: Sat, 16 Oct 2021 09:53:11 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.13.0
MIME-Version: 1.0
In-Reply-To: <20211016184017.11daf496@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.4 (--)
X-Debbugs-Envelope-To: 51144
Cc: Gnulib bugs <bug-gnulib@HIDDEN>, 51144 <at> debbugs.gnu.org,
 Bruno Haible <bruno@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.4 (---)

On 10/16/21 9:40 AM, T=C4=B3l Coosemans wrote:
> Where
> necessary we simply pass --build=3Dx64_64-portbld-freebsd$(version).  A=
n
> example is gcc.

Could you pass --build=3Dx64_64-portbld-freebsd$(version) to every=20
'configure' invocation, not just gcc's and a few others?

If I understand you correctly, doing that would have avoided this=20
particular problem, and it would avoid other potential problems with=20
gnulib/m4's float_h.m4, host-cpu-c-abi.m4, lib-prefix.m4, multiarch.m4,=20
printf.m4, as well as in GNU projects other than Gnulib (I haven't tried=20
to catalog them).




Information forwarded to bug-grep@HIDDEN:
bug#51144; Package grep. Full text available.

Message received at 51144 <at> debbugs.gnu.org:


Received: (at 51144) by debbugs.gnu.org; 15 Oct 2021 07:33:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 15 03:33:19 2021
Received: from localhost ([127.0.0.1]:37958 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mbHiR-0000L3-Dj
	for submit <at> debbugs.gnu.org; Fri, 15 Oct 2021 03:33:19 -0400
Received: from mxt.nsu.ru ([84.237.50.40]:40560)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <danfe@HIDDEN>) id 1mbHiM-0000Kk-1x
 for 51144 <at> debbugs.gnu.org; Fri, 15 Oct 2021 03:33:17 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nsu.ru;
 s=email; h=In-Reply-To:Content-Type:Mime-Version:References:Message-ID:
 Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=eYT3a5Z9F1Q63XH2/nFP3azK/r0CW02k3WpPfCGKBWI=; b=u+EDNUK8K1/+Bo7KXjSk4X20lG
 jvDGGagM7aN3qr/O1oHTYPLh5pDrdxws3MTdJ9kqkR9plTeAGbfSiDyh7CsTYA3vQF+cbQue9hCsd
 r+f4mR142LxNBviyzheVuYB7xzq3sfShvVwaRvCtO5Xa9VxlqHDWkhxZXsY/Po/Zom4M=;
Received: from zimbra.nsu.ru ([84.237.50.42])
 by mxt.nsu.ru with esmtp (Exim 4.89)
 (envelope-from <danfe@HIDDEN>)
 id 1mbHi5-0002Ed-GJ; Fri, 15 Oct 2021 14:32:58 +0700
Received: from localhost (localhost [127.0.0.1])
 by zimbra.nsu.ru (Postfix) with ESMTP id 744F8AC055B;
 Fri, 15 Oct 2021 14:32:57 +0700 (+07)
Received: from zimbra.nsu.ru ([127.0.0.1])
 by localhost (zimbra.nsu.ru [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id GORW7atZoyB0; Fri, 15 Oct 2021 14:32:52 +0700 (+07)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.nsu.ru (Postfix) with ESMTP id DF7EBAC09FC;
 Fri, 15 Oct 2021 14:32:52 +0700 (+07)
X-Virus-Scanned: amavisd-new at zimbra.nsu.ru
Received: from zimbra.nsu.ru ([127.0.0.1])
 by localhost (zimbra.nsu.ru [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id dEN1xTZFq-Rb; Fri, 15 Oct 2021 14:32:52 +0700 (+07)
Received: from regency.nsu.ru (unknown [84.237.50.47])
 by zimbra.nsu.ru (Postfix) with ESMTPS id 8D1F9AC055B;
 Fri, 15 Oct 2021 14:32:52 +0700 (+07)
Received: from regency.nsu.ru (localhost [127.0.0.1])
 by regency.nsu.ru (8.14.2/8.14.2) with ESMTP id 19F7X0A5085180;
 Fri, 15 Oct 2021 14:33:00 +0700 (+07)
 (envelope-from danfe@HIDDEN)
Received: (from danfe@localhost)
 by regency.nsu.ru (8.14.2/8.14.2/Submit) id 19F7WsFa085087;
 Fri, 15 Oct 2021 14:32:54 +0700 (+07) (envelope-from danfe)
Date: Fri, 15 Oct 2021 14:32:54 +0700
From: Alexey Dokuchaev <danfe@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
Subject: Re: bug#51144: GNU grep 3.7 fails to build on FreeBSD
Message-ID: <20211015073254.GA82090@HIDDEN>
References: <20211012025300.GA43189@HIDDEN>
 <a24e453e-9e54-b5f2-61df-2fe64bb49aec@HIDDEN>
 <20211013040258.GA99982@HIDDEN>
 <d449ea50-a5a2-1d86-8011-ca38467eb4d1@HIDDEN>
 <20211014140254.GA35593@HIDDEN>
 <594312a4-d474-d2f0-1358-e4ff19f8b4e7@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <594312a4-d474-d2f0-1358-e4ff19f8b4e7@HIDDEN>
User-Agent: Mutt/1.4.2.1i
X-KLMS-Rule-ID: 1
X-KLMS-Message-Action: clean
X-KLMS-AntiSpam-Lua-Profiles: 166737 [Oct 15 2021]
X-KLMS-AntiSpam-Version: 5.9.20.0
X-KLMS-AntiSpam-Envelope-From: danfe@HIDDEN
X-KLMS-AntiSpam-Rate: 0
X-KLMS-AntiSpam-Status: not_detected
X-KLMS-AntiSpam-Method: none
X-KLMS-AntiSpam-Auth: dmarc=pass header.from=nsu.ru policy=quarantine;
 spf=pass smtp.mailfrom=regency.nsu.ru; dkim=none
X-KLMS-AntiSpam-Info: LuaCore: 463 463
 5854868460de3f0d8e8c0a4df98aeb05fb764a09, {rep_avail},
 {Tracking_from_domain_doesnt_match_to}, 84.237.50.42:7.4.1,7.1.2,7.7.3;
 d41d8cd98f00b204e9800998ecf8427e.com:7.1.1; nsu.ru:7.1.1; 127.0.0.199:7.1.2;
 zimbra.nsu.ru:7.1.1;
 regency.nsu.ru:7.1.1, {iprep_blacklist}, {Tracking_smtp_domain_mismatch},
 ApMailHostAddress: 84.237.50.42
X-MS-Exchange-Organization-SCL: -1
X-KLMS-AntiSpam-Interceptor-Info: scan successful
X-KLMS-AntiPhishing: Clean, bases: 2021/10/15 05:10:00
X-KLMS-AntiVirus: Kaspersky Security for Linux Mail Server, version 8.0.3.30,
 not scanned, license restriction
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 51144
Cc: Gnulib bugs <bug-gnulib@HIDDEN>, tijl@HIDDEN, 51144 <at> debbugs.gnu.org,
 Bruno Haible <bruno@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Thu, Oct 14, 2021 at 10:34:55AM -0700, Paul Eggert wrote:
> On 10/14/21 7:02 AM, Alexey Dokuchaev wrote:
> > On Wed, Oct 13, 2021 at 11:47:34AM -0700, Paul Eggert wrote:
> > > On 10/12/21 9:02 PM, Alexey Dokuchaev wrote:
> > > > Ports framework does several things which affect GNU configure
> > > > scripts, particularly, it replaces build-aux/config.guess file
> > > > with our own, where host/build tuples are derived from.
> > > > 
> > > > x86_64 is spelled as amd64 in FreeBSD
> > > 
> > > Ouch. When porting, does this mean you need to look for places where
> > > GNU source code says "x86_64" and replace many of these places with
> > > "amd64" before building? That sounds error-prone.
> > 
> > No, of course not, typically we don't replace anything.  All we do is
> > use our pre-built templates for config.{guess,site,sub} and pass the
> > --build=amd64-portbld-freebsd$(version) argument to configure scripts
> > if they are generated by GNU autotools.
> 
> Surely this doesn't work if there's a configure.ac or m4/*.m4 file that
> does something like this:
> 
>   if "$host_os" = x86_64; then
>     ...
>   fi
> 
> and I see examples of this in gnulib/m4's float_h.m4, host-cpu-c-abi.m4,
> lib-prefix.m4, multiarch.m4, printf.m4, stack-direction.m4. In general
> don't you need to also edit these files and re-run Autoconf?

In general, we don't edit those files, and typically we only run autoconf
when there's no pre-generated configure script, or there's something so
very wrong about it, or generated Makefiles, that patching isn't feasible
and we have to rebootstrap the whole thing.

About why this x86_64 vs amd64 thing does not cause massive fallout for
us, I better ask our Autotools expert.  Tijl, can you shed some light
here?  I've added back omitted context to the quoted parts of this email,
I hope Paul wouldn't mind.

./danfe

> > I can't remember when was the last time I've been bitten by this. :-)
> 
> Often Gnulib code will guess the right value anyway. Not always, though.
> You ran into a case where Gnulib didn't guess and aborted. Some other
> times, the guess may differ from what it would be if you did a plain
> 'configure; make' from a tarball. You might want to test for that, given
> the above list of potential problem files.
> 
> There may well be similar problems in configure.ac or *.m4 files
> maintained in GNU projects other than Gnulib. Autoconf itself has
> "x86_64" hardwired into AC_C_BIGENDIAN; I don't know whether this
> affects FreeBSD compilers.




Information forwarded to bug-grep@HIDDEN:
bug#51144; Package grep. Full text available.

Message received at 51144 <at> debbugs.gnu.org:


Received: (at 51144) by debbugs.gnu.org; 14 Oct 2021 17:35:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 14 13:35:08 2021
Received: from localhost ([127.0.0.1]:37019 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mb4dI-0006y3-DZ
	for submit <at> debbugs.gnu.org; Thu, 14 Oct 2021 13:35:08 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:32944)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1mb4dF-0006xR-TJ
 for 51144 <at> debbugs.gnu.org; Thu, 14 Oct 2021 13:35:07 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 483EB1600FD;
 Thu, 14 Oct 2021 10:35:00 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id rLf2lwnmNG5m; Thu, 14 Oct 2021 10:34:55 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id AD199160101;
 Thu, 14 Oct 2021 10:34:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id kgDP_5q2OQ-x; Thu, 14 Oct 2021 10:34:55 -0700 (PDT)
Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com
 [172.91.119.151])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 802111600FD;
 Thu, 14 Oct 2021 10:34:55 -0700 (PDT)
To: Alexey Dokuchaev <danfe@HIDDEN>
References: <20211012025300.GA43189@HIDDEN>
 <a24e453e-9e54-b5f2-61df-2fe64bb49aec@HIDDEN>
 <20211013040258.GA99982@HIDDEN>
 <d449ea50-a5a2-1d86-8011-ca38467eb4d1@HIDDEN>
 <20211014140254.GA35593@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
Subject: Re: bug#51144: GNU grep 3.7 fails to build on FreeBSD
Message-ID: <594312a4-d474-d2f0-1358-e4ff19f8b4e7@HIDDEN>
Date: Thu, 14 Oct 2021 10:34:55 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.13.0
MIME-Version: 1.0
In-Reply-To: <20211014140254.GA35593@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.4 (--)
X-Debbugs-Envelope-To: 51144
Cc: Gnulib bugs <bug-gnulib@HIDDEN>, 51144 <at> debbugs.gnu.org,
 Bruno Haible <bruno@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.4 (---)

On 10/14/21 7:02 AM, Alexey Dokuchaev wrote:

> All we do is
> use our pre-built templates for config.{guess,site,sub} and pass the
> --build=3Damd64-portbld-freebsd$(version) argument to configure scripts
> if they are generated by GNU autotools.

Surely this doesn't work if there's a configure.ac or m4/*.m4 file that=20
does something like this:

   if "$host_os" =3D x86_64; then
     ...
   fi

and I see examples of this in gnulib/m4's float_h.m4, host-cpu-c-abi.m4,=20
lib-prefix.m4, multiarch.m4, printf.m4, stack-direction.m4. In general=20
don't you need to also edit these files and re-run Autoconf?


> I can't remember when was the last time I've been
> bitten by this. :-)

Often Gnulib code will guess the right value anyway. Not always, though.=20
You ran into a case where Gnulib didn't guess and aborted. Some other=20
times, the guess may differ from what it would be if you did a plain=20
'configure; make' from a tarball. You might want to test for that, given=20
the above list of potential problem files.

There may well be similar problems in configure.ac or *.m4 files=20
maintained in GNU projects other than Gnulib. Autoconf itself has=20
"x86_64" hardwired into AC_C_BIGENDIAN; I don't know whether this=20
affects FreeBSD compilers.


> would you also consider
> adding "amd64" as a synonym to "x86_64" in that switch/case check?

Yes I suppose we could do that. Bruno, what do you think? You wrote most=20
of those "x86_64"s.


>> Otherwise "result: unknown" should result in STACK_DIRECTION being 0,
>> which gnulib/lib/stackvma.h does not support (perhaps it should?).
>=20
> Are you sure "result: unknown" should result in 0, not empty value as
> in my first email?

Not at this point, no.




Information forwarded to bug-grep@HIDDEN:
bug#51144; Package grep. Full text available.

Message received at 51144 <at> debbugs.gnu.org:


Received: (at 51144) by debbugs.gnu.org; 14 Oct 2021 14:03:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 14 10:03:14 2021
Received: from localhost ([127.0.0.1]:36664 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mb1KE-0007TK-6Q
	for submit <at> debbugs.gnu.org; Thu, 14 Oct 2021 10:03:14 -0400
Received: from mxt.nsu.ru ([84.237.50.40]:40186)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <danfe@HIDDEN>) id 1mb1K9-0007Sx-Tl
 for 51144 <at> debbugs.gnu.org; Thu, 14 Oct 2021 10:03:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nsu.ru;
 s=email; h=In-Reply-To:Content-Type:Mime-Version:References:Message-ID:
 Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=T0yeVD2jeqTf/sHW4+7d7uL+a0uH448HgiBBdxdVBWw=; b=ZHAOn35hs6DtQL1RdOjqFZqnK3
 glUJtBXJJUEn3rHYijiRmcNyWgCpB3IzBW3gmMNTlsnNYTXdGAsXzvNR/tNK7Y7rGj8ap5llDDU6X
 A+1yeKn2NhneXpk/CjGHRWFzF6izbmA4N108FTH9sqXJUerobvvm/QvlGbS5LyrTq6k0=;
Received: from zimbra.nsu.ru ([84.237.50.42])
 by mxt.nsu.ru with esmtp (Exim 4.89)
 (envelope-from <danfe@HIDDEN>)
 id 1mb1Ju-00010v-U4; Thu, 14 Oct 2021 21:02:55 +0700
Received: from localhost (localhost [127.0.0.1])
 by zimbra.nsu.ru (Postfix) with ESMTP id DE8C4AC0235;
 Thu, 14 Oct 2021 21:02:54 +0700 (+07)
Received: from zimbra.nsu.ru ([127.0.0.1])
 by localhost (zimbra.nsu.ru [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id pG5QytbhqbdT; Thu, 14 Oct 2021 21:02:54 +0700 (+07)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.nsu.ru (Postfix) with ESMTP id 91CD7AC0D16;
 Thu, 14 Oct 2021 21:02:54 +0700 (+07)
X-Virus-Scanned: amavisd-new at zimbra.nsu.ru
Received: from zimbra.nsu.ru ([127.0.0.1])
 by localhost (zimbra.nsu.ru [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id lbYyFCkarGIr; Thu, 14 Oct 2021 21:02:54 +0700 (+07)
Received: from regency.nsu.ru (unknown [84.237.50.47])
 by zimbra.nsu.ru (Postfix) with ESMTPS id 55210AC0235;
 Thu, 14 Oct 2021 21:02:54 +0700 (+07)
Received: from regency.nsu.ru (localhost [127.0.0.1])
 by regency.nsu.ru (8.14.2/8.14.2) with ESMTP id 19EE30Qc038163;
 Thu, 14 Oct 2021 21:03:00 +0700 (+07)
 (envelope-from danfe@HIDDEN)
Received: (from danfe@localhost)
 by regency.nsu.ru (8.14.2/8.14.2/Submit) id 19EE2srg038081;
 Thu, 14 Oct 2021 21:02:54 +0700 (+07) (envelope-from danfe)
Date: Thu, 14 Oct 2021 21:02:54 +0700
From: Alexey Dokuchaev <danfe@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
Subject: Re: bug#51144: GNU grep 3.7 fails to build on FreeBSD
Message-ID: <20211014140254.GA35593@HIDDEN>
References: <20211012025300.GA43189@HIDDEN>
 <a24e453e-9e54-b5f2-61df-2fe64bb49aec@HIDDEN>
 <20211013040258.GA99982@HIDDEN>
 <d449ea50-a5a2-1d86-8011-ca38467eb4d1@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <d449ea50-a5a2-1d86-8011-ca38467eb4d1@HIDDEN>
User-Agent: Mutt/1.4.2.1i
X-KLMS-Rule-ID: 1
X-KLMS-Message-Action: clean
X-KLMS-AntiSpam-Lua-Profiles: 166733 [Oct 14 2021]
X-KLMS-AntiSpam-Version: 5.9.20.0
X-KLMS-AntiSpam-Envelope-From: danfe@HIDDEN
X-KLMS-AntiSpam-Rate: 0
X-KLMS-AntiSpam-Status: not_detected
X-KLMS-AntiSpam-Method: none
X-KLMS-AntiSpam-Auth: dmarc=pass header.from=nsu.ru policy=quarantine;
 spf=pass smtp.mailfrom=regency.nsu.ru; dkim=none
X-KLMS-AntiSpam-Info: LuaCore: 463 463
 5854868460de3f0d8e8c0a4df98aeb05fb764a09, {rep_avail},
 {Tracking_from_domain_doesnt_match_to}, regency.nsu.ru:7.1.1; nsu.ru:7.1.1;
 127.0.0.199:7.1.2; d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;
 zimbra.nsu.ru:7.1.1;
 84.237.50.42:7.4.1,7.1.2,7.7.3, {iprep_blacklist},
 {Tracking_smtp_domain_mismatch}, ApMailHostAddress: 84.237.50.42
X-MS-Exchange-Organization-SCL: -1
X-KLMS-AntiSpam-Interceptor-Info: scan successful
X-KLMS-AntiPhishing: Clean, bases: 2021/10/14 11:28:00
X-KLMS-AntiVirus: Kaspersky Security for Linux Mail Server, version 8.0.3.30,
 not scanned, license restriction
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 51144
Cc: Gnulib bugs <bug-gnulib@HIDDEN>, 51144 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Wed, Oct 13, 2021 at 11:47:34AM -0700, Paul Eggert wrote:
> On 10/12/21 9:02 PM, Alexey Dokuchaev wrote:
> 
> >Ports framework does several things which affect GNU configure
> >scripts, particularly, it replaces build-aux/config.guess file
> >with our own, where host/build tuples are derived from.
> >
> >x86_64 is spelled as amd64 in FreeBSD
> 
> Ouch. When porting, does this mean you need to look for places where GNU
> source code says "x86_64" and replace many of these places with "amd64"
> before building? That sounds error-prone.

No, of course not, typically we don't replace anything.  All we do is
use our pre-built templates for config.{guess,site,sub} and pass the
--build=amd64-portbld-freebsd$(version) argument to configure scripts
if they are generated by GNU autotools.

In rare cases, like this one we're dealing with, this difference could
become a problem.  I can't remember when was the last time I've been
bitten by this. :-)

> >   conftest.c:13:1: error: second parameter of 'main' (argument array)
> >     must be of type 'char **'
> >     main (int argc, char *argv)
> >     ^
> >     1 error generated.
> >   configure:35726: $? = 1
> >   configure:35741: result: unknown
> 
> Thanks for reporting that. That's due to a quoting typo in Gnulib's
> m4/stack-direction.m4. I fixed it by installing the attached patch into
> Gnulib. Grep will get this fix the next time it merges from Gnulib. In
> the meantime you should be able work around the problem by changing that
> 'char *argv' to 'char *argv[]' in 'configure'.

Right, that's what I did as I've mentioned above.

> >>and config.h says:
> >>
> >>#define STACK_DIRECTION -1
> 
> This is after you modified 'configure', right?

Right.  So, in retrospect, there were two problems: "amd64" was not in
the list of known architectures, so it could not use known value for
stack direction, and had to fallback to run the program which did not
build because of unescaped brackets.  Fixing either of them allows it
to deduce correct #define STACK_DIRECTION -1.

Now that you've fixed the second problem, would you also consider
adding "amd64" as a synonym to "x86_64" in that switch/case check?

> Otherwise "result: unknown" should result in STACK_DIRECTION being 0,
> which gnulib/lib/stackvma.h does not support (perhaps it should?).

Are you sure "result: unknown" should result in 0, not empty value as
in my first email?

./danfe




Information forwarded to bug-grep@HIDDEN:
bug#51144; Package grep. Full text available.

Message received at 51144 <at> debbugs.gnu.org:


Received: (at 51144) by debbugs.gnu.org; 13 Oct 2021 18:47:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 13 14:47:46 2021
Received: from localhost ([127.0.0.1]:33417 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1majI2-0006Y3-2Z
	for submit <at> debbugs.gnu.org; Wed, 13 Oct 2021 14:47:46 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:53816)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1majHy-0006Ws-PF
 for 51144 <at> debbugs.gnu.org; Wed, 13 Oct 2021 14:47:44 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1AB701600FF;
 Wed, 13 Oct 2021 11:47:37 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id weZ0uaoI5uJR; Wed, 13 Oct 2021 11:47:35 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id BD3C116006F;
 Wed, 13 Oct 2021 11:47:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id 4F9mjr-1ET_E; Wed, 13 Oct 2021 11:47:35 -0700 (PDT)
Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com
 [172.91.119.151])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 914AA1600FF;
 Wed, 13 Oct 2021 11:47:35 -0700 (PDT)
To: Alexey Dokuchaev <danfe@HIDDEN>
References: <20211012025300.GA43189@HIDDEN>
 <a24e453e-9e54-b5f2-61df-2fe64bb49aec@HIDDEN>
 <20211013040258.GA99982@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
Subject: Re: bug#51144: GNU grep 3.7 fails to build on FreeBSD
Message-ID: <d449ea50-a5a2-1d86-8011-ca38467eb4d1@HIDDEN>
Date: Wed, 13 Oct 2021 11:47:34 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.13.0
MIME-Version: 1.0
In-Reply-To: <20211013040258.GA99982@HIDDEN>
Content-Type: multipart/mixed; boundary="------------C9C83A1B3378CE5C86257013"
Content-Language: en-US
X-Spam-Score: -2.4 (--)
X-Debbugs-Envelope-To: 51144
Cc: Gnulib bugs <bug-gnulib@HIDDEN>, 51144 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.4 (---)

This is a multi-part message in MIME format.
--------------C9C83A1B3378CE5C86257013
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable

On 10/12/21 9:02 PM, Alexey Dokuchaev wrote:

> Ports framework does several things which affect GNU configure
> scripts, particularly, it replaces build-aux/config.guess file
> with our own, where host/build tuples are derived from.
>=20
> x86_64 is spelled as amd64 in FreeBSD

Ouch. When porting, does this mean you need to look for places where GNU=20
source code says "x86_64" and replace many of these places with "amd64"=20
before building? That sounds error-prone.


>    conftest.c:13:1: error: second parameter of 'main' (argument array)
>      must be of type 'char **'
>      main (int argc, char *argv)
>      ^
>      1 error generated.
>    configure:35726: $? =3D 1
>    configure:35741: result: unknown

Thanks for reporting that. That's due to a quoting typo in Gnulib's=20
m4/stack-direction.m4. I fixed it by installing the attached patch into=20
Gnulib. Grep will get this fix the next time it merges from Gnulib. In=20
the meantime you should be able work around the problem by changing that=20
'char *argv' to 'char *argv[]' in 'configure'.


>> and config.h says:
>>
>> #define STACK_DIRECTION -1

This is after you modified 'configure', right? Otherwise "result:=20
unknown" should result in STACK_DIRECTION being 0, which=20
gnulib/lib/stackvma.h does not support (perhaps it should?).

--------------C9C83A1B3378CE5C86257013
Content-Type: text/x-patch; charset=UTF-8;
 name="0001-sigsegv-fix-quoting-problem.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
 filename="0001-sigsegv-fix-quoting-problem.patch"

=46rom ff5ef2582300c2d982820ffeaede2ea08aaba3d8 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@HIDDEN>
Date: Wed, 13 Oct 2021 10:24:40 -0700
Subject: [PATCH] sigsegv: fix quoting problem

Problem reported for FreeBSD ports by Alexey Dokuchaev in:
https://bugs.gnu.org/51144
* m4/stack-direction.m4 (SV_STACK_DIRECTION): Quote brackets.
---
 ChangeLog             | 7 +++++++
 m4/stack-direction.m4 | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index da5b570ee..ea71de0b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2021-10-13  Paul Eggert  <eggert@HIDDEN>
+
+	sigsegv: fix quoting problem
+	Problem reported for FreeBSD ports by Alexey Dokuchaev in:
+	https://bugs.gnu.org/51144
+	* m4/stack-direction.m4 (SV_STACK_DIRECTION): Quote brackets.
+
 2021-10-10  Paul Eggert  <eggert@HIDDEN>
=20
 	nproc: port better to OpenBSD
diff --git a/m4/stack-direction.m4 b/m4/stack-direction.m4
index e682be97d..c90d69733 100644
--- a/m4/stack-direction.m4
+++ b/m4/stack-direction.m4
@@ -1,4 +1,4 @@
-# stack-direction.m4 serial 8
+# stack-direction.m4 serial 9
 dnl Copyright (C) 2002-2021 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
@@ -79,7 +79,7 @@ find_stack_direction (int *addr, int depth)
   return dir + dummy;
 }
 int
-main (int argc, char *argv[])
+main (int argc, char *argv[[]])
 {
   printf ("%d\n", find_stack_direction (NULL, argc + 20));
   return 0;
--=20
2.30.2


--------------C9C83A1B3378CE5C86257013--




Information forwarded to bug-grep@HIDDEN:
bug#51144; Package grep. Full text available.

Message received at 51144 <at> debbugs.gnu.org:


Received: (at 51144) by debbugs.gnu.org; 13 Oct 2021 04:15:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 13 00:15:29 2021
Received: from localhost ([127.0.0.1]:57169 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1maVfs-0002ZR-Br
	for submit <at> debbugs.gnu.org; Wed, 13 Oct 2021 00:15:29 -0400
Received: from mxt.nsu.ru ([84.237.50.40]:56058)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <danfe@HIDDEN>) id 1maVU4-0002H8-J4
 for 51144 <at> debbugs.gnu.org; Wed, 13 Oct 2021 00:03:18 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nsu.ru;
 s=email; h=In-Reply-To:Content-Type:Mime-Version:References:Message-ID:
 Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=JtuIyHLf58p+5W8ZRcmmuRGSMo/Ni9pcf2XwAIwaiGg=; b=o04G1/FmbfKPaUMkP1XtGskIjv
 45/Rkzp5Ap27ZL97ph+vHwNuYTBZEy/Zf2RLVYgknqPhRqyExk3B/dmROXH2ZkL3SYgI4CiDTOJaP
 ydrzts5AEDbM0KxfdM95AMJxwy43rUjPS81Cl21BDhnZfNAziem1/eF0fIyA0Hc78JEQ=;
Received: from zimbra.nsu.ru ([84.237.50.42])
 by mxt.nsu.ru with esmtp (Exim 4.89)
 (envelope-from <danfe@HIDDEN>)
 id 1maVTq-0007DF-LM; Wed, 13 Oct 2021 11:03:03 +0700
Received: from localhost (localhost [127.0.0.1])
 by zimbra.nsu.ru (Postfix) with ESMTP id 9C94FAC01F2;
 Wed, 13 Oct 2021 11:03:02 +0700 (+07)
Received: from zimbra.nsu.ru ([127.0.0.1])
 by localhost (zimbra.nsu.ru [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id PS75c4oLNFoh; Wed, 13 Oct 2021 11:03:02 +0700 (+07)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.nsu.ru (Postfix) with ESMTP id 570E0AC0370;
 Wed, 13 Oct 2021 11:03:02 +0700 (+07)
X-Virus-Scanned: amavisd-new at zimbra.nsu.ru
Received: from zimbra.nsu.ru ([127.0.0.1])
 by localhost (zimbra.nsu.ru [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id Fu_3qZTvDo3K; Wed, 13 Oct 2021 11:03:02 +0700 (+07)
Received: from regency.nsu.ru (unknown [84.237.50.47])
 by zimbra.nsu.ru (Postfix) with ESMTPS id 1E308AC01F2;
 Wed, 13 Oct 2021 11:03:02 +0700 (+07)
Received: from regency.nsu.ru (localhost [127.0.0.1])
 by regency.nsu.ru (8.14.2/8.14.2) with ESMTP id 19D433YS016493;
 Wed, 13 Oct 2021 11:03:04 +0700 (+07)
 (envelope-from danfe@HIDDEN)
Received: (from danfe@localhost)
 by regency.nsu.ru (8.14.2/8.14.2/Submit) id 19D42wnn016454;
 Wed, 13 Oct 2021 11:02:58 +0700 (+07) (envelope-from danfe)
Date: Wed, 13 Oct 2021 11:02:58 +0700
From: Alexey Dokuchaev <danfe@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
Subject: Re: bug#51144: GNU grep 3.7 fails to build on FreeBSD
Message-ID: <20211013040258.GA99982@HIDDEN>
References: <20211012025300.GA43189@HIDDEN>
 <a24e453e-9e54-b5f2-61df-2fe64bb49aec@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <a24e453e-9e54-b5f2-61df-2fe64bb49aec@HIDDEN>
User-Agent: Mutt/1.4.2.1i
X-KLMS-Rule-ID: 1
X-KLMS-Message-Action: clean
X-KLMS-AntiSpam-Lua-Profiles: 166678 [Oct 13 2021]
X-KLMS-AntiSpam-Version: 5.9.20.0
X-KLMS-AntiSpam-Envelope-From: danfe@HIDDEN
X-KLMS-AntiSpam-Rate: 0
X-KLMS-AntiSpam-Status: not_detected
X-KLMS-AntiSpam-Method: none
X-KLMS-AntiSpam-Auth: dmarc=pass header.from=nsu.ru policy=quarantine;
 spf=pass smtp.mailfrom=regency.nsu.ru; dkim=none
X-KLMS-AntiSpam-Info: LuaCore: 463 463
 5854868460de3f0d8e8c0a4df98aeb05fb764a09, {rep_avail},
 {Tracking_from_domain_doesnt_match_to}, regency.nsu.ru:7.1.1;
 d41d8cd98f00b204e9800998ecf8427e.com:7.1.1; 84.237.50.42:7.1.2,7.7.3,7.4.1;
 nsu.ru:7.1.1; zimbra.nsu.ru:7.1.1;
 127.0.0.199:7.1.2, {iprep_blacklist}, {Tracking_smtp_domain_mismatch},
 ApMailHostAddress: 84.237.50.42
X-MS-Exchange-Organization-SCL: -1
X-KLMS-AntiSpam-Interceptor-Info: scan successful
X-KLMS-AntiPhishing: Clean, bases: 2021/10/13 02:38:00
X-KLMS-AntiVirus: Kaspersky Security for Linux Mail Server, version 8.0.3.30,
 not scanned, license restriction
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 51144
X-Mailman-Approved-At: Wed, 13 Oct 2021 00:15:27 -0400
Cc: 51144 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Tue, Oct 12, 2021 at 12:50:55PM -0700, Paul Eggert wrote:
> On 10/11/21 19:53, Alexey Dokuchaev via Bug reports for GNU grep wrote:
> 
> >   +#define STACK_DIRECTION
> 
> I don't observe this problem when I build GNU grep 3.7 on FreeBSD
> 13.0-RELEASE amd64.

That's probably because you just tar xf grep-3.7.tar.xz && cd grep-3.7
&& ./configure && make.  This works.  But not when configured from the
FreeBSD ports framework, and here's why.

The clue is these lines:

Vanilla ./configure (untainted):

  configure:4945: checking build system type
  configure:4960: result: x86_64-portbld-freebsd13.0
  configure:4980: checking host system type
  configure:4994: result: x86_64-portbld-freebsd13.0

From within the FreeBSD ports framework:

  configure:4945: checking build system type
  configure:4960: result: amd64-portbld-freebsd13.0
  configure:4980: checking host system type
  configure:4994: result: amd64-portbld-freebsd13.0

Ports framework does several things which affect GNU configure
scripts, particularly, it replaces build-aux/config.guess file
with our own, where host/build tuples are derived from.

x86_64 is spelled as amd64 in FreeBSD, but ``case "$host_cpu" in''
block has only "i?86 | x86_64 | \" on line 35668 in the configure
script.

> Also, what did 'configure' say when it attempted to configure stack
> direction, and what got put into config.log?
> 
> configure:35646: checking for stack direction
> configure:35741: result: grows down

  configure:35646: checking for stack direction
  configure:35723: cc -o conftest -O2 -pipe [..snip..] conftest.c >&5
  conftest.c:13:1: error: second parameter of 'main' (argument array)
    must be of type 'char **'
    main (int argc, char *argv)
    ^
    1 error generated.
  configure:35726: $? = 1
  configure:35741: result: unknown

> and config.h says:
> 
> #define STACK_DIRECTION -1
> 
> which is correct for amd64.

If I add "amd64" to that list -> "i?86 | x86_64 | amd64 | \" or
fix the main() argument *argv -> **argv, it behaves correctly as
well.

./danfe




Information forwarded to bug-grep@HIDDEN:
bug#51144; Package grep. Full text available.

Message received at 51144 <at> debbugs.gnu.org:


Received: (at 51144) by debbugs.gnu.org; 12 Oct 2021 19:51:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 12 15:51:11 2021
Received: from localhost ([127.0.0.1]:54043 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1maNnp-0007v6-6h
	for submit <at> debbugs.gnu.org; Tue, 12 Oct 2021 15:51:11 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:40438)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1maNnj-0007uO-Fp
 for 51144 <at> debbugs.gnu.org; Tue, 12 Oct 2021 15:51:07 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1F9C816006E;
 Tue, 12 Oct 2021 12:50:57 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id SSfMX4KH32_M; Tue, 12 Oct 2021 12:50:56 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 765251600BB;
 Tue, 12 Oct 2021 12:50:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id jgO2xV9zpEo5; Tue, 12 Oct 2021 12:50:56 -0700 (PDT)
Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 55EA416006E;
 Tue, 12 Oct 2021 12:50:56 -0700 (PDT)
Message-ID: <a24e453e-9e54-b5f2-61df-2fe64bb49aec@HIDDEN>
Date: Tue, 12 Oct 2021 12:50:55 -0700
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
 Thunderbird/91.1.0
Subject: Re: bug#51144: GNU grep 3.7 fails to build on FreeBSD
Content-Language: en-US
To: Alexey Dokuchaev <danfe@HIDDEN>
References: <20211012025300.GA43189@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
In-Reply-To: <20211012025300.GA43189@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.4 (--)
X-Debbugs-Envelope-To: 51144
Cc: 51144 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.4 (---)

On 10/11/21 19:53, Alexey Dokuchaev via Bug reports for GNU grep wrote:

>    +#define STACK_DIRECTION

I don't observe this problem when I build GNU grep 3.7 on FreeBSD 
13.0-RELEASE amd64.

I suppose the problem is platform-dependent. Could you please send 
details about your platform? Also, what did 'configure' say when it 
attempted to configure stack direction, and what got put into 
config.log? On my platform, config.log says:

configure:35646: checking for stack direction
configure:35741: result: grows down

and config.h says:

#define STACK_DIRECTION -1

which is correct for amd64.




Information forwarded to bug-grep@HIDDEN:
bug#51144; Package grep. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Oct 2021 03:12:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 11 23:12:01 2021
Received: from localhost ([127.0.0.1]:33112 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ma8Cu-0003JY-Lj
	for submit <at> debbugs.gnu.org; Mon, 11 Oct 2021 23:12:01 -0400
Received: from lists.gnu.org ([209.51.188.17]:45910)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <danfe@HIDDEN>) id 1ma7uN-0002qe-6v
 for submit <at> debbugs.gnu.org; Mon, 11 Oct 2021 22:52:51 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:34226)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <danfe@HIDDEN>)
 id 1ma7uM-0006R3-UC
 for bug-grep@HIDDEN; Mon, 11 Oct 2021 22:52:50 -0400
Received: from mxt.nsu.ru ([84.237.50.40]:48756)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <danfe@HIDDEN>)
 id 1ma7uJ-0000dD-1p
 for bug-grep@HIDDEN; Mon, 11 Oct 2021 22:52:49 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nsu.ru;
 s=email; h=Content-Type:Mime-Version:Message-ID:Subject:To:From:Date:Sender:
 Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description:
 Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
 In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=RZGnjIUqHt/RpAprNXaoT6LPhlyV+e5sohUjcW/7Cbc=; b=rXxanKG92I2elnas8lH8yz4kiM
 An32BBzNXkv02RRGIRY9ipbjvZci7wF9EEnNVQOgkYT3g7tniUaWR92qFTaWtk2G80VP4cYNwKgdv
 5eDAuFhNDVqUArmEUiTva4mX0abmcY/KtlnXBirZPW8WfeOfbtVJgOMRNhqYyodvSDyw=;
Received: from mail.nsu.ru ([84.237.50.42] helo=zimbra.nsu.ru)
 by mxt.nsu.ru with esmtp (Exim 4.89)
 (envelope-from <danfe@HIDDEN>) id 1ma7u5-0003Xl-E7
 for bug-grep@HIDDEN; Tue, 12 Oct 2021 09:52:35 +0700
Received: from localhost (localhost [127.0.0.1])
 by zimbra.nsu.ru (Postfix) with ESMTP id 6A9DCAC031E
 for <bug-grep@HIDDEN>; Tue, 12 Oct 2021 09:52:33 +0700 (+07)
Received: from zimbra.nsu.ru ([127.0.0.1])
 by localhost (zimbra.nsu.ru [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id 1yvBAP21JR9Y for <bug-grep@HIDDEN>;
 Tue, 12 Oct 2021 09:52:33 +0700 (+07)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.nsu.ru (Postfix) with ESMTP id 214D9AC0966
 for <bug-grep@HIDDEN>; Tue, 12 Oct 2021 09:52:33 +0700 (+07)
X-Virus-Scanned: amavisd-new at zimbra.nsu.ru
Received: from zimbra.nsu.ru ([127.0.0.1])
 by localhost (zimbra.nsu.ru [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id RRhyqhSqfK-d for <bug-grep@HIDDEN>;
 Tue, 12 Oct 2021 09:52:33 +0700 (+07)
Received: from regency.nsu.ru (unknown [84.237.50.47])
 by zimbra.nsu.ru (Postfix) with ESMTPS id DE6A9AC031E
 for <bug-grep@HIDDEN>; Tue, 12 Oct 2021 09:52:32 +0700 (+07)
Received: from regency.nsu.ru (localhost [127.0.0.1])
 by regency.nsu.ru (8.14.2/8.14.2) with ESMTP id 19C2r5qx045667
 for <bug-grep@HIDDEN>; Tue, 12 Oct 2021 09:53:05 +0700 (+07)
 (envelope-from danfe@HIDDEN)
Received: (from danfe@localhost)
 by regency.nsu.ru (8.14.2/8.14.2/Submit) id 19C2r03E045662
 for bug-grep@HIDDEN; Tue, 12 Oct 2021 09:53:00 +0700 (+07)
 (envelope-from danfe)
Date: Tue, 12 Oct 2021 09:53:00 +0700
From: Alexey Dokuchaev <danfe@HIDDEN>
To: bug-grep@HIDDEN
Subject: GNU grep 3.7 fails to build on FreeBSD
Message-ID: <20211012025300.GA43189@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4.2.1i
X-KLMS-Rule-ID: 1
X-KLMS-Message-Action: clean
X-KLMS-AntiSpam-Lua-Profiles: 166652 [Oct 11 2021]
X-KLMS-AntiSpam-Version: 5.9.20.0
X-KLMS-AntiSpam-Envelope-From: danfe@HIDDEN
X-KLMS-AntiSpam-Rate: 0
X-KLMS-AntiSpam-Status: not_detected
X-KLMS-AntiSpam-Method: none
X-KLMS-AntiSpam-Auth: dmarc=pass header.from=nsu.ru policy=quarantine;
 spf=pass smtp.mailfrom=regency.nsu.ru; dkim=none
X-KLMS-AntiSpam-Info: LuaCore: 463 463
 5854868460de3f0d8e8c0a4df98aeb05fb764a09, {rep_avail},
 {Tracking_uf_ne_domains}, {Tracking_from_domain_doesnt_match_to},
 84.237.50.42:7.1.2; zimbra.nsu.ru:7.1.1; bugs.freebsd.org:7.1.1;
 127.0.0.199:7.1.2; regency.nsu.ru:7.1.1;
 d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;
 nsu.ru:7.1.1, {Tracking_smtp_domain_mismatch}, ApMailHostAddress: 84.237.50.42
X-MS-Exchange-Organization-SCL: -1
X-KLMS-AntiSpam-Interceptor-Info: scan successful
X-KLMS-AntiPhishing: Clean, bases: 2021/10/12 01:42:00
X-KLMS-AntiVirus: Kaspersky Security for Linux Mail Server, version 8.0.3.30,
 not scanned, license restriction
Received-SPF: pass client-ip=84.237.50.40; envelope-from=danfe@HIDDEN;
 helo=mxt.nsu.ru
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Mon, 11 Oct 2021 23:11:59 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

Hi there,

Version 3.7 does not build under FreeBSD, with the first problem of
STACK_DIRECTION macro being wrongly defined:

  ...
  ./stackvma.h:31:21: error: invalid token at start of a preprocessor expression
  #if STACK_DIRECTION < 0
                      ^

If I diff the generated grep-3.{6,7}/config.h files, I see this:

  @@ -1483,19 +1666,20 @@
      'size_t'. */
   /* #undef SIZE_T_SUFFIX */
   
  -/* If using the C implementation of alloca, define if you know the
  -   direction of stack growth for your system; otherwise it will be
  -   automatically deduced at runtime.
  -     STACK_DIRECTION > 0 => grows toward higher addresses
  -     STACK_DIRECTION < 0 => grows toward lower addresses
  -     STACK_DIRECTION = 0 => direction of growth unknown */
  -/* #undef STACK_DIRECTION */
  +/* Define on Solaris 11 and its derivates. */
  +/* #undef SOLARIS11 */
   
  +/* Define as the direction of stack growth for your system.  STACK_DIRECTION >
  +   0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward
  +   lower addresses STACK_DIRECTION = 0 => spaghetti stack. */
  +#define STACK_DIRECTION 
  +
   /* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
   /* #undef STAT_MACROS_BROKEN */

So before it was /* #undef STACK_DIRECTION */, now it's #define
STACK_DIRECTION<space>.  If I undefine it after ./configure manually, the
build still fails further down the road:

  ...
  sigsegv.c:979:29: error: no member named 'is_near_this' in 'struct vma_struct'
                      : vma.is_near_this (addr, &vma))
                        ~~~ ^

I believe the same bug affects diffutils 3.8 on FreeBSD:

    https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257631

./danfe




Acknowledgement sent to Alexey Dokuchaev <danfe@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-grep@HIDDEN. Full text available.
Report forwarded to bug-grep@HIDDEN:
bug#51144; Package grep. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 16 Oct 2021 22:00:02 UTC

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