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-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, 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 C175D1F934 for ; Sun, 25 Oct 2020 16:21:09 +0000 (UTC) Received: from localhost ([::1]:49848 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWilY-0003om-7H for normalperson@yhbt.net; Sun, 25 Oct 2020 12:21:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kWilU-0003oX-Qs for bug-gnulib@gnu.org; Sun, 25 Oct 2020 12:21:04 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.220]:36921) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kWilS-00014B-DM; Sun, 25 Oct 2020 12:21:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1603642859; 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=n+1hlJsuH7l8KKU1OwqIRCh1equY7apYwZiDASYUGxE=; b=oKyH65sT747dVpBLwtNWsDf1sOlUwb9lI0bLDbnlK4WfFN/Mf83DytK4C9THcr3uPc ZEp4VmSsiq9Jdy1onPEhFTmknk+jklHd89lSyqI123PqrIoSCNRTCfG42YpiVr0Pvijg /Z8kSVm/7KB++kyCA06geIksklafMkFKvfvKQKmkfneIH7/NN/mDyiNJHetZ1X3xLaEC KxPEZkV+h+320Y3Xy0yFAdHrDa4C0Rb7jQ7zprRwqojzhBbKHxgUAaIQjDlDqHsN1mtK p3F6drRLvkEn3LsZF0yMkgjtkb9tLHIN4VULZJ+GUZRoeDezfbqBdJgrIrQRtFkiJO+X Ko9g== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOGaf0yJVW" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 47.2.1 DYNA|AUTH) with ESMTPSA id R01daaw9PGKxsn7 (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); Sun, 25 Oct 2020 17:20:59 +0100 (CET) From: Bruno Haible To: bug-gnulib@gnu.org Subject: Re: "GNULIB_STRERROR" redefined in single-configure package Date: Sun, 25 Oct 2020 17:20:58 +0100 Message-ID: <3240715.C6Mjl6uUBg@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-189-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <87sga2bd3v.fsf-ueno@gnu.org> References: <87sga2bd3v.fsf-ueno@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Received-SPF: none client-ip=81.169.146.220; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/25 12:20:59 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: Daiki Ueno Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Hi Daiki, > In GnuTLS, we import Gnulib sources in two phases, first LGPL sources to > be linked with the library, and then GPL sources for the tools and > tests, something like following: >=20 > In bootstrap: >=20 > gnulib-tool --extract-recursive-dependencies "$gnulib_modules" > gnulib-tool --import --local-dir=3Dsrc/gl/override --lib=3Dlibgnu_gpl -= =2Dsource-base=3Dsrc/gl --m4-base=3Dsrc/gl/m4 --doc-base=3Ddoc --aux-dir=3D= build-aux --no-conditional-dependencies --libtool --macro-prefix=3Dggl --wi= thout-tests --no-vc-files "$src_modules" >=20 > In configure.ac: >=20 > gl_INIT > ggl_INIT >=20 > It had worked until we added 'xalloc' to $src_modules, but now, > confdefs.h generated during the configure phase contains two definitions > of GNULIB_STRERROR and it prevents compilation with -Werror: >=20 > configure:53786: gcc -o conftest -O0 -Wall -Werror -g3 conftest.c -l= ev >&5 > conftest.c:412: error: "GNULIB_STRERROR" redefined [-Werror] > 412 | #define GNULIB_STRERROR 1 > |=20 > conftest.c:305: note: this is the location of the previous definition > 305 | #define GNULIB_STRERROR IN_GNUTLS_GNULIB_TESTS > |=20 > cc1: all warnings being treated as errors >=20 > Could anyone shed some light on this? gnulib-tool was designed for a set of main modules and a set of tests modules, to be compiled in different directories. Adding support for arbitrary sets of directories with different sets of modules and with/witho= ut =2DI options would be a major undertaking. This has not been done. So you are left with various possible adjustments of the sets of directories. Currently your situation is: same configure ---- module set (A) + tests of (A) ---- module set (A=E2=88=AAB) I can see two reasonable ways to modify the situation: (a) 1/configure ---- module set (A) ---- module set (A=E2=88=AAB) 2/configure ---- module set (A) + tests of (A) In other words, use a second directory purely for testing (A). Two two directories 1/configure and 2/configure will be completely separate, in particular no -I options that point from 2/Makefile to 1= /. (b) same configure ---- module set (A) ---- module set (A=E2=88=AAB) + tests of (A=E2=88=AAB) In other words, test more modules, not only those of the subset (A). This should work, because gnulib-tool has been tested numerous times with module sets (U) =E2=8A=82 (V) =E2=8A=82 (W), whereas the situati= on that causes the problem is when it's not well-ordered. Bruno