"weak references are not implemented" (was: rt / perl 5.8.5?)

No, I haven’t. The mailing list haven’t been to helpful either. Just to
recap (for the list)…

rt 3.2.1 running,
Summary of my perl5 (revision 5 version 8 subversion 5) configuration:
Platform:
osname=freebsd, osvers=4.10-release-p2, archname=i386-freebsd
uname=‘freebsd netsphere.cenergynetworks.com 4.10-release-p2 freebsd
4.10-release-p2 #5: thu aug 5 14:18:54 sast 2004
root@netsphere.varynet.co.za:usrobjusrsrcsysnetsphere i386 ‘
config_args=’‘
hint=previous, 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
=’-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include’,
optimize=’-O’,
cppflags=’-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe
-I/usr/local/include -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing
-pipe -I/usr/local/include’
ccversion=’’, gccversion=‘2.95.4 20020320 [FreeBSD]’, gccosandvers=’‘
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype=‘long’, ivsize=4, nvtype=‘double’, nvsize=8, Off_t=‘off_t’,
lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld=‘cc’, ldflags =’-Wl,-E -L/usr/local/lib’
libpth=/usr/lib /usr/local/lib
libs=-lgdbm -lm -lcrypt -lutil -lc
perllibs=-lm -lcrypt -lutil -lc
libc=, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version=’‘
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=’ ‘
cccdlflags=’-DPIC -fPIC’, lddlflags=’-shared -L/usr/local/lib’

Characteristics of this binary (from libperl):
Compile-time options: USE_LARGE_FILES
Built under freebsd
Compiled at Sep 1 2004 08:37:39
@INC:
/usr/local/lib/perl5/5.8.5/i386-freebsd
/usr/local/lib/perl5/5.8.5
/usr/local/lib/perl5/site_perl/5.8.5/i386-freebsd
/usr/local/lib/perl5/site_perl/5.8.5
/usr/local/lib/perl5/site_perl
.

error log:
[Tue Sep 7 09:37:22 2004] [crit]: weak references are not implemented in
this release of perl at
/usr/local/lib/perl5/site_perl/5.8.5/HTML/Mason/Component.
pm line 340.

Stack:
[/usr/local/lib/perl5/site_perl/5.8.5/HTML/Mason/ApacheHandler.pm:143]
[/usr/local/lib/perl5/site_perl/5.8.5/HTML/Mason/ApacheHandler.pm:792]
[/usr/local/rt/bin/webmux.pl:105]
[/dev/null:0]
(/usr/local/rt/bin/webmux.pl:107)----- Original Message -----
From: “Brian McCauley” nobull@mail.com
To: savage@savage.za.org
Sent: Wednesday, September 29, 2004 11:46 AM
Subject: “weak references are not implemented” (was: rt / perl 5.8.5?)

I seem to have just hit the same problem you hit a few weeks back. Did you
find a solution?


\ ( )
. \[oo
.
/ \ /@
. l
__\

ll l\

###LL LL\

Please run perl -e 'use Scalar::Util; print $Scalar::Util::VERSION'

Then please update Scalar::Util module.
Check if error is still there.

Send us results.

Chris Knipe wrote:

Also grepping on perl source code says that if you have perl with
SvWEAKREF(which is not conditional) then this error shouldn’t appear.

Do you use mod_perl? If so then it’s possible that you’ve compiled
mod_perl against wrong libperl(perl’s).

run locate libperl
and send us output.

Ruslan U. Zakirov wrote:

You also may read this for more info:
http://mathforum.org/epigone/modperl/sterdgloxful

Chris Knipe wrote:
[snip]

Hi,

IRT Scalar::Util, the version installed is 1.14, current with current
available versions from CPAN. CPAN also further reported the module to be
up to date.

Also grepping on perl source code says that if you have perl with
SvWEAKREF(which is not conditional) then this error shouldn’t appear.

OK… This may be something, seeing that the error only appeared after I
upgraded (manually) to perl 5.8.5. Perhaps, I’ll give the port version of
perl 5.8.5 a try again to make sure perl is compiled with the propper
options. Is there a quick way to see whether WEAKREF is in fact left out of
the perl compilation?

Do you use mod_perl? If so then it’s possible that you’ve compiled
mod_perl against wrong libperl(perl’s).

Yep, again, I should try running via FastCGI as well… I did recompile
mod_perl a couple of times after upgrading to 5.8.5. Just to proove myself,
I recompiled mod_perl again now, with the same effects…

===> Registering installation for mod_perl-1.29_1
===> SECURITY REPORT:
This port has installed the following files which may act as network
servers and may therefore pose a remote security risk to the system.
/usr/local/libexec/apache/libperl.so

root@netsphere:/usr/ports/www/mod_perl# ldd
/usr/local/libexec/apache/libperl.so
/usr/local/libexec/apache/libperl.so:
libm.so.2 => /usr/lib/libm.so.2 (0x2824d000)
libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x28269000)
libutil.so.3 => /usr/lib/libutil.so.3 (0x28282000)
libc.so.4 => /usr/lib/libc.so.4 (0x28069000)

