Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 90

Summary: 5.2 perl fails where 5.1 perl works
Product: [Retired] Red Hat Linux Reporter: Need Real Name <aander07>
Component: perlAssignee: Crutcher Dunnavant <crutcher>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2CC: aleksey, davidn
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-03-18 15:09:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Need Real Name 1998-11-16 14:52:01 UTC
Subject: 5.2 PERL

This is the second report I've heard of this.
                Bryan C. Andregg * <> *
Red Hat Software

"Hey, wait a minute, you clowns are on dope!"
        -- Owen Cheese in 'Shakes the Clown'

------- Forwarded Message

Date:    Mon, 16 Nov 1998 13:13:56 -0500
Subject: 5.2, Perl, and Majordomo

Last Friday I upgraded from 5.1 to 5.2, and found out that
night that Majordomo had been broken thereby.  The culprit
turned out to be the Perl 5.004m4 installation that the 5.2
upgrade apparently did.  (I don't know what I'd had on
there before -- whatever came with 5.1.)  Installing the
contrib Perl 5.005_1 RPM fixed the problem.

Comment 1 Need Real Name 1998-11-16 14:56:59 UTC
I also noticed issues with the 5.2 build of perl
(perl-5.004m4-1.i386.rpm) and bugzilla.  Downgrading to the latest 5.1
build (perl-5.004-7.i386.rpm) worked as in interim solution.

The following errors were reported:

Substitution loop at line 547.

    542 # Trim whitespace from front and back.
    544 sub trim {
    545     ($_) = (@_);
    546     s/^\s*//g;
    547     s/\s*$//g;
    548     return $_;
    549 }

Substitution loop at /usr/lib/perl5/CGI/ line 245.

    238 sub die {
    239     my $message = shift;
    240     my $time = scalar(localtime);
    241     my($file,$line,$id) = id(1);
    242     $message .= " at $file line $line.\n" unless
    243     &fatalsToBrowser($message) if $WRAP && _longmess() !~
    244     my $stamp = stamp;
    245     $message=~s/^/$stamp/gm;
    246     realdie $message;
    247 }

Comment 2 dmurphy 1998-11-20 23:25:59 UTC
I've also had the same problem - "downgrading" to perl-5.004-6 works
fine... What's the difference between perl-5.004-* AND perl-5.004m4-*?
Anyway, it seems to choke on the following code:

