Subject: Re: Anyone compiling X on NetBSD-current ?
To: Robert Elz <kre@munnari.OZ.AU>
From: Frederick Bruckman <>
List: current-users
Date: 04/18/2002 08:56:18
On Thu, 18 Apr 2002, Robert Elz wrote:

> I guess I should see what happens if I try compiling X with a DESTDIR
> that is not / when there is no /usr/X11R6 installed at all, to see if
> it was being broken because of an assumption somewhere that DESTDIR==/
> or because it was just finding files in /usr/X11R6 first, before
> in DESTDIR/usr/X11R6, and assuming they would do. But some other day...

DESTDIR!=/ works, because that's how we make snapshots. [If you try to
make a snapshot with DESTDIR=/, you'll get a lot of old files that
"xsrc" thinks my have been locally altered, and so won't overwrite.]

I believe "xsrc" does use some of the installed files, such as
"imake", to bootstrap "imake" and "xmkmf", only if they are available.
It shouldn't make much difference in the end result.

> I appreciate the problems attempting to make pkgsrc cross compilable
> (given that NetBSD doesn't control the environment), but I think it would
> really be useful to make X compile that way.  Then a complete release
> could be cross compiled, now the x* sets can't be.

What would be useful to me, would be a wrapper like "nbmake-<arch>"
which was capabable of building even a single object file outside of
the "src" tree. As it is, the bootstrap compiler is not a proper
cross-compiler -- it's not wired to use the target host's includes,
and instead relies on src/share/mk to supply the correct CPPFLAGS to
search in ${DESTDIR}/usr/include. Is should probably be possible to
set all the right stuff in the environment to use it anyway, but I
haven't figured it out yet.

With that, I could see if an apparent compiler bug can be reproduced
with the cross-compiler, or maybe even run "configure" on the Mac, but
do the actual build on the PC (for m68k).