David E. Wheeler
Wed, 28 May 2008 21:55:01 -0700
On Apr 24, 2008, at 00:03, Philippe M. Chiasson wrote:
Nah, the core file by itself is not exactly super usefull. You just have to figure out how to get a debugging build. Also, I've tried to reproducethis on OS X/Apache 2.2.8 prefork/ Perl 5.10 without any luck. Can you post the exact details on how you built each of these ? For me, it goes something like: perl> ./Configure -des \ -Doptimize=-g \ -Dprefix=$HOME/opt/perl.org/perl/5.10.0/debug
For me: perl-5.10.0> sh Configure -des \ -Duseshrplib\ -Dprefix=/usr/local/perl-5.10.0.d \ -Doptimize='-g'
apache> CFLAGS="-g" ./configure \ --with-included-apr \ --with-mpm=prefork \ --enable-maintainer-mode \ --enable-modules=all \ --neable-mods-shared=max \ --prefix=$HOME/opt/apache.org/httpd/2.2.8/prefork-debug
For me: httpd-2.2.8>export CPPFLAGS="-I/usr/local/include" export LDFLAGS="-L/usr/local/lib" export CFLAGS="-DAP_UNSAFE_ERROR_LOG_UNESCAPED -g" ./configure \ --prefix=/usr/local/apache2 \ --with-mpm=prefork \ --enable-dav \ --enable-dav-fs \ --enable-log-config \ --enable-authn-file \ --enable-authz-host \ --enable-authz-group \ --enable-authz-user \ --prefix=/usr/local/apache2.d \--enable-mods-shared="rewrite info worker proxy deflate mod_auth include ssl env mime-magic auth_digest expires dav dav_fs perl"
So I added the -g to CFLAGS. I didn't have that before. Instead I used --enable-maintainer-mode as documented in
http://perl.apache.org/docs/2.0/devel/debug/c.html#Analyzing_Dumped_Core_Files Is that out of date, perhaps?
mod_perl> perl Makefile.PL \ MP_APXS=$HOME/opt/apache.org/httpd/2.2.8/prefork-debug/bin/apxs MP_MAINTAINER=1 \ MP_DEBUG=1
For me: mod_perl-2.0.4>/usr/local/perl-5.10.0.d/bin/perl Makefile.PL \ MP_AP_PREFIX=/usr/local/apache2.d \ MP_MAINTAINER=1 \ MP_PROMPT_DEFAULT=1 \The above URL doesn't have the MP_MAINTAINER=1 bit, but I followed your lead. Should it have that?
Ah, bloody hell! Now I get this: # make cd "src/modules/perl" && makecc -I/usr/local/src/mod_perl-2.0.4/src/modules/perl -I/usr/local/src/ mod_perl-2.0.4/xs -I/usr/include/apr-1 -I/usr/include/apr-1 -I/usr/ local/apache2.d/include -fno-common -DPERL_DARWIN -no-cpp-precomp - DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/ local/perl-5.10.0.d/lib/5.10.0/darwin-2level/CORE -DMOD_PERL -Wall - Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Werror -Wdeclaration-after-statement -DMP_COMPAT_1X -DMP_DEBUG -DMP_TRACE - DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g \
-c mod_perl.c && mv mod_perl.o mod_perl.lo
In file included from /usr/local/perl-5.10.0.d/lib/5.10.0/
darwin-2level/CORE/perl.h:2382,
from modperl_perl_includes.h:65,
from modperl_common_includes.h:24,
from mod_perl.h:21,
from mod_perl.c:17:
/usr/local/perl-5.10.0.d/lib/5.10.0/darwin-2level/CORE/handy.h:85:1:
error: "bool" redefined
In file included from /usr/include/mach-o/dyld.h:29,
from /usr/include/apr-1/apr_portable.h:166,
from /usr/local/apache2.d/include/http_protocol.h:31,
from modperl_apache_includes.h:30,
from mod_perl.h:20,
from mod_perl.c:17:
/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdbool.h:36:1: error:
this is the location of the previous definition
cc1: warnings being treated as errors
In file included from modperl_perl_includes.h:65,
from modperl_common_includes.h:24,
from mod_perl.h:21,
from mod_perl.c:17:
/usr/local/perl-5.10.0.d/lib/5.10.0/darwin-2level/CORE/perl.h:3969:
warning: function declaration isn’t a prototype
In file included from modperl_io_apache.h:22,
from modperl_io.h:20,
from mod_perl.h:83,
from mod_perl.c:17:
/usr/local/perl-5.10.0.d/lib/5.10.0/darwin-2level/CORE/perliol.h:173:
warning: function declaration isn’t a prototype
mod_perl.c: In function ‘modperl_response_handler’: mod_perl.c:1019: warning: unused variable ‘rcfg’ make[1]: *** [mod_perl.lo] Error 1 make: *** [modperl_lib] Error 2WTF? I could have sworn I built a debugging mod_perl before. Could it be choking on Perl 5.10 here, too?
Thanks, David --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]