From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: pgsql-hackers@lists.postgresql.org
Subject: configure fails for perl check on CentOS8
Date: Wed, 09 Oct 2019 22:46:11 -0700 (PDT)
Message-ID: <20191010.144533.263180400.horikyota.ntt@gmail.com> (raw)
Hello, While I'm moving to CentOS8 environment, I got stuck at
./configure with the following error.
configure: error: libperl library is requred for Perl
It complains that it needs -fPIC.
Configure uses only $Config{ccflags}, but it seems that
$Config{cccdlflags} is also required. The attached patch make
./configure success. (configure itself is excluded in the patch.)
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
Attachments:
[text/x-patch] cent8_perl_conf.patch (1.5K, ../20191010.144533.263180400.horikyota.ntt@gmail.com/2-cent8_perl_conf.patch)
download | inline diff:diff --git a/config/perl.m4 b/config/perl.m4index 059e31c476..8563ac7869 100644--- a/config/perl.m4+++ b/config/perl.m4@@ -69,10 +69,10 @@ AC_DEFUN([PGAC_CHECK_PERL_CONFIGS],
AC_DEFUN([PGAC_CHECK_PERL_EMBED_CCFLAGS],
[AC_REQUIRE([PGAC_PATH_PERL])
AC_MSG_CHECKING([for CFLAGS recommended by Perl])
-perl_ccflags=`$PERL -MConfig -e ['print $Config{ccflags}']`+perl_ccflags=`$PERL -MConfig -e ['print "$Config{ccflags} $Config{cccdlflags}"']`
AC_MSG_RESULT([$perl_ccflags])
AC_MSG_CHECKING([for CFLAGS to compile embedded Perl])
-perl_embed_ccflags=`$PERL -MConfig -e ['foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}']`+perl_embed_ccflags=`$PERL -MConfig -e ['foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)} print "$Config{cccdlflags} "']`
AC_SUBST(perl_embed_ccflags)dnl
AC_MSG_RESULT([$perl_embed_ccflags])
])# PGAC_CHECK_PERL_EMBED_CCFLAGS
diff --git a/configure.in b/configure.inindex 0d16c1a971..47770f54f0 100644--- a/configure.in+++ b/configure.in@@ -2223,7 +2223,7 @@ fi
# check for <perl.h>
if test "$with_perl" = yes; then
ac_save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS $perl_includespec"+ CPPFLAGS="$CPPFLAGS $perl_includespec $perl_embed_ccflags"
AC_CHECK_HEADER(perl.h, [], [AC_MSG_ERROR([header file <perl.h> is required for Perl])],
[#include <EXTERN.h>])
# While we're at it, check that we can link to libperl.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: horikyota.ntt@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: configure fails for perl check on CentOS8
In-Reply-To: <20191010.144533.263180400.horikyota.ntt@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox