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";