pkgsrc-Bugs archive

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

Re: pkg/45450: pkgtools/p5-pkgsrc-Dewey fails to build with non-standard $WRKOBJDIR

The following reply was made to PR pkg/45450; it has been noted by GNATS.

From: David Holland <>
Subject: Re: pkg/45450: pkgtools/p5-pkgsrc-Dewey fails to build with
 non-standard $WRKOBJDIR
Date: Thu, 13 Oct 2011 14:53:34 +0000

 On Wed, Oct 12, 2011 at 01:00:09PM +0000, John Marino wrote:
  >>  You sound like a cancer patient that tells his doc about the head ache
  >>  he had for years. The very good reason for this being off-limits is that
  >>  it triggers magic behavior in make. Enforcing it is non-trivial as there
  >>  are too many different ways to trigger it.
  >  I assumed the trivial way to enforce it is to check the value of
  >  $WRKOBJDIR and emit an error/die if it starts with "/usr/obj/".
  >  >  Frankly, I am more in favour of something being openly broken that
  >  >  seemingly working most of the time. This is such a case where pretty
  >  >  much every make target can easily create a more or less obvious error.
  >  >  I don't see the advantage in hunting them down.
  >  I'd rather the case just be handled rather gracefully than let it go on
  >  with unexpected behavior.  If the decision is really that "/usr/obj/" is
  >  a sacred directory, then A) publish that in the pkgsrc guide and B) have
  >  pkgsrc enforce the limitation.  Obviously I'd rather there was no such
  >  limitation, but if that's not practical then so be it.
 It's not sacred, it's just a special case, and it's never going to
 work. (Or at least, not until make's objdir handling misfeature is
 expunged, but that isn't happening anytime soon.)
 Something like
 .if ${.OBJDIR} != ${.CURDIR}
 .error "Hit an objdir, please don't do this"
 will probably work, but the error isn't going to be comprehensible.
 Writing a test that will allow reporting what went wrong requires
 duplicating make's rather complicated objdir search logic, which isn't
 a very good idea.
 In the meantime, just change your WRKOBJDIR to /usr/obj/pkg. This will
 also help keep it from getting mixed up with object dirs from the base
 system build.
 David A. Holland

Home | Main Index | Thread Index | Old Index