Trunk: APR.so won't load

Jie Gao <[email protected]>
Newsgroups gmane.comp.apache.mod-perl,gmane.comp.apache.incubator.bigtop.devel
Message-ID <[email protected]>
I have got the source code from the trunk, "make test" mostly passed except for
a threading issue, but I installed it anyway.

Tried to load a test module, but it fails with the following error:

#     Error:  Can't load '/usr/local/lib/perl5/site_perl/5.20.2/x86_64-linux-thread-multi/auto/APR/APR.so' for module APR: /usr/local/lib/perl5/site_perl/5.20.2/x86_64-linux-thread-multi/auto/APR/APR.so: undefined symbol: ap_strchr at /usr/local/lib/perl5/5.20.2/x86_64-linux-thread-multi/DynaLoader.pm line 193.
#  at /usr/local/lib/perl5/site_perl/5.20.2/x86_64-linux-thread-multi/APR/Table.pm line 23.

The following test module loads OK, but fails if I uncomment any of the "use APR::*" lines:

#-------------------------------------------------------------------------

package mytest::mytestmodule;

use 5.010001;
use strict;
use warnings;
use Carp;
$SIG{__DIE__} = \&Carp::confess;

use mod_perl2;
use Apache2::Connection();
use Apache2::RequestRec();
use Apache2::SubRequest();
use Apache2::Access();
use Apache2::RequestUtil();
use Apache2::Response();
use Apache2::Log();
use Apache2::Util();
use Apache2::Const ("-compile", qw(:common :methods :satisfy :auth MODE_READBYTES));
use Apache2::URI();
use Apache2::Filter ();
#use APR::Const ("-compile", qw(:common SUCCESS BLOCK_READ));
use IO::Socket qw(SOCK_STREAM);
use Data::Dumper;
use AnyDBM_File ();
#use APR::Brigade ();
#use APR::Bucket ();
#use APR::Base64 ();
#use APR::Table ();
#use APR::URI ();
use URI::Escape::XS qw/uri_escape uri_unescape/;
#use Apache2::MPM();

our $VERSION = '1.0.1';

1;
__END__

#-------------------------------------------------------------------------

-------------8<---------- Start Bug Report ------------8<----------
1. Problem Description:

  [DESCRIBE THE PROBLEM HERE]

2. Used Components and their Configuration:

*** mod_perl version 2.000009

*** using /usr/local/src/mod_perl-2.0/lib/Apache2/BuildConfig.pm

*** Makefile.PL options:
  MP_APR_CONFIG  => /usr/local/httpd-2.4.12/bin/apr-1-config
  MP_APR_LIB     => aprext
  MP_APXS        => /usr/local/httpd-2.4.12/bin/apxs
  MP_COMPAT_1X   => 1
  MP_GENERATE_XS => 1
  MP_LIBNAME     => mod_perl
  MP_USE_DSO     => 1


*** /usr/local/httpd-2.4.12/bin/httpd -V
Server version: Apache/2.4.12 (Unix)
Server built:   Feb 27 2015 20:05:23
Server's Module Magic Number: 20120211:41
Server loaded:  APR 1.5.1, APR-UTIL 1.5.4
Compiled using: APR 1.5.1, APR-UTIL 1.5.4
Architecture:   64-bit
Server MPM:     worker
  threaded:     yes (fixed thread count)
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/usr/local/httpd-2.4.12"
 -D SUEXEC_BIN="/usr/local/httpd-2.4.12/bin/suexec"


*** /usr/bin/ldd /usr/local/httpd-2.4.12/bin/httpd
        linux-vdso.so.1 =>  (0x00007fffcefff000)
        libpcre.so.0 => /lib64/libpcre.so.0 (0x000000327f400000)
        libaprutil-1.so.0 => /usr/local/httpd-2.4.12/lib/libaprutil-1.so.0 (0x00007f3ba864c000)
        libexpat.so.1 => /lib64/libexpat.so.1 (0x0000003281c00000)
        libapr-1.so.0 => /usr/local/httpd-2.4.12/lib/libapr-1.so.0 (0x00007f3ba8417000)
        librt.so.1 => /lib64/librt.so.1 (0x000000327dc00000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00000036c2400000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x000000327d400000)
        libc.so.6 => /lib64/libc.so.6 (0x000000327d000000)
        /lib64/ld-linux-x86-64.so.2 (0x000000327cc00000)
        libfreebl3.so => /lib64/libfreebl3.so (0x00000036c2800000)
        libdl.so.2 => /lib64/libdl.so.2 (0x000000327d800000)


