Package: perl
Version: 5.10.0-19
Severity: normal
Tags: patch

The Perl header "syslimits.ph" got lost between Etch and Lenny
because of a change in gcc.

>From the build log:
 # convert required header files
 cd /usr/include; /build/buildd/perl-5.10.0/perl.static -I 
/build/buildd/perl-5.10.0/lib \
        /build/buildd/perl-5.10.0/utils/h2ph -a -d 
/build/buildd/perl-5.10.0/debian/tmp/usr/lib/perl/5.10 \
        `cat /build/buildd/perl-5.10.0/debian/headers`
 Can't open syslimits.h: No such file or directory

As of 4.2.0 or so, gcc's search path has a new "include-fixed"
directory, which contains <syslimits.h> and a few others.
h2ph doesn't look there, so syslimits.ph generation fails.

 http://gcc.gnu.org/ml/gcc-patches/2007-02/msg02038.html

The attached patch fixes this; I'll send it upstream next.

Given that we haven't received a single bug report about this, it's
questionable whether <syslimits.h> actually needs to be converted.
I'm inclined to keep it but would certainly welcome other opinions.

The header conversion in debian/rules ignores all errors, probably
because h2ph -a will exit with a non-zero status if any files cannot be
found during the recursion. There are normally a few other missing files:

 Can't open machine/ansi.h: No such file or directory
 Can't open sys/_types.h: No such file or directory
 Can't open gnu/stubs-32.h: No such file or directory

which are harmless because they are #ifdef'd out on the corresponding
architecture (which h2ph doesn't grok).

I noticed this while experimenting with the header checking patch in
#511848, so applying that should make sure headers aren't lost again
accidentally.
-- 
Niko Tyni   nt...@debian.org
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index a3ff285..6f40126 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -743,7 +743,7 @@ sub queue_includes_from
 
 
 # Determine include directories; $Config{usrinc} should be enough for (all
-# non-GCC?) C compilers, but gcc uses an additional include directory.
+# non-GCC?) C compilers, but gcc uses additional include directories.
 sub inc_dirs
 {
     my $from_gcc    = `LC_ALL=C $Config{cc} -v 2>&1`;
@@ -755,7 +755,7 @@ sub inc_dirs
            $from_gcc = '';
        };
     };
-    length($from_gcc) ? ($from_gcc, $Config{usrinc}) : ($Config{usrinc});
+    length($from_gcc) ? ($from_gcc, $from_gcc . "-fixed", $Config{usrinc}) : ($Config{usrinc});
 }
 
 

Reply via email to