On 2012-06-21 22:04, oh...@cox.net wrote:
---- Ben Noordhuis <i...@bnoordhuis.nl> wrote:
On Thu, Jun 21, 2012 at 8:43 PM, <oh...@cox.net> wrote:
I tried that, which allowed me to start Apache, but am getting a segfault.
Run it through gdb and inspect the backtrace. Compiling with debug
symbols and optimizations disabled (-g -O0) will help.
Sorin,
The apxs already has "-g" and "-O2" looks like. How do I change that to "-O0"?
Or, do I just run the gcc compile manually?
Try adding
-Wc,-O0 -Wc,-g -Wc,-fno-inline -Wl,-g
to your apxs command line.
Also how do I "run it through gdb", since apachectl is a script?
You don't run apachectl, you run the apache binary.
gdb
Then in gdb type:
file /path/to/your/httpd_or_apache2
set args -d /path/to/your/server_root_dir -f /path/to/your/conf/file -X
If apachectl sets some environment variables first, which are then used
in the conf file (as in the standard debian installation) then you'll
have to set them manually in gdb, e.g.
set environment APACHE_RUN_USER www-data
set environment APACHE_RUN_GROUP www-data
Last, type
run
For example, on my debian I'd do
file /usr/sbin/apache2
set args -d /etc/apache2 -f /etc/apache2/apache2.conf -X
And a couple of set environments and then run.
S
Sorry for the questions, but not too familiar with this stuff :(...
Jim