Subject: Re: Cross-compiling bug - where to report?
To: None <netbsd-help@netbsd.org>
From: Frederick Bruckman <fredb@immanent.net>
List: netbsd-help
Date: 04/04/2005 00:50:34
In article <BAY101-F28663963B2FF3115E0DF5FAD3A0@phx.gbl>,
	"Peter Hull" <peterhull90@hotmail.com> writes:
> I have been trying to build NetBSD 2.0 on a Linux (SuSE 8.2) system, and 
> found an error whilst installing the info files for libbz2
> I started the process with
> ./build.sh -m i386 release
> and it failed with a message like*
> 
> No rule to make '/usr/local/info:/usr/share/info:/usr/info/libbz2.info'
> 
> As far as I can tell (I'm not familiar enough with BSD's make or with the 
> NetBSD build system) it seems to be pulling the value of the variable 
> INFOPATH (or maybe INFODIR) from my Linux environment and  building an 
> 'impossible' target path from that. When I unset those two variables, the 
> error did not occur - but I wonder where it is trying to install the info 
> files now. It should be $(NETBSDSRCDIR)/destdir.i386/usr/info' , shouldn't 
> it?

${INFODIR} is set conditionally to "/usr/share/info" in "bsd.own.mk".
It's really meant to be overridden only in the "Makefile" for a program,
not by the user. There's no problem with setting ${INFOPATH} -- I do that
all the time. ${INFODIR} isn't documented to do anything for "info". What
do you use that for?

> Please can someone advise:
> 1. Is this a bug?

I don't think so.  There are a lot of little ways to go wrong.  If it
were really common to set ${INFODIR} in the environment then it would
be annoying to other people, too, and worth changing for that reason.
You'd have to make a case, though.

> 2. Have I posted it to the correct place?

Sure, netbsd-help is always a good place to start. If you find a real
bug -- and you will ;-) -- you can always take it a tech-* forum, or
fire off a problem report.

> 3. What other information (from me) is needed to fix it?

What many of the developers recommend, is to create a little wrapper
script at the top of the NetBSD 'src' tree.  You can use it to unset
${INFODIR}, set your ${PATH}, and give some default arguments which
you always want (such as -U).  For example:


----build-netbsd---------------------------------------------
#/bin/sh

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
export PATH

unset INFODIR

exec ./build.sh					\
   -m i386 -U ${*:-release} 
-------------------------------------------------------------


Such with no arguments would build a release without X, but if you
add any arguments then a release isn't done.  So, after an update,
you could invoke the same script to build a custom kernel:

    ./build-netbsd kernel=MYKERNEL

or perhaps just update the kernel after a cvs update, with

    ./build-netbsd tools kernel=MYKERNEL

To build a full release, you could change the script, or call it
with "-x release".  You get the idea?


Frederick