Skip Menu |

This queue is for tickets about the Filesys-Df CPAN distribution.

Report information
The Basics
Id: 107904
Status: resolved
Priority: 0/
Queue: Filesys-Df

People
Owner: Nobody in particular
Requestors: PLICEASE [...] cpan.org
Cc:
AdminCc:

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



Subject: Unable to find sys/statfs.h (Perl 5.23.4, Debian 8)
This fails to install for me on Debian 8 with Perl 5.23.4. Please see the attached install log. I poked around a little with the Makefile.PL and it seems to search for some header files which now live in /usr/include/x86_64-linux-gnu/ on Debian. This path is not included in $Config{usrinc}, but is in $Config{incpth}. The patch attached would be sufficient to get this module to work on newer Perls that have have $Config{incpth}, and older Perls seem to already work (probably because the appropriate header files are leaking into XS). Another fix may be appropriate, and I'd be happy to test any alternate fixes that you may have. Using Config::AutoConf (for example) may be a more rigorous approach to detecting header files, although it does bring in additional dependencies.
Subject: install.txt
cpanm (App::cpanminus) 1.7039 on perl 5.023004 built for x86_64-linux-thread-multi Work directory is /home/ollisg/.cpanm/work/1445439408.2833 You have make /usr/bin/make You have LWP 6.13 You have /bin/tar: tar (GNU tar) 1.27.1 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by John Gilmore and Jay Fenlason. You have /usr/bin/unzip Searching Filesys::Df on mirror file:///home/ollisg/minicpan ... Downloading index file file:///home/ollisg/minicpan/modules/02packages.details.txt.gz ... Uncompressing index file... Unpacking Filesys-Df-0.92.tar.gz --> Working on Filesys::Df Fetching file:///home/ollisg/minicpan/authors/id/I/IG/IGUTHRIE/Filesys-Df-0.92.tar.gz ... OK Filesys-Df-0.92/ Filesys-Df-0.92/XS_statvfs Filesys-Df-0.92/META.yml Filesys-Df-0.92/test.pl Filesys-Df-0.92/Changes Filesys-Df-0.92/MANIFEST Filesys-Df-0.92/typemap Filesys-Df-0.92/Df.pm Filesys-Df-0.92/XS_statfs Filesys-Df-0.92/Makefile.PL Filesys-Df-0.92/README Entering Filesys-Df-0.92 Checking configure dependencies from META.yml Running Makefile.PL Configuring Filesys-Df-0.92 ... You need at least one of these to build this module. OS = linux Checking for statvfs ..... d_statvfs is not defined Cannot find a sys/statvfs.h file We will not try to build with statvfs Checking for statfs ..... d_statfs_s is not defined Cannot find a sys/statfs.h file We will not try to build Statfs We could not find statvfs, or statfs. ! Configure failed for Filesys-Df-0.92. See /home/ollisg/.cpanm/work/1445439408.2833/build.log for details. N/A
Subject: patch.diff
diff --git a/Makefile.PL b/Makefile.PL index 6a89ec4..17061c9 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -163,7 +163,7 @@ sub look_for_header { my $header = shift; #my @header_inc = split(/\s+/, join(" ", $Config{usrinc}, $Config{locincpth})); - my @header_inc = split(/\s+/, join(" ", $Config{usrinc})); + my @header_inc = split(/\s+/, join(" ", $Config{incpth} ? $Config{incpth} : $Config{usrinc})); foreach $header_path (@header_inc) { if(-f $header_path . '/' . $header) { print "Header found:" , $header_path . '/' . $header, "\n";
On 2015-10-21 11:02:54, PLICEASE wrote: Show quoted text
> This fails to install for me on Debian 8 with Perl 5.23.4. Please see > the attached install log. I poked around a little with the > Makefile.PL and it seems to search for some header files which now > live in /usr/include/x86_64-linux-gnu/ on Debian. This path is not > included in $Config{usrinc}, but is in $Config{incpth}. The patch > attached would be sufficient to get this module to work on newer Perls > that have have $Config{incpth}, and older Perls seem to already work > (probably because the appropriate header files are leaking into XS). > > Another fix may be appropriate, and I'd be happy to test any alternate > fixes that you may have. Using Config::AutoConf (for example) may be > a more rigorous approach to detecting header files, although it does > bring in additional dependencies.
Probably the same problem as reported for Filesys-DfPortable. See * https://rt.perl.org/Ticket/Display.html?id=126368 * https://rt.cpan.org/Ticket/Display.html?id=108189
On 2015-10-30 07:43:06, SREZIC wrote: Show quoted text
> On 2015-10-21 11:02:54, PLICEASE wrote:
> > This fails to install for me on Debian 8 with Perl 5.23.4. Please see > > the attached install log. I poked around a little with the > > Makefile.PL and it seems to search for some header files which now > > live in /usr/include/x86_64-linux-gnu/ on Debian. This path is not > > included in $Config{usrinc}, but is in $Config{incpth}. The patch > > attached would be sufficient to get this module to work on newer Perls > > that have have $Config{incpth}, and older Perls seem to already work > > (probably because the appropriate header files are leaking into XS). > > > > Another fix may be appropriate, and I'd be happy to test any alternate > > fixes that you may have. Using Config::AutoConf (for example) may be > > a more rigorous approach to detecting header files, although it does > > bring in additional dependencies.
> > Probably the same problem as reported for Filesys-DfPortable. See > * https://rt.perl.org/Ticket/Display.html?id=126368 > * https://rt.cpan.org/Ticket/Display.html?id=108189
Another data point: building still works on FreeBSD 9.2 with perl 5.23.4.
On Fri Oct 30 07:50:03 2015, SREZIC wrote: Show quoted text
> Another data point: building still works on FreeBSD 9.2 with perl 5.23.4.
I suspect that it would also work with Debian 6, since that was the last version of Debian that didn't have multiarch support. That is why changing the $Config{} variable to probe for the header fixes it on 8 (and presumably 7).
This breakage was caused by http://perl5.git.perl.org/perl.git/commit/821805a244cacd9869331999cd53407f3323206a which has now been reverted by http://perl5.git.perl.org/perl.git/commit/ea4421009acdf10bf0a7b26ff22c5afd431690db and further patched up by http://perl5.git.perl.org/perl.git/commitdiff/c66a9c0baa73b43bd590914b090f93b04c68677b (the ea442100 mistakenly refers to rt.perl.tickets, perl #NNN, which it should refer to rt.cpan.tickets, cpan #NNN)
I can confirm that this is no longer a problem (for me) on Perl 5.23.5. I do think that the fallback would be better to use $Config{incpth} when available instead of $Config{usrinc}, but that seems to be a small nit.