Bug? Make test fails on configure_httpd/configure_apxs

[prev] [thread] [next] [Date index for 2004/10/31]

From: Steven
Subject: Bug? Make test fails on configure_httpd/configure_apxs
Date: 21:12 on 31 Oct 2004
Dear mailing list,

When following instructions for mod_perl 2.0 on the website:

> make
blah... no warnings or errors
> make test
Just enters and leaves a few directories first
....
make[1]: Leaving directory 
`/home/ufo/downloads/apache2/modules/mod_perl-1.99_17/xs'
/usr/local/bin/perl -Iblib/arch -Iblib/lib \
t/TEST -clean
[warning] setting ulimit to allow core files
ulimit -c unlimited; /usr/local/bin/perl 
/home/ufo/downloads/apache2/modules/mod_perl-1.99_17/t/TEST -bugreport 
-verbose=0
something is wrong, mod_perl 2.0 build should have supplied all the needed 
information to run the tests. Please post lib/Apache/BuildConfig.pm along 
with the bug report at 
/home/ufo/downloads/apache2/modules/mod_perl-1.99_17/Apache-Test/lib/Apache/TestConfig.pm 
line 349.
+--------------------------------------------------------+
| Please file a bug report: http://perl.apache.org/bugs/ |
+--------------------------------------------------------+
make: *** [run_tests] Error 2

Following is t/REPORT:

#!/usr/local/bin/perl
# WARNING: this file is generated, do not edit
# 01: Apache-Test/lib/Apache/TestConfig.pm:898
# 02: Apache-Test/lib/Apache/TestConfig.pm:988
# 03: Apache-Test/lib/Apache/TestReport.pm:45
# 04: Makefile.PL:283
# 05: Makefile.PL:52

BEGIN { eval { require blib && blib->import; } }


use strict;
use warnings FATAL => 'all';

use lib qw(
    /home/ufo/downloads/apache2/modules/mod_perl-1.99_17/lib
    /home/ufo/downloads/apache2/modules/mod_perl-1.99_17/Apache-Test/lib
    /home/ufo/downloads/apache2/modules/mod_perl-1.99_17/t/lib
);


use ModPerl::TestReport;
ModPerl::TestReport->new(@ARGV)->run;

<end>

TestConfig.pm is huge so following is only the direct context of the 
error-producing line in 
/home/ufo/downloads/apache2/modules/mod_perl-1.99_17/Apache-Test/lib/Apache/TestConfig.pm
:

sub httpd_config {
    my $self = shift;

    $self->configure_apxs;
    $self->configure_httpd;

    my $vars = $self->{vars};
    unless ($vars->{httpd} or $vars->{apxs}) {

        # mod_perl 2.0 build always knows the right httpd location
        # (and optionally apxs)
        if (IS_MOD_PERL_2_BUILD) {
            # XXX: at the moment not sure what could go wrong, but it
            # shouldn't enter interactive config, which doesn't work
            # with mod_perl 2.0 build (by design)
            die "something is wrong, mod_perl 2.0 build should have " .
                "supplied all the needed information to run the tests. " .
                "Please post lib/Apache/BuildConfig.pm along with the " .
                "bug report";
        }

        if ($ENV{APACHE_TEST_NO_STICKY_PREFERENCES}) {
            error "You specified APACHE_TEST_NO_STICKY_PREFERENCES=1 " .
                "in which case you must explicitly specify -httpd " .
                "and/or -apxs options";
            Apache::TestRun::exit_perl(0);
        }

        $self->clean(1);
        # this method restarts the whole program via exec
        # so it never returns
        $self->custom_config_first_time($self->{vars});
    }

    # if we have gotten that far we know at least about the location
    # of httpd and or apxs, so let's save it if we haven't saved any
    # custom configs yet
    unless (custom_config_exists()) {
        $self->custom_config_save($self->{vars});
    }

    $self->inherit_config; #see TestConfigParse.pm
    $self->configure_httpd_eapi; #must come after inherit_config

    $self->default_module(cgi    => [qw(mod_cgi mod_cgid)]);
    $self->default_module(thread => [qw(worker threaded)]);
    $self->default_module(ssl    => [qw(mod_ssl)]);
    $self->default_module(access => [qw(mod_access mod_authz_host)]);
    $self->default_module(auth   => [qw(mod_auth mod_auth_basic)]);
    $self->default_module(php    => [qw(sapi_apache2 mod_php4 mod_php5)]);

    $self->{server}->post_config;

    $self;
}

sub configure_apxs {
    my $self = shift;

    $self->{APXS} = $self->default_apxs;

    return unless $self->{APXS};

    $self->{APXS} =~ s{/}{\\}g if WIN32;

    my $vars = $self->{vars};

    $vars->{bindir}   ||= $self->apxs('BINDIR', 1);
    $vars->{sbindir}  ||= $self->apxs('SBINDIR');
    $vars->{target}   ||= $self->apxs('TARGET');
    $vars->{conf_dir} ||= $self->apxs('SYSCONFDIR');

    if ($vars->{conf_dir}) {
        $vars->{httpd_conf} ||= catfile $vars->{conf_dir}, 'httpd.conf';
    }
}

sub configure_httpd {
    my $self = shift;
    my $vars = $self->{vars};

    debug "configuring httpd";

    $vars->{target} ||= (WIN32 ? 'Apache.EXE' : 'httpd');

    unless ($vars->{httpd}) {
        #sbindir should be bin/ with the default layout
        #but its eaiser to workaround apxs than fix apxs
        for my $dir (map { $vars->{$_} } qw(sbindir bindir)) {
            next unless defined $dir;
            my $httpd = catfile $dir, $vars->{target};
            next unless -x $httpd;
            $vars->{httpd} = $httpd;
            last;
        }

        $vars->{httpd} ||= $self->default_httpd;
    }

    if ($vars->{httpd}) {
        my @chunks = splitdir $vars->{httpd};
        #handle both $prefix/bin/httpd and $prefix/Apache.exe
        for (1,2) {
            pop @chunks;
            last unless @chunks;
            $self->{httpd_basedir} = catfile @chunks;
            last if -d "$self->{httpd_basedir}/bin";
        }
    }

    #cleanup httpd droppings
    my $sem = catfile $vars->{t_logs}, 'apache_runtime_status.sem';
    unless (-e $sem) {
        $self->clean_add_file($sem);
    }
}


<end>

Following is lib/Apache/BuildConfig.pm :

# 
# /*
#  * *********** WARNING **************
#  * This file generated by Apache::Build/0.01
#  * Any changes made here will be lost
#  * ***********************************
#  * 01: lib/ModPerl/Code.pm:702
#  * 02: lib/Apache/Build.pm:810
#  * 03: lib/Apache/Build.pm:827
#  * 04: Makefile.PL:326
#  * 05: Makefile.PL:92
#  */
# 
package Apache::BuildConfig;

use Apache::Build ();

sub new {
    bless( {
                 'MODPERL_AR' => 'ar',
                 'MODPERL_OBJ_EXT' => '.o',
                 'ap_includedir' => 
'/home/ufo/downloads/apache2/httpd-2.0.52/include',
                 'MODPERL_O_FILES' => 'mod_perl.o modperl_interp.o 
modperl_tipool.o modperl_log.o modperl_config.o modperl_cmd.o 
modperl_options.o modperl_callback.o modperl_handler.o modperl_gtop.o 
modperl_util.o modperl_io.o modperl_io_apache.o modperl_filter.o 
modperl_bucket.o modperl_mgv.o modperl_pcw.o modperl_global.o modperl_env.o 
modperl_cgi.o modperl_perl.o modperl_perl_global.o modperl_perl_pp.o 
modperl_sys.o modperl_module.o modperl_svptr_table.o modperl_const.o 
modperl_constants.o modperl_apache_compat.o modperl_error.o modperl_debug.o 
modperl_common_util.o modperl_common_log.o modperl_hooks.o 
modperl_directives.o modperl_flags.o modperl_xsinit.o modperl_exports.o',
                 'MP_USE_DSO' => 1,
                 'MODPERL_O_PIC_FILES' => 'mod_perl.lo modperl_interp.lo 
modperl_tipool.lo modperl_log.lo modperl_config.lo modperl_cmd.lo 
modperl_options.lo modperl_callback.lo modperl_handler.lo modperl_gtop.lo 
modperl_util.lo modperl_io.lo modperl_io_apache.lo modperl_filter.lo 
modperl_bucket.lo modperl_mgv.lo modperl_pcw.lo modperl_global.lo 
modperl_env.lo modperl_cgi.lo modperl_perl.lo modperl_perl_global.lo 
modperl_perl_pp.lo modperl_sys.lo modperl_module.lo modperl_svptr_table.lo 
modperl_const.lo modperl_constants.lo modperl_apache_compat.lo 
modperl_error.lo modperl_debug.lo modperl_common_util.lo 
modperl_common_log.lo modperl_hooks.lo modperl_directives.lo modperl_flags.lo 
modperl_xsinit.lo modperl_exports.lo',
                 'MODPERL_AP_INCLUDEDIR' => '',
                 'MODPERL_RM' => 'rm',
                 'file_ldopts' => 'src/modules/perl/ldopts',
                 'MODPERL_CPPRUN' => 'cc -E',
                 'cwd' => 
'/home/ufo/downloads/apache2/modules/mod_perl-1.99_17',
                 'MODPERL_RANLIB' => ':',
                 'MP_GENERATE_XS' => 1,
                 'MODPERL_ARCHLIBEXP' => 
'/usr/local/lib/perl5/5.8.3/i686-linux',
                 'MODPERL_LIB_DSO' => 'mod_perl.so',
                 'MODPERL_XSUBPP' => '$(MODPERL_PERLPATH) 
$(MODPERL_PRIVLIBEXP)/ExtUtils/xsubpp -typemap 
$(MODPERL_PRIVLIBEXP)/ExtUtils/typemap -typemap 
/home/ufo/downloads/apache2/modules/mod_perl-1.99_17/lib/typemap',
                 'MODPERL_PRIVLIBEXP' => '/usr/local/lib/perl5/5.8.3',
                 'MODPERL_LIB_STATIC' => 'mod_perl.a',
                 'MODPERL_RM_F' => 'rm -f',
                 'MODPERL_MAKEFILE' => 'Makefile',
                 'MODPERL_CCOPTS' => ' -fno-strict-aliasing 
-I/usr/local/include -I/usr/local/lib/perl5/5.8.3/i686-linux/CORE -DMOD_PERL 
-DMP_COMPAT_1X',
                 'MODPERL_LDDLFLAGS' => '-shared -L/usr/local/lib',
                 'MODPERL_INC' => 
'-I/home/ufo/downloads/apache2/modules/mod_perl-1.99_17/src/modules/perl 
-I/home/ufo/downloads/apache2/modules/mod_perl-1.99_17/xs 
-I/home/ufo/downloads/apache2/httpd-2.0.52/include 
-I/home/ufo/downloads/apache2/httpd-2.0.52/srclib/apr/include 
-I/home/ufo/downloads/apache2/httpd-2.0.52/srclib/apr-util/include 
-I/home/ufo/downloads/apache2/httpd-2.0.52/os/unix',
                 'file_build_config' => 'lib/Apache/BuildConfig.pm',
                 'XS' => {},
                 'httpd_version' => {
                                      
'/home/ufo/downloads/apache2/httpd-2.0.52/include' => '2.0.52'
                                    },
                 'MP_COMPAT_1X' => 1,
                 'apr_config' => {
                                   'HAS_FORK' => '1',
                                   'HAS_THREADS' => '1',
                                   'HAS_MMAP' => '1',
                                   'HAS_RANDOM' => '1',
                                   'HAS_DSO' => '1',
                                   'HAS_SENDFILE' => '1',
                                   'HAS_LARGE_FILES' => '0',
                                   'HAS_INLINE' => '1'
                                 },
                 'MODPERL_LIBNAME' => 'mod_perl',
                 'apr_config_path' => 
'/home/ufo/downloads/apache2/httpd-2.0.52/srclib/apr/apr-config',
                 'MODPERL_LIB_EXT' => '.a',
                 'MODPERL_C_FILES' => 'mod_perl.c modperl_interp.c 
modperl_tipool.c modperl_log.c modperl_config.c modperl_cmd.c 
modperl_options.c modperl_callback.c modperl_handler.c modperl_gtop.c 
modperl_util.c modperl_io.c modperl_io_apache.c modperl_filter.c 
modperl_bucket.c modperl_mgv.c modperl_pcw.c modperl_global.c modperl_env.c 
modperl_cgi.c modperl_perl.c modperl_perl_global.c modperl_perl_pp.c 
modperl_sys.c modperl_module.c modperl_svptr_table.c modperl_const.c 
modperl_constants.c modperl_apache_compat.c modperl_error.c modperl_debug.c 
modperl_common_util.c modperl_common_log.c modperl_hooks.c 
modperl_directives.c modperl_flags.c modperl_xsinit.c modperl_exports.c',
                 'MP_LIBNAME' => 'mod_perl',
                 'MODPERL_H_FILES' => 'mod_perl.h modperl_interp.h 
modperl_tipool.h modperl_log.h modperl_config.h modperl_cmd.h 
modperl_options.h modperl_callback.h modperl_handler.h modperl_gtop.h 
modperl_util.h modperl_io.h modperl_io_apache.h modperl_filter.h 
modperl_bucket.h modperl_mgv.h modperl_pcw.h modperl_global.h modperl_env.h 
modperl_cgi.h modperl_perl.h modperl_perl_global.h modperl_perl_pp.h 
modperl_sys.h modperl_module.h modperl_svptr_table.h modperl_const.h 
modperl_constants.h modperl_apache_compat.h modperl_error.h modperl_debug.h 
modperl_common_util.h modperl_common_log.h modperl_perl_unembed.h 
modperl_types.h modperl_time.h modperl_apache_includes.h 
modperl_perl_includes.h modperl_apr_includes.h modperl_apr_compat.h 
modperl_common_includes.h modperl_common_types.h modperl_hooks.h 
modperl_directives.h modperl_flags.h modperl_trace.h modperl_largefiles.h',
                 'MODPERL_TEST_F' => 'test -f',
                 'MP_APR_LIB' => 'aprext',
                 'dir' => '/home/ufo/downloads/apache2/httpd-2.0.52',
                 'MODPERL_MV' => 'mv',
                 'MODPERL_LDOPTS' => '-rdynamic  -L/usr/local/lib 
/usr/local/lib/perl5/5.8.3/i686-linux/auto/DynaLoader/DynaLoader.a 
-L/usr/local/lib/perl5/5.8.3/i686-linux/CORE -lperl -lnsl -ldl -lm -lcrypt 
-lutil -lc',
                 'MODPERL_CP' => 'cp',
                 'file_makefile' => 'src/modules/perl/Makefile',
                 'MODPERL_LIB_SHARED' => 'mod_perl.so',
                 'MODPERL_PERLPATH' => '/usr/local/bin/perl',
                 'MODPERL_CC' => 'cc',
                 'MODPERL_CCCDLFLAGS' => '-fpic',
                 'apr_includedir' => 
'/home/ufo/downloads/apache2/httpd-2.0.52/srclib/apr/include',
                 'MODPERL_AP_LIBEXECDIR' => '',
                 'MODPERL_DLEXT' => 'so',
                 'httpd_is_source_tree' => '1',
                 'MODPERL_OPTIMIZE' => '-O3',
                 'MODPERL_LIB' => 'mod_perl.so',
                 'MODPERL_LIBPERL' => 
'/usr/local/lib/perl5/5.8.3/i686-linux/CORE/libperl.a',
                 'MODPERL_AP_LIBS' => '',
                 'MODPERL_LD' => 'cc',
                 'VERSION' => '1.99_17'
               }, 'Apache::Build' );
}

1;

<end>

Apache 2.0.52 configured as:

./configure --prefix=/usr/apache2 \
	--enable-so	\
	--enable-cgi	\
	--enable-info	\
	--enable-rewrite	\
	--enable-speling	\
	--enable-usertrack	\
	--enable-deflate \
	--enable-ssl	\
	--enable-mime-magic

perl 5.8.3, standard configuration

> perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 3) configuration:
  Platform:
    osname=linux, osvers=2.6.8.1, archname=i686-linux
    uname='linux steven 2.6.8.1 #1 thu oct 21 15:16:38 cest 2004 i686 unknown 
'
    config_args='-de'
    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=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O3',
    cppflags='-fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='3.4.2', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -ldl -lm -lcrypt -lutil -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/libc-2.2.5.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.2.5'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: USE_LARGE_FILES
  Built under linux
  Compiled at Oct 29 2004 23:53:26
  @INC:
    /usr/local/lib/perl5/5.8.3/i686-linux
    /usr/local/lib/perl5/5.8.3
    /usr/local/lib/perl5/site_perl/5.8.3/i686-linux
    /usr/local/lib/perl5/site_perl/5.8.3
    /usr/local/lib/perl5/site_perl
    .

Using GCC version 3.4.2.

I've tried a few things (including setting %vars manually to fool the test), 
but I can't figure out where the problem is.

Hope this rings a bell somewhere,
Steven.

        -- 
        Mijn openbare cryptografische sleutel / My public cryptographic key:
http://steven.lepelaar.homeunix.org/public_key.asc


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Bug? Make test fails on configure_httpd/configure_apxs
Steven 21:12 on 31 Oct 2004

Generated at 11:27 on 21 Dec 2004 by mariachi v0.52