perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josef Karthauser <>
Subject Is Apache2::compat broken? (with proper mp2bug output)
Date Fri, 23 Feb 2007 13:22:39 GMT
-------------8<---------- Start Bug Report ------------8<----------
1. Problem Description:

	Hi there,

	I've got an modperl 1 script I've trying to run under modperl2.
	It's a bit hairy, because it's actually a library (.pm file) which
	can be run either within a perl module, or in a stand alone CGI
	script.  It also has to continue running on my old mod_perl 1 apache
	server for the time being.

	Now it looks as if I can just add:

	    eval { use Apache2::compat };

	at the top of the script and my needs will be satisfied.

	However there appears to be a problem, which i can summaries as follows.

	This piece of test code:

		use Apache2::compat;

	doesn't work.  It blows up with:

	    % perl
	    Bareword "Apache2::ServerUtil::server_root" not allowed while "strict subs" in use at
/usr/local/lib/perl5/site_perl/5.8.8/mach/Apache2/ line 347.
	    BEGIN not safe after errors--compilation aborted at /usr/local/lib/perl5/site_perl/5.8.8/mach/Apache2/
line 430.
	    Compilation failed in require at line 3.
	    BEGIN failed--compilation aborted at line 3.

	This is with mod-perl2 version 2.0.3, but the same problem occurs
	with 2.0.2.

	Is something wierd going on, or is the compat code broken in this



2. Used Components and their Configuration:

*** mod_perl version 2.000003

*** using /usr/local/lib/perl5/site_perl/5.8.8/mach/Apache2/

*** Makefile.PL options:
  MP_APR_LIB     => aprext
  MP_APXS        => /usr/local/sbin/apxs
  MP_COMPAT_1X   => 1
  MP_LIBNAME     => mod_perl
  MP_USE_DSO     => 1

*** The httpd binary was not found

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

 -L/usr/local/lib -laprutil-1 -lexpat -liconv -L/usr/local/lib
 -L/usr/local/lib -lapr-1 -lcrypt  -lpthread 

*** /usr/local/bin/perl -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
    osname=freebsd, osvers=6.2-stable, archname=i386-freebsd-64int
    uname='freebsd 6.2-stable freebsd 6.2-stable #10: sat jan 27
20:19:48 gmt 2007 i386 '
    config_args='-sde -Dprefix=/usr/local -Darchlib=/usr/local/lib/perl5/5.8.8/mach -Dprivlib=/usr/local/lib/perl5/5.8.8
-Dman3dir=/usr/local/lib/perl5/5.8.8/perl/man/man3 -Dman1dir=/usr/local/man/man1 -Dsitearch=/usr/local/lib/perl5/site_perl/5.8.8/mach
-Dsitelib=/usr/local/lib/perl5/site_perl/5.8.8 -Dscriptdir=/usr/local/bin -Dsiteman3dir=/usr/local/lib/perl5/5.8.8/man/man3
-Dsiteman1dir=/usr/local/man/man1 -Ui_malloc -Ui_iconv -Uinstallusrbinperl -Dcc=cc -Duseshrplib
-Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.8/BSDPAN" -Doptimize=-O2 -pipe -march=prescott
-Ud_dosuid -Ui_gdbm -Dusethreads=n -Dusemymalloc=y -Duse64bitint'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=define use64bitall=undef uselongdouble=undef
    usemymalloc=y, bincompat5005=undef
    cc='cc', ccflags ='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.8/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H
-fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include',
    optimize='-O2 -pipe -march=prescott',
    cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.8/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H
-fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include'
    ccversion='', gccversion='3.4.6 [FreeBSD] 20060305', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -Wl,-E -L/usr/local/lib'
    libpth=/usr/lib /usr/local/lib
    libs=-lm -lcrypt -lutil
    perllibs=-lm -lcrypt -lutil
    libc=, so=so, useshrplib=true,
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='  -Wl,-R/usr/local/lib/perl5/5.8.8/mach/CORE'
    cccdlflags='-DPIC -fPIC', lddlflags='-shared  -L/usr/local/lib'

Characteristics of this binary (from libperl): 
  Compile-time options: MYMALLOC PERL_MALLOC_WRAP USE_64_BIT_INT
                        USE_LARGE_FILES USE_PERLIO
  Locally applied patches:
  Built under freebsd
  Compiled at Jan 28 2007 17:28:33

*** Packages of interest status:

Apache2            : -
Apache2::Request   : -
CGI                : 3.15
ExtUtils::MakeMaker: 6.30, undef
LWP                : 5.805
mod_perl           : -
mod_perl2          : 2.000003

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


This report was generated by /usr/local/bin/mp2bug on Fri Feb 23 13:17:25 2007 GMT.

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

View raw message