Skip Menu |

Date: Wed, 21 May 2014 00:16:20 +0300
Subject: Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
From: Alexandr Ciornii <alexchorny [...] gmail.com>
To: perlbug [...] perl.org
Download (untitled) / with headers
text/plain 1.1k
On Russian locale. If I set LANG=C, problem disappears.
Debian 7.

#   Failed test 'use Wx;'
#   at t/01_load.t line 6.
#     Tried to use 'Wx'.
#     Error:  Invalid version format (non-numeric data) at /home/c/perl5/perlbrew/perls/20rc1i/lib/5.20.0/Tie/Handle.pm line 3.
# BEGIN failed--compilation aborted at /home/c/perl5/perlbrew/perls/20rc1i/lib/5.20.0/Tie/Handle.pm line 3.
# Compilation failed in require at /home/c/.cpan/build/Wx-0.9923-XUII6l/blib/lib/Wx.pm line 176.
# Compilation failed in require at t/01_load.t line 6.
# BEGIN failed--compilation aborted at t/01_load.t line 6.
Attempt to reload Wx.pm aborted.
Compilation failed in require at t/01_load.t line 8.
BEGIN failed--compilation aborted at t/01_load.t line 8.
# Looks like you planned 6 tests but ran 1.
# Looks like you failed 1 test of 1 run.
# Looks like your test exited with 255 just after 1.

More data here: http://www.cpantesters.org/cpan/report/fcc719b0-de76-11e3-b8e2-4dcc6dfca90a
PASS 5.18.2 on same VM: http://www.cpantesters.org/cpan/report/64f79210-e036-11e3-8976-76fc6dfca90a

