NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

error writing to stdout



Not sure if this is a netbsd issue or a pkgsrc issue.

I'm seeing this increasingly as a failure when doing pkgsrc builds. Universally it seems to be thunderbird and firefox that blow up. gmake may be implicated.

This is from a failing firefox build.

gmake[4]: Leaving directory '/pkg_comp/obj/pkgsrc/www/firefox/default/build/config/makefiles/xpidl'
gmake[4]: write error: stdout
gmake[3]: *** [Makefile:15: export] Error 1

stdout in this case is a pipe but unless the receiving program crashes which it hasn't as it grabbed that data and wrote it to a file. So do we have an error code leaking out that shouldn't be or has gmake got a bug. Only time I've seen stdout return errors in programs is if I've done something daft like make the file handle non-blocking which tends to cause trouble.

This is a rather random error that comes and goes and I don't really know how to track it down. I can't really ktrace the pkgsrc build as that would be a nightmare to sift through.

The offending code in gmake is:
static void
close_stdout (void)
{
  int prev_fail = ferror (stdout);
  int fclose_fail = fclose (stdout);

  if (prev_fail || fclose_fail)
    {
      if (fclose_fail)
        perror_with_name (_("write error: stdout"), "");
      else
        O (error, NILF, _("write error: stdout"));
      exit (MAKE_TROUBLE);
    }
}

I'm really tempted to write a patch for gmake that skips this bit of paranoia ;) Thoughts?

Mike


Home | Main Index | Thread Index | Old Index