Subject: | CheckLib fails on NFS |
CheckLib fails when building on NFS on my FreeBSD system (See: http://
www.freebsd.org/cgi/query-pr.cgi?pr=ports/155991)
The problem is that it tries to use File::Temp::tempfile() to create a
file within the source directory, which may cause problems.
A patch which solves the issue is attached ... I'm not familiar with
Perl, and couldn't find a "get_tmp_dir()"-like function with a quick
search, but you should get the idea ;)
Subject: | patch-inc-Devel-CheckLib.pm |
--- inc/Devel/CheckLib.pm.orig 2011-05-25 05:39:14.000000000 +0200
+++ inc/Devel/CheckLib.pm 2011-11-09 01:10:42.000000000 +0100
@@ -222,7 +222,7 @@
for my $header (@headers) {
push @use_headers, $header;
my($ch, $cfile) = File::Temp::tempfile(
- 'assertlibXXXXXXXX', SUFFIX => '.c'
+ 'assertlibXXXXXXXX', SUFFIX => '.c', DIR => '/tmp/'
);
print $ch qq{#include <$_>\n} for @use_headers;
print $ch qq{int main(void) { return 0; }\n};
@@ -262,7 +262,7 @@
# now do each library in turn with headers
my($ch, $cfile) = File::Temp::tempfile(
- 'assertlibXXXXXXXX', SUFFIX => '.c'
+ 'assertlibXXXXXXXX', SUFFIX => '.c', DIR => '/tmp/'
);
print $ch qq{#include <$_>\n} foreach (@headers);
print $ch "int main(void) { ".($args{function} || 'return 0;')." }\n";