#(/opt/local/majordomo/majordomo, lines 132-135)
if (! &valid_addr($reply_to)) {
    &abort( "$whoami: $reply_to is not a valid return address.\n");
    exit 2;
# $reply_to and valid_addr are defined in, line 501...:
# If you would like to see the code, or would like a login on my
# RedHat box to test it all out, just give a holler... thanks
# for the prompt attention!

Comment 3 Lance A. Brown 1998-11-25 13:53:59 UTC
There are also problems with the Text::ParseWords module in the perl-5
RPM shipped with 5.2.  Using it when called with 'perl -w' causes
massive numbers of 'using uninitialized variable' warnings.
Downgrading to perl-5.004-6 corrected the problem.

I'd strongly reccomend upgrading this package to the release version
of perl 5.005.

Comment 4 Cristian Gafton 1998-12-11 22:54:59 UTC
*** Bug 90 has been marked as a duplicate of this bug. ***
Some scripts that work with perl 5.004_04 (the version
included with RHL 5.1) don't work with the version included
with RHL 5.2.  It appears that the version with 5.2 is buggy
in some respects.  I've had it running for a few hours, and
already found a couple of problems.  One I tracked down to
the regexp replace

 $dtstr =~ s#(\A|\n|\Z)# #sog;

giving a "Substitution loop" error (and the script dies).
This is a valid regexp, so I suspect the maintenance release
of perl from RHL 5.2 is buggy.

How about sticking to "released" versions of software for
RHL releases?  I use RHL on several Internet/web/database
servers and I depend on it being stable.

------- Additional Comments From  12/10/98 14:04 -------
The version of Perl that ships with 5.2 is 5.004_04 (check /usr/bin to
verify) and using a fresh install of 5.2 I was able to execute the
script command that you included without problems in the test lab.
Verify the version of Perl that you are running.

------- Additional Comments From  12/10/98 20:05 -------
Please see my email - this is a bug in the trial release of perl used
in building the RHL 5.2 perl RPM.  The version of perl you included
with RHL 5.2 is a trial maintenance release, not meant for regular
widespread distribution.  Looking through Bugzilla, I see lots of
complaints about this version of perl.  You should issue an errata on
this, either reccomending people downgrade to a stable version of perl
or upgrade to a newer perl (and put a newer version of perl in the
updates directory).

------- Additional Comments From  12/11/98 11:45 -------
This bug has been assigned to a developer for further review.

Comment 5 frankw 1998-12-15 15:20:59 UTC
OS: Linux (RedHat 5.2) 2.0.36 #1 Tue Oct 13 22:17:11 EDT 1998 i686
Perl: version 5.005_02 built for i686-linux

     Any perl program that tries to use the syslog module by doing
     use Sys::Syslog;
     fails with the following messages:

     Can't locate in @INC (did you run h2ph?) (@INC
     /usr/lib/perl5/i386-linux/5.00401 /usr/lib/perl5
     /usr/lib/perl5/site_perl/i386-linux /usr/lib/perl5/site_perl .)
     at /usr/lib/perl5/i386-linux/5.00401/sys/ line 74.

     Note: After the installation of Perl 5.005_02, in /usr/include I
           ran h2ph *.h sys/*.h

     Based on a suggestion found at

     The fix is to run h2ph by hand:
        cd `/usr/bin/gcc --print-file-name include`
       /usr/bin/h2ph *.h

Follow up problem:
     Next, I try my simple test program:

     #!/usr/bin/perl -w
     use Sys::Syslog;
     openlog ('testprogram', 'pid', 'user');
     syslog ('info', 'yaut');

When I run this program, the output is:
     Constant subroutine __need___va_list undefined at
     /usr/lib/perl5/site_perl/5.005/i686-linux/ line 7.

If I comment this line (i.e. put an # in front of it), the error does
not occur anymore. However, there is no output in the syslog either.

Comment 6 Jeff Johnson 1998-12-31 15:16:59 UTC
*** Bug 90 has been marked as a duplicate of this bug. ***

perl reports an error when trying to remove leading blanks

new install of redhat 5.2 on i386
latest majordomo

majordomo script at line 177


------- Additional Comments From  12/26/98 19:04 -------
This is a duplicate of #90 and #383

Comment 7 Jeff Johnson 1998-12-31 15:17:59 UTC
*** Bug 90 has been marked as a duplicate of this bug. ***

I'm getting odd errors on 5.2 from a script that's supposed
to be an example of using the package. The URL
listed above is where the script is available. I get
different results on my RHL 4.2 box, though it still does
not run.

I can't be sure at this stage whether this is a RedHat bug,
a Perl bug, a bug in the module, or what. I'm trying to get
a WORKING example of from somewhere (anywhere!) so
I can indeed be sure. chat2.examp bolton
Prototype mismatch: sub chat::__need_size_t vs () at (eval
43) line 1.
String found where operator expected at (eval 147) line 1,
near "&__const 'struct sockaddr'"
        (Missing operator before  'struct sockaddr'?)
open: Bad file descriptor at chat2.examp line 38.

------- Additional Comments From  12/28/98 12:15 -------
Apparently the URL field in the bug tracking form doesn't get recorded
properly. I'll email the script in question to shortly.

------- Additional Comments From  12/28/98 12:35 -------
Further update. I now have a VERY simple script that works fine on my
4.2 RHL, and blows up on 5.2. The script is included below. Also
included are the PERL versions from the two boxes (which are slightly
different apparently).


require "";

$where = '';
$whereport = 23;
$handle = &chat'open_port($where, $whereport);
print "result of open_port is $handle\n";

On the 4.2 system:

perl -v gives:

This is perl, version 5.004_04 built for i386-linux

On the 5.2 system the script fails with:

Prototype mismatch: sub chat::__need_size_t vs () at (eval 43) line 1.
String found where operator expected at (eval 147) line 1, near
"&__const 'struct sockaddr'"
        (Missing operator before  'struct sockaddr'?)
result of open_port is chatsymbol000001

and the perl -v there shows:

This is perl, version 5.004_04 built for i386-linux
(with 1 registered patch, see perl -V for more detail)

Comment 8 Jeff Johnson 1998-12-31 15:18:59 UTC
*** Bug 90 has been marked as a duplicate of this bug. ***

Requiring "sys/" results in an error.
This breaks some Perl scripts.

sonata$ perl -e 'require "sys/";'
Prototype mismatch: sub main::__need_size_t vs () at (eval
43) line 1.
String found where operator expected at (eval 147) line 1,
near "&__const 'struct sockaddr'"
        (Missing operator before  'struct sockaddr'?)

This is on a RedHat 5.2 system upgraded from RedHat 5.1.
I verified the Perl installation with rpm --verify.

Comment 9 Jeff Johnson 1999-01-10 20:01:59 UTC
*** Bug 90 has been marked as a duplicate of this bug. ***

Perl 5.004m4, which ships on the RHL 5.2 discs, is bad.

It breaks majordomo horribly, generates spurious messages
in various other places, and in general has broken a LOT
of stuff, and cost many hours of futile debugging.

The fix is to:

rpm --force -Uvh perl-5.004-4.i386.rpm

and then things returned to normal.

Comment 10 Jeff Johnson 1999-01-19 00:24:59 UTC
*** Bug 835 has been marked as a duplicate of this bug. ***

When I attempt to load Tk_402_004 with Red Hat 5.2 on an
Intel 586 machine, it fails at the make test stage.  It
worked fine on Red Hat 5.1.  Also, when I reinstall perl
5.004_04 from scratch on a Red Hat 5.2 system, then Tk
starts working, even though that is the Perl version
nominally installed on Red Hat 5.2.

Comment 11 Preston Brown 1999-03-18 15:09:59 UTC
Perl in 5.2 is broken in several horrible ways.  The perl in RawHide
has fixed the majordomo problems, and hopefully most other perl
related issues.

------- Email Received From  Andrew Anderson <> 03/18/99 14:34 -------

Comment 12 Chris Seawood 1999-08-20 20:27:59 UTC
I ran into the problem with today.  It turns out that h2ph
cannot properly handle glibc's embedding of #defines inside enums.  So
you end up with things like
    eval 'sub SOCK_STREAM () { &SOCK_STREAM;}' unless
instead of
eval 'sub SOCK_STREAM () { 1;}' unless defined(&SOCK_STREAM);
in /usr/lib/perl5/5.00503/i386-linux/bits/

Does this new rawhide rpm fix this particular problem?  It seems to be
a perl specific problem but is there any plan for an official RH6.0
fix?  The broken bits/ caused aub to go into an infinte loop
when calling socket() and locked up my machine.