Return-Path: Delivered-To: apmail-perl-dev-archive@www.apache.org Received: (qmail 13229 invoked from network); 13 May 2005 08:43:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 May 2005 08:43:58 -0000 Received: (qmail 75321 invoked by uid 500); 13 May 2005 08:48:10 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 75287 invoked by uid 500); 13 May 2005 08:48:10 -0000 Mailing-List: contact dev-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@perl.apache.org Received: (qmail 75271 invoked by uid 99); 13 May 2005 08:48:09 -0000 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=FORGED_RCVD_HELO,FROM_ENDS_IN_NUMS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of doink123@abv.bg designates 194.153.145.66 as permitted sender) Received: from ns.netinfo.bg (HELO ns2.netinfo.bg) (194.153.145.66) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 13 May 2005 01:48:09 -0700 Received: from webmail.gyuvetch.bg (app6.ni.bg [192.168.151.23]) by ns2.netinfo.bg (Postfix) with SMTP id 7D9236AF5C for ; Fri, 13 May 2005 11:42:01 +0300 (EEST) Received: (qmail 23487 invoked from network); 13 May 2005 08:43:50 -0000 Received: from app6.ni.bg (192.168.151.23) by webmail.gyuvetch.bg with SMTP; 13 May 2005 08:43:50 -0000 Message-ID: <1452285935.1115973830242.JavaMail.nobody@app6.ni.bg> Date: Fri, 13 May 2005 11:43:50 +0300 (EEST) From: Nick *** To: Stas Bekman Subject: Re: Some small fixes... Cc: dev@perl.apache.org, "Philippe M. Chiasson" Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: 8bit X-Mailer: AbvMail 1.0 X-Originating-IP: 82.101.66.107 X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N >-------- ���������� ����� -------- >��: Stas Bekman >�������: Re: Some small fixes... >��: Nick *** >��������� ��: �����, 2005, ��� 13 00:56:59 EEST >---------------------------------- > >Nick *** wrote: >> >> Why MP_AP_PREFIX and MP_APR_CONFIG cannot be used together? I guess >> >> this is valid only when MP_AP_PREFIX is pointing to an installed httpd, >> >> because when MP_AP_PREFIX is pointing to a source tree, I can get >> >> around this check by adding MP_AP_CONFIGURE="--with-apr=...". It's >> >> logical to me that this check should work only when MP_AP_PREFIX is not >> >> pointing to a source tree, because, I think, it shouldn't be possible >> >> to build mod_perl with different apr than the one httpd was build with. >> >> But then again, if the above is true, there should be the same check >> >> for MP_APR_CONFIG and MP_APXS, because as I see in Apache2::Build, >> >> MP_APR_CONFIG will take precedence over the value supplied by apxs. Is >> >> my guess a good one? >> > >> >While MP_AP_PREFIX originally was used to point to the install tree, it's >> >no longer the case. MP_AP_PREFIX should only be used when building a >> >statically linked httpd/mod_perl. In which case you don't need >> >MP_APR_CONFIG, since all the needed sources live under MP_AP_PREFIX. >> >> But if I have previously installed apr in /usr/apr, >> and when I want to build a static MP and want both apache and MP to use /usr/apr instead of srclib/apr, I'd like to use >> perl Makefile.PL MP_AP_PREFIX=../httpd MP_APR_CONFIG=/usr/apr/apr-config > >Hmm. So are you saying that if mod_perl builds against source it won't be >using the right apr? No, now it picks and install the right stuff and there is no problem with that. The problem is that I want to use MP_AP_PREFIX and MP_AP(R|U)_CONFIG arguments together when building a static MP. Why do I think it's good to have it? Well, my dev machine is a slow one and every time I have to rebuild a static MP I have to wait a long time, because the process compiles mod_perl, apr, apr-util, pcre and httpd. But if I compile and install apr and apr-util in /usr/lib once, then I can just use perl Makefile.PL MP_USE_STATIC=1 MP_AP_PREFIX=../httpd MP_AP(R|U)_CONFIG=/usr/lib/ap(r|u)-config, so both MP and Apache will use these. What are the advantages? - You'll wait half of the time when compiling a static MP. - You can use a special port of apr and apr-util suited for your operating system, instead of the generic ones that come in srclib/ (which is the case with my Cygwin installation). >Philippe, what are you saying about this? I'd expect >that once the static httpd+mod_perl are installed the apr stuff is >installed too and the everybody uses that installed apr. Isn't that the case? > >> >Why would you want to use a different libapr? If you do that you will end >> >up with Apache linking against one libapr and mod_perl against another, >> >which is a certain way to get things crashed. >> >> Yes, the following patch fixes that. What it does is: >> 1. Allow the use of both MP_AP_PREFIX and MP_AP(R|U)_CONFIG when MP_AP_PREFIX is pointing to a source tree. >> 2. Currently, if it's a static build and MP_AP(R|U)_CONFIG is set, mod_perl will use it, but apache won't. It's fixed now. Note that >> if both MP_APR_CONFIG and MP_AP_CONFIGURE="--with-apr=..." are set, MP_APR_CONFIG will take precedence. > >Let's discuss this some more, since I think we make things too complicated. > >> 3. A better check whether --with-apr=/path is a file > >> Index: lib/Apache2/Build.pm >> =================================================================== >[...] >> @@ -1116,7 +1127,7 @@ >> if ($self->{MP_AP_CONFIGURE} && >> $self->{MP_AP_CONFIGURE} =~ /--with-${what_long}=(\S+)/) { >> my $dir = $1; >> - $dir =~ s/$config$// unless -d $dir; >> + $dir = dirname($dir) if -e $dir and !-d $dir; >> push @tries, grep -d $_, $dir, catdir $dir, 'bin'; > >may be just this? > > $dir = dirname $dir if -f $dir; In one of the early versions of cygwin, if $dir is a symlink, -f would return 0, so I thought this might happen with some other platforms and I wanted just to make sure that $dir is not a dir :) Currently, this works right in the newer versions and I guess we can just use -f. >-- >__________________________________________________________________ >Stas Bekman JAm_pH ------> Just Another mod_perl Hacker >http://stason.org/ mod_perl Guide ---> http://perl.apache.org >mailto:stas@stason.org http://use.perl.org http://apacheweek.com >http://modperlbook.org http://apache.org http://ticketmaster.com > ----------------------------------------------------------------- http://www.Tyxo.com - ������ ����� web ������. ������� �� ��� 5000 ������������� ��������� --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org For additional commands, e-mail: dev-help@perl.apache.org