You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Michael Robinton <mi...@insulin-pumpers.org> on 2005/01/01 22:14:29 UTC

Re: [mp1] Linking confusion


On Thu, 30 Dec 2004, William McKee wrote:

> 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
>

Try...

in apache directory

make distclean

./configure  --with-layout=Apache

then

in mod perl source directory
Run:
perl Makefile.PL \
        APACHE_SRC=/usr/src/apache/src \
        DO_HTTPD=1 \
        USE_APACI=1 \
        PREP_HTTPD=1 \
        EVERYTHING=1 \

make
make test       # broken ??
make install

back in apache directory
./configure --with-layout=Apache \
        --activate-module=src/modules/perl/libperl.a
make
make install




> 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.
>
> >From what I could find reading the INSTALL document that comes with the
> Perl 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?
>
> 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.
>
> 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.
>
>
> Thanks,
> William
>
> [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_
>
> --
> Knowmad Services Inc.
> http://www.knowmad.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
>


-- 
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