*** (apr|apu)-config linking info

 -L/usr/local/httpd-2.4.12/lib -laprutil-1     -lexpat 
 -L/usr/local/httpd-2.4.12/lib -lapr-1 -lrt -lcrypt  -lpthread 



*** /usr/local/bin/perl -V
Summary of my perl5 (revision 5 version 20 subversion 2) configuration:
   
  Platform:
    osname=linux, osvers=2.6.32-504.8.1.el6.x86_64, archname=x86_64-linux-thread-multi
    uname='linux xxx.xxx.xxx.xx 2.6.32-504.8.1.el6.x86_64 #1 smp fri dec 19 12:09:25 est 2014 x86_64 x86_64 x86_64 gnulinux '
    config_args='-Dusethreads -Dprefix=/usr/local -des -A ccflags=-fPIC'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fPIC -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fPIC -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.4.7 20120313 (Red Hat 4.4.7-11)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib /lib/../lib64 /usr/lib/../lib64 /lib /lib64 /usr/lib64 /usr/local/lib64
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=libc-2.12.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.12'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'


Characteristics of this binary (from libperl): 
  Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
                        PERL_DONT_CREATE_GVSV
                        PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
                        PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
                        PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV
                        USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS
                        USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
                        USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO
                        USE_PERL_ATOF USE_REENTRANT_API
  Built under linux
  Compiled at Feb 25 2015 15:58:55
  %ENV:
    PERL_LWP_USE_HTTP_10="1"
  @INC:
    /usr/local/lib/perl5/site_perl/5.20.2/x86_64-linux-thread-multi
    /usr/local/lib/perl5/site_perl/5.20.2
    /usr/local/lib/perl5/5.20.2/x86_64-linux-thread-multi
    /usr/local/lib/perl5/5.20.2
    /usr/local/lib/perl5/site_perl/5.18.2
    /usr/local/lib/perl5/site_perl/5.18.0
    /usr/local/lib/perl5/site_perl
    .

*** Packages of interest status:

Apache2            : -
Apache2::Request   : -
CGI                : 3.65
ExtUtils::MakeMaker: 6.98
LWP                : 5.837
mod_perl           : -
mod_perl2          : 2.000009


3. This is the core dump trace: (if you get a core dump):

  [CORE TRACE COMES HERE]

This report was generated by bin/mp2bug on Sun Mar  1 06:21:21 2015 GMT.

-------------8<---------- End Bug Report --------------8<----------

# ls -al /usr/local/httpd-2.4.12/lib/
total 4108
drwxr-xr-x.  4 root root    4096 Feb 27 20:07 .
drwxr-xr-x. 15 root root    4096 Feb 27 20:07 ..
-rw-r--r--.  1 root root    9262 Feb 27 20:07 apr.exp
drwxr-xr-x.  2 root root    4096 Feb 27 20:07 apr-util-1
-rw-r--r--.  1 root root    5272 Feb 27 20:07 aprutil.exp
-rw-r--r--.  1 root root 1685642 Feb 27 20:07 libapr-1.a
-rwxr-xr-x.  1 root root     969 Feb 27 20:07 libapr-1.la
lrwxrwxrwx.  1 root root      17 Feb 27 20:07 libapr-1.so -> libapr-1.so.0.5.1
lrwxrwxrwx.  1 root root      17 Feb 27 20:07 libapr-1.so.0 -> libapr-1.so.0.5.1
-rwxr-xr-x.  1 root root  858051 Feb 27 20:07 libapr-1.so.0.5.1
-rw-r--r--.  1 root root 1022024 Feb 27 20:07 libaprutil-1.a
-rwxr-xr-x.  1 root root    1045 Feb 27 20:07 libaprutil-1.la
lrwxrwxrwx.  1 root root      21 Feb 27 20:07 libaprutil-1.so -> libaprutil-1.so.0.5.4
lrwxrwxrwx.  1 root root      21 Feb 27 20:07 libaprutil-1.so.0 -> libaprutil-1.so.0.5.4
-rwxr-xr-x.  1 root root  589222 Feb 27 20:07 libaprutil-1.so.0.5.4
drwxr-xr-x.  2 root root    4096 Feb 27 20:07 pkgconfig






Regards,


Jie.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.