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=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,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 E05C21F466 for ; Sat, 18 Jan 2020 18:12:01 +0000 (UTC) Received: from localhost ([::1]:43414 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1issZk-0008JF-Jp for normalperson@yhbt.net; Sat, 18 Jan 2020 13:12:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42882) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1issZe-0008J4-C0 for bug-gnulib@gnu.org; Sat, 18 Jan 2020 13:11:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1issZa-0004L4-Rs for bug-gnulib@gnu.org; Sat, 18 Jan 2020 13:11:54 -0500 Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::7]:28107) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1issZa-0004JO-Ck for bug-gnulib@gnu.org; Sat, 18 Jan 2020 13:11:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1579371108; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=yG/akgpCA0oXbd4xH79MEF0WERtGp7tC0Kdz+sWv3DI=; b=IyZwxB61l9ecxl50SwnhV8XTS+ASFoDzeR5jwnmrmBCxYXpCkVdCeipSy/RGstRn5b 8VcaPlx4z0DYhM5f51rmL2m716Ft8J/YZyw1Zt4GBNK6xQp3kO8ZzR2oTcIqv4ZNvd/W oYk/bVNCYyZw+V7bTg7+Ka/1/ZfTWq1DGtzItd8+zL5AN356WIlEzW2kN2KgMR5VGRXp fIOaGfJ2DwRx+cytyY0r2V0u+bEu3nLX4NQun/Z5vucam2tqVkoofTKQRhavsCHf9zqc Bsc/BRfE7VZdOxpsYbr4dV3VqhMSw+0cusnP+zR+Jkm/FU6IATa9qV+cbGe3Y5Gee1Uz KGmw== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOH6fzxfs=" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 46.1.4 DYNA|AUTH) with ESMTPSA id z0b9d9w0IIBaif4 (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Sat, 18 Jan 2020 19:11:36 +0100 (CET) From: Bruno Haible To: bug-gnulib@gnu.org Subject: Re: Messed up gl_COMPILER_PREPARE_CHECK_DECL Date: Sat, 18 Jan 2020 19:11:34 +0100 Message-ID: <15957290.6tjZKmyNYO@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-171-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20200118153128.GA62234@aun.utmark.mea> References: <20200110151102.GA6823@aun.utmark.mea> <2323216.mW919xj1Fl@omega> <20200118153128.GA62234@aun.utmark.mea> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:238:20a:202:5300::7 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: , Cc: Mats Erik Andersson Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Hi Mats, > The following appears with Gnulib pulled just minutes ago, > when bootstrapping Inetutils on OpenIndiana. It was successful > with Gnulib ba4b91abd from the 10th of January! Thanks for the report. The patch below fixes it. > The first change after my report was successful, but now > you continue to push non-portable, or rather, seemingly > version-dependent code. No, the changes I pushed were neither non-portable nor version-dependent. The cause of the failure is that inetutils/configure.ac invokes AC_ISC_POSIX before AC_PROG_CC. But AC_ISC_POSIX is documented to expand into an invocation of AC_SEARCH_LIBS; therefore it requires to run the C compiler. It therefore does not really make sense to invoke AC_ISC_POSIX before AC_PROG_CC. You were just lucky that it worked before. This is a grey area of Autoconf: where you don't get a warning about wrong order of invocation of two macros, and the result seemingly works, but stops working when one of the involved macros changes a bit. 2020-01-18 Bruno Haible Avoid error "m4_require: circular dependency of AC_LANG_COMPILER(C)". Reported by Mats Erik Andersson in . * m4/00gnulib.m4 (gl_COMPILER_CLANG): Use _AC_COMPILE_IFELSE, not AC_EGREP_CPP. diff --git a/m4/00gnulib.m4 b/m4/00gnulib.m4 index 36304b9..90e7e04 100644 --- a/m4/00gnulib.m4 +++ b/m4/00gnulib.m4 @@ -1,4 +1,4 @@ -# 00gnulib.m4 serial 6 +# 00gnulib.m4 serial 7 dnl Copyright (C) 2009-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -58,13 +58,18 @@ AC_DEFUN([gl_COMPILER_CLANG], dnl AC_REQUIRE([AC_PROG_CC]) AC_CACHE_CHECK([whether the compiler is clang], [gl_cv_compiler_clang], - [AC_EGREP_CPP([barfbarf],[ -#ifdef __clang__ -barfbarf -#endif - ], - [gl_cv_compiler_clang=yes], - [gl_cv_compiler_clang=no]) + [dnl Use _AC_COMPILE_IFELSE instead of AC_EGREP_CPP, to avoid error + dnl "circular dependency of AC_LANG_COMPILER(C)" if AC_PROG_CC has + dnl not yet been invoked. + _AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ + #ifdef __clang__ + barfbarf + #endif + ]],[[]]) + ], + [gl_cv_compiler_clang=no], + [gl_cv_compiler_clang=yes]) ]) ]) AC_DEFUN([gl_COMPILER_PREPARE_CHECK_DECL],