Building mod_perl for Tenon's iTools on Mac OS 10.2

2003-09-24 Thread Peter Bengtson
I've recently upgraded the pre-installed Perl 5.6 on a server running 
Mac OS 10.2 to Perl 5.8.0, and as part of the upgrade I need to 
recompile mod_perl (mod_perl-1.28). I'm not running Apple's Apache, but 
Tenon's integrated solution, iTools, based on apache_1.3.27. The make 
procedure runs without any problems -- make test completes at 100% -- 
and the install is straightforward.

However, the resulting module crashes Apache during startup, and Tenon 
seem to be quite nonplussed and are unwilling to help, so I am on my 
own. I am new to compiling mod_perl, but experienced in other server 
maintenance areas, so any pointers from you folks who have done this 
before would be much appreciated.

I have found a couple of articles on the install process, but they are 
very old and seem to be out of date.

	/ Peter Bengtson

The arguments given to Makefile.PL are

perl Makefile.PL APACHE_SRC=../apache_1.3.27/src DO_HTTPD=1 USE_DSO=1 \
USE_APSX=1 WITH_APXS=/usr/sbin/apxs EVERYTHING=1
perl -V:
	Summary of my perl5 (revision 5.0 version 8 subversion 0) 
configuration:
	  Platform:
		osname=darwin, osvers=6.6, archname=darwin
		uname='darwin sphinx.naradek.org 6.6 darwin kernel version 6.6: thu 
may 1 21:48:54 pdt 2003; root:xnuxnu-344.34.obj~1release_ppc power 
macintosh powerpc '
		config_args='-Dprefix=/usr'
		hint=recommended, useposix=true, d_sigaction=define
		usethreads=undef use5005threads=undef useithreads=undef 
usemultiplicity=undef
		useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
		use64bitint=undef use64bitall=undef uselongdouble=undef
		usemymalloc=n, bincompat5005=undef
	  Compiler:
		cc='cc', ccflags ='-pipe -fno-common -no-cpp-precomp 
-fno-strict-aliasing',
		optimize='-O3',
		cppflags='-no-cpp-precomp -pipe -fno-common -no-cpp-precomp 
-fno-strict-aliasing'
		ccversion='', gccversion='3.3 20030304 (Apple Computer, Inc. build 
1435)', gccosandvers=''
		intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
		d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
		ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
		alignbytes=8, prototype=define
	  Linker and Libraries:
		ld='cc', ldflags =' -flat_namespace -L/usr/local/lib'
		libpth=/usr/local/lib /usr/lib
		libs=-lgdbm -ldb -lm -lc
		perllibs=-lm -lc
		libc=/usr/lib/libc.dylib, so=dylib, useshrplib=true, 
libperl=libperl.dylib
		gnulibc_version=''
	  Dynamic Linking:
		dlsrc=dl_dyld.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
		cccdlflags=' ', lddlflags=' -flat_namespace -bundle -undefined 
suppress -L/usr/local/lib'
	
	
	Characteristics of this binary (from libperl):
	  Compile-time options: USE_LARGE_FILES
	  Built under darwin
	  Compiled at Sep 10 2003 12:56:00
	  @INC:
		/System/Library/Perl/darwin
		/System/Library/Perl
		/Library/Perl/darwin
		/Library/Perl
		/Library/Perl
		/Network/Library/Perl/darwin
		/Network/Library/Perl
		/Network/Library/Perl

From httpd.crash.log:
Date/Time:  2003-09-18 00:47:58 +0200
OS Version: 10.2.6 (Build 6L60)
Host:   sphinx.naradek.org

Command:httpd
PID:489

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:  KERN_INVALID_ADDRESS (0x0001) at 0xabababab

