Subject: solution to odd NetBSD 2.1 kernel build problem
To: None <port-sparc64@netbsd.org>
From: Ryan Cresawn <cresawn@chass.utoronto.ca>
List: port-sparc64
Date: 10/30/2005 01:43:49
I've been frustrated lately because I haven't been able to build
either netbsd-2-1-RELEASE or netbsd-2-1 on my Ultra 1 or Ultra 5.
Both computers were able to build the tools of both branches; however,
neither computer could build distribution or kernel or
netbsd-2-1-RELEASE.  This is when I used cvs to checkout netbsd-2-1.
With this branch I was able to build tools and distribution but not
kernel with the Ultra 5.  I have not yet tested the build on the Ultra
1 because it is slower and I haven't had the time.  I no longer have
the error---sorry---but I know that it was complaining about a closing
double-quote (") missing in vers.c.  The file,
/usr/obj/sys/arch/sparc64/compile/GENERIC/vers.c, contains the
following comments at the top:


/*
 * Automatically generated file from /usr/src/sys/conf/newvers.sh
 * Do not edit.
 */


Line 19 clearly lacks a double-quote at the end:


"    The Regents of the University of California.  All rights reserved.\n


I followed the trail to newvers.sh to see what could be wrong with it
and found line 48 which is related to the copyright notice:


copyright=$(awk '{ print "\""$0"\\n\""}' ${cwd}/copyright)


So finally I decided to look at the copyright file,
/usr/src/sys/conf/copyright.  There was nothing particularly obvious
about the file that seemed like it should be causing problems;
however, I did notice that the line which later in vers.c lacks the
double-quote happens to be the last line in the copyright file.  I
decided that it might be worthwhile to try appending a newline
character, \n, to the end of the file and then attempting the kernel
build again.  I'm happy to write that it worked.  I hope this is
useful to others who have not had the luck they would like with
building 2.1 so far.

Ryan