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.8 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, 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 378491F5AE for ; Sun, 13 Jun 2021 20:55:59 +0000 (UTC) Received: from localhost ([::1]:39110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lsX9C-0006yi-53 for normalperson@yhbt.net; Sun, 13 Jun 2021 16:55:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59152) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsX97-0006yR-7s for bug-gnulib@gnu.org; Sun, 13 Jun 2021 16:55:53 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.163]:33304) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsX90-0004X2-9N for bug-gnulib@gnu.org; Sun, 13 Jun 2021 16:55:52 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1623617742; cv=none; d=strato.com; s=strato-dkim-0002; b=gXb6Sed8IRLp0lVmrbiZO7twbgsvBtUzCoZUOvKF2wsda87EQDG8wZflRCN2IQhawd wNr/egR6EQu202jdDD8lT1kGi4KJQEb863ziuOyaZUAxupKlvtUeMNomOHydO450RuZK ayAmLSwCBk6ZPyUZdZbCqT0cVVm4r9lgzCVsEC2O6ajsfw8In/Lk03ERizik7h/jvE1A U41OutTs2e/tGeSTPvqhI6mxMEPyR/Z/dvWeMIaRGeYOHDxkPHXiRHZyXzNL5+5eFhiw HkoscKJxLst/T9jTATZ3SvqHilJBmsYrYH9cwPb4JpsCQ6l478T26aXui5WJjbq1UCJB 7GxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1623617742; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=PraiNy3rEprbIlJywUm3zt0PRLNaqN3yoW2Hvp6dYqA=; b=fFca+t2xs7RXJ6g5wxgowes2gKRCxMqHE064pZPWfCJZ9KdeH7QJAJpvO/fapM5f5R oCnA9q0uQwMWNu12y9kRsHlZ3dhI4w2h9cw2TzGL1riHE7dbUDwFiITJG0FMS7l6pE1D cf/eiYhvR15NTtXy6Z3lY+RBj8xlZu2WJKJEFDvSR/pKepEgtYT3ajXD+MXM22oOmwrz nwqYi5FM/is3k6F9gkeqVRgM73QN++mNHxCiyW7mwgS1E03e7J20I984QGDjdUqposbN Z88wrxcHdmjfX7KJeQAiN/3yPH150ReKOJfdD//jDk84gr0plMG1zR5ECLEoPn8yT39Z AvqA== ARC-Authentication-Results: i=1; strato.com; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1623617742; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=PraiNy3rEprbIlJywUm3zt0PRLNaqN3yoW2Hvp6dYqA=; b=RASPlXkXv1KQN98D8ibLDGzZi0MIgpW5sa154TRTxixMakoeXeV7bUOZROamhe+aUL +Fx8VErWzhLrem/vJycajxM5RQkQlIoIvX+hqzkEf+Zqd3Wgxbl0Zh8CgmW4deTzknIv KxZZ6ZP12hYoIDoTHrzyL1g+5/M5QyEjKHHG3Be/OtWcjUOAG+JJi+hVoyKmWl2m5az1 XRrXkxZIOXblTlTox0sLUdLAGUI1Q44ZsWdmaPQtYH8zRhZ26moAs9CG4NojcdyZjTUm Ee98zVXS3Y7/DRgV8zaS1DQT5mNLNtAZ2ncXmhwFz1Le7q2fnIWC9SnrJfApB6rq0jWJ MZiw== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOHqf3z5NW" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 47.27.2 DYNA|AUTH) with ESMTPSA id q0869dx5DKtgshi (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, 13 Jun 2021 22:55:42 +0200 (CEST) From: Bruno Haible To: Paul Eggert Subject: Re: Interference between two installations of gnulib Date: Sun, 13 Jun 2021 22:55:41 +0200 Message-ID: <2346037.MTHoLHxhaa@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-210-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <111e3305-4023-415b-3631-653b87a09e2c@cs.ucla.edu> References: <43737965.862IWm2pC9@omega> <111e3305-4023-415b-3631-653b87a09e2c@cs.ucla.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: none client-ip=81.169.146.163; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 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.144, RCVD_IN_DNSWL_NONE=-0.0001, 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: bug-gnulib@gnu.org, Reuben Thomas Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Paul Eggert wrote: > > Having two separate configure scripts is undesirable, because that would > > increase the total configure time of the package (and people have already > > complained about the configure time). > > > > The same problem is seen also in GNU gettext and in GNU poke. I'm fixing it > > through the attached patch set. > > Unfortunately this broke getopt-gnu on Solaris 10, because it relies on > this line in modules/unistd: > > -e > 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT)/g' > \ > > and substitution went awry in this line, resulting in: > > -e > 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GL_GNULIB_GL_UNISTD_H_GETOPT)/g' \ > > This caused 'make check' to fail because test-getopt-gnu.c was testing > Solaris getopt rather than the Gnulib substitute. > > I discovered the problem after updating GNU grep to use the latest > Gnulib, and after someone else's buildbots failed on Solaris 10 with > 'grep' and I got notified of their failures: > > https://buildfarm.opencsw.org/buildbot/builders/ggrep-solaris10-i386/builds/227 > https://buildfarm.opencsw.org/buildbot/builders/ggrep-solaris10-sparc/builds/229 > > I installed the attached patch to work around the problem. Oh, I see: My "Support several gnulib-tool invocations under the same configure.ac." commit from 2021-04-11 interfered with the "Fix conflict between two instantiations of module 'unistd'." commit from 2011-11-26. Both attempt to do the same thing, just with a different naming conventions of the substituted variables. And the later commit is in fact a generalization of the older one. So, instead of adding a workaround, it is simpler to just rework the older patch. More precisely, we have 3 times the same situation, between module 'unistd' and modules getopt-posix nonblocking sigpipe. The simpler fix is to treat GNULIB_UNISTD_H_GETOPT like GNULIB_UNISTD_H_NONBLOCKING and GNULIB_UNISTD_H_SIGPIPE. Done through the patch below. It uses gl_MODULE_INDICATOR_INIT_VARIABLE conditionally, like done in modules/windows-stat-override. Tested with a current GNU grep checkout, on Solaris 10/x86_64. > The Python > patch is obviously a hack (and I haven't tested it); suggestions for > improvements are welcome. Few people are using the Python-based implementation at this point (the wget2 people, in particular). If I'm not sure how to keep pygnulib/* in sync with gnulib-tool, I just leave it out, and leave an entry in gnulib-tool.py.TODO. 2021-06-13 Bruno Haible Align 2011-11-26 patch to 2021-04-11 patch (regression from 2021-04-11). Reported by Paul Eggert. * m4/unistd_h.m4 (gl_UNISTD_H_REQUIRE_DEFAULTS): Also initialize GNULIB_UNISTD_H_GETOPT variable. * modules/getopt-posix (configure.ac): Set GNULIB_UNISTD_H_GETOPT variable. * modules/unistd (Makefile.am): Rely on ${gl_include_guard_prefix} processing done by gnulib-tool since 2021-04-11. * gnulib-tool: Revert last change. * pygnulib/GLEmiter.py: Likewise. diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4 index a40a41b..0ce4ea4 100644 --- a/m4/unistd_h.m4 +++ b/m4/unistd_h.m4 @@ -1,4 +1,4 @@ -# unistd_h.m4 serial 88 +# unistd_h.m4 serial 89 dnl Copyright (C) 2006-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -133,6 +133,7 @@ AC_DEFUN([gl_UNISTD_H_REQUIRE_DEFAULTS], gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SYMLINKAT]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TRUNCATE]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TTYNAME_R]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_GETOPT]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_NONBLOCKING]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_SIGPIPE]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNLINK]) diff --git a/modules/getopt-posix b/modules/getopt-posix index cbcfff5..1a665e1 100644 --- a/modules/getopt-posix +++ b/modules/getopt-posix @@ -25,10 +25,10 @@ gl_FUNC_GETOPT_POSIX if test $REPLACE_GETOPT = 1; then AC_LIBOBJ([getopt]) AC_LIBOBJ([getopt1]) - dnl Arrange for unistd.h to include getopt.h. - GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT=1 + dnl Define the substituted variable GNULIB_UNISTD_H_GETOPT to 1. + gl_UNISTD_H_REQUIRE_DEFAULTS + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_GETOPT], [1]) fi -AC_SUBST([GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT]) gl_UNISTD_MODULE_INDICATOR([getopt-posix]) Makefile.am: diff --git a/modules/unistd b/modules/unistd index 281924f..acc9d86 100644 --- a/modules/unistd +++ b/modules/unistd @@ -93,7 +93,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \ -e 's/@''GNULIB_TRUNCATE''@/$(GNULIB_TRUNCATE)/g' \ -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \ - -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT)/g' \ + -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_UNISTD_H_GETOPT)/g' \ -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \ -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \ -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \ diff --git a/gnulib-tool b/gnulib-tool index 1ea6580..63a875d 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -3700,7 +3700,7 @@ func_emit_lib_Makefile_am () -e 's,lib_LTLIBRARIES,lib%_LTLIBRARIES,g' \ -e "$sed_eliminate_LDFLAGS" \ -e 's,lib_\([A-Z][A-Z]*\),'"${libname}_${libext}"'_\1,g' \ - -e 's,\$(\(GNULIB_[A-Z]\),$('"${module_indicator_prefix}"'_\1,' \ + -e 's,\$(GNULIB_,$('"${module_indicator_prefix}"'_GNULIB_,' \ -e 's,lib%_LIBRARIES,lib_LIBRARIES,g' \ -e 's,lib%_LTLIBRARIES,lib_LTLIBRARIES,g' \ -e "$sed_transform_check_PROGRAMS" \ @@ -3714,7 +3714,7 @@ func_emit_lib_Makefile_am () func_get_automake_snippet_unconditional "$module" | LC_ALL=C \ sed -e 's,lib_\([A-Z][A-Z]*\),'"${libname}_${libext}"'_\1,g' \ - -e 's,\$(\(GNULIB_[A-Z]\),$('"${module_indicator_prefix}"'_\1,' + -e 's,\$(GNULIB_,$('"${module_indicator_prefix}"'_GNULIB_,' } > "$tmp"/amsnippet2 # Skip the contents if it's entirely empty. if grep '[^ ]' "$tmp"/amsnippet1 "$tmp"/amsnippet2 > /dev/null ; then @@ -4058,7 +4058,7 @@ func_emit_tests_Makefile_am () -e 's,lib_LTLIBRARIES,lib%_LTLIBRARIES,g' \ -e "$sed_eliminate_LDFLAGS" \ -e 's,lib_\([A-Z][A-Z]*\),libtests_a_\1,g' \ - -e 's,\$(\(GNULIB_[A-Z]\),$('"${module_indicator_prefix}"'_\1,' \ + -e 's,\$(GNULIB_,$('"${module_indicator_prefix}"'_GNULIB_,' \ -e 's,lib%_LIBRARIES,lib_LIBRARIES,g' \ -e 's,lib%_LTLIBRARIES,lib_LTLIBRARIES,g' \ -e "$sed_transform_check_PROGRAMS" \ @@ -4072,7 +4072,7 @@ func_emit_tests_Makefile_am () func_get_automake_snippet_unconditional "$module" | LC_ALL=C \ sed -e 's,lib_\([A-Z][A-Z]*\),libtests_a_\1,g' \ - -e 's,\$(\(GNULIB_[A-Z]\),$('"${module_indicator_prefix}"'_\1,' + -e 's,\$(GNULIB_,$('"${module_indicator_prefix}"'_GNULIB_,' } > "$tmp"/amsnippet2 # Skip the contents if it's entirely empty. if grep '[^ ]' "$tmp"/amsnippet1 "$tmp"/amsnippet2 > /dev/null ; then diff --git a/pygnulib/GLEmiter.py b/pygnulib/GLEmiter.py index 729862b..e6b5a2a 100644 --- a/pygnulib/GLEmiter.py +++ b/pygnulib/GLEmiter.py @@ -716,12 +716,8 @@ AC_DEFUN([%V1%_LIBSOURCES], [ pattern = compiler('lib_([A-Z][A-Z](?:.*?))', re.S | re.M) amsnippet1 = pattern.sub('%s_%s_\\1' % (libname, libext), amsnippet1) - # FIXME: Use regular expression substitution instead - # of this hack. - amsnippet1 = amsnippet1.replace('$(GNULIB_$', '$(GNULIB!@#$%') amsnippet1 = amsnippet1.replace( '$(GNULIB_', '$(' + module_indicator_prefix + '_GNULIB_') - amsnippet1 = amsnippet1.replace('$(GNULIB!@#$%', '$(GNULIB_$') amsnippet1 = amsnippet1.replace( 'lib%_LIBRARIES', 'lib_LIBRARIES') amsnippet1 = amsnippet1.replace( @@ -745,12 +741,8 @@ AC_DEFUN([%V1%_LIBSOURCES], [ pattern = compiler('lib_([A-Z][A-Z](?:.*?))', re.S | re.M) amsnippet2 = pattern.sub('%s_%s_\\1' % (libname, libext), amsnippet2) - # FIXME: Use regular expression substitution instead - # of this hack. - amsnippet2 = amsnippet2.replace('$(GNULIB_$', '$(GNULIB!@#$%') amsnippet2 = amsnippet2.replace( '$(GNULIB_', '$(' + module_indicator_prefix + '_GNULIB_') - amsnippet1 = amsnippet2.replace('$(GNULIB!@#$%', '$(GNULIB_$') if type(amsnippet1) is bytes: amsnippet1 = amsnippet1.decode(ENCS['default']) if type(amsnippet2) is bytes: @@ -1019,12 +1011,8 @@ AC_DEFUN([%V1%_LIBSOURCES], [ snippet = pattern.sub('', snippet) pattern = compiler('lib_([A-Z][A-Z](?:.*?))', re.S | re.M) snippet = pattern.sub('libtests_a_\\1', snippet) - # FIXME: Use regular expression substitution instead - # of this hack. - snippet = snippet.replace('$(GNULIB_$', '$(GNULIB!@#$%') snippet = snippet.replace( '$(GNULIB_', '$(' + module_indicator_prefix + '_GNULIB_') - snippet = snippet.replace('$(GNULIB!@#$%', '$(GNULIB_$') snippet = snippet.replace('lib%_LIBRARIES', 'lib_LIBRARIES') snippet = snippet.replace( 'lib%_LTLIBRARIES', 'lib_LTLIBRARIES')