Subject: | PNG compile does not find zconf.h |
My smokers on linux (Debian sid) all refused to build Tk/PNG due to missing zconf.h. The reason is that zconf.h is in /usr/include/x86_64-linux-gnu/zconf.h and as such is found by gcc (4.7.3) even though it is included from /usr/include/zlib.h with
#include "zconf.h"
But it's not found by Tk/MakeDepend. The reason is in multiarch. The triplet x86_64-linux-gnu can be found with:
% gcc -print-multiarch
A tentative prove-of-concept fix works and is attached. At least the compilation is fixed that way. Some occasional test failures remain but have unrelated causes.
Subject: | perl-tk-zconf-include-not-found.patch |
diff --git a/Tk/MakeDepend.pm b/Tk/MakeDepend.pm
index 3c3cba7..0164cc8 100644
--- a/Tk/MakeDepend.pm
+++ b/Tk/MakeDepend.pm
@@ -247,8 +247,16 @@ sub command_line
}
}
# force /usr/include to be last element of @include
- push @include, $Config{'usrinc'}
- if (defined $Config{'usrinc'} and $Config{'usrinc'} ne '');
+ if (defined $Config{'usrinc'} and $Config{'usrinc'} ne ''){
+ push @include, $Config{'usrinc'};
+ if ($Config{ccname} eq "gcc") {
+ my($multiarch) = `gcc -print-multiarch`;
+ if ($multiarch) {
+ chomp $multiarch;
+ push @include, "$Config{'usrinc'}/$multiarch";
+ }
+ }
+ }
# warn "Include:@include\n";
while (@files)
{