Bug 20636 - syslog calls from perl in redhat 7 is broken?
syslog calls from perl in redhat 7 is broken?
Product: Red Hat Linux
Classification: Retired
Component: perl (Show other bugs)
i386 Linux
high Severity high
: ---
: ---
Assigned To: Chip Turner
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2000-11-10 04:15 EST by Johan Leckstrom
Modified: 2005-10-31 17:00 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-12-06 16:22:13 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Johan Leckstrom 2000-11-10 04:15:28 EST
In redhat 6.1 I used Sys::Syslog in some scripts. The same script doesn't
work in Redhat 7. I can't find any solution like changing the syntax etc.

This example script doesn't work:
# Syslog variables
$ident = "apa";
use Sys::Syslog;
# Log to syslog
sub logthis {
        openlog ( $ident,"ndelay","daemon");
        syslog ( alert , "@_[0]" );
Sys::Syslog::setlogsock("unix") if defined &Sys::Syslog::setlogsock;
logthis ("test!");

This is the error message:

Usage: Sys::Syslog::_PATH_LOG() at
/usr/lib/perl5/5.6.0/i386-linux/Sys/Syslog.pm line 277
Comment 1 Stig Hackvan 2000-11-18 22:38:52 EST
This problem also occurs with 6.2-based systems.  (i've got a "clean and fresh"
install of krud's updates)

## stig/POD1 (pts/0) -- Sat Nov 18 -- 19:24:04 ## 
## /ice/tmp >> cat test.pl
use Sys::Syslog;
           openlog('fooprogram', 'pid,nowait','mail');
           syslog('notice', 'this is another test');
           syslog('mail|warning', 'this is a better test: %d', time);

## stig/POD1 (pts/0) -- Sat Nov 18 -- 19:24:17 ## 
## /ice/tmp >> perl -w test.pl
Constant subroutine __stub_lgammal redefined at
/usr/lib/perl5/5.00503/i386-linux/gnu/stubs.ph line 58.
Constant subroutine __stub_lgammal_r redefined at
/usr/lib/perl5/5.00503/i386-linux/gnu/stubs.ph line 64.
Constant subroutine __need___va_list undefined at
/usr/lib/perl5/5.00503/i386-linux/stdarg.ph line 9.
## stig/POD1 (pts/0) -- Sat Nov 18 -- 19:24:23 ## 
## /ice/tmp >> whperl
bash: whperl: command not found
## stig/POD1 (pts/0) -- Sat Nov 18 -- 19:24:34 ## 
## /ice/tmp >> wh perl
perl is hashed (/usr/bin/perl)
-rwxr-xr-x    2 root     root       527888 Aug 10 12:37 /usr/bin/perl
Name        : perl                         Relocations: (not relocateable)
Version     : 5.00503                           Vendor: Red Hat, Inc.
Release     : 12                            Build Date: Thu 10 Aug 2000 12:37:21
Install date: Thu 16 Nov 2000 08:31:01 PM PST      Build Host:
Group       : Development/Languages         Source RPM: perl-5.00503-12.src.rpm
Size        : 14005304                         License: GPL
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Summary     : The Perl programming language.
Description :
Perl is a high-level programming language with roots in C, sed, awk
and shell scripting.  Perl is good at handling processes and files,
and is especially good at handling text.  Perl's hallmarks are
practicality and efficiency.  While it is used to do a lot of
different things, Perl's most common applications are system
administration utilities and web programming.  A large proportion of
the CGI scripts on the web are written in Perl.  You need the perl
package installed on your system so that your system can handle Perl

Install this package if you want to program in Perl or enable your
system to handle Perl scripts.
## stig/POD1 (pts/0) -- Sat Nov 18 -- 19:24:36 ## 
## /ice/tmp >> pg kernel

Comment 2 psamuel 2001-01-08 19:19:57 EST
tom@compton.nu (the latest author of the Syslog.pm file) suggests the following
patch to Syslog.pm

I have tried this under RH7.0 and it works.

> my $syslog = &_PATH_LOG                          || croak "_PATH_LOG not found
in syslog.ph";
< my $syslog = _PATH_LOG()                          || croak "_PATH_LOG not
found in syslog.ph"; 
Comment 3 Jody McIntyre 2001-04-27 10:45:38 EDT
This fix is made in the Syslog.pm that comes with perl-5.6.1.  Use perl-5.6.1.  

If you are affected by this bug, I have built a perl-5.6.1 RPM based on RedHat's
perl-5.6.0.  Email me if you want it.
Comment 4 Chip Turner 2001-12-19 03:50:15 EST
perl 5.6.1 is in rawhide now, and this bug would seem to be gone

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