develooper Front page | perl.perl5.porters | Postings from February 2015

[perl #123784] Tests fail with GCC 5.0 because Errno cannot obtain errno constants

Thread Previous | Thread Next
From:
Petr Pisar
Date:
February 10, 2015 15:35
Subject:
[perl #123784] Tests fail with GCC 5.0 because Errno cannot obtain errno constants
Message ID:
rt-4.0.18-30254-1423582493-392.123784-75-0@perl.org
# New Ticket Created by  Petr Pisar 
# Please include the string:  [perl #123784]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=123784 >


Hello,

I don't know if this is the best news before releasing perl 5.20.2, but none
of the perl branches (including blead) does not pass tests when built
with GCC 5.0:

t/run/switches ................................................. "EACCES" is not
 exported by the Errno module
 "EISDIR" is not exported by the Errno module
Can't continue after import errors at run/switches.t line 126.
# Looks like you planned 115 tests but ran 8.
FAILED--expected 115 tests, saw 8

etc.

This is caused by wrongly generated Errno.h which is missing all the constants
(e.g. Errno::EISDIR):


--- /usr/lib64/perl5/Errno.pm   2015-01-23 15:15:43.000000000 +0100
+++ ext/Errno/Errno.pm  2015-02-10 16:06:47.831000000 +0100
@@ -9,10 +9,10 @@
 use strict;
 
 "$Config{'archname'}-$Config{'osvers'}" eq
-"x86_64-linux-thread-multi-3.17.8-300.bz1178975.fc21.x86_64" or
-       die "Errno architecture (x86_64-linux-thread-multi-3.17.8-300.bz1178975.fc21.x86_64) does not match executable architecture ($Config{'archname'}-$Config{'osvers'})";
+"x86_64-linux-thread-multi-3.19.0-0.rc7.git2.1.fc22.x86_64" or
+       die "Errno architecture (x86_64-linux-thread-multi-3.19.0-0.rc7.git2.1.fc22.x86_64) does not match executable architecture ($Config{'archname'}-$Config{'osvers'})";
 
-our $VERSION = "1.20_03";
+our $VERSION = "1.22";
 $VERSION = eval $VERSION;
 our @ISA = 'Exporter';
 
@@ -20,140 +20,6 @@
 
 BEGIN {
     %err = (
-       EPERM => 1,
-       ENOENT => 2,
-       ESRCH => 3,
[...]


That's reportedly caused by a change in GCC 5.0's preprocesor as described in:

<https://lists.fedoraproject.org/pipermail/devel/2015-February/207549.html>
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60723#c27>

The preprocessed output contains a new line with current working directory
directive which make troubles to the Errno_pm.PL parser.

Simple work-around is to call the preprocessor with -P option (inhibit
generation of linemarkers). Once I find a proper fix, I will post it here.

-- Petr


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About