This is starting to make sense. The code section that I have been
suspecting in make 4.1 (which is the only place that resets the job_slots
to 1) is...
#ifndef WINDOWS32
#ifdef HAVE_FCNTL
# define FD_OK(_f) ((fcntl ((_f), F_GETFD) != -1) || (errno != EBADF))
#else
# define FD_OK(_f) 1
#endif
/* Create a duplicate pipe, that will be closed in the SIGCHLD
handler. If this fails with EBADF, the parent has closed the pipe
on us because it didn't think we were a submake. If so, print a
warning then default to -j1. */
else if (!FD_OK (job_fds[0]) || !FD_OK (job_fds[1])
|| (job_rfd = dup (job_fds[0])) < 0)
{
if (errno != EBADF)
pfatal_with_name (_("dup jobserver"));
O (error, NILF,
_("warning: jobserver unavailable: using -j1. Add '+' to
parent make rule."));
job_slots = 1;
job_fds[0] = job_fds[1] = -1;
}
#endif
whereas the same code section in make 3.82 (which doesn't show this bug)
is...
/* Create a duplicate pipe, that will be closed in the SIGCHLD
handler. If this fails with EBADF, the parent has closed the pipe
on us because it didn't think we were a submake. If so, print a
warning then default to -j1. */
else if ((job_rfd = dup (job_fds[0])) < 0)
{
if (errno != EBADF)
pfatal_with_name (_("dup jobserver"));
error (NILF,
_("warning: jobserver unavailable: using -j1. Add `+' to
parent make rule."));
job_slots = 1;
}
So only make 4.1 is executing the fnctl() calls via the FD_OK macro.
Perhaps we can hack around this by causing HAVE_FCNTL to be undefined in
the fink make 4.1 build?
On Tue, Oct 20, 2015 at 8:20 PM, Jack Howarth <[email protected]>
wrote:
> So far my testing on 10.12 suggests that the trigger for the
> regression in using fink make 4.1 under 10.12 is due to the flock() usage
> in Services.pm. The most reliable reproducer of this regression on my
> system has been the InfoTest of libcurl4 which always fails in the
> compilation of the test suite under make 4.1. Using the following hack...
>
> --- Services.pm.orig 2015-10-20 20:06:57.000000000 -0400
> +++ Services.pm 2015-10-20 20:09:39.000000000 -0400
> @@ -1756,11 +1756,11 @@
> }
>
> my $mode = $exclusive ? LOCK_EX : LOCK_SH;
> - if (flock $lockfile_FH, $mode | LOCK_NB) {
> - return wantarray ? ($lockfile_FH, 0) : $lockfile_FH;
> - } else {
> +# if (flock $lockfile_FH, $mode | LOCK_NB) {
> +# return wantarray ? ($lockfile_FH, 0) : $lockfile_FH;
> +# } else {
> # Maybe the system doesn't support locking?
> - if ($! == EOPNOTSUPP || $! == ENOLCK) {
> +# if ($! == EOPNOTSUPP || $! == ENOLCK) {
> require Fink::Config;
> if (!defined $Fink::Config::config ||
> !$Fink::Config::config->get_option("LockWarning", 0)) {
> @@ -1772,7 +1772,7 @@
> if defined $Fink::Config::config;
> }
> return ($lockfile_FH, 0);
> - }
> +# }
>
> return (wantarray ? (0, 0) : 0) if $no_block;
>
> @@ -1808,7 +1808,7 @@
> close $lockfile_FH;
> return wantarray ? (0, 0) : 0;
> }
> - }
> +# }
> }
>
> =item dpkg_lockwait
>
> to avoid the flock() calls in perl suppresses the failure under make 4.1
> on 10.12.
>
>
------------------------------------------------------------------------------
_______________________________________________
Fink-devel mailing list
[email protected]
List archive:
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel