Re: BUG #5339: Version of Perl detected incorrectly - Mailing list pgsql-bugs

From Alex Hunsaker
Subject Re: BUG #5339: Version of Perl detected incorrectly
Date
Msg-id 34d269d41002221144qebc9d5apbedf38daad677eef@mail.gmail.com
Whole thread Raw
In response to BUG #5339: Version of Perl detected incorrectly  ("Jonathan "Duke" Leto" <jonathan@leto.net>)
Responses Re: BUG #5339: Version of Perl detected incorrectly  (Alex Hunsaker <badalex@gmail.com>)
Re: BUG #5339: Version of Perl detected incorrectly  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: BUG #5339: Version of Perl detected incorrectly  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Mon, Feb 22, 2010 at 10:57, Jonathan <jonathan@leto.net> wrote:
>
> The following bug has been logged online:
>
> Bug reference: =C2=A0 =C2=A0 =C2=A05339
> Logged by: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Jonathan "Duke" Leto
> Email address: =C2=A0 =C2=A0 =C2=A0jonathan@leto.net
> PostgreSQL version: master 0f50d482
> Operating system: =C2=A0 CentOS 5.4 (Linux kernel 2.6.18)
> Description: =C2=A0 =C2=A0 =C2=A0 =C2=A0Version of Perl detected incorrec=
tly
> Details:
>
> $ =C2=A0perl -v
>
> This is perl 5, version 11, subversion 4 (v5.11.4-114-ga4cc961*) built for
> x86_64-linux
...
> checking for perl... /home/leto/bin/perl
> configure: using perl
> configure: WARNING:
> *** The installed version of Perl, /home/leto/bin/perl, is too old to use
> with PostgreSQL.
> *** Perl version 5.8 or later is required, but this is .

Yeah find the below which attempts to clean this up a bit.  Instead of
parsing perl -v output, we just "use" the min required version and
rely on perl error out for us.   Its also more or less what we do at
runtime in plc_perl_boot.pl now.

Thoughts?

*** a/configure
--- b/configure
***************
*** 6867,6884 **** fi
  fi

  if test "$PERL"; then
!   pgac_perl_version=3D`$PERL -v 2>/dev/null | sed -n 's/This is perl,
v[a-z ]*//p' | sed 's/ .*//'`
!   { $as_echo "$as_me:$LINENO: using perl $pgac_perl_version" >&5
! $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
!   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
!     $AWK '{ if ($1 =3D 5 && $2 >=3D 8) exit 1; else exit 0;}'
!   then
      { $as_echo "$as_me:$LINENO: WARNING:
  *** The installed version of Perl, $PERL, is too old to use with PostgreS=
QL.
! *** Perl version 5.8 or later is required, but this is
$pgac_perl_version." >&5
  $as_echo "$as_me: WARNING:
  *** The installed version of Perl, $PERL, is too old to use with PostgreS=
QL.
! *** Perl version 5.8 or later is required, but this is
$pgac_perl_version." >&2;}
      PERL=3D""
    fi
  fi
--- 6867,6880 ----
  fi

  if test "$PERL"; then
!   perl_version_error=3D`$PERL -e 'use 5.00801;' 2>&1`
!   if test -n "$perl_version_error"; then
      { $as_echo "$as_me:$LINENO: WARNING:
  *** The installed version of Perl, $PERL, is too old to use with PostgreS=
QL.
! *** $perl_version_error." >&5
  $as_echo "$as_me: WARNING:
  *** The installed version of Perl, $PERL, is too old to use with PostgreS=
QL.
! *** $perl_version_error." >&2;}
      PERL=3D""
    fi
  fi

pgsql-bugs by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: BUG #5118: start-status-insert-fatal
Next
From: Alex Hunsaker
Date:
Subject: Re: BUG #5339: Version of Perl detected incorrectly