On Thu, Dec 30, 2004 at 05:57:07PM -0500, Stas Bekman wrote:
During compilation of mod_perl, I was seeing undefined reference errors which are nicely described on the install page[1]. The prescription suggests rebuilding Perl with dynamic linking; apparently the version that's shipped with Debian is not dynamically linked(?). Sounds fine, but I'm not a C programmer so am not sure exactly what this means.
Now that you know what does it take, please send a patch that extends [1] to explain how to do that.
I've started working on a patch for the install doc[1] but have come across a couple of questions that I'm sure someone on the list could answer for me.
1) The docs refer to building a "dynamically linked Perl." Shouldn't the Perl be lowercase since we're talking about the interpreter, not the language?
+1
2) In the same sentence, it says that a dynamically linked perl will
have a libperl.a. Isn't that a libperl.so?
You are correct.
Could someone describe the
differences between libperl.a and libperl.so?
libfoo.a is an archive used at linking time - it's completely included in the final application that linked it.
libperl.so is a shared library. At the linking time the application only knows which library it wants. Only at the loading time (runtime) that library will be loaded.
One of the benefits of using a shared library, is that only it's loaded by one application, any other application using the same library will not need load it, it'll be shared (a service provided by the kernel). In the case of static libfoo.a, it'll be loaded as many times as there are applications that included it, thus consuming more memory. Of course this is not the only benefit of using shared libs.
I see that it exists in the apache source directory which makes me think it is used when building modperl. If I'm building mp statically linked, I shouldn't need libperl.a after I've installed, right? Is this the library that has been more appropriately named modperl.a in MP2?
Yes, that's the result of the unfortunate naming scheme in Apache 1.3. So you have libperl.(so|a) which is perl, and you have libperl.(so|a) which is modperl. You are certainly looking at the modperl version of libperl.a if you find it in the apache directory. perl's libperl.(so|a) lives under
something like 5.8.6/i686-linux/CORE/
And yes, mp2's lib is mod_perl.(so|a).
[1] http://perl.apache.org/docs/1.0/guide/install.html#Undefined_reference_to__PL_perl_destruct_level_
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
-- 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
