
私たちのアプリケーションは現在RHEL 6で実行されているモノリシックPerlアプリケーションであり、RHEL 7で構築しようとしています。私たちはPerlbrewを使用してPerl 5.18.2スレッドで実行しています。 /opt/prismディレクトリにインストールされていますが、/usr/local/bin/perlにシンボリックリンクされているので、そこにリンクされていることがわかります。ほとんどすべての項目を正しく設定しましたが、libapreq2をコンパイルしようとすると奇妙な問題が発生します。
設定が正しく機能し、問題なくmakeが実行されます。ただし、make test は Apache::TestSSLCA のエラーを発生させます。
root以外のユーザーとして実行したコマンドは次のとおりです。まず、Perlのバージョン情報を確認してください。
bash# perl -v
This is perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-linux-thread-multi
(with 1 registered patch, see perl -V for more detail)
./configure --prefix=/opt/prism/work --enable-perl-glue --with-apache2-apxs=/opt/prism/work/bin/apxs --with-perl=/usr/local/bin/perl
make
make test
次のエラーが発生します。
ulimit -c unlimited; /opt/prism/perl5/perlbrew/perls/threaded-perl-5.18.2/bin/perl /opt/PEC.longshot/libapreq2-2.13/module/t/TEST
[ debug] configuring httpd
[ debug] Using httpd: /opt/prism/work/bin/httpd
[ debug] isolated httpd_info VERSION = Apache/2.2.27 (Unix)
[ debug] isolated httpd_info BUILT = May 7 2020 10:37:33
[ debug] isolated httpd_info MODULE_MAGIC_NUMBER = 20051115:33
[ debug] isolated httpd_info SERVER_MPM = Prefork
[ debug] isolated httpd_defines APACHE_MPM_DIR = server/mpm/prefork
[ debug] isolated httpd_defines APR_HAS_SENDFILE = 1
[ debug] isolated httpd_defines APR_HAS_MMAP = 1
[ debug] isolated httpd_defines APR_HAVE_IPV6 (IPv4-mapped addresses enabled) = 1
[ debug] isolated httpd_defines APR_USE_SYSVSEM_SERIALIZE = 1
[ debug] isolated httpd_defines APR_USE_PTHREAD_SERIALIZE = 1
[ debug] isolated httpd_defines SINGLE_LISTEN_UNSERIALIZED_ACCEPT = 1
[ debug] isolated httpd_defines APR_HAS_OTHER_CHILD = 1
[ debug] isolated httpd_defines AP_HAVE_RELIABLE_PIPED_LOGS = 1
[ debug] isolated httpd_defines DYNAMIC_MODULE_LIMIT = 128
[ debug] isolated httpd_defines HTTPD_ROOT = /opt/prism/work
[ debug] isolated httpd_defines SUEXEC_BIN = /opt/prism/work/bin/suexec
[ debug] isolated httpd_defines DEFAULT_PIDLOG = logs/httpd.pid
[ debug] isolated httpd_defines DEFAULT_SCOREBOARD = logs/apache_runtime_status
[ debug] isolated httpd_defines DEFAULT_LOCKFILE = logs/accept.lock
[ debug] isolated httpd_defines DEFAULT_ERRORLOG = logs/error_log
[ debug] isolated httpd_defines AP_TYPES_CONFIG_FILE = conf/mime.types
[ debug] isolated httpd_defines SERVER_CONFIG_FILE = conf/httpd.conf
[ debug] inheriting config file: /opt/prism/work/conf/httpd.conf
[ debug] using httpd.conf inherited ServerRoot to resolve conf/mime.types
[ debug] conf/mime.types successfully resolved to existing file /opt/prism/work/conf/mime.types
[ debug] Matched Apache revision Apache/2.2.27 2
[ error] configure() has failed:
Use of each() on hash after insertion without resetting hash iterator results in undefined behavior, Perl interpreter: 0x18a2010 at /opt/prism/perl5/perlbrew/perls/threaded-perl-5.18.2/lib/site_perl/5.18.2/x86_64-linux-thread-multi/Apache/TestSSLCA.pm line 103.
Compilation failed in require at /opt/prism/perl5/perlbrew/perls/threaded-perl-5.18.2/lib/site_perl/5.18.2/x86_64-linux-thread-multi/Apache/TestConfig.pm line 1474.
TestSSLCA.pm 行 103 を見ると、次のようになります。
#generate DSA versions of the server certs/keys
while (my($key, $val) = each %$cert_dn) {
next unless $key =~ /^server/;
my $name = join '_', $key, 'dsa';
$cert_dn->{$name} = { %$val }; #copy
$cert_dn->{$name}->{OU} =~ s/rsa/dsa/;
}
TestConfig.pmライン1474に
require Apache::TestSSLCA;
どんな助けでも大変感謝します。
答え1
引用したコードは繰り返し%cert_dn
ループ内で書かれているようです%cert_dn
。コンパイルに使用したPerlのバージョンによると、これは許可されていません。
RHEL 6で以前のPerlを使って構築していますか?
mod_perlをアップグレードするかPerlをダウングレードすると、正常にビルドできると考えられます。
内部に現在のmod_perlトランク問題のスニペットは次のとおりです。
#generate DSA versions of the server certs/keys
for my $key (keys %$cert_dn) {
next unless $key =~ /^server/;
my $val = $$cert_dn{$key};
my $name = join '_', $key, 'dsa';
$cert_dn->{$name} = { %$val }; #copy
$cert_dn->{$name}->{OU} =~ s/rsa/dsa/;
}
これをmod_perlバージョンにコピーすると、結果も構築できます。