mp2 on osx jaguar won't load mod_perl.so

2003-08-16 Thread Douglas Theobald
I've been quite successful with mp1 (Apache/1.3.28, mod_perl/1.28, perl
5.8.0, OSX jaguar 10.2.6.), but I'd really like to get mp2 going on OSX.
Has anyone had any luck or experienced this same problem?

Apache2, by itself, appears to compile and run just fine. I've found no
problems so far (though I'm not using it much since I want/need mp). I get
mp2 to compile without errors or warnings, and it successfully gives me a
mod_perl.a and mod_perl.so, and will install them in apache2 correctly.
However, make test fails with a server failed to start! error (full
output below). 

I decided to screw the test and see what I could get it to do manually, so I
modified httpd.conf as described in the docs (added LoadModule perl_module
modules/mod_perl.so and PerlModule Apache2). Commands such as apachectl
start and httpd -k start appear to work with no error or output
whatsoever, but httpd never fires up ('ps -aux | grep httpd' gives zilch).
Likewise, the error_log logs nothing. As soon as I commnet out the two perl
module lines in httpd.conf, httpd runs again just fine.

Now here's the strange part: if comment out the perl module lines in
httpd.conf and fire up httpd, *then* uncomment them and restart httpd, it
works temporarily. Mp modules run, my mod_perl directory has working mp
executables, etc. Even error_log registers [notice] Apache/2.0.47 (Unix)
mod_perl/1.99_09 Perl/v5.8.0 configured -- resuming normal operations. At
least for a while, then it seems to stop working. An additional apachectl
restart definitely kills it and the server dies dead. Again, nothing to the
error_log or stdout/stderr.

Any ideas??

Here's the full mp2 sudo make test output:

chem134-218-dhcp/theobal sudo make test
cd src/modules/perl  make -f Makefile.modperl
make[1]: Nothing to be done for `all'.
/usr/bin/perl -Iblib/arch/Apache2 -Iblib/lib/Apache2 \
t/TEST -clean
*** setting ulimit to allow core files
ulimit -c unlimited; t/TEST -clean
APACHE_USER= APACHE_GROUP= APACHE_PORT= APACHE= APXS= \
/usr/bin/perl -Iblib/arch/Apache2 -Iblib/lib/Apache2 \
t/TEST -verbose=0 
*** setting ulimit to allow core files
ulimit -c unlimited; t/TEST -verbose=0
*** root mode: changing the fs ownership to 'nobody' (4294967294:4294967294)
/usr/local/apache2//bin/httpd  -d /usr/local/mod_perl-1.99_09/t -f
/usr/local/mod_perl-1.99_09/t/conf/httpd.conf -DAPACHE2
using Apache/2.0.47 (prefork MPM)

waiting for server to start: ..[Fri Aug 15 23:35:16 2003] [info] 19 Apache::
modules loaded
[Fri Aug 15 23:35:16 2003] [info] 3 APR:: modules loaded
[Fri Aug 15 23:35:16 2003] [info] base server + 8 vhosts ready to run tests
...
waiting for server to start: giving up after 61 secs
!!! server failed to start! (please examine t/logs/error_log)
make: *** [run_tests] Error 1


And here's t/logs/error_log:

END in modperl_extra.pl, pid=25065





-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Re: mp2 on osx jaguar won't load mod_perl.so

2003-08-16 Thread Stas Bekman
Douglas, when reporting problems/bugs please follow the guidelines at 
http://perl.apache.org/bugs/

It's a known issue with certain builds of perl, please look in the list 
archives for similar reports.

Several people reported success with max os x using perl built with usethreads 
enabled. Here is one of them:
http://marc.theaimsgroup.com/?l=apache-modperl-devm=105955380011549w=2

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: Odd Reload Behavior

2003-08-16 Thread Cory 'G' Watson
On Friday, August 15, 2003, at 06:23  PM, Ged Haywood wrote:
Ignore syntax errors and lack of declarations, as I just threw that
together from memory
The guesswork would be a lot easier if it didn't involve so much 
guesswork. :)
I think the root question of my email was lost in my poor explanation.

Basically, I have a module (which I called App) that has something like:

%somehash = ();

This declaration is outside of any subroutines.  VirtualHosts then call 
App-load(name, libdir) to fille $somehash{$name} with a hashref of 
page objects.  All logging led me to believe that this variable was 
being properly populated, but when that variable was accessed (via 
getApp($name)), %somehash was undef.

Silly mistakes aside, I was basically trying to create a 'global' 
variable that was populated by a method call _after_ it was 
require()ed.  The problem comes from the module being loaded _twice_.  
The second time, %somehash = () sets things back to undef, but 
loadApp() is not called again.

My motive for questioning the list was to find out if Apache's 'will 
this survive a SIGHUP' pass caused this behavior, or if it was 
something else I was missing.

I re-attacked this problem by adding a caller() check in App, and it 
proved to me that App was indeed being loaded twice.  Once by my 
startup.pl (use App ();), and _again_ by an eval.  caller() couldn't 
point me to the spot of code that was doing this, other than telling me 
it was a 'require App;'.  I started flipping switches and localized it 
to PerlFreshRestart being on.  When I turn it off, the eval() happens 
_before_ my startup.pl use() and subsequence call to App-load().

So this long-winded explanation is for the archives, and also to get an 
idea as to why this happens.  Thanks! :)

Cory 'G' Watson



Cory 'G' Watson
http://www.loggerithim.org


--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: Odd Reload Behavior

2003-08-16 Thread Ged Haywood
Hi there,

On Sat, 16 Aug 2003, Cory 'G' Watson wrote:

 started flipping switches and localized it to PerlFreshRestart being on.

Have you read

http://perl.apache.org/docs/1.0/guide/troubleshooting.html#Evil_things_might_happen_when_using_PerlFreshRestart

 When I turn it off, the eval() happens _before_ my startup.pl use()
 and subsequence call to App-load().

So is it working now?

73,
Ged.



-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Re: mp2 on osx jaguar won't load mod_perl.so

2003-08-16 Thread Michael Chamberlain
On Saturday, August 16, 2003, at 07:03  am, Douglas Theobald wrote:

I've been quite successful with mp1 (Apache/1.3.28, mod_perl/1.28, perl
5.8.0, OSX jaguar 10.2.6.), but I'd really like to get mp2 going on 
OSX.
Has anyone had any luck or experienced this same problem?

Rebuild your perl with threads support, and only use '-lm -lc'.

All should work fine as a DSO then.

Mike.



--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: mp2 on osx jaguar won't load mod_perl.so

2003-08-16 Thread Stas Bekman
Michael Chamberlain wrote:
On Saturday, August 16, 2003, at 07:03  am, Douglas Theobald wrote:

I've been quite successful with mp1 (Apache/1.3.28, mod_perl/1.28, perl
5.8.0, OSX jaguar 10.2.6.), but I'd really like to get mp2 going on OSX.
Has anyone had any luck or experienced this same problem?
Rebuild your perl with threads support, and only use '-lm -lc'.
Michael, what's the deal with using only '-lm -lc' on jaguar? Care to send a 
patch so it'll work out of box?

All should work fine as a DSO then.
__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: mp2 on osx jaguar won't load mod_perl.so

2003-08-16 Thread Stas Bekman
[moving the thread back to the list, so others can benefit from it as well]

Douglas Theobald wrote:
Thanks Stas and Michael, I guess I'll have to recompile perl with ithreads.
I'll probably have two perl builds, since I don't want threads in my
standard perl.
It'd be much better if somebody could figure out what the problem is with 
non-threaded builds and fix it.

Stas, I didn't realize this was a bug, I figured this was more likely a
configuration problem on my end. 
It doesn't matter, the bug report includes all the information about your 
environment, including the configuration parameters. And without having those 
we can't tell what your problem is, whether it's a bug in mp or your 
configuration problem.

Anyway, I have thoroughly scoured this
list, google, and the mod_perl site for any and all information on this
subject (OSX, jaguar, mp2, mod_perl) and have turned up nothing but
mp1-related issues. Now that I know the solution I can easily find the
relevant posts. It would be particularly helpful if there were a known
bugs page at perl.apache.org (is there one? I can't find it).
It's in the STATUS file. Under 'Platforms on which mod_perl won't build/load'. 
I will add an entry on osx as soon as somebody tells me the exact details, 
besides requiring -Dusethreads. Michael has mentioned -lc -lm...

It would be
even more useful if Eric Cholet's information you gave me below was
available on the OS-specific Info mp2 page:
http://perl.apache.org/docs/2.0/os/index.html
You know, secretly I hope that the frustration will make someone, with osx 
knowledge, fix the problem. So instead of advertising the workaround, I'd 
rather see it fixed. However if the general opinion is that we want to make 
the workaround more visible, we can do that as well.

Another solution to this problem is to use the static build, which is 
incomplete yet. If someone wants to do that, patches are *very* welcome.

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: mp2 on osx jaguar won't load mod_perl.so

2003-08-16 Thread Michael Chamberlain
On Saturday, August 16, 2003, at 05:16  pm, Stas Bekman wrote:

Michael Chamberlain wrote:
On Saturday, August 16, 2003, at 07:03  am, Douglas Theobald wrote:
I've been quite successful with mp1 (Apache/1.3.28, mod_perl/1.28, 
perl
5.8.0, OSX jaguar 10.2.6.), but I'd really like to get mp2 going on 
OSX.
Has anyone had any luck or experienced this same problem?

Rebuild your perl with threads support, and only use '-lm -lc'.
Michael, what's the deal with using only '-lm -lc' on jaguar? Care to 
send a patch so it'll work out of box?

I'll double check if it's significant or not. I was having major 
problems getting stuff to build
before you posted your link initially to that working config. The -lm 
-lc and threads bits
where the only areas which where different. Changing to those 
everything worked.

Mike.



--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html