httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [mp2 patch] getting APR to work w/o modperl
Date Fri, 07 May 2004 17:06:22 GMT
Randy Kobes wrote:
> On Fri, 7 May 2004, Stas Bekman wrote:
> 
> 
>>Stas Bekman wrote:
>>
>>>Remind me please what is mod_perl.lib? The file with symbols listing?
>>
>>and also show me the actual output where it is used during
>>linking. Thanks.
> 
> 
> I don't have access to my Win32 machine at the moment, but
> it's used at the link stage:
> 
> cl.exe -c ... WhatEver.c
> link C:\Path\to\Apache2\lib\libapr.lib ...
>     C:\Path\to\modperl-2.0\...\mod_perl.lib ...
> 
> The compilations (cl.exe ...) is fine. With the link to
> mod_perl.lib in there, the symbols get resolved, but via
> mod_perl.lib, so that when you try to use the module (for
> example, in the apr-ext tests) it searches for mod_perl.so,
> and dies if that isn't in the PATH (mod_perl.so is a dll).
> If I take out mod_perl.lib in the link stage, the link
> command dies with an unknown symbol error.

OK, in which case we need to split mod_perl.so into
mod_perl_base.so and mod_perl.so, where the base part includes no ap_ symbols, 
and mod_perl.so links against it. So we will have mod_perl_base.lib and 
mod_perl.lib. So APR:: objects will link only against mod_perl_base.lib, the 
rest will link against both .lib files. From construction point of view, this 
is the simplest straightforward solution.

This solution is a big kludge, as we have to stick that _base.(so|lib) 
somewhere where the system loader can find it, which sucks, since we don't do 
that for any other file at the moment. But the best solution will be something 
along these lines.

We want mod_perl_base to be linked statically to APR.so and mod_perl.so 
(that's what my patch does at the moment, but instead it links 3 .o files). So 
how do we make windows compiler find the symbols from the base, when building 
APR:: objects? What we want to tell the compiler that is that the symbols are 
in mod_perl_base.lib, but they may be found in mod_perl.so or APR.so. Can we 
do that?

Think of APR.so as an equivalent of mod_perl.so, which doesn't require httpd. 
So for example APR::Pool may find its symbols resoved in mod_perl.so or APR.so 
depending on which is loaded. Do you think we can arrange such a thing?


__________________________________________________________________
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

Mime
View raw message