You should be able to use newer versions of Perl...

        On my production systems, I'm using mod_perl v2.0.10 with Perl v5.24 
and libapreq v2.13 with Apache HTTPd v2.4.

        On my test systems, I'm using mod_perl v2.0.10 with Perl v5.26 and 
libapreq v2.13 with Apache HTTPd v2.4.

        We're also using cached DBI connections and prepared statements with 
PostgreSQL, various DNS libraries, and also manipulating images with 
the PerlMagick libraries immediately upon users uploading them, so 
there is much more than basic functionality being utilized (just in 
case you were wondering about going beyond a basic installation).

        The difference for me is that I'm using pre-build 64-bit code via 
the "pkgin" tool.  Perhaps there's an option with FreeBSD's package 
installer to limit the installation of additional modules?  I'm quite 
surprised that there are a lot of other modules being installed by 
default.

        If it wasn't due to a compilation issue, then switching to a 
different MPM could be one option, but it seems that you're not even 
getting that far with it (unfortunately).

> Hey everyone,
> I work at a company where we do all our development under ModPerl and
> FreeBSD servers. Its been a few years since I've been able to compile
> mod-perl in FreeBSD. Everytime I need a new webserver I need to install
> FreeBSD9 and Perl 5.22. This has gradually been causing me more and more
> problems with server maintenance. Im hoping somebody can help me work this
> out. And ideally this can be resolved for other users, I've googled a bunch
> and it seems like Im not the only one going through this.
> 
> *Heres what Im doing *
> *=================*
> 
> tar xzfv perl-5.26.0.tar.gz
> cd perl-5.26.0
> sh Configure -Dusethreads -des -A ccflags=-fPIC -Dprefix=/usr/local/perl
> -Duseperlio
> make
> make test
> make install
> 
> *This works and I get a working perl5.26 binary, which I then symlink to
> /usr/local/bin and /usr/bin*
> 
> *===================*
> tar xzfv httpd-2.4.27.tar.bz2
> tar xzfv mod_perl-2.0.10.tar.gz
> cd mod_perl-2.0.10
> 
> perl Makefile.PL MP_USE_STATIC=1 \
> MP_AP_PREFIX=/usr/local/src/httpd-2.4.27 \
> MP_AP_CONFIGURE="--prefix=/usr/local/apache --with-mpm=prefork"
> 
> *this produces the following error : *
> *============================*
> 
> Checking if your kit is complete...
> 
> Looks good
> 
> ERROR from evaluation of
> /usr/local/src/mod_perl-2.0.10/Apache-Reload/Makefile.PL:
> Use of uninitialized value $v in substitution (s///) at
> Apache-Test/lib/Apache/TestRun.pm line 1100.
> 
> *So I need to edit Apache-Test/lib/Apache/TestRun.pm and comment the
> offending 2 lines *
> 
> *=====================================================*
> 
> my %args = @Apache::TestMM::Argv;
>     while (my($k, $v) = each %args) {
>         # $v =~ s/\|/\\|/g;
>         # $body .= "\n\$Apache::TestConfig::Argv{'$k'} = q|$v|;\n";
>     }
> 
> *Run the Makefile.pl again :*
> *=====================*
> 
> perl Makefile.PL MP_USE_STATIC=1 \
> MP_AP_PREFIX=/usr/local/src/httpd-2.4.27 \
> MP_AP_CONFIGURE="--prefix=/usr/local/apache --with-mpm=prefork"
> 
> *This works*
> *==========*
> 
> Writing Makefile for mod_perl2
> Writing MYMETA.yml and MYMETA.json
> [warning] mod_perl static library will be built as mod_perl.a
> 
> *Try to run make*
> *=============*
> 
> 2 warnings generated.
> In file included from modperl_apr_perlio.c:19:
> In file included from /usr/local/src/mod_perl-2.0.
> 10/src/modules/perl/mod_perl.h:89:
> /usr/local/src/mod_perl-2.0.10/src/modules/perl/modperl_global.h:21:5:
> warning: macro expansion producing 'defined' has undefined behavior
> [-Wexpansion-to-defined]
> #if MP_THREADED
>     ^
> /usr/local/src/mod_perl-2.0.10/src/modules/perl/mod_perl.h:27:22: note:
> expanded from macro 'MP_THREADED'
> #define MP_THREADED (defined(USE_ITHREADS) && APR_HAS_THREADS)
>                      ^
> In file included from modperl_apr_perlio.c:19:
> In file included from /usr/local/src/mod_perl-2.0.
> 10/src/modules/perl/mod_perl.h:89:
> /usr/local/src/mod_perl-2.0.10/src/modules/perl/modperl_global.h:29:5:
> warning: macro expansion producing 'defined' has undefined behavior
> [-Wexpansion-to-defined]
> #if MP_THREADED
>     ^
> /usr/local/src/mod_perl-2.0.10/src/modules/perl/mod_perl.h:27:22: note:
> expanded from macro 'MP_THREADED'
> #define MP_THREADED (defined(USE_ITHREADS) && APR_HAS_THREADS)
>                      ^
> 2 warnings generated.
> make[3]: don't know how to make static. Stop
> 
> *Before this theres a lot of warnings that say : *
> *=====================================*
> 
> warning: macro expansion producing 'defined' has undefined behavior
> [-Wexpansion-to-defined]
> 
> ==============
> 
>  Ive tried a bunch of things Ive found in google but cant get it to
> compile. I also tried going the APXS route ( which I don't like, but if
> thats the only option then Ill do it ). But that also fails to compile.
> 
> ===============
> 
> The FreeBSD port compiles, but It uses APXS, installs binaries and
> libraries all over the place, adds on a million apache modules, and has
> other issues.
> 
> ================
> 
> Any help will be very much appreciated, Ive been banging my head against
> the wall for a week with this.
> 
> 
> Thank you!
> 


Randolf Richardson - rand...@inter-corporate.com
Inter-Corporate Computer & Network Services, Inc.
Beautiful British Columbia, Canada
http://www.inter-corporate.com/


Reply via email to