Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mZdmF-0004By-G0 for pgsql-hackers@arkaria.postgresql.org; Sun, 10 Oct 2021 18:42:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mZdmB-0008DT-T7 for pgsql-hackers@arkaria.postgresql.org; Sun, 10 Oct 2021 18:42:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mZdmB-0008DI-LF for pgsql-hackers@lists.postgresql.org; Sun, 10 Oct 2021 18:42:23 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mZdm8-0007h7-EO for pgsql-hackers@lists.postgresql.org; Sun, 10 Oct 2021 18:42:23 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 19AIgBWD318520; Sun, 10 Oct 2021 14:42:11 -0400 From: Tom Lane To: Noah Misch cc: Daniel Gustafsson , Postgres hackers , Craig Ringer Subject: Re: pgsql: Adjust configure to insist on Perl version >= 5.8.3. In-reply-to: <313640.1633886230@sss.pgh.pa.us> References: <173186.1633635888@sss.pgh.pa.us> <20211008025659.GA398563@rfd.leadboat.com> <197091.1633664351@sss.pgh.pa.us> <20211008042454.GB398563@rfd.leadboat.com> <03177128-BE87-4520-90D1-D5FA16B79EB6@yesql.se> <234637.1633709021@sss.pgh.pa.us> <20211009192333.GA450252@rfd.leadboat.com> <245162.1633808657@sss.pgh.pa.us> <20211009195947.GB450252@rfd.leadboat.com> <247872.1633811686@sss.pgh.pa.us> <20211010022553.GB458218@rfd.leadboat.com> <313640.1633886230@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Sun, 10 Oct 2021 13:17:10 -0400" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <318387.1633891229.0@sss.pgh.pa.us> Date: Sun, 10 Oct 2021 14:42:11 -0400 Message-ID: <318519.1633891331@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <318387.1633891229.1@sss.pgh.pa.us> I wrote: > The closest I can get to what we want using cpanm is with this recipe: > cpanm install Test::Simple@0.87_01 > cpanm install IPC::Run@0.79 > cpanm install ExtUtils::MakeMaker@6.50 # downgrade Upon trying to actually use the perlbrew installation, I discovered another oversight in the recipe: at least with old perl versions, you end up with a non-shared libperl, so that --with-perl fails. That leads me to the attached revision... regards, tom lane ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name="improve-test-perl-README-3.patch"; charset="us-ascii" Content-ID: <318387.1633891229.2@sss.pgh.pa.us> Content-Description: improve-test-perl-README-3.patch diff --git a/src/test/perl/README b/src/test/perl/README index bfc7cdcfa3..67a050b9d4 100644 --- a/src/test/perl/README +++ b/src/test/perl/README @@ -70,20 +70,36 @@ perldoc for the test modules, e.g.: perldoc src/test/perl/PostgresNode.pm -Required Perl -------------- +Portability +----------- + +Avoid using any bleeding-edge Perl features. We have buildfarm animals +running Perl versions as old as 5.8.3, so your tests will be expected +to pass on that. -Tests must run on perl 5.8.3 and newer. perlbrew is a good way to obtain such -a Perl; see http://perlbrew.pl . +Also, do not use any non-core Perl modules except IPC::Run. Or, if you +must do so for a particular test, arrange to skip the test when the needed +module isn't present. If unsure, you can consult Module::CoreList to find +out whether a given module is part of the Perl core, and which module +versions shipped with which Perl releases. -Just install and +One way to test for compatibility with old Perl versions is to use +perlbrew; see http://perlbrew.pl . After installing that, do + export PERLBREW_CONFIGURE_FLAGS='-de -Duseshrplib' perlbrew --force install 5.8.3 perlbrew use 5.8.3 perlbrew install-cpanm - cpanm install IPC::Run + cpanm install Test::Simple@0.87_01 + cpanm install IPC::Run@0.79 + cpanm install ExtUtils::MakeMaker@6.50 # downgrade -then re-run configure to ensure the correct Perl is used when running -tests. To verify that the right Perl was found: +Then re-run Postgres' configure to ensure the correct Perl is used when +running tests. To verify that the right Perl was found: grep ^PERL= config.log + +Due to limitations of cpanm, this recipe doesn't exactly duplicate the +module list of older buildfarm animals. The discrepancies should seldom +matter, but if you want to be sure, bypass cpanm and instead manually +install the desired versions of Test::Simple and IPC::Run. ------- =_aaaaaaaaaa0--