Hi folks,
I'm trying to recompile Perl and Apache/mod_perl on a Debian Sarge system using the following versions:
Perl 5.8.6 Apache 1.3.33 mod_perl 1.29
I am compiling mod_perl statically (using Apachetoolbox) with the following options:
APACHE_PREFIX=/usr/local/apache APACHE_SRC=/usr/local/src/Apachetoolbox-1.5.72/apache_1.3.33/src SSL_BASE= APACI_ARGS='--enable-module=rewrite' DO_HTTPD=1 USE_APACI=1 EVERYTHING=1
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.
From what I could find reading the INSTALL document that comes with thePerl source, I need to recompile with the -Duseshrplib compile-time option. My understanding is that this option will build a libperl.so file. Is this correct? Am I taking the right action to build a dynamic Perl?
That's correct.
With that option, I am able to compile Apache with mod_perl. Now though, when starting the newly compiled server, I'm receiving relocation errors which appear to be due to multiple versions of libperl.so/libperl.a (not sure which).
While browsing the net for possible solutions, I came across the troubleshooting document[2]. It seems to say that if 'perl -V:useshrplib' returns true, then Perl is statically linked. Is this correct? It seems opposite of what I'd expect from reading the INSTALL document.
Right, it's a docbug, fixed in svn.
I'm pretty much at wits end as to why I'm receiving relocation errors. The best I can figure is some kind of binary incompatibility between the version of Perl that I've compiled and previously compiled libraries. I've tried reinstalling some of the XS modules such as DBI which seems to clear up these errors.
Any other suggestions or pointers, esp. in light of the differences between dynamic and static linking and libperl.so/libperl.a, would be much appreciated.
As [2] explains you have more than one libperl.so and the wrong one gets loaded. libperl.so should *not* be in /usr/lib or any other globally seen loader path if you want to have more than one perl on the same system. Unfortunately some distros don't get it and install libperl.(so|a) into /usr/lib :(
[1] http://perl.apache.org/docs/1.0/guide/install.html#Undefined_reference_to__PL_perl_destruct_level_ [2] http://perl.apache.org/docs/1.0/guide/troubleshooting.html#_relocation_errors__or__undefined_symbol_
-- __________________________________________________________________ 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