--
Alexandr Ciornii, http://chorny.net
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
From: Karl Williamson <public [...] khwilliamson.com>
Date: Tue, 20 May 2014 23:16:50 -0600
To: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 6.3k
On 05/20/2014 03:16 PM, Alexandr Ciornii (via RT) wrote: Show quoted text
> # New Ticket Created by Alexandr Ciornii > # Please include the string: [perl #121930] > # in the subject line of all future correspondence about this issue. > # <URL: https://rt.perl.org/Ticket/Display.html?id=121930 > > > > On Russian locale. If I set LANG=C, problem disappears. > Debian 7. > > # Failed test 'use Wx;' > # at t/01_load.t line 6. > # Tried to use 'Wx'. > # Error: Invalid version format (non-numeric data) at > /home/c/perl5/perlbrew/perls/20rc1i/lib/5.20.0/Tie/Handle.pm line 3. > # BEGIN failed--compilation aborted at > /home/c/perl5/perlbrew/perls/20rc1i/lib/5.20.0/Tie/Handle.pm line 3. > # Compilation failed in require at > /home/c/.cpan/build/Wx-0.9923-XUII6l/blib/lib/Wx.pm line 176. > # Compilation failed in require at t/01_load.t line 6. > # BEGIN failed--compilation aborted at t/01_load.t line 6. > Attempt to reload Wx.pm aborted. > Compilation failed in require at t/01_load.t line 8. > BEGIN failed--compilation aborted at t/01_load.t line 8. > # Looks like you planned 6 tests but ran 1. > # Looks like you failed 1 test of 1 run. > # Looks like your test exited with 255 just after 1. > > More data here: > http://www.cpantesters.org/cpan/report/fcc719b0-de76-11e3-b8e2-4dcc6dfca90a > > PASS 5.18.2 on same VM: > http://www.cpantesters.org/cpan/report/64f79210-e036-11e3-8976-76fc6dfca90a > > > https://rt.cpan.org/Ticket/Display.html?id=95808 > >
I'm trying to reproduce this, and am unable to compile it. We have seen these symptoms before, which were fixed. It appears that 'version' is getting a comma as the decimal point, which it can't handle. In getting ready for 5.21, I found some potentially relevant code that I believed was wrong for 5.20, but didn't come up with a test that failed for it. The most expedient thing might be for you to try the attached patch and see if that fixes the problem. I'm using gcc 4.8.1; the bug report compiler is 4.7.2. The code is g++ that is failing. At first I thought somehow it was something I was doing that was causing it to be C++ instead of C, but at least subsets of the code appear to be real C++. The messages I get are PropertyGrid.c: In function ‘void XS_Wx__ColourProperty_SetPlValue(CV*)’: PropertyGrid.c:26060:49: error: call of overloaded ‘wxVariant(wxColour&)’ is ambiguous wxVariant value = wxVariant(*col); ^ PropertyGrid.c:26060:49: note: candidates are: In file included from ../../cpp/helpers.h:19:0, from ../../cpp/wxapi.h:158, from PropertyGrid.c:23: /home/khw/cpanbroken/lib/perl5/site_perl/5.20.0/x86_64-linux/Alien/wxWidgets/gtk_3_0_0_uni/include/wx-3.0/wx/variant.h:283:5: note: wxVariant::wxVariant(void*, const wxString&) <near match> wxVariant(void* ptr, const wxString& name = wxEmptyString); ^ /home/khw/cpanbroken/lib/perl5/site_perl/5.20.0/x86_64-linux/Alien/wxWidgets/gtk_3_0_0_uni/include/wx-3.0/wx/variant.h:283:5: note: no known conversion for argument 1 from ‘wxColour’ to ‘void*’ /home/khw/cpanbroken/lib/perl5/site_perl/5.20.0/x86_64-linux/Alien/wxWidgets/gtk_3_0_0_uni/include/wx-3.0/wx/variant.h:256:5: note: wxVariant::wxVariant(wchar_t, const wxString&) <near match> wxVariant(wchar_t val, const wxString& name = wxEmptyString); ^ /home/khw/cpanbroken/lib/perl5/site_perl/5.20.0/x86_64-linux/Alien/wxWidgets/gtk_3_0_0_uni/include/wx-3.0/wx/variant.h:256:5: note: no known conversion for argument 1 from ‘wxColour’ to ‘wchar_t’ /home/khw/cpanbroken/lib/perl5/site_perl/5.20.0/x86_64-linux/Alien/wxWidgets/gtk_3_0_0_uni/include/wx-3.0/wx/variant.h:255:5: note: wxVariant::wxVariant(char, const wxString&) <near match> wxVariant(char val, const wxString& name = wxEmptyString); ^ /home/khw/cpanbroken/lib/perl5/site_perl/5.20.0/x86_64-linux/Alien/wxWidgets/gtk_3_0_0_uni/include/wx-3.0/wx/variant.h:255:5: note: no known conversion for argument 1 from ‘wxColour’ to ‘char’ /home/khw/cpanbroken/lib/perl5/site_perl/5.20.0/x86_64-linux/Alien/wxWidgets/gtk_3_0_0_uni/include/wx-3.0/wx/variant.h:187:5: note: wxVariant::wxVariant(bool, const wxString&) wxVariant(bool val, const wxString& name = wxEmptyString); ^ /home/khw/cpanbroken/lib/perl5/site_perl/5.20.0/x86_64-linux/Alien/wxWidgets/gtk_3_0_0_uni/include/wx-3.0/wx/variant.h:178:5: note: wxVariant::wxVariant(short int, const wxString&) <near match> wxVariant(short val, const wxString& name = wxEmptyString); ^ /home/khw/cpanbroken/lib/perl5/site_perl/5.20.0/x86_64-linux/Alien/wxWidgets/gtk_3_0_0_uni/include/wx-3.0/wx/variant.h:178:5: note: no known conversion for argument 1 from ‘wxColour’ to ‘short int’ /home/khw/cpanbroken/lib/perl5/site_perl/5.20.0/x86_64-linux/Alien/wxWidgets/gtk_3_0_0_uni/include/wx-3.0/wx/variant.h:177:5: note: wxVariant::wxVariant(int, const wxString&) <near match> wxVariant(int val, const wxString& name = wxEmptyString); ^ /home/khw/cpanbroken/lib/perl5/site_perl/5.20.0/x86_64-linux/Alien/wxWidgets/gtk_3_0_0_uni/include/wx-3.0/wx/variant.h:177:5: note: no known conversion for argument 1 from ‘wxColour’ to ‘int’ /home/khw/cpanbroken/lib/perl5/site_perl/5.20.0/x86_64-linux/Alien/wxWidgets/gtk_3_0_0_uni/include/wx-3.0/wx/variant.h:176:5: note: wxVariant::wxVariant(long int, const wxString&) <near match> wxVariant(long val, const wxString& name = wxEmptyString); ^ /home/khw/cpanbroken/lib/perl5/site_perl/5.20.0/x86_64-linux/Alien/wxWidgets/gtk_3_0_0_uni/include/wx-3.0/wx/variant.h:176:5: note: no known conversion for argument 1 from ‘wxColour’ to ‘long int’ /home/khw/cpanbroken/lib/perl5/site_perl/5.20.0/x86_64-linux/Alien/wxWidgets/gtk_3_0_0_uni/include/wx-3.0/wx/variant.h:111:5: note: wxVariant::wxVariant(const wxAny&) wxVariant(const wxAny& any); ^ make[2]: *** [PropertyGrid.o] Error 1 make[2]: Leaving directory `/home/khw/.cpanm/work/1400635301.14983/Wx-0.9923/ext/propgrid' make[1]: *** [subdirs] Error 2 ========================================= I haven't dealt with C++ in well over a decade. My guess is that the newer compiler is catching things that the older one didn't, and it would be time consuming for me to try to figure out the internal code of this distribution enough to fix this compilation error (and who knows how many further ones there are).

Message body is not shown because sender requested not to inline it.

RT-Send-CC: public [...] khwilliamson.com, perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 973b
On Tue May 20 22:17:19 2014, public@khwilliamson.com wrote: Show quoted text
> On 05/20/2014 03:16 PM, Alexandr Ciornii (via RT) wrote:
> > # New Ticket Created by Alexandr Ciornii > > # Please include the string: [perl #121930] > > # in the subject line of all future correspondence about this issue. > > # <URL: https://rt.perl.org/Ticket/Display.html?id=121930 > > > > > > > On Russian locale. If I set LANG=C, problem disappears. > > Debian 7.
Show quoted text
> I'm trying to reproduce this, and am unable to compile it. We have > seen > these symptoms before, which were fixed. It appears that 'version' is > getting a comma as the decimal point, which it can't handle. In > getting > ready for 5.21, I found some potentially relevant code that I believed > was wrong for 5.20, but didn't come up with a test that failed for it. > The most expedient thing might be for you to try the attached patch > and > see if that fixes the problem.
Still fails. -- Alexandr Ciornii, http://chorny.net
Date: Wed, 21 May 2014 21:54:39 -0600
To: perlbug-followup [...] perl.org, "OtherRecipients of perl Ticket #121930:;" [...] smtp.indra.com
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
CC: perl5-porters [...] perl.org
From: Karl Williamson <public [...] khwilliamson.com>
Download (untitled) / with headers
text/plain 1.5k
On 05/21/2014 03:13 PM, Alexandr Ciornii via RT wrote: Show quoted text
> On Tue May 20 22:17:19 2014, public@khwilliamson.com wrote:
>> On 05/20/2014 03:16 PM, Alexandr Ciornii (via RT) wrote:
>>> # New Ticket Created by Alexandr Ciornii >>> # Please include the string: [perl #121930] >>> # in the subject line of all future correspondence about this issue. >>> # <URL: https://rt.perl.org/Ticket/Display.html?id=121930 > >>> >>> >>> On Russian locale. If I set LANG=C, problem disappears. >>> Debian 7.
> >
>> I'm trying to reproduce this, and am unable to compile it. We have >> seen >> these symptoms before, which were fixed. It appears that 'version' is >> getting a comma as the decimal point, which it can't handle. In >> getting >> ready for 5.21, I found some potentially relevant code that I believed >> was wrong for 5.20, but didn't come up with a test that failed for it. >> The most expedient thing might be for you to try the attached patch >> and >> see if that fixes the problem.
> > > Still fails. >
I wiped out what I had and re-did it to be sure that it wasn't something I had done. Same compilation problem. I suspect this is the result of changes in the C++ standard. I have some old astronomy software I got in a book, and when I got my new computer with a more modern g++, it failed to compile, and I had to figure out the necessary changes. Some of the failures are similar to this one. I then tried dromedary, which has an older g++. Unfortunately it doesn't have the requisite gtk+ development libraries installed on it. I wonder if there is a chance that it could be.
Date: Thu, 22 May 2014 20:10:09 -0600
To: perlbug-followup [...] perl.org, mdootson [...] cpan.org
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
CC: perl5-porters [...] perl.org
From: Karl Williamson <public [...] khwilliamson.com>
Download (untitled) / with headers
text/plain 1.1k
On 05/21/2014 09:54 PM, Karl Williamson wrote: Show quoted text
> On 05/21/2014 03:13 PM, Alexandr Ciornii via RT wrote:
>> On Tue May 20 22:17:19 2014, public@khwilliamson.com wrote:
>>> On 05/20/2014 03:16 PM, Alexandr Ciornii (via RT) wrote:
>>>> # New Ticket Created by Alexandr Ciornii >>>> # Please include the string: [perl #121930] >>>> # in the subject line of all future correspondence about this issue. >>>> # <URL: https://rt.perl.org/Ticket/Display.html?id=121930 > >>>> >>>> >>>> On Russian locale. If I set LANG=C, problem disappears. >>>> Debian 7.
>> >>
>>> I'm trying to reproduce this
Fernando Vezzosi graciously installed gtk+ libraries on Dromedary, and I compiled there, which is running gcc 4.4.7. After a significant amount of effort with hdr and linker issues, I was able to get it to compile. But it doesn't run, giving undefined symbol: _Z24wxGetFullScreenMethodX11PvS_ which sounds to me like something very basic, and unrelated to my hacks to get things to work. If someone has some advice about this, please let me know. Another possibility is for Alexandr to give me temporary ssh access to a machine where this is failing. I would need something compiled with debugging symbols, and gdb.
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
CC: perl5-porters [...] perl.org
From: Karl Williamson <public [...] khwilliamson.com>
Date: Sun, 25 May 2014 16:50:14 -0600
To: perlbug-followup [...] perl.org, mdootson [...] cpan.org
Download (untitled) / with headers
text/plain 1.5k
On 05/22/2014 08:10 PM, Karl Williamson wrote: Show quoted text
> On 05/21/2014 09:54 PM, Karl Williamson wrote:
>> On 05/21/2014 03:13 PM, Alexandr Ciornii via RT wrote:
>>> On Tue May 20 22:17:19 2014, public@khwilliamson.com wrote:
>>>> On 05/20/2014 03:16 PM, Alexandr Ciornii (via RT) wrote:
>>>>> # New Ticket Created by Alexandr Ciornii >>>>> # Please include the string: [perl #121930] >>>>> # in the subject line of all future correspondence about this issue. >>>>> # <URL: https://rt.perl.org/Ticket/Display.html?id=121930 > >>>>> >>>>> >>>>> On Russian locale. If I set LANG=C, problem disappears. >>>>> Debian 7.
>>> >>>
>>>> I'm trying to reproduce this
> > Fernando Vezzosi graciously installed gtk+ libraries on Dromedary, and I > compiled there, which is running gcc 4.4.7. > > After a significant amount of effort with hdr and linker issues, I was > able to get it to compile. But it doesn't run, giving > > undefined symbol: _Z24wxGetFullScreenMethodX11PvS_ > > which sounds to me like something very basic, and unrelated to my hacks > to get things to work. > > If someone has some advice about this, please let me know. Another > possibility is for Alexandr to give me temporary ssh access to a machine > where this is failing. I would need something compiled with debugging > symbols, and gdb. > >
I examined the core code in isolation, and see a potential code path that could cause this issue. Attached is a patch to try out to see if it fixes the bug. This is just a diagnostic patch and generates a porting test error

Message body is not shown because sender requested not to inline it.

RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.5k
Dana Uto 20. Svibanj 2014, 14:16:52, chorny reče: Show quoted text
> On Russian locale. If I set LANG=C, problem disappears. > Debian 7. > > # Failed test 'use Wx;' > # at t/01_load.t line 6. > # Tried to use 'Wx'. > # Error: Invalid version format (non-numeric data) at > /home/c/perl5/perlbrew/perls/20rc1i/lib/5.20.0/Tie/Handle.pm line 3. > # BEGIN failed--compilation aborted at > /home/c/perl5/perlbrew/perls/20rc1i/lib/5.20.0/Tie/Handle.pm line 3. > # Compilation failed in require at > /home/c/.cpan/build/Wx-0.9923-XUII6l/blib/lib/Wx.pm line 176. > # Compilation failed in require at t/01_load.t line 6. > # BEGIN failed--compilation aborted at t/01_load.t line 6. > Attempt to reload Wx.pm aborted. > Compilation failed in require at t/01_load.t line 8. > BEGIN failed--compilation aborted at t/01_load.t line 8. > # Looks like you planned 6 tests but ran 1. > # Looks like you failed 1 test of 1 run. > # Looks like your test exited with 255 just after 1. > > More data here: > http://www.cpantesters.org/cpan/report/fcc719b0-de76-11e3-b8e2-4dcc6dfca90a > > PASS 5.18.2 on same VM: > http://www.cpantesters.org/cpan/report/64f79210-e036-11e3-8976-76fc6dfca90a > > > https://rt.cpan.org/Ticket/Display.html?id=95808 > >
I saw these strange "Invalid version format" errors with perl 5.20.0-RC1, too. Probably LANG=de_DE.UTF-8 was iactive. At least the following distributions were affected: * BORUP/Gtk2-TrayIcon-0.06.tar.gz * KRYDE/Glib-Ex-ObjectBits-15.tar.gz * MUGENKEN/Net-OpenVPN-TrayIcon-v0.2.2.tar.gz * KARMAN/SWISH-Prog-0.75.tar.gz * JHALLOCK/Gapp-0.60.tar.gz * JHALLOCK/Lorem-0.22.tar.gz
CC: perl5-porters [...] perl.org
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
To: perlbug-followup [...] perl.org
Date: Mon, 26 May 2014 08:15:11 -0400
From: John Peacock <john.peacock [...] havurah-software.org>
Download (untitled) / with headers
text/plain 1.2k
On 05/26/2014 02:19 AM, slaven@rezic.de via RT wrote: Show quoted text
> Dana Uto 20. Svibanj 2014, 14:16:52, chorny reče:
>> On Russian locale. If I set LANG=C, problem disappears. >> Debian 7. >> >> # Failed test 'use Wx;' >> # at t/01_load.t line 6. >> # Tried to use 'Wx'. >> # Error: Invalid version format (non-numeric data) at >> /home/c/perl5/perlbrew/perls/20rc1i/lib/5.20.0/Tie/Handle.pm line 3.
> > I saw these strange "Invalid version format" errors with perl 5.20.0-RC1, too. Probably LANG=de_DE.UTF-8 was iactive. At least the following distributions were affected: > > * BORUP/Gtk2-TrayIcon-0.06.tar.gz > * KRYDE/Glib-Ex-ObjectBits-15.tar.gz > * MUGENKEN/Net-OpenVPN-TrayIcon-v0.2.2.tar.gz > * KARMAN/SWISH-Prog-0.75.tar.gz > * JHALLOCK/Gapp-0.60.tar.gz > * JHALLOCK/Lorem-0.22.tar.gz
Since all of those packages (including Wx) have a huge list of requirements, it would be very good to know if they all have something in common in where the error is being thrown. I suppose it is too much to hope for them all to be failing with Tie::Handle, but I'm wondering if they are all failing on a line like this: use 5.006_001; None of the version code has changed in a long time (Feb 4) and I'm actually holding a few changes until after v5.20.0 is officially released. John
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 3.4k
Dana Ned 25. Svibanj 2014, 23:19:28, slaven@rezic.de reče: Show quoted text
> Dana Uto 20. Svibanj 2014, 14:16:52, chorny reče:
> > On Russian locale. If I set LANG=C, problem disappears. > > Debian 7. > > > > # Failed test 'use Wx;' > > # at t/01_load.t line 6. > > # Tried to use 'Wx'. > > # Error: Invalid version format (non-numeric data) at > > /home/c/perl5/perlbrew/perls/20rc1i/lib/5.20.0/Tie/Handle.pm line 3. > > # BEGIN failed--compilation aborted at > > /home/c/perl5/perlbrew/perls/20rc1i/lib/5.20.0/Tie/Handle.pm line 3. > > # Compilation failed in require at > > /home/c/.cpan/build/Wx-0.9923-XUII6l/blib/lib/Wx.pm line 176. > > # Compilation failed in require at t/01_load.t line 6. > > # BEGIN failed--compilation aborted at t/01_load.t line 6. > > Attempt to reload Wx.pm aborted. > > Compilation failed in require at t/01_load.t line 8. > > BEGIN failed--compilation aborted at t/01_load.t line 8. > > # Looks like you planned 6 tests but ran 1. > > # Looks like you failed 1 test of 1 run. > > # Looks like your test exited with 255 just after 1. > > > > More data here: > > http://www.cpantesters.org/cpan/report/fcc719b0-de76-11e3-b8e2- > > 4dcc6dfca90a > > > > PASS 5.18.2 on same VM: > > http://www.cpantesters.org/cpan/report/64f79210-e036-11e3-8976- > > 76fc6dfca90a > > > > > > https://rt.cpan.org/Ticket/Display.html?id=95808 > > > >
> > I saw these strange "Invalid version format" errors with perl 5.20.0- > RC1, too. Probably LANG=de_DE.UTF-8 was iactive. At least the > following distributions were affected: > > * BORUP/Gtk2-TrayIcon-0.06.tar.gz > * KRYDE/Glib-Ex-ObjectBits-15.tar.gz > * MUGENKEN/Net-OpenVPN-TrayIcon-v0.2.2.tar.gz > * KARMAN/SWISH-Prog-0.75.tar.gz > * JHALLOCK/Gapp-0.60.tar.gz > * JHALLOCK/Lorem-0.22.tar.gz
A little bit more data mining in the reports on my hard disk: the following files were referenced in the error messages (perl-5.20.0-RC1 is unthreaded, 5.20.0-RC1t is threaded): $ grep /opt/perl-5.20 /tmp/invalid-version-format.log |perl -nle 'm{ at (\S+) line (\d+)} and print "$1 $2"'|sort -u /opt/perl-5.20.0-RC1/lib/5.20.0/File/Temp.pm 9 /opt/perl-5.20.0-RC1/lib/5.20.0/x86_64-linux/Data/Dumper.pm 18 /opt/perl-5.20.0-RC1/lib/site_perl/5.20.0/x86_64-linux/Gtk2/TrayIcon.pm 3 /opt/perl-5.20.0-RC1/lib/site_perl/5.20.0/x86_64-linux/Moose.pm 8 /opt/perl-5.20.0-RC1t/lib/5.20.0/File/Temp.pm 9 /opt/perl-5.20.0-RC1t/lib/5.20.0/Text/ParseWords.pm 4 /opt/perl-5.20.0-RC1t/lib/5.20.0/x86_64-linux-thread-multi/Data/Dumper.pm 18 /opt/perl-5.20.0-RC1t/lib/site_perl/5.20.0/MooseX/SemiAffordanceAccessor.pm 9 /opt/perl-5.20.0-RC1t/lib/site_perl/5.20.0/SWISH/Filter.pm 3 /opt/perl-5.20.0-RC1t/lib/site_perl/5.20.0/x86_64-linux-thread-multi/DateTime.pm 3 /opt/perl-5.20.0-RC1t/lib/site_perl/5.20.0/x86_64-linux-thread-multi/Gtk2/TrayIcon.pm 3 /opt/perl-5.20.0-RC1t/lib/site_perl/5.20.0/x86_64-linux-thread-multi/Moose.pm 8 /opt/perl-5.20.0-RC1t/lib/site_perl/5.20.0/x86_64-linux-thread-multi/XML/Parser/Expat.pm 3 And the problematic lines in these files: $ grep /opt/perl-5.20 /tmp/invalid-version-format.log |perl -nle 'm{ at (\S+) line (\d+)} and print "$1 $2"'|sort -u|perl -Mautodie -nle 'my($f,$l)=split; open my $fh, $f; for(1..$l-1) { <$fh> } chomp(my $c = <$fh>); print $c' use 5.006; use 5.006_001; use 5.008; use 5.008003; use 5.006; require 5.006; use 5.006_001; use Moose 0.94 (); use 5.005; use 5.008001; use 5.008; use 5.008003; require 5.004;
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 2.2k
On Mon May 26 12:46:59 2014, slaven@rezic.de wrote: Show quoted text
> Dana Ned 25. Svibanj 2014, 23:19:28, slaven@rezic.de reče:
> > Dana Uto 20. Svibanj 2014, 14:16:52, chorny reče:
> > > On Russian locale. If I set LANG=C, problem disappears. > > > Debian 7. > > > > > > # Failed test 'use Wx;' > > > # at t/01_load.t line 6. > > > # Tried to use 'Wx'. > > > # Error: Invalid version format (non-numeric data) at > > > /home/c/perl5/perlbrew/perls/20rc1i/lib/5.20.0/Tie/Handle.pm line > > > 3. > > > # BEGIN failed--compilation aborted at > > > /home/c/perl5/perlbrew/perls/20rc1i/lib/5.20.0/Tie/Handle.pm line > > > 3. > > > # Compilation failed in require at > > > /home/c/.cpan/build/Wx-0.9923-XUII6l/blib/lib/Wx.pm line 176. > > > # Compilation failed in require at t/01_load.t line 6. > > > # BEGIN failed--compilation aborted at t/01_load.t line 6. > > > Attempt to reload Wx.pm aborted. > > > Compilation failed in require at t/01_load.t line 8. > > > BEGIN failed--compilation aborted at t/01_load.t line 8. > > > # Looks like you planned 6 tests but ran 1. > > > # Looks like you failed 1 test of 1 run. > > > # Looks like your test exited with 255 just after 1. > > > > > > More data here: > > > http://www.cpantesters.org/cpan/report/fcc719b0-de76-11e3-b8e2- > > > 4dcc6dfca90a > > > > > > PASS 5.18.2 on same VM: > > > http://www.cpantesters.org/cpan/report/64f79210-e036-11e3-8976- > > > 76fc6dfca90a > > > > > > > > > https://rt.cpan.org/Ticket/Display.html?id=95808 > > > > > >
> > > > I saw these strange "Invalid version format" errors with perl 5.20.0- > > RC1, too. Probably LANG=de_DE.UTF-8 was iactive. At least the > > following distributions were affected: > > > > * BORUP/Gtk2-TrayIcon-0.06.tar.gz > > * KRYDE/Glib-Ex-ObjectBits-15.tar.gz > > * MUGENKEN/Net-OpenVPN-TrayIcon-v0.2.2.tar.gz > > * KARMAN/SWISH-Prog-0.75.tar.gz > > * JHALLOCK/Gapp-0.60.tar.gz > > * JHALLOCK/Lorem-0.22.tar.gz
>
It appears that these all have depdendencies on gtk+, and I run into problems when I try to get them onto my machine. It would be most helpful if someone who has any of these running on their machines could try blead on them with the patch I attached above at https://rt.perl.org/Ticket/Attachment/1294077/684389/0001-Try-this-for-perl-121930.patch -- Karl Williamson
To: perlbug-followup [...] perl.org, "OtherRecipients of perl Ticket #121930:;" [...] smtp.indra.com
Date: Mon, 26 May 2014 18:36:13 -0600
From: Karl Williamson <public [...] khwilliamson.com>
CC: perl5-porters [...] perl.org
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
Download (untitled) / with headers
text/plain 268b
On 05/26/2014 04:46 PM, Karl Williamson via RT wrote: Show quoted text
> * KRYDE/Glib-Ex-ObjectBits-15.tar.gz
I did find a machine that has gtk2, and tried this distribution on it, and could not get official blead to fail. I used an Austrian german locale whose radix is a comma.
To: Perl5 Porters <perl5-porters [...] perl.org>
Date: Tue, 27 May 2014 20:42:14 +0200
From: Alexander Hartmaier <alex.hartmaier [...] gmail.com>
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
CC: perlbug-followup [...] perl.org
Download (untitled) / with headers
text/plain 848b
On Tue, May 27, 2014 at 2:36 AM, Karl Williamson <public@khwilliamson.com> wrote:
Show quoted text
On 05/26/2014 04:46 PM, Karl Williamson via RT wrote:
* KRYDE/Glib-Ex-ObjectBits-15. tar.gz

I did find a machine that has gtk2, and tried this distribution on it, and could not get official blead to fail.  I used an Austrian german locale whose radix is a comma.
I just tried to install it as requirement for Padre on my notebook with 5.20 and got this failure.
My env looks like this (US keyboard and UI, Austrian date format, currency etc):
LANG=en_US.UTF-8
GDM_LANG=en_US
LANGUAGE=en
LC_PAPER=de_AT.UTF-8
LC_ADDRESS=de_AT.UTF-8
LC_MONETARY=de_AT.UTF-8
LC_NUMERIC=de_AT.UTF-8
LC_TELEPHONE=de_AT.UTF-8
LC_IDENTIFICATION=de_AT.UTF-8
LC_MEASUREMENT=de_AT.UTF-8
LC_TIME=de_AT.UTF-8
LC_NAME=de_AT.UTF-8

Anything I can do to help troubleshooting it?
To: Alexander Hartmaier <alex.hartmaier [...] gmail.com>, Perl5 Porters <perl5-porters [...] perl.org>
Date: Tue, 27 May 2014 12:59:52 -0600
From: Karl Williamson <public [...] khwilliamson.com>
CC: perlbug-followup [...] perl.org
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
Download (untitled) / with headers
text/plain 1.1k
On 05/27/2014 12:42 PM, Alexander Hartmaier wrote: Show quoted text
> On Tue, May 27, 2014 at 2:36 AM, Karl Williamson > <public@khwilliamson.com <mailto:public@khwilliamson.com>> wrote: > > On 05/26/2014 04:46 PM, Karl Williamson via RT wrote: > > * KRYDE/Glib-Ex-ObjectBits-15.__tar.gz > > > I did find a machine that has gtk2, and tried this distribution on > it, and could not get official blead to fail. I used an Austrian > german locale whose radix is a comma. > > I just tried to install it as requirement for Padre on my notebook with > 5.20 and got this failure. > My env looks like this (US keyboard and UI, Austrian date format, > currency etc): > LANG=en_US.UTF-8 > GDM_LANG=en_US > LANGUAGE=en > LC_PAPER=de_AT.UTF-8 > LC_ADDRESS=de_AT.UTF-8 > LC_MONETARY=de_AT.UTF-8 > LC_NUMERIC=de_AT.UTF-8 > LC_TELEPHONE=de_AT.UTF-8 > LC_IDENTIFICATION=de_AT.UTF-8 > LC_MEASUREMENT=de_AT.UTF-8 > LC_TIME=de_AT.UTF-8 > LC_NAME=de_AT.UTF-8 > > Anything I can do to help troubleshooting it?
Yes please, just see if this patch fixes it, and if not we can go from there. https://rt.perl.org/Ticket/Attachment/1294077/684389/0001-Try-this-for-perl-121930.patch
From: Alexander Hartmaier <alex.hartmaier [...] gmail.com>
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
CC: Perl5 Porters <perl5-porters [...] perl.org>, perlbug-followup [...] perl.org
To: Karl Williamson <public [...] khwilliamson.com>
Date: Tue, 27 May 2014 21:53:42 +0200
On Tue, May 27, 2014 at 8:59 PM, Karl Williamson <public@khwilliamson.com> wrote:
Show quoted text
On 05/27/2014 12:42 PM, Alexander Hartmaier wrote:
On Tue, May 27, 2014 at 2:36 AM, Karl Williamson
<public@khwilliamson.com <mailto:public@khwilliamson.com>> wrote:

    On 05/26/2014 04:46 PM, Karl Williamson via RT wrote:

        * KRYDE/Glib-Ex-ObjectBits-15.__ tar.gz



    I did find a machine that has gtk2, and tried this distribution on
    it, and could not get official blead to fail.  I used an Austrian
    german locale whose radix is a comma.

I just tried to install it as requirement for Padre on my notebook with
5.20 and got this failure.
My env looks like this (US keyboard and UI, Austrian date format,
currency etc):
LANG=en_US.UTF-8
GDM_LANG=en_US
LANGUAGE=en
LC_PAPER=de_AT.UTF-8
LC_ADDRESS=de_AT.UTF-8
LC_MONETARY=de_AT.UTF-8
LC_NUMERIC=de_AT.UTF-8
LC_TELEPHONE=de_AT.UTF-8
LC_IDENTIFICATION=de_AT.UTF-8
LC_MEASUREMENT=de_AT.UTF-8
LC_TIME=de_AT.UTF-8
LC_NAME=de_AT.UTF-8

Anything I can do to help troubleshooting it?

Yes please, just see if this patch fixes it, and if not we can go from there.

https://rt.perl.org/Ticket/ Attachment/1294077/684389/ 0001-Try-this-for-perl-121930. patch

Is this a patch against Perl?
Don't tell me I have to wait until 5.20.1 to use 5.20 on my dev notebook for Padre...
And now I run into perlbrew's RT#95841 and had to create a tarball from the patched 5.20 dir to be able to use perlbrew.

Two tests failed:
t/porting/customized .......................................... # Failed test 31 - SHA for vutil.c matches stashed SHA at porting/customized.t line 103
#      got "69dd75c528eb0a2675d0701e42273cb4d9f22945"
# expected "238196173eb90dea388443213a4b968323474874"
FAILED at test 31
cpan/Time-HiRes/t/itimer ...................................... #   Failed test at t/itimer.t line 60.
FAILED at test 2

The first one is clear, the sha hash changed because we patched the file, the second isn't (to me).

I installed it anyways and the Wx tests still fail with the same error.
From: Karl Williamson <public [...] khwilliamson.com>
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
To: Alexander Hartmaier <alex.hartmaier [...] gmail.com>, Perl5 Porters <perl5-porters [...] perl.org>, "perlbug-followup [...] perl.org" <perlbug-followup [...] perl.org>
Date: Tue, 27 May 2014 14:33:48 -0600
Download (untitled) / with headers
text/plain 2.9k
On 05/27/2014 01:53 PM, Alexander Hartmaier wrote: Show quoted text
> On Tue, May 27, 2014 at 8:59 PM, Karl Williamson > <public@khwilliamson.com <mailto:public@khwilliamson.com>> wrote: > > On 05/27/2014 12:42 PM, Alexander Hartmaier wrote: > > On Tue, May 27, 2014 at 2:36 AM, Karl Williamson > <public@khwilliamson.com <mailto:public@khwilliamson.com> > <mailto:public@khwilliamson.__com > <mailto:public@khwilliamson.com>>> wrote: > > On 05/26/2014 04:46 PM, Karl Williamson via RT wrote: > > * KRYDE/Glib-Ex-ObjectBits-15.____tar.gz > > > > I did find a machine that has gtk2, and tried this > distribution on > it, and could not get official blead to fail. I used an > Austrian > german locale whose radix is a comma. > > I just tried to install it as requirement for Padre on my > notebook with > 5.20 and got this failure. > My env looks like this (US keyboard and UI, Austrian date format, > currency etc): > LANG=en_US.UTF-8 > GDM_LANG=en_US > LANGUAGE=en > LC_PAPER=de_AT.UTF-8 > LC_ADDRESS=de_AT.UTF-8 > LC_MONETARY=de_AT.UTF-8 > LC_NUMERIC=de_AT.UTF-8 > LC_TELEPHONE=de_AT.UTF-8 > LC_IDENTIFICATION=de_AT.UTF-8 > LC_MEASUREMENT=de_AT.UTF-8 > LC_TIME=de_AT.UTF-8 > LC_NAME=de_AT.UTF-8 > > Anything I can do to help troubleshooting it? > > > Yes please, just see if this patch fixes it, and if not we can go > from there. > > https://rt.perl.org/Ticket/__Attachment/1294077/684389/__0001-Try-this-for-perl-121930.__patch > <https://rt.perl.org/Ticket/Attachment/1294077/684389/0001-Try-this-for-perl-121930.patch> > > > Is this a patch against Perl? > Don't tell me I have to wait until 5.20.1 to use 5.20 on my dev notebook > for Padre...
Afraid so, or use 5.20 with whatever patch we finally come up with. Show quoted text
> And now I run into perlbrew's RT#95841 and had to create a tarball from > the patched 5.20 dir to be able to use perlbrew. > > Two tests failed: > t/porting/customized .......................................... # Failed > test 31 - SHA for vutil.c matches stashed SHA at porting/customized.t > line 103 > # got "69dd75c528eb0a2675d0701e42273cb4d9f22945" > # expected "238196173eb90dea388443213a4b968323474874" > FAILED at test 31 > cpan/Time-HiRes/t/itimer ...................................... # > Failed test at t/itimer.t line 60. > FAILED at test 2 > > The first one is clear, the sha hash changed because we patched the > file, the second isn't (to me).
HiRes notoriously fails reasonably often in smokers due to load issues. It is testing timings, and when run again, passes. Show quoted text
> > I installed it anyways and the Wx tests still fail with the same error.
Darn. Could you either give me temporary ssh access to your system, or work with me via skype or irc chat so that I can guide you in debugging the issue?
From: Alexander Hartmaier <alex.hartmaier [...] gmail.com>
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
CC: Perl5 Porters <perl5-porters [...] perl.org>, "perlbug-followup [...] perl.org" <perlbug-followup [...] perl.org>
To: Karl Williamson <public [...] khwilliamson.com>
Date: Wed, 28 May 2014 10:27:31 +0200
Download (untitled) / with headers
text/plain 3.2k
On Tue, May 27, 2014 at 10:33 PM, Karl Williamson <public@khwilliamson.com> wrote:
Show quoted text
On 05/27/2014 01:53 PM, Alexander Hartmaier wrote:
On Tue, May 27, 2014 at 8:59 PM, Karl Williamson
<public@khwilliamson.com <mailto:public@khwilliamson.com>> wrote:

    On 05/27/2014 12:42 PM, Alexander Hartmaier wrote:

        On Tue, May 27, 2014 at 2:36 AM, Karl Williamson
        <public@khwilliamson.com <mailto:public@khwilliamson.com>
        <mailto:public@khwilliamson.__ com

        <mailto:public@khwilliamson.com>>> wrote:

             On 05/26/2014 04:46 PM, Karl Williamson via RT wrote:

                 * KRYDE/Glib-Ex-ObjectBits-15.__ __tar.gz




             I did find a machine that has gtk2, and tried this
        distribution on
             it, and could not get official blead to fail.  I used an
        Austrian
             german locale whose radix is a comma.

        I just tried to install it as requirement for Padre on my
        notebook with
        5.20 and got this failure.
        My env looks like this (US keyboard and UI, Austrian date format,
        currency etc):
        LANG=en_US.UTF-8
        GDM_LANG=en_US
        LANGUAGE=en
        LC_PAPER=de_AT.UTF-8
        LC_ADDRESS=de_AT.UTF-8
        LC_MONETARY=de_AT.UTF-8
        LC_NUMERIC=de_AT.UTF-8
        LC_TELEPHONE=de_AT.UTF-8
        LC_IDENTIFICATION=de_AT.UTF-8
        LC_MEASUREMENT=de_AT.UTF-8
        LC_TIME=de_AT.UTF-8
        LC_NAME=de_AT.UTF-8

        Anything I can do to help troubleshooting it?


    Yes please, just see if this patch fixes it, and if not we can go
    from there.

    https://rt.perl.org/Ticket/__ Attachment/1294077/684389/__ 0001-Try-this-for-perl-121930. __patch

    <https://rt.perl.org/Ticket/Attachment/1294077/684389/0001-Try-this-for-perl-121930.patch>


Is this a patch against Perl?
Don't tell me I have to wait until 5.20.1 to use 5.20 on my dev notebook
for Padre...

Afraid so, or use 5.20 with whatever patch we finally come up with.



And now I run into perlbrew's RT#95841 and had to create a tarball from
the patched 5.20 dir to be able to use perlbrew.

Two tests failed:
t/porting/customized .............................. ............ # Failed
test 31 - SHA for vutil.c matches stashed SHA at porting/customized.t
line 103
#      got " 69dd75c528eb0a2675d0701e42273c b4d9f22945"
# expected " 238196173eb90dea388443213a4b96 8323474874"
FAILED at test 31
cpan/Time-HiRes/t/itimer .............................. ........ #
Failed test at t/itimer.t line 60.
FAILED at test 2

The first one is clear, the sha hash changed because we patched the
file, the second isn't (to me).

HiRes notoriously fails reasonably often in smokers due to load issues.  It is testing timings, and when run again, passes.


I installed it anyways and the Wx tests still fail with the same error.

Darn.  Could you either give me temporary ssh access to your system, or work with me via skype or irc chat so that I can guide you in debugging the issue?

It's my company notebook inside the company network, access isn't allowed and also technically not possible but I'm on irc, my nickname is abraxxa.
CC: Perl5 Porters <perl5-porters [...] perl.org>, "perlbug-followup [...] perl.org" <perlbug-followup [...] perl.org>, kaffeetisch [...] gmx.de
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
From: Karl Williamson <public [...] khwilliamson.com>
Date: Mon, 02 Jun 2014 10:52:55 -0600
To: Alexander Hartmaier <alex.hartmaier [...] gmail.com>
Download (untitled) / with headers
text/plain 251b
For those people who can easily reproduce this problem, there is a possibility that the version of Perl at http://perl5.git.perl.org/perl.git/shortlog/refs/heads/smoke-me/khw-locale will fix it. I would appreciate it if someone would try it out.
To: Karl Williamson <public [...] khwilliamson.com>
Date: Tue, 3 Jun 2014 09:59:21 +0200
From: Alexander Hartmaier <alex.hartmaier [...] gmail.com>
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
CC: Perl5 Porters <perl5-porters [...] perl.org>, "perlbug-followup [...] perl.org" <perlbug-followup [...] perl.org>, kaffeetisch [...] gmx.de
Download (untitled) / with headers
text/plain 1.3k
On Mon, Jun 2, 2014 at 6:52 PM, Karl Williamson <public@khwilliamson.com> wrote:
Show quoted text
For those people who can easily reproduce this problem, there is a possibility that the version of Perl at

http://perl5.git.perl.org/ perl.git/shortlog/refs/heads/ smoke-me/khw-locale

will fix it.  I would appreciate it if someone would try it out.
I tried to build it and got:
Can't locate Exporter.pm in @INC (you may need to install the Exporter module) (@INC contains: /home/ahartmai/perl5/git/perl/cpan/AutoLoader/lib /home/ahartmai/perl5/git/perl/dist/Carp/lib /home/ahartmai/perl5/git/perl/dist/Cwd /home/ahartmai/perl5/git/perl/dist/Cwd/lib /home/ahartmai/perl5/git/perl/dist/ExtUtils-Command/lib /home/ahartmai/perl5/git/perl/dist/ExtUtils-Install/lib /home/ahartmai/perl5/git/perl/cpan/ExtUtils-MakeMaker/lib /home/ahartmai/perl5/git/perl/dist/ExtUtils-Manifest/lib /home/ahartmai/perl5/git/perl/cpan/File-Path/lib /home/ahartmai/perl5/git/perl/ext/re /home/ahartmai/perl5/git/perl/dist/Term-ReadLine/lib /home/ahartmai/perl5/git/perl/lib .).
BEGIN failed--compilation aborted.
Failed to build miniperl. Please run make minitest
make: *** [lib/buildcustomize.pl] Error 1

I tried building it using
perlbrew install file://home/ahartmai/perl5/git/perl-5.20.0-khw-locale.tar.bz2 --as 20-khw-locale -Duserelocatableinc -Duse64bitall -Dusethreads -Dusedevel
after creating a tar.bz2 from the git checkout.
Full build log attached.
Download build.perl-5.20.log
text/x-log 75.8k

Message body is not shown because sender requested not to inline it.

To: Alexander Hartmaier <alex.hartmaier [...] gmail.com>
CC: Perl5 Porters <perl5-porters [...] perl.org>, "perlbug-followup [...] perl.org" <perlbug-followup [...] perl.org>, kaffeetisch [...] gmx.de
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
From: Karl Williamson <public [...] khwilliamson.com>
Date: Thu, 05 Jun 2014 12:10:43 -0600
Download (untitled) / with headers
text/plain 765b
On 06/03/2014 01:59 AM, Alexander Hartmaier wrote: Show quoted text
> On Mon, Jun 2, 2014 at 6:52 PM, Karl Williamson <public@khwilliamson.com > <mailto:public@khwilliamson.com>> wrote: > > For those people who can easily reproduce this problem, there is a > possibility that the version of Perl at > > http://perl5.git.perl.org/__perl.git/shortlog/refs/heads/__smoke-me/khw-locale > <http://perl5.git.perl.org/perl.git/shortlog/refs/heads/smoke-me/khw-locale> > > will fix it. I would appreciate it if someone would try it out. > > I tried to build it and got: > Can't locate Exporter.pm in @INC (you may need to install the Exporter > module)
I don't know offhand what's going on here. But the changes are now in blead, and hopefully you can build that.
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
CC: Perl5 Porters <perl5-porters [...] perl.org>, "perlbug-followup [...] perl.org" <perlbug-followup [...] perl.org>, kaffeetisch [...] gmx.de
To: Karl Williamson <public [...] khwilliamson.com>
Date: Fri, 6 Jun 2014 10:55:01 +0200
From: Alexander Hartmaier <alex.hartmaier [...] gmail.com>
Download (untitled) / with headers
text/plain 15.8k

Message body is not shown because it is too large.

Download (untitled) / with headers
text/html 17.7k

Message body is not shown because it is too large.

Date: Fri, 06 Jun 2014 22:34:13 +0200
From: Torsten Schoenfeld <kaffeetisch [...] gmx.de>
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
CC: "perlbug-followup [...] perl.org" <perlbug-followup [...] perl.org>
Download (untitled) / with headers
text/plain 326b
On 05.06.2014 20:10, Karl Williamson wrote: Show quoted text
> I don't know offhand what's going on here. But the changes are now in > blead, and hopefully you can build that.
I also still see the failure # perl -e'use Gtk3; BEGIN{ Gtk3::init (); } use 5.8.0;' Invalid version format (non-numeric data) at -e line 1. with today's blead.
Date: Fri, 06 Jun 2014 15:12:36 -0600
From: Karl Williamson <public [...] khwilliamson.com>
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
To: Torsten Schoenfeld <kaffeetisch [...] gmx.de>, Alexander Hartmaier <alex.hartmaier [...] gmail.com>
CC: Perl5 Porters <perl5-porters [...] perl.org>
Download (untitled) / with headers
text/plain 776b
On 06/06/2014 02:34 PM, Torsten Schoenfeld wrote: Show quoted text
> On 05.06.2014 20:10, Karl Williamson wrote:
>> I don't know offhand what's going on here. But the changes are now in >> blead, and hopefully you can build that.
> > I also still see the failure > > # perl -e'use Gtk3; BEGIN{ Gtk3::init (); } use 5.8.0;' > Invalid version format (non-numeric data) at -e line 1. > > with today's blead. >
If you are somewhat comfortable with using gdb, you could give me some information that would be helpful. First of all, make sure your perl is compiled with -DDEBUGGING, then run perl with the -DL parameter and capture the output to send to me. Second, run it with gdb, and set a breakpoint gdb --args -Ilib CMD_THAT_FAILS b Perl_croak r bt and send me the output
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
To: "perlbug-followup [...] perl.org" <perlbug-followup [...] perl.org>
Date: Sat, 07 Jun 2014 00:13:50 +0200
From: Torsten Schoenfeld <kaffeetisch [...] gmx.de>
Download (untitled) / with headers
text/plain 1.4k
On 06.06.2014 23:12, Karl Williamson wrote: Show quoted text
> First of all, make sure your perl is compiled with -DDEBUGGING, then run > perl with the -DL parameter and capture the output to send to me.
Specifying "-DL" doesn't produce any extra output. (Other "-D" flags do produce additional output.) Show quoted text
> Second, run it with gdb, and set a breakpoint > gdb --args -Ilib CMD_THAT_FAILS > b Perl_croak > r > bt
Here's the backtrace for C<< perl -e'use Gtk3; BEGIN{ Gtk3::init (); } use 5.8.0;' >>: #0 Perl_croak (pat=pat@entry=0x66d172 "%s") at util.c:1685 #1 0x00000000004c536d in Perl_scan_version (s=s@entry=0x1536610 "5,015", rv=rv@entry=0x1443f18, qv=false) at vutil.c:290 #2 0x00000000004c5460 in Perl_upg_version (ver=ver@entry=0x1443f18, qv=<optimized out>, qv@entry=false) at vutil.c:682 #3 0x0000000000439a12 in S_enable_feature_bundle (ver=0x8d2de8) at feature.h:134 #4 Perl_utilize (aver=<optimized out>, floor=<optimized out>, version=<optimized out>, idop=<optimized out>, arg=<optimized out>) at op.c:5457 #5 0x000000000047dda0 in Perl_yyparse (gramtype=gramtype@entry=258) at perly.y:398 #6 0x000000000044577d in S_parse_body (env=env@entry=0x0, xsinit=xsinit@entry=0x41e960 <xs_init>) at perl.c:2290 #7 0x0000000000446a72 in perl_parse (my_perl=<optimized out>, xsinit=xsinit@entry=0x41e960 <xs_init>, argc=2, argv=0x7fffffffe1b8, env=env@entry=0x0) at perl.c:1599 #8 0x000000000041e7e0 in main (argc=2, argv=0x7fffffffe1b8, env=0x7fffffffe1d0) at perlmain.c:112
To: "perlbug-followup [...] perl.org" <perlbug-followup [...] perl.org>
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
From: Torsten Schoenfeld <kaffeetisch [...] gmx.de>
Date: Sat, 07 Jun 2014 00:20:41 +0200
Download (untitled) / with headers
text/plain 1.1k
On 07.06.2014 00:13, Torsten Schoenfeld wrote: Show quoted text
>> Second, run it with gdb, and set a breakpoint >> gdb --args -Ilib CMD_THAT_FAILS >> b Perl_croak >> r >> bt
> > Here's the backtrace for C<< perl -e'use Gtk3; BEGIN{ Gtk3::init (); } > use 5.8.0;' >>: > > [...]
Now with "-O0": #0 Perl_croak (pat=0x5f81c8 "%s") at util.c:1687 #1 0x00000000004c787a in Perl_scan_version (s=0x1456df0 "5,015", rv=0x13cd3f8, qv=false) at vutil.c:290 #2 0x00000000004c8c1f in Perl_upg_version (ver=0x13cd3f8, qv=false) at vutil.c:682 #3 0x000000000041d65f in S_enable_feature_bundle (ver=0x85dcd8) at feature.h:134 #4 0x0000000000428c7c in Perl_utilize (aver=1, floor=37, version=0x0, idop=0x862c78, arg=0x0) at op.c:5457 #5 0x000000000047ecfb in Perl_yyparse (gramtype=258) at perly.y:398 #6 0x00000000004405dd in S_parse_body (env=0x0, xsinit=0x41d2ab <xs_init>) at perl.c:2290 #7 0x000000000043f446 in perl_parse (my_perl=0x83c010, xsinit=0x41d2ab <xs_init>, argc=2, argv=0x7fffffffe1b8, env=0x0) at perl.c:1599 #8 0x000000000041d20d in main (argc=2, argv=0x7fffffffe1b8, env=0x7fffffffe1d0) at perlmain.c:112
Date: Sat, 07 Jun 2014 15:45:54 -0600
From: Karl Williamson <public [...] khwilliamson.com>
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
To: Torsten Schoenfeld <kaffeetisch [...] gmx.de>, "perlbug-followup [...] perl.org" <perlbug-followup [...] perl.org>
Download (untitled) / with headers
text/plain 4.5k
On 06/06/2014 04:20 PM, Torsten Schoenfeld wrote: Show quoted text
> On 07.06.2014 00:13, Torsten Schoenfeld wrote:
>>> Second, run it with gdb, and set a breakpoint >>> gdb --args -Ilib CMD_THAT_FAILS >>> b Perl_croak >>> r >>> bt
>> >> Here's the backtrace for C<< perl -e'use Gtk3; BEGIN{ Gtk3::init (); } >> use 5.8.0;' >>: >> >> [...]
> > Now with "-O0":
Thanks for finding that. Show quoted text
> > #0 Perl_croak (pat=0x5f81c8 "%s") at util.c:1687 > #1 0x00000000004c787a in Perl_scan_version (s=0x1456df0 "5,015", > rv=0x13cd3f8, qv=false) at vutil.c:290 > #2 0x00000000004c8c1f in Perl_upg_version (ver=0x13cd3f8, qv=false) > at vutil.c:682 > #3 0x000000000041d65f in S_enable_feature_bundle (ver=0x85dcd8) > at feature.h:134 > #4 0x0000000000428c7c in Perl_utilize (aver=1, floor=37, version=0x0, > idop=0x862c78, arg=0x0) at op.c:5457 > #5 0x000000000047ecfb in Perl_yyparse (gramtype=258) at perly.y:398 > #6 0x00000000004405dd in S_parse_body (env=0x0, xsinit=0x41d2ab <xs_init>) > at perl.c:2290 > #7 0x000000000043f446 in perl_parse (my_perl=0x83c010, > xsinit=0x41d2ab <xs_init>, argc=2, argv=0x7fffffffe1b8, env=0x0) > at perl.c:1599 > #8 0x000000000041d20d in main (argc=2, argv=0x7fffffffe1b8, > env=0x7fffffffe1d0) at perlmain.c:112 >
I believe I have now found the problem. Your initial analysis would have been sufficient, should I have been astute enough. It is this: "Gtk3::init is a wrapper around the C function gtk_init which for this bug boils down to setlocale (LC_ALL, ""), see <https://git.gnome.org/browse/gtk+/tree/gtk/gtkmain.c#n622>." I'm pretty confident that the attached patch will cause the immediate problem to go away, but it isn't the real correct solution. Perl has long thought in various places that it knew what the program's underlying locale is. (And all programs have an underlying locale.) What happened in 5.20 is that the number of such places increased (where Perl thought it knew the locale was), and ran afoul of this code in gnome which sets the locale, without Perl knowing about it. This is apparently not common, or otherwise we would have gotten many more reports, and over the years. One solution is to have a setlocale wrapper that intercepts all calls to the real setlocale, just as POSIX::setlocale() does for pure perl calls. That would require messing with the linker, which I'm told may not be feasible portably across different platforms. leont suggested having a setlocale() in Perl that would be loaded ahead of the libc version, but then we have to be able to call the real setlocale from the wrapper, and that would have portability issues Another solution is for Perl to change to avoid all assumptions about what the locale is, and to set the locale unconditionally to what it should be around every operation that is locale-affected. That's too slow. It is impossible to change the locale from pure perl without Perl's updating its info . Therefore, another solution is for Perl to update its locale knowledge upon return from any XS function. The extra work in the usual case of said function not diddling with the locale would be a single setlocale call that returns the current state and a compare and jump with the last-known state. Another solution is to "solve" this via documentation. Tell XS code writers that it is a bad idea generally to change the locale, but if they do, it should be done through the POSIX::setlocale interface. But we can't tell this to foreign libraries, like gtk. But as I said, this has long been an issue in Perl, just the number of instances where it is a problem increased in v5.20. So the problem existed to a lesser extent in previous Perls, and a grep of cpan shows a bunch of modules look like they handled it this way: require Gtk2; Gtk2->disable_setlocale; # leave LC_NUMERIC alone for version nums my $have_display = Gtk2->init_check; It may be that we document that XS writers have to do something with disabling or restoring the locales around calls to alien libraries. Suggestions welcome. The cpan grep I used to find calls to the libc setlocale is below. It returned 56 distros, many are false positives. The only results I know about that wouldn't be in it are if 'setlocale' is last on the line and its parentheses are on the next line, or if there is a comment between the setlocale and its parentheses. I think either of those is unlikely http://grep.cpan.me/?q=%28^|[^_%3A]%29setlocale\s*\%28%28%24|[^%29]%29+-file%3A%28config|Configure|Changes|.*\.%28t|cgi|log|pod|html|a|pl|pm|PL%29%24%29

Message body is not shown because sender requested not to inline it.

To: Karl Williamson <public [...] khwilliamson.com>, Torsten Schoenfeld <kaffeetisch [...] gmx.de>, "perlbug-followup [...] perl.org" <perlbug-followup [...] perl.org>
Subject: RE: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
From: bulk 88 <bulk88 [...] hotmail.com>
Date: Sat, 7 Jun 2014 18:12:27 -0400
Download (untitled) / with headers
text/plain 1.1k
---------------------------------------- Show quoted text
> Date: Sat, 7 Jun 2014 15:45:54 -0600 > From: public@khwilliamson.com > To: kaffeetisch@gmx.de; perlbug-followup@perl.org > Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz > > > It may be that we document that XS writers have to do something with > disabling or restoring the locales around calls to alien libraries.
I think that is only choice. GUI libraries can seriously infect "normal" assumptions about OS design. Event loops, signals, handle states, timers, what keyboard key presses are, OS threads (such as running C callbacks/C++ virtual method calls in random thread pool threads). It something that needs to be fixed in Wx the Perl module, not in the core. If I understand correctly, this is an issue where a C lib internal global is changed by GTK, but Perl's cached copy of that internal global isn't updated, since the C lib has no way to register a handler to be called when the locale is changed. Polling is slow and probably unacceptable. An API in GTK for a list of C callbacks to call when changing the locale would be nice, but im not sure it can be convinced to happen on the GTK side.
Subject: Invalid version format (non-numeric data) at /usr/share/perl5/core_perl/File/Copy.pm line 10.
To: perlbug [...] perl.org
From: Michael Kogan <michael.kogan [...] gmx.net>
Date: Sun, 15 Jun 2014 18:15:41 +0200
Download (untitled) / with headers
text/plain 4.3k
To: perlbug@perl.org
Cc: nobody
Message-Id: <5.20.0_25922_1402848368@photon-desktop>
Reply-To: michael.kogan@gmx.net
From: michael.kogan@gmx.net
Subject: Invalid version format (non-numeric data) at /usr/share/perl5/core_perl/File/Copy.pm line 10.


This is a bug report for perl from michael.kogan@gmx.net,
generated with the help of perlbug 1.40 running under perl 5.20.0.


-----------------------------------------------------------------
[Please describe your issue here]

Running any application which is using File::Copy gives following
output:

Invalid version format (non-numeric data) at
/usr/share/perl5/core_perl/File/Copy.pm line 10.
BEGIN failed--compilation aborted at
/usr/share/perl5/core_perl/File/Copy.pm line 10.

The issue seems to be related to
http://search.cpan.org/~rjbs/perl-5.20.0/pod/perldelta.pod#Locale_decimal_point_character_no_longer_leaks_outside_of_use%C2%A0locale_scope

Bug report on the Arch Linux bug tracker:
https://bugs.archlinux.org/task/40718

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=library
    severity=high
    module=File::Copy
---
Site configuration information for perl 5.20.0:

Configured by nobody at Wed May 28 16:49:00 CEST 2014.

Summary of my perl5 (revision 5 version 20 subversion 0) configuration:
  
  Platform:
    osname=linux, osvers=3.14.2-1-arch, archname=x86_64-linux-thread-multi
    uname='linux mnt-chroots-arch-extra-x86_64-flo-64 3.14.2-1-arch #1 smp preempt sun apr 27 11:28:44 cest 2014 x86_64 gnulinux '
    config_args='-des -Dusethreads -Duseshrplib -Doptimize=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -Dprefix=/usr -Dvendorprefix=/usr -Dprivlib=/usr/share/perl5/core_perl -Darchlib=/usr/lib/perl5/core_perl -Dsitelib=/usr/share/perl5/site_perl -Dsitearch=/usr/lib/perl5/site_perl -Dvendorlib=/usr/share/perl5/vendor_perl -Dvendorarch=/usr/lib/perl5/vendor_perl -Dscriptdir=/usr/bin/core_perl -Dsitescript=/usr/bin/site_perl -Dvendorscript=/usr/bin/vendor_perl -Dinc_version_list=none -Dman1ext=1perl -Dman3ext=3perl -Dcccdlflags='-fPIC' -Dlddlflags=-shared -Wl,-O1,--sort-common,--as-needed,-z,relro -Dldflags=-Wl,-O1,--sort-common,--as-needed,-z,relro'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.9.0 20140507 (prerelease)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags ='-Wl,-O1,--sort-common,--as-needed,-z,relro -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/include-fixed /usr/lib /lib/../lib /usr/lib/../lib /lib /lib64 /usr/lib64
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=libc-2.19.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.19'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE'
    cccdlflags='-fPIC', lddlflags='-shared -Wl,-O1,--sort-common,--as-needed,-z,relro -L/usr/local/lib -fstack-protector'


---
@INC for perl 5.20.0:
    /usr/lib/perl5/site_perl
    /usr/share/perl5/site_perl
    /usr/lib/perl5/vendor_perl
    /usr/share/perl5/vendor_perl
    /usr/lib/perl5/core_perl
    /usr/share/perl5/core_perl
    .

---
Environment for perl 5.20.0:
    HOME=/home/photon
    LANG=de_DE.utf8
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/vendor_perl:/usr/bin/core_perl
    PERL_BADLANG (unset)
    SHELL=/bin/bash

RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.3k
On Sun Jun 15 09:16:07 2014, michael.kogan@gmx.net wrote: Show quoted text
> To: perlbug@perl.org > Cc: nobody > Message-Id: <5.20.0_25922_1402848368@photon-desktop> > Reply-To: michael.kogan@gmx.net > From: michael.kogan@gmx.net > Subject: Invalid version format (non-numeric data) at > /usr/share/perl5/core_perl/File/Copy.pm line 10. > > > This is a bug report for perl from michael.kogan@gmx.net, > generated with the help of perlbug 1.40 running under perl 5.20.0. > > > ----------------------------------------------------------------- > [Please describe your issue here] > > Running any application which is using File::Copy gives following > output: > > Invalid version format (non-numeric data) at > /usr/share/perl5/core_perl/File/Copy.pm line 10. > BEGIN failed--compilation aborted at > /usr/share/perl5/core_perl/File/Copy.pm line 10. > > The issue seems to be related to > http://search.cpan.org/~rjbs/perl- > 5.20.0/pod/perldelta.pod#Locale_decimal_point_character_no_longer_leaks_outside_of_use%C2%A0locale_scope > > Bug report on the Arch Linux bug tracker: > https://bugs.archlinux.org/task/40718 >
Would it be possible for you to provide the full error output as well as the output of 'perl -V' from the machine on which you reproduce this error? (My impression is that the perl -V output which your 'perlbug' generated is from a different machine.) Thank you very much. Jim Keenan
To: perlbug-followup [...] perl.org
Subject: Re: [perl #122105] Invalid version format (non-numeric data) at /usr/share/perl5/core_perl/File/Copy.pm line 10.
Date: Mon, 16 Jun 2014 07:51:05 +0200
From: Michael Kogan <michael.kogan [...] gmx.net>
Download (untitled) / with headers
text/plain 5.7k
Of course. The output of Shutter:

--------
$ shutter
Invalid version format (non-numeric data) at /usr/share/perl5/core_perl/File/Copy.pm line 10.
BEGIN failed--compilation aborted at /usr/share/perl5/core_perl/File/Copy.pm line 10.
Compilation failed in require at /usr/bin/shutter line 56.
BEGIN failed--compilation aborted at /usr/bin/shutter line 56.
--------

The output of perl -V:

--------
$ perl -V
Summary of my perl5 (revision 5 version 20 subversion 0) configuration:
  
  Platform:
    osname=linux, osvers=3.14.2-1-arch, archname=x86_64-linux-thread-multi
    uname='linux mnt-chroots-arch-extra-x86_64-flo-64 3.14.2-1-arch #1 smp preempt sun apr 27 11:28:44 cest 2014 x86_64 gnulinux '
    config_args='-des -Dusethreads -Duseshrplib -Doptimize=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -Dprefix=/usr -Dvendorprefix=/usr -Dprivlib=/usr/share/perl5/core_perl -Darchlib=/usr/lib/perl5/core_perl -Dsitelib=/usr/share/perl5/site_perl -Dsitearch=/usr/lib/perl5/site_perl -Dvendorlib=/usr/share/perl5/vendor_perl -Dvendorarch=/usr/lib/perl5/vendor_perl -Dscriptdir=/usr/bin/core_perl -Dsitescript=/usr/bin/site_perl -Dvendorscript=/usr/bin/vendor_perl -Dinc_version_list=none -Dman1ext=1perl -Dman3ext=3perl -Dcccdlflags='-fPIC' -Dlddlflags=-shared -Wl,-O1,--sort-common,--as-needed,-z,relro -Dldflags=-Wl,-O1,--sort-common,--as-needed,-z,relro'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.9.0 20140507 (prerelease)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags ='-Wl,-O1,--sort-common,--as-needed,-z,relro -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/include-fixed /usr/lib /lib/../lib /usr/lib/../lib /lib /lib64 /usr/lib64
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=libc-2.19.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.19'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE'
    cccdlflags='-fPIC', lddlflags='-shared -Wl,-O1,--sort-common,--as-needed,-z,relro -L/usr/local/lib -fstack-protector'


Characteristics of this binary (from libperl):
  Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
                        PERL_DONT_CREATE_GVSV
                        PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
                        PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
                        PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV
                        USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS
                        USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
                        USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO
                        USE_PERL_ATOF USE_REENTRANT_API
  Built under linux
  Compiled at May 28 2014 16:49:33
  @INC:
    /usr/lib/perl5/site_perl
    /usr/share/perl5/site_perl
    /usr/lib/perl5/vendor_perl
    /usr/share/perl5/vendor_perl
    /usr/lib/perl5/core_perl
    /usr/share/perl5/core_perl
--------

Line 10 of Copy.pm:

--------
use 5.006;
--------
    .
What is your concern about the machine being not the same? Maybe something went wrong during some perl package updates and I have a mixture of different versions on my system? By the way, several other perl modules are affected as observed by another user: https://bbs.archlinux.org/viewtopic.php?pid=1422917#p1422917

Thanks for the quick reply,
Michael


2014-06-16 3:13 GMT+02:00 James E Keenan via RT <perlbug-followup@perl.org>:
Show quoted text
On Sun Jun 15 09:16:07 2014, michael.kogan@gmx.net wrote:
> To: perlbug@perl.org
> Cc: nobody
> Message-Id: <5.20.0_25922_1402848368@photon-desktop>
> Reply-To: michael.kogan@gmx.net
> From: michael.kogan@gmx.net
> Subject: Invalid version format (non-numeric data) at
> /usr/share/perl5/core_perl/File/Copy.pm line 10.
>
>
> This is a bug report for perl from michael.kogan@gmx.net,
> generated with the help of perlbug 1.40 running under perl 5.20.0.
>
>
> -----------------------------------------------------------------
> [Please describe your issue here]
>
> Running any application which is using File::Copy gives following
> output:
>
> Invalid version format (non-numeric data) at
> /usr/share/perl5/core_perl/File/Copy.pm line 10.
> BEGIN failed--compilation aborted at
> /usr/share/perl5/core_perl/File/Copy.pm line 10.
>
> The issue seems to be related to
> http://search.cpan.org/~rjbs/perl-
> 5.20.0/pod/perldelta.pod#Locale_decimal_point_character_no_longer_leaks_outside_of_use%C2%A0locale_scope
>
> Bug report on the Arch Linux bug tracker:
> https://bugs.archlinux.org/task/40718
>

Would it be possible for you to provide the full error output as well as the output of 'perl -V' from the machine on which you reproduce this error?

(My impression is that the perl -V output which your 'perlbug' generated is from a different machine.)

Thank you very much.
Jim Keenan


RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 991b
On Sun Jun 15 09:16:07 2014, michael.kogan@gmx.net wrote: Show quoted text
> Running any application which is using File::Copy gives following > output: > > Invalid version format (non-numeric data) at > /usr/share/perl5/core_perl/File/Copy.pm line 10. > BEGIN failed--compilation aborted at > /usr/share/perl5/core_perl/File/Copy.pm line 10. > > The issue seems to be related to > http://search.cpan.org/~rjbs/perl- > 5.20.0/pod/perldelta.pod#Locale_decimal_point_character_no_longer_leaks_outside_of_use%C2%A0locale_scope > > Bug report on the Arch Linux bug tracker: > https://bugs.archlinux.org/task/40718
Could you please provide a complete example that demonstrates the problem? This: LANG=de_DE.utf8 ~/perl/5.20.0-dbg/bin/perl -w -MFile::Copy -e0 didn't fail for me. Neither did: tony@mars:.../git/perl2$ LANG=de_DE.utf8 ./test.pl Hello, World tony@mars:.../git/perl2$ cat test.pl #!/home/tony/perl/5.20.0-dbg/bin/perl use strict; use File::Copy; print "Hello, World\n"; Tony
CC: bugs-bitbucket [...] rt.perl.org
Subject: Re: [perl #122105] Invalid version format (non-numeric data) at /usr/share/perl5/core_perl/File/Copy.pm line 10.
To: pp Porters <perl5-porters [...] perl.org>
From: Kent Fredric <kentfredric [...] gmail.com>
Date: Mon, 16 Jun 2014 19:44:28 +1200
Download (untitled) / with headers
text/plain 659b

Would you be able to inform us what

`perl -Mversion\ 9999` emits?


My suspicion is you have an old version.pm lying around in @INC, and there's references in version.pm's changelog about problems with 'use locale'.

This won't be a problem on most Perl installations, however, arch does something not recommended: Sharing an @INC path between major versions of Perl, requiring a full cleanout of @INC between installations ( as indicated by https://bbs.archlinux.org/viewtopic.php?pid=1424409#p1424409 ).

Its likely I'm completely wrong here, but this seems to be the most likely explanation given the problem hasn't yet been seen outside Arch.


--
Kent

Date: Mon, 16 Jun 2014 09:53:29 +0200
From: "Torsten Schönfeld" <kaffeetisch [...] gmx.de>
Subject: Re: [perl #122105] Invalid version format (non-numeric data) at /usr/share/perl5/core_perl/File/Copy.pm line 10.
To: perlbug-followup [...] perl.org
Download (untitled) / with headers
text/plain 342b
I think this is the same issue as the one discussed in https://rt.perl.org/Public/Bug/Display.html?id=121930 https://rt.perl.org/Public/Bug/Display.html?id=121317 https://rt.perl.org/Public/Bug/Display.html?id=120723 It affects any program that directly or indirectly uses gtk+ (or any other library that calls setlocale()), like Shutter.
From: Michael Kogan <michael.kogan [...] gmx.net>
Date: Mon, 16 Jun 2014 09:12:02 +0200
To: perlbug-followup [...] perl.org
Subject: Re: [perl #122105] Invalid version format (non-numeric data) at /usr/share/perl5/core_perl/File/Copy.pm line 10.
Download (untitled) / with headers
text/plain 2.2k
Hello Tony,

the two snippets you gave in your comment work for me either without any errors. Unfortunately, I'm not a developer but just a regular user, therefore I cannot provide a minimal example causing the problem. I can just point you at applications where this problem occurs:

- Shutter with Copy.pm. URL: https://code.launchpad.net/shutter Output:
---------
$ shutter
Invalid version format (non-numeric data) at /usr/share/perl5/core_perl/File/Copy.pm line 10.
BEGIN failed--compilation aborted at /usr/share/perl5/core_perl/File/Copy.pm line 10.
Compilation failed in require at /usr/bin/shutter line 56.
BEGIN failed--compilation aborted at /usr/bin/shutter line 56.
--------
Line 56 in /usr/bin/shutter is:
--------
use File::Copy qw/ cp mv /;
--------

- Gmusicbrowser with Encode.pm (see cpan ticket #96467 attached by James). URL: https://github.com/squentin/gmusicbrowser Output:
--------
$ gmusicbrowser
Invalid version format (non-numeric data) at /usr/lib/perl5/core_perl/Encode.pm line 12.
BEGIN failed--compilation aborted at /usr/lib/perl5/core_perl/Encode.pm line 12.
Compilation failed in require at /usr/bin/gmusicbrowser line 26.
BEGIN failed--compilation aborted at /usr/bin/gmusicbrowser line 26.
--------
Line 26 in /usr/bin/gmusicbrowser is:
--------
use Encode qw/_utf8_on _utf8_off/;
--------

- Reported by another user: Pac Manager with Socket.pm. URL: no idea, can ask the other user if important. Output:
--------
$ pac
Invalid version format (non-numeric data) at /usr/lib/perl5/core_perl/IO/Socket.pm line 13.
BEGIN failed--compilation aborted at /usr/lib/perl5/core_perl/IO/Socket.pm line 13.
Compilation failed in require at /usr/lib/perl5/core_perl/IO/Socket/INET.pm line 11.
BEGIN failed--compilation aborted at /usr/lib/perl5/core_perl/IO/Socket/INET.pm line 11.
Compilation failed in require at /usr/share/pacmanager/lib/PACTerminal.pm line 38.
BEGIN failed--compilation aborted at /usr/share/pacmanager/lib/PACTerminal.pm line 38.
Compilation failed in require at /usr/share/pacmanager/lib/PACMain.pm line 58.
BEGIN failed--compilation aborted at /usr/share/pacmanager/lib/PACMain.pm line 58.
Compilation failed in require at /usr/bin/pac line 62.
BEGIN failed--compilation aborted at /usr/bin/pac line 62.
--------

Thanks for your assistance,
Michael
From: Michael Kogan <michael.kogan [...] gmx.net>
Date: Mon, 16 Jun 2014 10:11:49 +0200
To: perlbug-followup [...] perl.org
Subject: Re: [perl #122105] Invalid version format (non-numeric data) at /usr/share/perl5/core_perl/File/Copy.pm line 10.
Download (untitled) / with headers
text/plain 847b
Kent, here is the output:
--------
$ perl -Mversion\ 9999
version version 9999 required--this is only version 0.9908.
BEGIN failed--compilation aborted.
--------​
However, I had already discovered the post that you linked and followed the steps described in it. But the error reported above still persists. On the other hand, running the command from step 2 still gives me the same list of bad packages even after reinstalling them as in step 3. The packages in my case are:
--------
perl-data-random
perl-goo-canvas
perl-gtk2-imageview
perl-gtk2-notify
perl-gtk2-unique
perl-mouse
perl-net-dropbox-api
perl-proc-processtable
perl-proc-simple
perl-test-leaktrace
--------

Torsten, the issues you referenced look fitting. Indeed, Shutter, Gmusicbrowser, Gprename (which I forgot to mention in the previous comment) and Pac Manager all use Gtk+.
Subject: Re: [perl #122105] Invalid version format (non-numeric data) at /usr/share/perl5/core_perl/File/Copy.pm line 10.
To: perlbug-followup [...] perl.org
From: Michael Kogan <michael.kogan [...] gmx.net>
Date: Mon, 16 Jun 2014 13:38:48 +0200
Download (untitled) / with headers
text/plain 1.1k
I sent already two replies, 3 and 4 hours ago, but none of them made it through to the bug report. In the hope that this short one will, how can I deal with it?

Michael


2014-06-16 10:11 GMT+02:00 Michael Kogan <michael.kogan@gmx.net>:
Show quoted text
Kent, here is the output:
--------
$ perl -Mversion\ 9999
version version 9999 required--this is only version 0.9908.
BEGIN failed--compilation aborted.
--------​
However, I had already discovered the post that you linked and followed the steps described in it. But the error reported above still persists. On the other hand, running the command from step 2 still gives me the same list of bad packages even after reinstalling them as in step 3. The packages in my case are:
--------
perl-data-random
perl-goo-canvas
perl-gtk2-imageview
perl-gtk2-notify
perl-gtk2-unique
perl-mouse
perl-net-dropbox-api
perl-proc-processtable
perl-proc-simple
perl-test-leaktrace
--------

Torsten, the issues you referenced look fitting. Indeed, Shutter, Gmusicbrowser, Gprename (which I forgot to mention in the previous comment) and Pac Manager all use Gtk+.

Date: Mon, 16 Jun 2014 13:19:27 -0600
From: Karl Williamson <public [...] khwilliamson.com>
Subject: Re: [perl #122105] [perl #121930] Invalid version format (non-numeric data) at /usr/share/perl5/core_perl/File/Copy.pm line 10.
To: Torsten Schönfeld <kaffeetisch [...] gmx.de>, perlbug-followup [...] perl.org
Download (untitled) / with headers
text/plain 636b
On 06/16/2014 01:53 AM, "Torsten Schönfeld" wrote: Show quoted text
> I think this is the same issue as the one discussed in > > https://rt.perl.org/Public/Bug/Display.html?id=121930 > https://rt.perl.org/Public/Bug/Display.html?id=121317 > https://rt.perl.org/Public/Bug/Display.html?id=120723 > > It affects any program that directly or indirectly uses gtk+ (or any other library that calls setlocale()), like Shutter. >
Almost certainly this is the case. I posted a patch to blead to try on 6/7, but have not heard any response as to whether that works or not. Until we get someone who can reproduce the problem to try this, we can't proceed.
From: Michael Kogan <michael.kogan [...] gmx.net>
Date: Mon, 16 Jun 2014 21:25:27 +0200
To: perlbug-followup [...] perl.org
Subject: Re: [perl #122105] Invalid version format (non-numeric data) at /usr/share/perl5/core_perl/File/Copy.pm line 10.
Karl, could you point me to the patch, please? Thanks!
Subject: Re: [perl #122105] Invalid version format (non-numeric data) at /usr/share/perl5/core_perl/File/Copy.pm line 10.
To: Michael Kogan <michael.kogan [...] gmx.net>, perlbug-followup [...] perl.org
From: Karl Williamson <public [...] khwilliamson.com>
Date: Mon, 16 Jun 2014 13:36:41 -0600
Download (untitled) / with headers
text/plain 1.2k
On 06/16/2014 05:38 AM, Michael Kogan wrote: Show quoted text
> I sent already two replies, 3 and 4 hours ago, but none of them made it > through to the bug report. In the hope that this short one will, how can > I deal with it? > > Michael
I believe your replies eventually got through. And I think your question above is about how you as a user and not a programmer can deal with shutter not working. What would likely work for you immediately is to run it under a locale that uses a dot for the decimal point character, instead of a comma The command 'locale -a' should tell you what locales are available on your system. You could choose an English one, for example. Let's say that en_UK.UTF-8 is there. Then, from the shell command line you could say LC_NUMERIC=en_UK.UTF-8 export LC_NUMERIC shutter ... (or however it is invoked) Another option is to revert to using Perl v5.18 until this issue is resolved. My problem is that I can't get gtk to compile on the systems I have access too, and am relying on people with development capabilities to try things out on their system, which slows things down. We are not sure what the problem is, though I believe I have isolated it. You can look at this url to see the discussion so far https://rt.perl.org/Ticket/Display.html?id=121930
Subject: Re: [perl #122105] Invalid version format (non-numeric data) at /usr/share/perl5/core_perl/File/Copy.pm line 10.
To: Michael Kogan <michael.kogan [...] gmx.net>, perlbug-followup [...] perl.org
Date: Mon, 16 Jun 2014 13:40:35 -0600
From: Karl Williamson <public [...] khwilliamson.com>
Download (untitled) / with headers
text/plain 112b
On 06/16/2014 01:25 PM, Michael Kogan wrote: Show quoted text
> Karl, could you point me to the patch, please? Thanks!
Attached
Download khw.patch
text/plain 534b

Message body is not shown because sender requested not to inline it.

From: Michael Kogan <michael.kogan [...] gmx.net>
Date: Mon, 16 Jun 2014 21:58:01 +0200
Subject: Re: [perl #122105] Invalid version format (non-numeric data) at /usr/share/perl5/core_perl/File/Copy.pm line 10.
To: perlbug-followup [...] perl.org
Download (untitled) / with headers
text/plain 377b
Karl, thanks for the patch. I forwarded the call for testing to the Arch forums thread and the corresponding bug report in the Arch tracker. If everything else fails, I will set up a Virtual Box Arch install and try applying the patch this weekend.


2014-06-16 21:25 GMT+02:00 Michael Kogan <michael.kogan@gmx.net>:
Show quoted text
Karl, could you point me to the patch, please? Thanks!

Date: Tue, 17 Jun 2014 07:45:19 +0200
From: Michael Kogan <michael.kogan [...] gmx.net>
To: perlbug-followup [...] perl.org
Subject: Re: [perl #122105] Invalid version format (non-numeric data) at /usr/share/perl5/core_perl/File/Copy.pm line 10.
Download (untitled) / with headers
text/plain 113b
​Karl, a user reported that your patch solves the problem: https://bugs.archlinux.org/task/40718#comment124393
To: Michael Kogan <michael.kogan [...] gmx.net>, perlbug-followup [...] perl.org
CC: Steve Hay <steve.m.hay [...] googlemail.com>, kryde [...] cpan.org
Date: Tue, 17 Jun 2014 22:11:46 -0600
Subject: Re: [perl #122105] Invalid version format (non-numeric data) at /usr/share/perl5/core_perl/File/Copy.pm line 10.
From: Karl Williamson <public [...] khwilliamson.com>
Download (untitled) / with headers
text/plain 2.4k
On 06/16/2014 11:45 PM, Michael Kogan wrote: Show quoted text
> ​Karl, a user reported that your patch solves the problem: > https://bugs.archlinux.org/task/40718#comment124393
Thanks. Based on that, I've merged this ticket into https://rt.perl.org/Ticket/Display.html?id=121930 I can produce a patch that should apply cleanly to v5.20. Things have changed slightly since then, and I'm pretty sure that is why the patch I sent doesn't cleanly apply. What we need to do is decide how to proceed. The problem isn't really a Perl problem, but an interaction with the gtk library. Let me first say that the basic issue isn't new in v5.20. It has been around probably from the beginning of interacting with gtk. Various modules in CPAN have encountered this before and solved it. What is new is that 5.20 perturbed things so that various modules that had avoided this issue, mostly by luck, were now exposed to it. That includes shutter and Wx (perhaps shutter is built on Wx, I don't know). Every C program has an underlying locale. Both perl and gtk set up the program to use that. One could argue that a library shouldn't be setting the locale, but gtk does, and we have to deal with that. Fortunately, it has the ability to turn off locale setting, and that is how other modules have coped. http://grep.cpan.me/?q=disable_setlocale+ shows 20 modules that do this, most of them authored by Kevin Ryde. There are plenty of things that modules could do in C code that would screw up Perl; setting the locale is just one of them. In order to prevent needless setting and resetting of the locale, Perl keeps track of what it thinks it is set to. In 5.20 Perl keeps better track than before, and so when gtk changes it behind Perl's back, Perl doesn't know that it got changed. There were code paths before 5.20 that could result in this, but they didn't affect you. I think the best long term solution would be for the underlying module(s) to tell gtk to not set the locale, but it doesn't look like there is much work going on, in Wx anyway. The patch makes Perl unconditionally set the locale even if it thinks it is already correct. We could put this into a 5.20.1 maintenance release, but that isn't scheduled until August. As far as I know this would be the only candidate for that right now. In the past, we've had maintenance releases a month after the dot zero one. Perhaps this one could be moved up to accommodate people, should they be unable to get the disable into the appropriate modules
From: Torsten Schoenfeld <kaffeetisch [...] gmx.de>
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
Date: Wed, 18 Jun 2014 21:30:17 +0200
To: Karl Williamson <public [...] khwilliamson.com>, "perlbug-followup [...] perl.org" <perlbug-followup [...] perl.org>
Download (untitled) / with headers
text/plain 1.2k
Sorry for the delay. On 07.06.2014 23:45, Karl Williamson wrote: Show quoted text
> I'm pretty confident that the attached patch will cause the immediate > problem to go away, but it isn't the real correct solution.
Yes, your patch does fix the symptom. Thanks for your explanation of the circumstances. You suggest that Gtk2/Gtk3 make gtk+ not call setlocale() in order to avoid violating perl's assumptions. Unfortunately, this would mean that some aspects of the program's GUI do not follow the user's locale (the formatting of numbers, for example). gtk+ has been relying on setlocale() being called early on so that the locale is synchronized with the user's environment for more than ten years now [1, 2], so it seems unlikely that they will change their localization features to re-read the user's environment whenever locale-specific output is created. As far as I remember, we've never seen locale-related issues with Gtk2/Gtk3 before perl 5.19/5.20. As you say, we might just not have tried hard enough to find them. But I do wonder: when perl is parsing things that are supposed to be of a locale-independent format (like version numbers), should it not use locale-independet parsing routines? [1] https://bugzilla.gnome.org/show_bug.cgi?id=60606 [2] https://mail.gnome.org/archives/gtk-devel-list/2001-October/msg00082.html
From: Karl Williamson <public [...] khwilliamson.com>
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
Date: Thu, 19 Jun 2014 22:22:41 -0600
To: Torsten Schoenfeld <kaffeetisch [...] gmx.de>, "perlbug-followup [...] perl.org" <perlbug-followup [...] perl.org>
Download (untitled) / with headers
text/plain 6.5k
On 06/18/2014 01:30 PM, Torsten Schoenfeld wrote: Show quoted text
> Sorry for the delay. > > On 07.06.2014 23:45, Karl Williamson wrote:
>> I'm pretty confident that the attached patch will cause the immediate >> problem to go away, but it isn't the real correct solution.
> > Yes, your patch does fix the symptom. > > Thanks for your explanation of the circumstances. > > You suggest that Gtk2/Gtk3 make gtk+ not call setlocale() in order to > avoid violating perl's assumptions. Unfortunately, this would mean that > some aspects of the program's GUI do not follow the user's locale (the > formatting of numbers, for example). gtk+ has been relying on > setlocale() being called early on so that the locale is synchronized > with the user's environment for more than ten years now [1, 2], so it > seems unlikely that they will change their localization features to > re-read the user's environment whenever locale-specific output is created. > > As far as I remember, we've never seen locale-related issues with > Gtk2/Gtk3 before perl 5.19/5.20. As you say, we might just not have > tried hard enough to find them. >
My explanation wasn't good enough. Here is a more complete one. There have been a lot of bugs and inconsistencies in handling locales. I set out to try to fix them in 5.20. Perl thinks of itself as the center of the universe. It does a setlocale(LC_ALL, "") itself upon startup. Nowadays gtk also thinks of itself as the center of the universe and also does a setlocale(LC_ALL, "") upon startup. I would argue that it's more appropriate for a program that has a main() function that starts everything from scratch to consider itself the center of the universe, than for a library to do so. But that isn't particularly relevant here. The bottom line is that the existing situation is that Perl sets up the locale to the user's default. So does gtk, unless told not to. I've done some research into this application, but I still don't know very much about it. I don't know what shutter is built upon vs the ones you're using. I presume that on Linux everything comes down to gtk underlying it all. CPAN's Wx is built upon WxWidgets. The Wx CPAN man page has some cautions about locales. WxWidgets did not start setting the locale until release 2.9, which turns out to be in 2009. There is a case where Perl isn't the center of the universe, and that is when it is embedded into another application. The perlembed documentation gives information about it. Prior to v5.20, Perl did think it was the center of the universe here, and overrode the locale that the embedding program set up. (And led to at least one application rewriting Perl core functionality to get around this.) That is one of the bugs I fixed in 5.20, so that you can now tell Perl it isn't the center of the universe in regards to locales, and to not do initialization. So if both Perl and the underlying GUI library call setlocale(LC_ALL, ""), what is the problem? The locales are identical. Well there are problems. One is that other code may want to setlocale. Since Perl does its setlocale at startup, that other code gets to override Perl. But a library may be called at any time, and its setting of locale can really screw up that other code. This is really bad practice, and is at the root of this particular issue. Now it may be that a GUI library actually forms the main part of the code with the main execution path a loop in the library. This loop waits for events and calls functions registered by your layer, which handle an event and return to the loop. That's how these kinds of things used to be written anyway, and it makes some sense therefore for the libary that implements this to consider itself to be the center of the universe. But there is another problem. I omitted a crucial fact above. Yes, Perl does do a setlocale(LC_ALL, "") upon initialization. But then it almost immediately does a setlocale(LC_NUMERIC, "C"). The reason, I suspect, is that most XS code can cope only with the decimal point being a dot. There was infrastructure developed so that the LC_NUMERIC locale could be kept at C so that such code only saw a dot, but set to the desired locale at the appropriate times, then set back. That infrastructure was not documented, and was used only in a few places. This led to inconsistent behavior. Some operations used the infrastructure; some did not. That was another bug I fixed in 5.20, to use the infrastructure consistently. But the infrastructure working depends on Perl's knowing about all the setlocales that get done. The Perl core is written for perl programs. In pure Perl, it is impossible to change the locale without Perl noticing and updating its knowledge about the state. XS is an extension to get things done mainly faster. They can, but shouldn't, be doing antisocial things, like changing the locale, that affects code , but outside themselves. As bulk88 noted earlier in the discussion of these tickets, there are plenty of other antisocial behaviors that are possible. These may not show up given a particular combination of circumstances, but may do so in the future when those circumstances get perturbed. Things got perturbed in 5.20 so this lurking issue showed up in more places, leading to these tickets. The inconsistent behavior in earlier releases means that if code executed one of the operations that behaved in one way, this issue would happen; for other operations it didn't. I hope the above is clear enough, but I've gone through several drafts of it, and am giving up on improving it for now Show quoted text
> But I do wonder: when perl is parsing things that are supposed to be of > a locale-independent format (like version numbers), should it not use > locale-independet parsing routines?
Well, it seems saner when dealing with a floating point number to not reinvent the library code that knows how to parse it. All such library code is locale-dependent. Perl has indeed reinvented some of that code; I know not why, except probably they found it buggy on some platforms, or wanted consistent results across platforms. But Perl still needs to put out a comma in locales that want it. And it knows that for version parsing it should always use a dot. The bug is that since gtk or whatever is changing the locale behind Perl's back, Perl wrongly thinks that the locale is such that a dot will be used. So the patch works by just blindly setting the locale to a dot one, whether Perl thinks it already is there or not. Show quoted text
From: Torsten Schoenfeld <kaffeetisch [...] gmx.de>
Date: Mon, 23 Jun 2014 21:20:29 +0200
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
To: Karl Williamson <public [...] khwilliamson.com>, "perlbug-followup [...] perl.org" <perlbug-followup [...] perl.org>
Download (untitled) / with headers
text/plain 1.4k
On 20.06.2014 06:22, Karl Williamson wrote: Show quoted text
>> But I do wonder: when perl is parsing things that are supposed to be of >> a locale-independent format (like version numbers), should it not use >> locale-independet parsing routines?
> > Well, it seems saner when dealing with a floating point number to not > reinvent the library code that knows how to parse it. All such library > code is locale-dependent. Perl has indeed reinvented some of that code; > I know not why, except probably they found it buggy on some platforms, > or wanted consistent results across platforms. But Perl still needs to > put out a comma in locales that want it. And it knows that for version > parsing it should always use a dot. The bug is that since gtk or > whatever is changing the locale behind Perl's back, Perl wrongly thinks > that the locale is such that a dot will be used. So the patch works by > just blindly setting the locale to a dot one, whether Perl thinks it > already is there or not.
Then it appears all we need to do in Gtk2/Gtk3 is to tell perl when the locale might have changed behind its back. The logic in POSIX::setlocale seems to do that. $ perl -e'use Gtk3; use POSIX qw/locale_h/; BEGIN{ POSIX::setlocale (LC_ALL, ""); Gtk3::init (); } use 5.8.0;' && echo OK OK What's the best way to invoke the locale-updating logic in POSIX::setlocale from XS? And is there a way to invoke only this logic, not the actual setlocale call?
From: Karl Williamson <public [...] khwilliamson.com>
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
Date: Tue, 24 Jun 2014 23:04:02 -0600
To: Torsten Schoenfeld <kaffeetisch [...] gmx.de>, "perlbug-followup [...] perl.org" <perlbug-followup [...] perl.org>
On 06/23/2014 01:20 PM, Torsten Schoenfeld wrote: Show quoted text
> On 20.06.2014 06:22, Karl Williamson wrote:
>>> But I do wonder: when perl is parsing things that are supposed to be of >>> a locale-independent format (like version numbers), should it not use >>> locale-independet parsing routines?
>> >> Well, it seems saner when dealing with a floating point number to not >> reinvent the library code that knows how to parse it. All such library >> code is locale-dependent. Perl has indeed reinvented some of that code; >> I know not why, except probably they found it buggy on some platforms, >> or wanted consistent results across platforms. But Perl still needs to >> put out a comma in locales that want it. And it knows that for version >> parsing it should always use a dot. The bug is that since gtk or >> whatever is changing the locale behind Perl's back, Perl wrongly thinks >> that the locale is such that a dot will be used. So the patch works by >> just blindly setting the locale to a dot one, whether Perl thinks it >> already is there or not.
> > Then it appears all we need to do in Gtk2/Gtk3 is to tell perl when the > locale might have changed behind its back. The logic in > POSIX::setlocale seems to do that. > > $ perl -e'use Gtk3; use POSIX qw/locale_h/; BEGIN{ POSIX::setlocale > (LC_ALL, ""); Gtk3::init (); } use 5.8.0;' && echo OK > OK > > What's the best way to invoke the locale-updating logic in > POSIX::setlocale from XS? And is there a way to invoke only this logic, > not the actual setlocale call? >
I think it would be best if I write some new function to do this and avoid the setlocale call altogether. But if you want to do a quick experiment, you could call these three C functions with the new locale. This doesn't get all the categories, but it would be a proof-of-concept. new_ctype() new_numeric() new_collate() Each takes a single parameter, the char * returned from the setlocale you've done. (I'm presuming you did an LC_ALL for the purposes of this experiment.) Remember to revert the patch that fixed the problem before trying this out
From: Torsten Schoenfeld <kaffeetisch [...] gmx.de>
Date: Wed, 25 Jun 2014 22:08:42 +0200
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
To: Karl Williamson <public [...] khwilliamson.com>, "perlbug-followup [...] perl.org" <perlbug-followup [...] perl.org>
Download (untitled) / with headers
text/plain 1.2k
On 25.06.2014 07:04, Karl Williamson wrote: Show quoted text
>> What's the best way to invoke the locale-updating logic in >> POSIX::setlocale from XS? And is there a way to invoke only this logic, >> not the actual setlocale call?
> > I think it would be best if I write some new function to do this and > avoid the setlocale call altogether. But if you want to do a quick > experiment, you could call these three C functions with the new locale. > This doesn't get all the categories, but it would be a proof-of-concept. > new_ctype() > new_numeric() > new_collate() > > Each takes a single parameter, the char * returned from the setlocale > you've done. (I'm presuming you did an LC_ALL for the purposes of this > experiment.) Remember to revert the patch that fixed the problem before > trying this out
I ended up wanting a pure-Perl solution, so I now simply call POSIX::setlocale(), accepting the double call to setlocale(). https://git.gnome.org/browse/perl-Gtk2/commit/?id=02a7052603306cca8e1b910e3cfe8c8677ee0354 https://git.gnome.org/browse/perl-Gtk3/commit/?id=6229db7a78da0b35c24ce1395e31a2d887a97e05 When you come up with an XS API around new_numeric() and friends, I can port this to XS. But for now, it seems to work as is. As far as Gtk2 and Gtk3 are concerned, this bug is resolved. Wx probably needs a similar fix.
To: Torsten Schoenfeld <kaffeetisch [...] gmx.de>, "perlbug-followup [...] perl.org" <perlbug-followup [...] perl.org>
From: Karl Williamson <public [...] khwilliamson.com>
Date: Wed, 25 Jun 2014 22:23:03 -0600
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
Download (untitled) / with headers
text/plain 279b
On 06/25/2014 02:08 PM, Torsten Schoenfeld wrote: Show quoted text
> I ended up wanting a pure-Perl solution, so I now simply call > POSIX::setlocale(), accepting the double call to setlocale().
My guess is that this is done only once, during initialization, so the overhead is imperceptible.
To: perlbug-followup [...] perl.org
From: Kevin Ryde <user42_kevin [...] yahoo.com.au>
Date: Tue, 01 Jul 2014 14:27:24 +1000
CC: Karl Williamson <public [...] khwilliamson.com>, Michael Kogan <michael.kogan [...] gmx.net>, Steve Hay <steve.m.hay [...] googlemail.com>
Subject: Re: [perl #122105] Invalid version format (non-numeric data) at /usr/share/perl5/core_perl/File/Copy.pm line 10.
Download (untitled) / with headers
text/plain 1.4k
Karl Williamson <public@khwilliamson.com> writes: Show quoted text
> > http://grep.cpan.me/?q=disable_setlocale+ > > shows 20 modules that do this, most of them authored by Kevin Ryde.
I can't remember what went wrong that I put disable_setlocale(). It was probably version numbers suffering under "," for decimal point, but I don't know if this was due to modules with strings $VERSION="1.23" instead of numbers, or something of version.pm. Show quoted text
> In order to > prevent needless setting and resetting of the locale, Perl keeps track > of what it thinks it is set to.
You could probably ask xs code to announce when it has changed or might have changed the locale. A locale change should be unusual so only a few things would be affected. That's the new_numeric() in POSIX.xs setlocale() already is it? A spot of ppport.h could no doubt let it do something on all perls. I wonder that if the perl startups have already set the locale sensibly then the default in perl-gtk and wxperl ought to be to leave the locale alone. I suppose that means LC_NUMERIC is not localized, but perhaps anything except LC_NUMERIC=C usually causes too much trouble to perl. In some of my charting code I think I applied an LC_NUMERIC to get the locale decimal into a Number::Format but then put it back to LC_NUMERIC=C for running. The Number::Format is then for user display, and ordinary "C" decimal point for arithmetic. (I may have even proposed a function in Number::Format which would give a formatter object with locale-ized settings.)
Download (untitled) / with headers
text/plain 592b
FWIW this issue affects any XS module that calls setlocale. You can see it with SWISH::3 (upon which SWISH::Prog and Dezi::App depend) which is a binding to the C libswish3. I have fixed it upstream with: https://github.com/karpet/libswish3/commit/483c1d5bfbefd15c39f3a08992cd2936121189ec though my fix seems a little draconian (and perhaps I'm doing the whole locale-detection thing wrong in the first place; corrections welcome). Re-reading perllocale I see the XS warnings about setlocale() now very clearly, though as mentioned elsewhere, this behavior didn't manifest until Perl 5.18.
RT-Send-CC: kaffeetisch [...] gmx.de, kentfredric [...] gmail.com, "OtherRecipients of perl Ticket #121930:;" [...] smtp.indra.com, mdootson [...] cpan.org, kryde [...] cpan.org, michael.kogan [...] gmx.net, alex.hartmaier [...] gmail.com, perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 709b
This issue has been fixed in v5.20.1 and blead. The fix involves protecting the Perl core from XS code changing the LC_NUMERIC locale behind its back around versioning statements. This was deemed to not likely to be done in time-critical sections (generally doing just 'requires'). But XS code can still change this and screw up other XS modules and the Perl core, but we haven't had reports of these. Note that Perl v5.22 will try to protect other modules by keeping LC_NUMERIC in the C locale. That means that XS code that wants it to be otherwise will be broken. You can participate in the development of a sufficient API to circumvent such problems by contacting me -- Karl Williamson khw@cpan.org
To: "perlbug-followup [...] perl.org" <perlbug-followup [...] perl.org>
Date: Tue, 16 Sep 2014 17:49:28 +0200
From: Alexander Hartmaier <alex.hartmaier [...] gmail.com>
Subject: Re: [perl #121930] Bleadperl breaks MDOOTSON/Wx-0.9923.tar.gz
CC: kaffeetisch [...] gmx.de, kentfredric [...] gmail.com, <"OtherRecipients of perl Ticket #121930:," [...] smtp.indra.com>, mdootson [...] cpan.org, kryde [...] cpan.org, michael.kogan [...] gmx.net, Perl5 Porters <perl5-porters [...] perl.org>
Download (untitled) / with headers
text/plain 1.1k
On Mon, Sep 15, 2014 at 9:53 PM, Karl Williamson via RT <perlbug-followup@perl.org> wrote:
Show quoted text
This issue has been fixed in v5.20.1 and blead.

The fix involves protecting the Perl core from XS code changing the LC_NUMERIC locale behind its back around versioning statements.  This was deemed to not likely to be done in time-critical sections (generally doing just 'requires').  But XS code can still change this and screw up other XS modules and the Perl core, but we haven't had reports of these.

Note that Perl v5.22 will try to protect other modules by keeping LC_NUMERIC in the C locale.  That means that XS code that wants it to be otherwise will be broken.  You can participate in the development of a sufficient API to circumvent such problems by contacting me

I can confirm that Wx now successfully installs on Xubuntu 14.04 64bit when all required packages are installed, see https://rt.cpan.org/Public/Bug/Display.html?id=25649#txn-992928.

Thank you very much for your work Karl!

Best regards, Alex

Show quoted text

--
Karl Williamson
khw@cpan.org

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=121930



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

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org