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.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,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 71B541F5AE for ; Sun, 13 Jun 2021 17:42:00 +0000 (UTC) Received: from localhost ([::1]:33082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lsU7T-0002zd-0z for normalperson@yhbt.net; Sun, 13 Jun 2021 13:41:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39174) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsU7P-0002zS-Oe for bug-gnulib@gnu.org; Sun, 13 Jun 2021 13:41:55 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:44860) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsU7M-00085B-RG for bug-gnulib@gnu.org; Sun, 13 Jun 2021 13:41:55 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 3506A16005E; Sun, 13 Jun 2021 10:41:49 -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 SLPN4ywvtgLT; Sun, 13 Jun 2021 10:41:47 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 4C41F16008F; Sun, 13 Jun 2021 10:41:47 -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 t5ltoiKxDvze; Sun, 13 Jun 2021 10:41:47 -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 1BE131600AD; Sun, 13 Jun 2021 10:41:47 -0700 (PDT) To: Bruno Haible References: <43737965.862IWm2pC9@omega> From: Paul Eggert Organization: UCLA Computer Science Department Subject: Re: Interference between two installations of gnulib Message-ID: <111e3305-4023-415b-3631-653b87a09e2c@cs.ucla.edu> Date: Sun, 13 Jun 2021 10:41:46 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <43737965.862IWm2pC9@omega> Content-Type: multipart/mixed; boundary="------------A9F9E36A1006CF9D888CB2CC" Content-Language: en-US Received-SPF: pass client-ip=131.179.128.68; envelope-from=eggert@cs.ucla.edu; helo=zimbra.cs.ucla.edu X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.144, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-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: Gnulib bugs , Reuben Thomas Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" This is a multi-part message in MIME format. --------------A9F9E36A1006CF9D888CB2CC Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable On 4/11/21 12:32 PM, Bruno Haible wrote: > Having two separate configure scripts is undesirable, because that woul= d > increase the total configure time of the package (and people have alrea= dy > complained about the configure time). >=20 > The same problem is seen also in GNU gettext and in GNU poke. I'm fixin= g it > through the attached patch set. Unfortunately this broke getopt-gnu on Solaris 10, because it relies on=20 this line in modules/unistd: -e=20 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_${gl_include_guard_prefix}_UNIS= TD_H_GETOPT)/g'=20 \ and substitution went awry in this line, resulting in: -e=20 '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=20 Solaris getopt rather than the Gnulib substitute. I discovered the problem after updating GNU grep to use the latest=20 Gnulib, and after someone else's buildbots failed on Solaris 10 with=20 'grep' and I got notified of their failures: https://buildfarm.opencsw.org/buildbot/builders/ggrep-solaris10-i386/buil= ds/227 https://buildfarm.opencsw.org/buildbot/builders/ggrep-solaris10-sparc/bui= lds/229 I installed the attached patch to work around the problem. The Python=20 patch is obviously a hack (and I haven't tested it); suggestions for=20 improvements are welcome. I must say that I am starting to reach my limits in debugging this sort=20 of thing. We have quite a pyramid of hacks here, involving more than=20 just the usual multilevel combination of make, m4, sh, and sed along=20 with Git submodules etc., and now also a duplicate Python implementation=20 that I don't offhand know how to test. And 'gnulib-tool', 'configure'=20 and 'make check' are so verrryy slow; to find the commit that caused the=20 problem, I had to run 'git bisect' overnight because my circa-2005=20 Solaris 10 sparc machine is not as fast as modern machines. This is a=20 long way from my traditional way of developing where I edited a Makefile=20 and typed 'make' (and that was already too slow!). I don't have a solution to this problem, and to some extent am just venti= ng. --------------A9F9E36A1006CF9D888CB2CC Content-Type: text/x-patch; charset=UTF-8; name="0001-getopt-gnu-port-back-to-Solaris-10.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-getopt-gnu-port-back-to-Solaris-10.patch" =46rom 3dd3c04d9b5cf70fa454a19c90fa7d9ddd8b0d1c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Jun 2021 10:31:33 -0700 Subject: [PATCH] getopt-gnu: port back to Solaris 10 MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit * gnulib-tool (func_emit_lib_Makefile_am) (func_emit_tests_Makefile_am): Don=E2=80=99t substitute things like $(GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT), as this mishandles unistd and getopt-gnu, which breaks =E2=80=98make check=E2=80=99 on Solaris 10 with getopt-gnu. * pygnulib/GLEmiter.py (lib_Makefile_am, tests_Makefile_am): Likewise, albeit hackier since I did not test this and so went with a trivial hack instead. --- ChangeLog | 12 ++++++++++++ gnulib-tool | 8 ++++---- pygnulib/GLEmiter.py | 12 ++++++++++++ 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index b48760c6e..084c43017 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2021-06-13 Paul Eggert + + getopt-gnu: port back to Solaris 10 + * gnulib-tool (func_emit_lib_Makefile_am) + (func_emit_tests_Makefile_am): Don=E2=80=99t substitute things like + $(GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT), + as this mishandles unistd and getopt-gnu, which breaks + =E2=80=98make check=E2=80=99 on Solaris 10 with getopt-gnu. + * pygnulib/GLEmiter.py (lib_Makefile_am, tests_Makefile_am): + Likewise, albeit hackier since I did not test this and + so went with a trivial hack instead. + 2021-06-13 Bruno Haible =20 ialloc: Put appropriate license notice in source files. diff --git a/gnulib-tool b/gnulib-tool index 63a875d4a..1ea6580b3 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_,$('"${module_indicator_prefix}"'_GNULIB= _,' \ + -e 's,\$(\(GNULIB_[A-Z]\),$('"${module_indicator_prefix}= "'_\1,' \ -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=3DC \ sed -e 's,lib_\([A-Z][A-Z]*\),'"${libname}_${libext}"'_\1,g'= \ - -e 's,\$(GNULIB_,$('"${module_indicator_prefix}"'_GNULIB= _,' + -e 's,\$(\(GNULIB_[A-Z]\),$('"${module_indicator_prefix}= "'_\1,' } > "$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_,$('"${module_indicator_prefix}"'_GNULIB= _,' \ + -e 's,\$(\(GNULIB_[A-Z]\),$('"${module_indicator_prefix}= "'_\1,' \ -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=3DC \ sed -e 's,lib_\([A-Z][A-Z]*\),libtests_a_\1,g' \ - -e 's,\$(GNULIB_,$('"${module_indicator_prefix}"'_GNULIB= _,' + -e 's,\$(\(GNULIB_[A-Z]\),$('"${module_indicator_prefix}= "'_\1,' } > "$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 e6b5a2a72..729862bc1 100644 --- a/pygnulib/GLEmiter.py +++ b/pygnulib/GLEmiter.py @@ -716,8 +716,12 @@ AC_DEFUN([%V1%_LIBSOURCES], [ pattern =3D compiler('lib_([A-Z][A-Z](?:.*?))', re.S | r= e.M) amsnippet1 =3D pattern.sub('%s_%s_\\1' % (libname, libext), amsnippet1) + # FIXME: Use regular expression substitution instead + # of this hack. + amsnippet1 =3D amsnippet1.replace('$(GNULIB_$', '$(GNULI= B!@#$%') amsnippet1 =3D amsnippet1.replace( '$(GNULIB_', '$(' + module_indicator_prefix + '_GNUL= IB_') + amsnippet1 =3D amsnippet1.replace('$(GNULIB!@#$%', '$(GN= ULIB_$') amsnippet1 =3D amsnippet1.replace( 'lib%_LIBRARIES', 'lib_LIBRARIES') amsnippet1 =3D amsnippet1.replace( @@ -741,8 +745,12 @@ AC_DEFUN([%V1%_LIBSOURCES], [ pattern =3D compiler('lib_([A-Z][A-Z](?:.*?))', re.S | r= e.M) amsnippet2 =3D pattern.sub('%s_%s_\\1' % (libname, libext), amsnippet2) + # FIXME: Use regular expression substitution instead + # of this hack. + amsnippet2 =3D amsnippet2.replace('$(GNULIB_$', '$(GNULI= B!@#$%') amsnippet2 =3D amsnippet2.replace( '$(GNULIB_', '$(' + module_indicator_prefix + '_GNUL= IB_') + amsnippet1 =3D amsnippet2.replace('$(GNULIB!@#$%', '$(GN= ULIB_$') if type(amsnippet1) is bytes: amsnippet1 =3D amsnippet1.decode(ENCS['default']) if type(amsnippet2) is bytes: @@ -1011,8 +1019,12 @@ AC_DEFUN([%V1%_LIBSOURCES], [ snippet =3D pattern.sub('', snippet) pattern =3D compiler('lib_([A-Z][A-Z](?:.*?))', re.S | r= e.M) snippet =3D pattern.sub('libtests_a_\\1', snippet) + # FIXME: Use regular expression substitution instead + # of this hack. + snippet =3D snippet.replace('$(GNULIB_$', '$(GNULIB!@#$%= ') snippet =3D snippet.replace( '$(GNULIB_', '$(' + module_indicator_prefix + '_GNUL= IB_') + snippet =3D snippet.replace('$(GNULIB!@#$%', '$(GNULIB_$= ') snippet =3D snippet.replace('lib%_LIBRARIES', 'lib_LIBRA= RIES') snippet =3D snippet.replace( 'lib%_LTLIBRARIES', 'lib_LTLIBRARIES') --=20 2.30.2 --------------A9F9E36A1006CF9D888CB2CC--