Bug 90 - 5.2 perl fails where 5.1 perl works
Summary: 5.2 perl fails where 5.1 perl works
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: perl
Version: 5.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Crutcher Dunnavant
QA Contact:
URL:
Whiteboard:
: 383 602 624 635 766 835 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1998-11-16 14:52 UTC by Need Real Name
Modified: 2008-05-01 15:37 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 1999-03-18 15:09:23 UTC
Embargoed:


Attachments (Terms of Use)

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

This is the second report I've heard of this.
--
                Bryan C. Andregg * <bandregg> *
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 globals.pl line 547.

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

Substitution loop at /usr/lib/perl5/CGI/Carp.pm 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
$message=~/\n$/;
    243     &fatalsToBrowser($message) if $WRAP && _longmess() !~
/eval
[{\']/m;
    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 majordomo.pl, 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 jturner  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 cadams  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 dkl  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

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

     Can't locate stdarg.ph in @INC (did you run h2ph?) (@INC
     contains:
     /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/syslog.ph line 74.

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

Solution:
     Based on a suggestion found at
     http://www.redhat.com/support/docs/rhl/rh51-errata-general.html:

     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');
     closelog();

When I run this program, the output is:
     Constant subroutine __need___va_list undefined at
     /usr/lib/perl5/site_perl/5.005/i686-linux/stdarg.ph 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

  s/^\s*//g;



------- Additional Comments From ayn2  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 chat2.pl 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 chat2.pl from somewhere (anywhere!) so
I can indeed be sure.

fennel.senie.com% 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 dts  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 dkl shortly.

------- Additional Comments From dts  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).

Script:
#!/usr/bin/perl

require "chat2.pl";

$where = 'gate.senie.com';
$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/socket.ph" results in an error.
This breaks some Perl scripts.

sonata$ perl -e 'require "sys/socket.ph";'
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'?)
sonata$

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 <andrew> 03/18/99 14:34 -------

Comment 12 Chris Seawood 1999-08-20 20:27:59 UTC
I ran into the problem with socket.ph 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
defined(&SOCK_STREAM);
instead of
eval 'sub SOCK_STREAM () { 1;}' unless defined(&SOCK_STREAM);
in /usr/lib/perl5/5.00503/i386-linux/bits/socket.ph

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/socket.ph caused aub to go into an infinte loop
when calling socket() and locked up my machine.


Note You need to log in before you can comment on or make changes to this bug.