0

Our app is a monolithic perl app that currently runs on RHEL 6 and I'm trying to get it built on RHEL 7. We run with perlbrew on Perl 5.18.2 threaded. It is installed into our /opt/prism dir but is symlinked to /usr/local/bin/perl so if you see it linked there that's why. I've gotten most everything setup properly but when I'm attempting to compile libapreq2 I am getting weird issues.

configure runs properly & the make runs without issues. However, make test throws an error about Apache::TestSSLCA

Below are the commands I'm running as a non-root user but first here's perl version info

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

I get this error:

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.

If I look at TestSSLCA.pm line 103 it has

#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 line 1474 just has

require Apache::TestSSLCA;

Any help would be greatly appreciated

0

The code you quoted appears to write to %cert_dn in the loop which iterates over %cert_dn. The version of Perl you are using to compile tells you this isn't allowed.

On RHEL 6 were you building with an older Perl?

I suspect if you upgrade mod_perl or downgrade Perl you'll be able to build successfully.

In the current mod_perl trunk the fragment in question looks like this:

#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/;
}

If you copy this into your version of mod_perl the result may build as well.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.