Thread 0 Crashed:
 #0   0x0031d0a4 in Perl_sv_upgrade
 #1   0x002af784 in perl_construct
 #2   0x00221e24 in perl_startup
 #3   0x00229300 in perl_cmd_handler_handlers
 #4   0xdc80 in invoke_cmd
 #5   0xe118 in ap_handle_command
 #6   0xe174 in ap_srm_command_loop
 #7   0x9768 in urlsection
 #8   0xd6b0 in invoke_cmd
 #9   0xe118 in ap_handle_command
 #10  0xe174 in ap_srm_command_loop
 #11  0xe880 in ap_process_resource_config
 #12  0xb3c0 in include_config
 #13  0xd77c in invoke_cmd
 #14  0xe118 in ap_handle_command
 #15  0xe174 in ap_srm_command_loop
 #16  0xe880 in ap_process_resource_config
 #17  0xf1b8 in ap_read_config
 #18  0x6808 in standalone_main
 #19  0x7294 in main
 #20  0x1a40 in _start
 #21  0x1870 in start

PPC Thread State:
  srr0: 0x0031d0a4 srr1: 0x0200f030vrsave: 0x
   xer: 0x   lr: 0x0031cb60  ctr: 0x0031d03c   mq: 0x
r0: 0x0010   r1: 0xbfff9510   r2: 0xabababab   r3: 0xabababab
r4: 0x0038cb60   r5: 0x   r6: 0x0031cc0c   r7: 0x0020
r8: 0x0031cbec   r9: 0x0031cb60  r10: 0x003a1538  r11: 0x0031d03c
   r12: 0x01ec  r13: 0x  r14: 0x  r15

[pm1] Building mod_perl for Tenon's iTools on Mac OS 10.2

2003-10-04 Thread Peter Bengtson
Network/Library/Perl

I tried the approach of downloading Apache 2 and mod_perl 1.99 in order 
to see if it would be possible to leave Tenon's iTools altogether in 
favour of compiling everything from scratch (including SSL, PHP, etc) 
-- but the same problem crops up again: "make test" for mod_perl can't 
start the server -- which in both cases can be started on its own.

Thus:

1) Why can't "make test" fire up Apache?
2) Why is --without-execstrip necessary on Mac OS X (Darwin/FreeBSD)?
3) Are any other Apache configuration options necessary to replicate
   Tenon's configuration, if required by mod_perl?
Any pointers much appreciated. At the moment it's a bit difficult to 
administrate the server in question, since mod_perl isn't working.

	/ Peter Bengtson



Re: [pm1] Building mod_perl for Tenon's iTools on Mac OS 10.2

2003-10-04 Thread Peter Bengtson
> What Perl were you using before?  Did Apache/mod_perl work with that?
> Do you have a compelling reason for upgrading to 5.8.1?

Yes, on all accounts.

>> and t/logs/error_log contains:
>>  [notice] END block called for startup.pl
>>  [notice] Destruction->DESTROY called for $global_object
>
> Might be useful to see more of the log.

That *is* the entire contents of the log file.

> If you're going to do that, why go to Apache version 2?  Why not stay
> with Apache 1?

To establish whether the crash had something to do with Apache 1 vs Apache
2, and to take advantage of the considerably easier configuration and
build process for Apache 2. Fairly standard reasons.

> I'd always build static from source.  Throwing the
> whole thing together in one go on OS 10.2 is just asking to find a few
> niggles.  I'd be inclined to work in stages, leaving out DSO, SSL, PHP
> etc until I had a bare-bones static mod_perl going.

Anybody in their right mind wouldn't work in any other way than in stages.
I'd add SSL and PHP support when the basics work, not earlier. However,
since I am building mod_perl for a third-party built Apache, I don't have
a choice but to build mod_perl as a dynamically loaded module.

Were I to build the entire thing from sources, I'd build mod_perl
statically of course, but right now, while I still am hoping to keep the
Tenon stuff, I have no option.

> Have you looked for MAC, Darwin, 10.2 and things like that in the
> archives?  There are people using Apache/mod_perl on the Mac and
> there have been threads recently on this List.

Yes, I have looked through the archives, and I think I am the person who
started this thread a few weeks ago. The problem with the archives is that
they are *vast*. It's very difficult to find anything which is to the
point when you have a fairly involved or very specific question. I didn't
think that a failing "make test" would pose any difficult problems,
especially since the question of a non-starting Apache definitely should
have cropped up before.

Thus I would, again, be very thankful for any advice or suggestions.

/ Peter Bengtson