Skip Menu |
 

This queue is for tickets about the Encode CPAN distribution.

Report information
The Basics
Id: 11511
Status: resolved
Priority: 0/
Queue: Encode

People
Owner: DANKOGAI [...] cpan.org
Requestors: aaron [...] droogs.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.08
Fixed in: (no value)



Subject: Encode::ConfigLocal not found
Download (untitled) / with headers
text/plain 242b
After installing Encode from CPAN I got errors like : can't locate Encode/ConfigLocal.pm at line XX in Encode.pm after a quick google I found I had to run : enc2xs -C Has this been fixed in the Makefile of the new version (2.09) ? thanks
Download (untitled) / with headers
text/plain 892b
[guest - Tue Feb 15 10:27:15 2005]: Show quoted text
> After installing Encode from CPAN I got errors like : > > can't locate Encode/ConfigLocal.pm at line XX in Encode.pm > > after a quick google I found I had to run : > > enc2xs -C > > Has this been fixed in the Makefile of the new version (2.09) ?
I can't fix which is not broken; I've never got a report like that before. The chances are you have mangled perl library directories (i.e. /usr/local/lib/perl5/5.8.x ) and ConfigLocal.pm got lost/corrupted in a way. enc2xs is primarily for extra Encode modules (i.e. Encode::HanExtra) so usually you don't have to fiddle with that.... For me to admit this is a bug of Encode and take further action, I need more detailed report -- detailed enough for me to reproduce the situation. I'll leave this ticket open for a while but I do not think this was Encode's bug... Dan the Maintainer Thereof
Download (untitled) / with headers
text/plain 978b
[DANKOGAI - Tue Feb 15 10:59:18 2005]: Show quoted text
> [guest - Tue Feb 15 10:27:15 2005]:
> > After installing Encode from CPAN I got errors like : > > > > can't locate Encode/ConfigLocal.pm at line XX in Encode.pm > > > > after a quick google I found I had to run : > > > > enc2xs -C > > > > Has this been fixed in the Makefile of the new version (2.09) ?
> > I can't fix which is not broken; I've never got a report like that > before.
I first had this problem in a month or two ago but it has recently occured twice. Show quoted text
> The chances are you have mangled perl library directories (i.e. > /usr/local/lib/perl5/5.8.x ) > and ConfigLocal.pm got lost/corrupted in a way.
I can rule that out. I installed via cpan on RH EL3. Even on fresh installs on new machines this problem has occured. looking at the distribution ConfigLocal.pm isn't included and has to be generated in some way. when installing on RH EL3 something is breaking that is only fixed by running 'enc2xs -C' manually. A.
Download (untitled) / with headers
text/plain 1.2k
[guest - Wed Feb 16 06:39:50 2005]: Show quoted text
> [DANKOGAI - Tue Feb 15 10:59:18 2005]: >
> > [guest - Tue Feb 15 10:27:15 2005]:
> > > After installing Encode from CPAN I got errors like : > > > > > > can't locate Encode/ConfigLocal.pm at line XX in Encode.pm > > > > > > after a quick google I found I had to run : > > > > > > enc2xs -C > > > > > > Has this been fixed in the Makefile of the new version (2.09) ?
> > > > I can't fix which is not broken; I've never got a report like that > > before.
> > I first had this problem in a month or two ago but it has recently > occured twice. >
> > The chances are you have mangled perl library directories (i.e. > > /usr/local/lib/perl5/5.8.x ) > > and ConfigLocal.pm got lost/corrupted in a way.
> > I can rule that out. I installed via cpan on RH EL3. Even on fresh > installs on new machines this problem has occured. > > looking at the distribution ConfigLocal.pm isn't included and has to be > generated in some way. when installing on RH EL3 something is breaking > that is only fixed by running 'enc2xs -C' manually. >
We have had this problem again. I can confirm that when installing on Redhat Enterprise 3 that this always seems to occur and enc2xs -C solves the problem. This happens if we use the installed perl. A.
Download (untitled) / with headers
text/plain 376b
On Wed May 11 11:19:40 2005, guest wrote: Show quoted text
> We have had this problem again. > > I can confirm that when installing on Redhat Enterprise 3 that this > always seems to occur and enc2xs -C solves the problem. This happens if > we use the installed perl. > > A.
Since this problem appears to be unique to RH3 and its perl, I'll close this ticket. Dan the Maintainer Thereof
From: kasal [...] ucw.cz
Download (untitled) / with headers
text/plain 831b
Hello, On Sat Jun 03 15:49:40 2006, DANKOGAI wrote: Show quoted text
> this problem appears to be unique to RH3 and its perl
actually, it isn't. There is a good description of the problem in https://bugzilla.redhat.com/show_bug.cgi?id=435505 including a reproducer: https://bugzilla.redhat.com/show_bug.cgi?id=435505#c2 I have reproduced the bug on Debian 3.1 and Fedora 8. As explained above, the problem seems to be caused by line eval { require Encode::ConfigLocal }; To workaround the problem, it is often recommended to create ConfigLocal.pm, perhaps by running enc2xs after installation. But I think it might be cleaner to replace the above hack by a more strightforward code which would search the @INC for ConfigLocal.pm and would import it only if it exists. Would this fix make sense? (If yes, I'd be happy to prepare a patch.)
Download (untitled) / with headers
text/plain 2.3k
Surely fixed in 2.26. See this. ==== % perl -Mblib -e 'BEGIN { $SIG{__DIE__} = sub { print "Die: $_[0]\n"; }; }; use Encode; print "Hello world.\n";' Hello world. % 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/local/lib/perl5/5.10.0/darwin-thread-multi-2level /usr/local/lib/perl5/5.10.0 /usr/local/lib/perl5/site_perl/5.10.0/darwin-thread-multi-2level /usr/local/lib/perl5/site_perl/5.10.0 .) at /usr/local/lib/perl5/5.10.0/darwin-thread-multi- 2level/Encode.pm line 54. Hello world. % perl -Mblib -e 'BEGIN { $SIG{__DIE__} = sub { print "Die: $_[0]\n"; }; }; use Encode; print "Hello world.\n";' Hello world. ==== If you can't wait for the upgrade, apply the patch below. % rcsdiff -u Encode.pm ========================================================= ========== RCS file: Encode.pm,v retrieving revision 2.25 diff -u -r2.25 Encode.pm --- Encode.pm 2008/05/07 20:56:05 2.25 +++ Encode.pm 2008/07/01 20:50:04 @@ -51,7 +51,14 @@ our %Encoding; our %ExtModule; require Encode::Config; -eval { require Encode::ConfigLocal }; +# See +# https://bugzilla.redhat.com/show_bug.cgi?id=435505#c2 +# to find why sig handers inside eval{} are disabled. +eval { + local $SIG{__DIE__}; + local $SIG{__WARN__}; + require Encode::ConfigLocal; +}; sub encodings { my $class = shift; Dan the Encode Maintainer On Thu May 08 08:15:01 2008, kasal wrote: Show quoted text
> Hello, > > On Sat Jun 03 15:49:40 2006, DANKOGAI wrote:
> > this problem appears to be unique to RH3 and its perl
> > actually, it isn't. There is a good description of the problem in > https://bugzilla.redhat.com/show_bug.cgi?id=435505 > including a reproducer: > https://bugzilla.redhat.com/show_bug.cgi?id=435505#c2 > > I have reproduced the bug on Debian 3.1 and Fedora 8. > > As explained above, the problem seems to be caused by line > eval { require Encode::ConfigLocal }; > > To workaround the problem, it is often recommended to create > ConfigLocal.pm, perhaps by running enc2xs after installation. > > But I think it might be cleaner to replace the above hack by a more > strightforward code which would search the @INC for ConfigLocal.pm and > would import it only if it exists. > > Would this fix make sense? (If yes, I'd be happy to prepare a patch.)


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.