root@netsphere:/usr/ports/www/mod_perl# apachectl restart
/usr/local/sbin/apachectl restart: httpd restarted

[Wed Sep 29 11:21:26 2004] [crit]: weak references are not implemented in
this release of perl at
/usr/local/lib/perl5/site_perl/5.8.5/HTML/Mason/Component.pm line 340.

Stack:
[/usr/local/lib/perl5/site_perl/5.8.5/HTML/Mason/ApacheHandler.pm:143]
[/usr/local/lib/perl5/site_perl/5.8.5/HTML/Mason/ApacheHandler.pm:792]
[/usr/local/rt/bin/webmux.pl:105]
[/dev/null:0]
(/usr/local/rt/bin/webmux.pl:107)

run locate libperl

This is huge… But here it is.
/usr/lib/libperl.a
/usr/lib/libperl.so
/usr/lib/libperl.so.3
/usr/lib/libperl_p.a
/usr/local/lib/perl5/5.8.5/i386-freebsd/CORE/libperl.a
/usr/local/lib/perl5/5.8.5/mach/CORE/libperl.so
/usr/local/libexec/apache/libperl.so
/usr/src/gnu/usr.bin/perl/libperl
/usr/src/gnu/usr.bin/perl/libperl/Makefile
/usr/src/gnu/usr.bin/perl/libperl/config.SH-elf.alpha
/usr/src/gnu/usr.bin/perl/libperl/config.SH-elf.i386

(/usr/obj/usr/src omitted)

Chris

You also may read this for more info:
http://mathforum.org/epigone/modperl/sterdgloxful

Ok, this was very useful… Thanks Ruslan,

Brian just confirmed to me as well, hes problem was related to duplicate /
old versions of modules laying arround. I just cleared up my old modules
and discovered that mod_perl was linking to a old / broken version of
Digest::MD5. I’m in the process of fixing.

This should definately be related to FreeBSD only?? Seeing that it does have
a tendency to leave old perl stuff laying arround your entire system after
upgrades… There was also a old mod_perl in /usr/lib and I think apache
was using that instead of the new compiled one in /usr/local/lib.

I should be OK from here on… Thanks again everyone,

Chris.

Chris Knipe wrote:

Hi,

IRT Scalar::Util, the version installed is 1.14, current with current
available versions from CPAN. CPAN also further reported the module to
be up to date.

Also grepping on perl source code says that if you have perl with
SvWEAKREF(which is not conditional) then this error shouldn’t appear.

OK… This may be something, seeing that the error only appeared after I
upgraded (manually) to perl 5.8.5. Perhaps, I’ll give the port version
of perl 5.8.5 a try again to make sure perl is compiled with the propper
options. Is there a quick way to see whether WEAKREF is in fact left
out of the perl compilation?

Do you use mod_perl? If so then it’s possible that you’ve compiled
mod_perl against wrong libperl(perl’s).

Yep, again, I should try running via FastCGI as well… I did recompile
mod_perl a couple of times after upgrading to 5.8.5. Just to proove
myself, I recompiled mod_perl again now, with the same effects…
Yeah. Below is your problem.

===> Registering installation for mod_perl-1.29_1
===> SECURITY REPORT:
This port has installed the following files which may act as network
servers and may therefore pose a remote security risk to the system.
/usr/local/libexec/apache/libperl.so
I said “perl’s” cause it make sense. mod_perl has own libperl file and
perl itself has one. ‘/usr/local/libexec/apache/libperl.so’ - mod_perl
DSO library.

[snip]

run locate libperl

This is huge… But here it is.
/usr/lib/libperl.a
/usr/lib/libperl.so
/usr/lib/libperl.so.3
/usr/lib/libperl_p.a
And this is your problem. it’s perl’s libperl files that should be
placed into other dirs(like below with 5.8.5 when you have more then one
perl).

If you want replace old perl with new then you can rm old files from
/usr/lib/ (don’t forget to backup) then may be(don’t know) you need
rebuild mod_perl.

This should definately be related to FreeBSD only?? Seeing that it
does have a tendency to leave old perl stuff laying arround your
entire system after upgrades… There was also a old mod_perl in
/usr/lib and I think apache was using that instead of the new compiled
one in /usr/local/lib.

When you upgrade perl and set up CPAN for the new version, one of the
options is to have CPAN uninstall any old copies of files it updates
that may be in different locations on your search path. You should set
that option. Also using the ports in freebsd to install perl and
"activate" that version helps a lot to avoid accidentally using the old
perl.

Vivek Khera, Ph.D. MailerMailer, LLC Rockville, MD
http://www.MailerMailer.com/ +1-301-869-4449 x806

smime.p7s (2.42 KB)