Subject: Re: CVS commit: pkgsrc/mk
To: Johnny C. Lam <jlam@pkgsrc.org>
From: James Chacon <jmc@NetBSD.org>
List: tech-pkg
Date: 05/12/2006 00:05:03
On Fri, May 12, 2006 at 03:01:21AM +0000, Johnny C. Lam wrote:
> On Fri, May 12, 2006 at 02:18:21AM +0200, Roland Illig wrote:
> > Johnny C. Lam wrote:
> > >Module Name:	pkgsrc
> > >Committed By:	jlam
> > >Date:		Thu May 11 22:13:19 UTC 2006
> > >
> > >Modified Files:
> > >	pkgsrc/mk: compiler.mk
> > >
> > >Log Message:
> > >Make build failures due to the previous commit less mysterious by using
> > >a wrapper script that emits a hint of what went wrong.
> > 
> > Nice try, but it doesn't give any hint to me. After commenting out the 
> > USE_LANGUAGES line in wm/icewm/Makefile.common I get:
> > 
> > ===> Configuring for icewm-1.2.25
> > => Fixing locale directory references.
> > WARNING: [subst.mk] Ignoring non-text file "./src/Makefile.in".
> > configure: WARNING: If you wanted to set the --build type, don't use --host.
> >     If a cross compiler is detected then cross compile mode will be used.
> > configure: error: C++ compiler cannot create executables
> > See `config.log' for more details.
> > *** Error code 77
> > 
> > 
> > I cannot see any hint here. What about printing the warning (which is 
> > currently in config.log) also to the terminal, so the user can see it 
> > more directly?
> 
> I don't know how to do this portably, but please feel free to modify
> the implementation.  Right now, there is enough information in the
> files that pkgsrc directs you to look at to figure out what's wrong
> and how to fix it.
> 
> > By the way, I would prefer to only create the fail-wrappers when 
> > PKG_DEVELOPER is set. For a typical user (even more for unexperienced 
> > users) this is just annoying.
> 
> I do not see how this is "annoying".  If the package doesn't invoke
> the C++ compiler, then nothing happens.  If it does, and it doesn't
> properly set USE_LANGUAGES, then it fails just like it would if
> PKG_CXX=${FALSE}.  Where is the "annoying" part?
> 
> And please don't cross-post.

Plus, at least in this case it stops with some clue about c++.

The one I fixed earlier in graphviz was completely broken. The configure
script happily skipped c++ (it noted none was available) but later on 
something still tries to compile with "c++" and then all you get is a nice

"Error 1"

and nothing else. It took me a good 10m to figure out what was going on
and in general I figure I have some clue here though I haven't hacked pkgsrc
in eons. At least with this patch I'd have gotten something else.

James