On Friday 16 April 2004 10:38 am, Stas Bekman wrote:
Fred Moyer wrote:
On Apr 16, 2004, at 10:35 AM, Fred Moyer wrote:
2) Note that your libapreq2 had been installed under Apache2. This scheme is used to isolate Apache2-specific code from Apache1 code. On my machine I do not have Apache1 and everything is installed w/o the Apache2 directory. The 'use Apache2 ();' directive prepends direcories in the @INC array with Apache2/ (I think). Maybe my Makefile.PL needs a 'use Apache2 ();' - but I am not sure what will happen during the make and make install.
Adding 'use Apache2 ();' to the Makefile.PL fixed the problem. Thanks!
Addendum:
The 'perl Makefile.PL' statement ran properly without errors on Linux 2.6.3 but on Darwin 7.0.3 building the Makefile generated the following error. This occurs with the latest releases as well as cvs tips of apreq2 and mp2. Perl 5.8.3 and httpd-2.0.49 were used.
Checking if your kit is complete... Looks good dyld: perl Undefined symbols: /Users/fredmoyer/dev/perl-5.8.3/lib/site_perl/5.8.3/darwin-2level/auto/ APR/Table/Table.bundle undefined reference to _modperl_hash_tie expected to be defined in a dynamic image /Users/fredmoyer/dev/perl-5.8.3/lib/site_perl/5.8.3/darwin-2level/auto/ APR/Table/Table.bundle undefined reference to _modperl_hash_tied_object expected to be defined in a dynamic image Trace/BPT trap
It shouldn't try to load APR::Table unless mod_perl is loaded and running. Where is it getting loaded from?
Hi Stas and Fred -
I am befuddled. Fred says this happended 'building the make file' which I take to mean running Makefile.PL (is that what you mean Fred?) The 'Makefile.PL' is pretty standard:
Beau, I haven't tried your handler so I can't tell. But what I can tell is how to reproduce Fred's issue. OSX and a few other platforms runtime loaders require resolution of all symbols in a shared library that's about to be loaded at the startup. Most other platforms do symbol resolution on demand, so you could be unware of an unresolved symbol unless it's used. There is a way though to force the symbols resolution at the startup, by setting the environment variable RTLD_NOW=1. Not sure why the DynaLoader manpage doesn't mention that. It probably should.
use 5.008; use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written.
print <<"*EOF*"; ----------------------------------------------------------- MasonX::Apache2Handler is an EXPERIMENTAL BETA RELEASE! Please install and use it only on a test system. (But it really, really works! The brave-hearted can use it in production.) Aloha => Beau; ----------------------------------------------------------- *EOF* sleep 3;
WriteMakefile(
NAME => 'MasonX::Apache2Handler',
VERSION_FROM => 'lib/MasonX/Apache2Handler.pm', # finds $VERSION
PREREQ_PM => {
mod_perl => 1.9910,
'HTML::Mason' => 1.25,
'Apache::Request' => '2.02-dev',
'Apache::Cookie' => '2.02-dev',
}, # e.g., Module::Name => 1.1
($] >= 5.005 ? ## Add these new keywords supported since 5.005
(ABSTRACT_FROM => 'lib/MasonX/Apache2Handler.pm', # retrieve abstract from module
AUTHOR => 'Beau E. Cox <[EMAIL PROTECTED]>') : ()),
);
Fred said he added 'use Apache2;' - Geoff agreed this should be done.
So I don't see anything here that could trigger the errors above. Fred could you confirm this is when your errors occured and show where you put 'use Apache2;'?
Maybe the use should not import anything: 'use Apache2 ();' ???
Nuh, Apache2.pm only mangles @INC. It doesn't load anything. It should be easy to figure out where the problem is coming from with a simple:
use Carp; $SIG{__DIE__} = \&Carp::confess;
assuming that no external processes are invoked on the way.
__________________________________________________________________ Stas Bekman JAm_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
-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html