Bug 435505 - Encode module in perl package can generate warnings.
Summary: Encode module in perl package can generate warnings.
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: perl
Version: 5.1
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Stepan Kasal
QA Contact: desktop-bugs@redhat.com
Depends On:
TreeView+ depends on / blocked
Reported: 2008-02-29 19:42 UTC by Jason Smith
Modified: 2010-01-12 09:40 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 493358 554661 (view as bug list)
Last Closed: 2009-01-20 21:11:20 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Bugzilla 199785 None None None Never
Red Hat Product Errata RHBA-2009:0117 normal SHIPPED_LIVE perl bug fix update 2009-01-20 16:04:48 UTC

Internal Links: 547121

Description Jason Smith 2008-02-29 19:42:04 UTC
Description of problem:
Perl's Encode module looks for a Encode::ConfigLocal module by calling:

eval { require Encode::ConfigLocal };

This Encode::ConfigLocal module does not exist, but since the require is wrapped
in an eval, it is not a fatal error, but depending on how the perl script is
written, this can generate warning messages, if for example the script is
catching eval errors and logging them.

Version-Release number of selected component (if applicable):
perl-5.8.8-10.el5_0.2 but I have also seen this in RHEL3 & RHEL4.

Additional info:
This was also reported in bugzilla issue #199785, but was closed without a fix
for some reason.  Since this can easily be fixed by executing "enc2xs -C",
shouldn't the perl package include this command in either the rpm build script
or a post-install script?

Comment 1 Marcela Mašláňová 2008-04-30 10:41:06 UTC
Could you be more specific? I see in generated file (by enc2xs) file including
definition of package mentioned above.

Also the issue doesn't exist any more.

Comment 2 Jason Smith 2008-04-30 12:19:35 UTC
If you have a perl script that catches and prints eval errors and it tried to
load the Encode module while running, it will print the message.  Here is an

$ perl -e 'BEGIN { $SIG{__DIE__} = sub { print "Die: $_[0]\n"; }; }; use Encode;
print "Hello world.\n";'
Die: Can't locate Encode/ConfigLocal.pm in @INC (@INC contains:
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7
/usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7
/usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5
/usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi
/usr/lib/perl5/5.8.8 .) at
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/Encode.pm line 52.

Hello world.

I have tested this on RHEL3, 4 & 5, with the same results.  The suggested
solution is to run the command: "enc2xs -C", so the best fix is to probably put
this into either the perl build/install script when making the rpm, or maybe in
a %post install script in the resulting perl rpm.


Comment 3 Stepan Kasal 2008-05-08 12:27:59 UTC
This problem is tracked upstream as

BTW, it's not possible to directly run enc2xs in the build tree nor in the
BuildRoot.  But that's not a problem, an empty ConfigLocal.pm can be created
directly from the template.  It is necessary to flag it as "config, noreplace" then.
But running "enc2xs -C" from %post would also work.
And there is a third alternative solution: fix Encode.pm so that it avoids the
"require" in the file does not exist, as proposed on the upstream bug.

Let's check the upstream decision just before we get to actual work on a patch.

Comment 4 RHEL Program Management 2008-06-02 20:16:08 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update

Comment 5 Stepan Kasal 2008-07-04 09:39:10 UTC
Note that upstream has provided us a path:

Comment 11 errata-xmlrpc 2009-01-20 21:11:20 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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