On Thu, 2006-11-09 at 11:24 +0100, Michael Frankl wrote: > Ok, I testet this: > perl -e "use Scalar::Util qw/weaken blessed/;" > > Runs without any complains. Used directly in the script started by > Apache writes the same message to errorlog: > --------------------- > [Thu Nov 09 10:37:23 2006] [error] Weak references are not implemented > in the version of perl > at /etc/apache2/modules.d/apache2-mod_perl-startup.pl line 24\nBEGIN > failed--compilation aborted > at /etc/apache2/modules.d/apache2-mod_perl-startup.pl line > 24.\nCompilation failed in require at (eval 2) line 1.\n > --------------------- > > So that means, that mod_perl is not compiled with the same perl as is > used by the standalone server!?
Yes, I don't know any way to disable weak references without recompiling Scalar::Util, which is part of the main distribution. It is possible that you installed a second version of Scalar::Util, which is in @INC in one case and not the other. Check your system for multiple copies of Scalar/Util.pm. > I looked a bit further to verify. First an ldd on mod_perl.so used by > Apache: > ---------------------- > mobile-mf modules # ldd mod_perl.so > linux-gate.so.1 => (0xffffe000) > libperl.so.1 => /usr/lib/libperl.so.1 (0xb7ea5000) > libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb7e93000) > libnsl.so.1 => /lib/libnsl.so.1 (0xb7e7e000) > libdl.so.2 => /lib/libdl.so.2 (0xb7e7a000) > libm.so.6 => /lib/tls/libm.so.6 (0xb7e58000) > libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7e2b000) > libutil.so.1 => /lib/libutil.so.1 (0xb7e26000) > libc.so.6 => /lib/tls/libc.so.6 (0xb7d13000) > /lib/ld-linux.so.2 (0x80000000) > ----------------------- > > Now a look at perl itself: > /usr/lib/perl5/5.8.8/i686-linux/CORE/libperl.so.1.5.8 > is identical (a link to the same file). Are you certain that this is the perl you get when you say "perl" on the command-line? Check the results of "which perl". > Sorry, I meant that I recompiled mod_perl but this did not solve the > problem :-) You installed your new compile and nothing changed? That does make me more suspicious about having a second copy of Scalar::Util lying around. > Now perhaps the "perl Makefile.PL" call done by the gentoo-portage could > help: > > ----------------- > perl Makefile.PL \ > PREFIX=${D}/usr \ > MP_TRACE=1 \ > MP_DEBUG=1 \ > MP_USE_DSO=1 \ > MP_APXS=/usr/sbin/apxs2 \ > CCFLAGS="${CFLAGS} -fPIC" \ > TMPDIR=${T} \ > INSTALLDIRS=vendor > ------------------ > > Does this give any hints? No, that looks pretty normal to me. - Perrin