Subject: Re: buildlink & imake & xpkgwedge ?
To: None <tech-pkg@netbsd.org>
From: Johnny C. Lam <jlam@NetBSD.org>
List: tech-pkg
Date: 09/23/2004 02:34:02
On Wed, Sep 22, 2004 at 09:12:52PM -0400, Allen Briggs wrote:
> I'm using a freshly-updated pkgsrc on a 2.0_BETA system with xpkgwedge
> installed, and I'm having some issues trying to use that setup to
> compile imake-using packages.
> 
> I noticed this with pkgsrc/x11/Xaw3d:
> ===> configure-message [Xaw3d-1.5] ===> Configuring for Xaw3d-1.5
> imake -DUseInstalled -I/usr/pkg/lib/X11/config -I/usr/X11R6/lib/X11/config
> Imakefile.c:15: Imake.tmpl: No such file or directory
> /usr/X11R6/bin/imake: Exit code 1.
>   Stop.
> *** Error code 1
> 
> If I cd into the subdirectories and try to run the imake command by hand
> (or xmkmf), it works fine.  Of course, that's not using the buildlink
> wrapper.  If I run the buildlink wrapper by hand, I see the error:
> 
> $ ../../../.wrapper/bin/imake -DUseInstalled -I/usr/pkg/lib/X11/config -I/usr/X11R6/lib/X11/config
> Imakefile.c:15: Imake.tmpl: No such file or directory
> /usr/X11R6/bin/imake: Exit code 1.
>   Stop.
> 
> if I run that with sh -x, it's clear what's happening:
> 
> ...
> + /usr/X11R6/bin/imake -DUseInstalled -I/usr/pkgsrc/x11/Xaw3d/work.i386/.buildlink/lib/X11/config -I/usr/pkgsrc/x11/Xaw3d/work.i386/.x11-buildlink/lib/X11/config
> Imakefile.c:15: Imake.tmpl: No such file or directory
> /usr/X11R6/bin/imake: Exit code 1.
>   Stop.
> 
> Looking under work.i386, I see neither .buildlink/lib/X11/config nor
> .x11-buildlink/lib/X11/config.  If I create .buildlink/lib/X11/config
> and copy the files from /usr/X11R6/lib/X11/config AND
> /usr/pkg/lib/X11/config (for xpkgwedge defs) there, it works OK,
> but something like that should be happening anyway, right?
> 
> Thoughts?  What have I managed to scramble here?

You're doing nothing wrong; the new wrapper framework apparently has
some bugs with package that build using imake, and I'll take care of
it.  If you want to file a PR on this, please feel free to assign it
to me.

In the future, I recommend checking the work/.work.log file when
packages don't build, as that file gives a step-by-step account of
what the wrapper scripts are doing and is an excellent source of
debugging information.

	Cheers,

	-- Johnny Lam <jlam@NetBSD.org>