From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 772EB1F670 for ; Thu, 14 Oct 2021 15:00:18 +0000 (UTC) Received: from localhost ([::1]:45464 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mb2DQ-00068l-1l for normalperson@yhbt.net; Thu, 14 Oct 2021 11:00:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mb1KU-0006HB-ME for bug-gnulib@gnu.org; Thu, 14 Oct 2021 10:03:30 -0400 Received: from mxt.nsu.ru ([84.237.50.40]:59844) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mb1KM-0003QZ-IZ for bug-gnulib@gnu.org; Thu, 14 Oct 2021 10:03:29 -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 ) 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@regency.nsu.ru) 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 To: Paul Eggert Cc: 51144@debbugs.gnu.org, Gnulib bugs Subject: Re: bug#51144: GNU grep 3.7 fails to build on FreeBSD Message-ID: <20211014140254.GA35593@regency.nsu.ru> References: <20211012025300.GA43189@regency.nsu.ru> <20211013040258.GA99982@regency.nsu.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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@regency.nsu.ru 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 Received-SPF: pass client-ip=84.237.50.40; envelope-from=danfe@regency.nsu.ru; 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-Mailman-Approved-At: Thu, 14 Oct 2021 11:00:07 -0400 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Reply-to: Alexey Dokuchaev From: Alexey Dokuchaev via Gnulib discussion list 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