You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Dominique Quatravaux <do...@idealx.com> on 2005/03/09 11:57:53 UTC

How to link mod_perl with a debugging libperl?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello mod_perl hackers,

Contrary to what I (mis?)understood from the documentation, MP_DEBUG
does not allow one to link mod_perl against the debugging libperl.a:

~  $   debugperl Makefile.PL MP_INST_APACHE2=1 MP_APXS=/usr/bin/apxs2    \
~      MP_APR_CONFIG=/usr/bin/apr-config MP_DEBUG=1
~  [...]
~  $   grep MODPERL_LDOPTS src/modules/perl/Makefile

MODPERL_LDOPTS = -rdynamic  -L/usr/local/lib
/usr/lib/perl/5.6.1/auto/DynaLoader/DynaLoader.a
- -L/usr/lib/perl/5.6.1/CORE -lperl -ldl -lm -lc -lcrypt

...No -lperld there (not that it would help my case, I need a
"-ldebugperl" for Debian's perl-debug packaging anyway). After reading
the source, I thought I found a way to trick ExtUtils::Embed into
doing what I want. I appended "-- -ldebugperl" onto the Makefile.PL
command line, but the result was thus:

MODPERL_LDOPTS =  -rdynamic  -L/usr/local/lib
- -L/usr/lib/perl/5.6.1/CORE -ldebugperl -ldebugperl

And so DynaLoader.a is gone, and of course the resulting mod_perl.so
doesn't bootstrap.

How can I link with -ldebugperl without manually fiddling with the
Makefile (which I did, and it works great)?

- --
Dominique QUATRAVAUX                           Ingénieur senior
01 44 42 00 08                                 IDEALX
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCLtawMJAKAU3mjcsRAj/7AJwOiLkRZOc0CqJMHhgL5zZ+NX+sSgCgwGSs
F+dpw3YV+/U4x3N2P7TpG/Y=
=YW96
-----END PGP SIGNATURE-----