Home | History | Annotate | Line # | Download | only in src
UPDATING revision 1.146
      1 $NetBSD: UPDATING,v 1.146 2006/06/02 19:01:00 pavel Exp $
      2 
      3 This file (UPDATING) is intended to be a brief reference to recent
      4 changes that might cause problems in the build process, and a guide for
      5 what to do if something doesn't work.
      6 
      7 For a more detailed description of the recommended way to build NetBSD
      8 using build.sh, see the BUILDING file.
      9 
     10 Note that much of the advice in this UPDATING file was written before
     11 build.sh existed.  Nevertheless, the advice here may be useful for
     12 working around specific problems with build.sh.
     13 
     14 See also: BUILDING, build.sh, Makefile.
     15 
     16 Recent changes:
     17 ^^^^^^^^^^^^^^^
     18 
     19 20060526:
     20 	the kernel links script for i386 and xen was changed to set the
     21 	load address correctly, for the benefit of MULTIBOOT boot loaders
     22 	(like Grub). If you use a linker (ld) older than from 2006/04/17, it
     23 	will be unable to link the kernel because of a bug, and you will
     24 	have to update at least src/gnu/dist/binutils/ld and recompile the
     25 	linker. If using the build.sh script, the easiest way is with a
     26 	"build.sh tools" command, with any other options that you use
     27 	normally. When using build.sh, the linker binary is installed as
     28 	${TOOLDIR}/bin/i386--netbsdelf-ld.
     29 20060131:
     30 	the protocol between the sparc64 bootloader (ofwboot) and
     31 	the kernel was changed. Before installing a new kernel,
     32 	you need to update ofwboot. After a full build, just copy
     33 	/usr/mdec/ofwboot to /, or do a rebuild of
     34 	src/sys/arch/sparc/stand/ofwboot and install the result to /.
     35 
     36 20050917:
     37 	arch/*/conf/std.* was changed to include conf/std, which
     38 	contains MI options previously enabled by default.
     39 	If you have kernel config files which doesn't include
     40 	arch/*/conf/std.*, you need to edit them to include conf/std
     41 	to get the previous configuration.
     42 
     43 20050830:
     44 	named.conf was moved from /etc/namedb to /etc.
     45 	postinstall(8) migrates this during interactive use.
     46 	Users of MKUPDATE=yes will need to manually rectify
     47 	this in their DESTDIR.
     48 
     49 20050825:
     50 	Some data structures in sys/device.h, related to interface
     51 	attributes and locator names, were changed. config(1) was
     52 	modified to emit the new data structures.
     53 	Thus usr.bin/config must be updated (and run on the kernel
     54 	configuration file) before a new kernel can be built.
     55 
     56 20050531:
     57 	genassym.sh(8) was moved to genassym(1). You need to either build
     58 	tools first or install the version of genassym from /usr/bin before
     59 	you can build a kernel again.
     60 
     61 20050520:
     62 	Because a kernfs bug which xentools relies on was fixed,
     63 	xentools up to xentools20-2.0.3nb4 won't work with new kernel.
     64 
     65 20050417:
     66 	postinstall(8) was moved from /etc to /usr/sbin and made part
     67 	of the "base" set, to make it easier to invoke after an
     68 	upgrade.
     69 
     70 20050325:
     71 	pcppi(4) was separated in two devices, adding attimer(4).  Be sure
     72 	to add a config line for an attimer(4) device in your kernel
     73 	configuration, or you won't be able to set the pitch of the beep
     74 	with wsconsctl.  Depending on the default value for the pitch, you
     75 	might even not hear any more beep.  Also, it is advised to attach both
     76 	devices the same way (i.e., both on isa or both on acpi) or the
     77 	pcppi(4) device may fail to find the attimer(4) one.
     78 
     79 20050211:
     80 	Fixes to tools/Makefile.gnuhost may cause UPDATE=1 builds in
     81 	some of the cross tools to fail if they use configure. Some configure's
     82 	cache the environment passed in and notice the new environment is
     83 	different and abort. Doing a clean in tools/ should be enough to
     84 	make a build continue.
     85 
     86 20050109:
     87 	Since su is using pam by default now, make sure that you have
     88 	/etc/pam.d populated (postinstall will do that automatically
     89 	for you). Otherwise su will fail open (i.e. will not require
     90 	a password).
     91 
     92 20041229:
     93 	Make had a path resolution bug that manifested itself as not
     94 	being able to install openpam.3. This bug has been fixed, but
     95 	you might need to rebuild make manually first to get through
     96 	the build.
     97 
     98 20041201:
     99 	Userland programs have been changed to use /dev/bpf instead of
    100 	/dev/bpfX. You need to create that device by installing a new
    101 	MAKEDEV and running it, or mv /dev/bpf0 /dev/bpf && rm /dev/bpf[0-9]*
    102 
    103 20041006:
    104 
    105 	A bug was introduced into /bin/sh (var.c rev 1.35) which causes
    106 	variables to not export correctly to subshells in all cases. This
    107 	will cause builds to break if that version of /bin/sh is installed
    108 	on the system. The proper version of /bin/sh can be verified with:
    109 
    110         ident /bin/sh | grep var
    111 
    112 	Any /bin/sh w. version 1.35 will not work and needs to be updated
    113 	before attempting a build.
    114 	
    115 20041001:
    116 	The ipfilter kernel sources moved from sys/netinet to
    117 	dist/sys/ipf/netinet. Due to the move some Makefile
    118 	dependencies are now dangling requiring a make cleandir
    119 	before they work again (kdump, ktruss, rescue, ipf, and
    120 	ftp-proxy are the victims).
    121 
    122 20040715:
    123 	The rc.d/sendmail script now uses a heuristic to determine
    124 	if sendmail should be started at boot time.  It checks the
    125 	contents of /etc/mailer.conf, /etc/mail/submit.cf, and the
    126 	owner and mode of the sendmail binary to see if any changes
    127 	to the mail infrastructure have been made.  If no changes
    128 	are detected, it will start an SMTP listener.
    129 
    130 	Setting sendmail=NO in /etc/rc.conf will override this.
    131 
    132 	If you are only using sendmail by default and only for
    133 	local delivery, it is important that you also update your
    134 	sendmail.cf so that the SMTP listener only listens on the
    135 	loopback interface.
    136 
    137 20040715:
    138 	The method by which athhal-elf.o gets pulled into i386
    139 	kernel builds has been changed again.  The latest version
    140 	of bsd.files.mk is no longer required.
    141 
    142 20040621:
    143 	Due to the recent rototill of tools/compat it's crucial one starts
    144 	from a clean objdir under tools/*.
    145 
    146 	This is mostly due to generated files (yacc and lex sources) needing
    147 	to be generated with new rules from bsd.hostprog.mk.
    148 
    149 	The safest course is to rm -rf all objects under tools before building.
    150 
    151 20040516:
    152 	The end-user modifiable X11 configuration has been moved
    153 	from /usr/X11R6/lib/X11/<dir> to /etc/X11/<dir>.
    154 	Ensure that src and xsrc is up to date, and run
    155 	"make cleandir" in src/x11 before your next build.
    156 
    157 	postinstall currently doesn't migrate the files from
    158 	/usr/X11R6/lib/X11/* to /etc/X11/* although it does
    159 	detect that this needs to occur, so you'll have to
    160 	manually move these files yourself.
    161 
    162 20040426:
    163 	Support for the original dynamic sysctl node structure has
    164 	been removed in favor of the newer layout.  This affects
    165 	consumers of the create and delete interface, as well as
    166 	the dynamic discovery mechanism.  This is believed only to
    167 	be the sysctl(8) binary itself, at this point in time, so
    168 	the only effect of this should be that a sysctl binary
    169 	built from sources dated between 2003/12/04 and 2004/03/24
    170 	will not work on a kernel built from sources dated after
    171 	2004/04/25.  If you need a new sysctl binary but build.sh
    172 	does not work, make sure that your revision of
    173 	src/sys/sys/sysctl.h is 1.112 (or later), and then the
    174 	do the following:
    175 
    176 	cd /usr/src (or wherever your source tree is)
    177 	make USETOOLS=no includes
    178 	cd lib/libc
    179 	make USETOOLS=no dependall install
    180 	cd ../../sbin/sysctl
    181 	make USETOOLS=no dependall install
    182 
    183 	If you are using older sysctl binary, GNU autoconf would fail to
    184 	identify your machine architecture, and tries to build binary for
    185 	"unknown-unknown-netbsd20F" or something like that.  if that happens,
    186 	make sure to follow the above steps.
    187 
    188 20040425:
    189 	The ffs superblock issues listed below under 20040109 and 20030402
    190 	are now automatically addressed by the /etc/rc.d/fixsb script or by
    191 	sysinst when it checks a a filesystem. The manual fsck_ffs -b16 -c4
    192 	invocation mentioned below will continue to work and is now
    193 	automated by those scripts.  Note that under certain circumstances,
    194 	affected filesystems upgraded to a -current kernel first before
    195 	upgrading their userland with the fixsb and fsck_ffs fixes may
    196 	encounter a 'freeing free inode' panic when writing to the affected
    197 	filesystem, so it is a good idea to repair the filesystem as soon as
    198 	possible.  For more details on the fixsb script, see pr install/25138.
    199 
    200 20040418:
    201 	statfs(2) and friends have been replaced with statvfs(2). Before
    202 	installing a newly build userland make sure that you are running
    203 	a newly built kernel with COMPAT_20 set. In addition your libc
    204 	build might not work (undefined SYS_statfs symbol) because make
    205 	clean does not know how to remove files it does not know about
    206 	anymore. Manually remove all generated .S sources and objects
    207 	from the libc build directory.
    208 
    209 20040326:
    210 	The method by which athhal-elf.o gets pulled into i386 kernel builds
    211 	has been changed. The file is now stored as a uuencoded file in CVS
    212 	and the generated Makefile will use the new .uue rules from bsd.file.mk
    213 	to build it.
    214 
    215 	This means you must have the latest bsd.files.mk installed when
    216 	building a kernel without USETOOLS=yes.
    217 
    218 20040318:
    219 	A bug in the cgd(4) blowfish code was corrected, without
    220 	provision of backwards compatibility, after several public
    221 	notices over several months. Users of cgd with blowfish cipher
    222 	ONLY must dump their data before updating their kernels, and
    223 	recreate cgd's and restore data using the new kernel. See
    224 	(recent message to current-users, URL when mail-index has updated)
    225 
    226 20040313:
    227 	On acorn32, the opms and qms drivers have been withdrawn, and
    228 	the old wsqms driver is now called qms.  Kernel config files
    229 	will need updating.  See the ones in sys/arch/acorn32/conf
    230 	for examples.
    231 
    232 20040125:
    233 	On acorn32, the beep and sysbeep devices are no longer
    234 	needed, and will need to be deleted from kernel configuration
    235 	files.
    236 
    237 20040109:
    238 	Compatibility for old ffs superblock layouts has been
    239 	added, and the restrictive fsck checks have been reenabled
    240 	when using those layouts.  If you have been using -current
    241 	since 20030402, you may find that fsck again signals fatal
    242 	superblock mismatches.  To repair, make sure you have
    243 	an updated fsck_ffs and then you can use fsck_ffs -b 16 -c 4
    244 	to complete the filesystem upgrade.  A message has
    245 	been added to the kernel which should detect this problem.
    246 	See the following discussion for more information:
    247 	http://mail-index.NetBSD.org/current-users/2004/01/11/0022.html
    248 
    249 20031203:
    250 	New binutils builds may fail due to old dependencies.
    251 	It's necessary to "make cleandir" to ensure that
    252 	the dependencies will be rebuilt correctly.
    253 
    254 20031111:
    255 	A newer mkdep is needed.  Error noting that is
    256 		cc: Ambiguous abbreviation --
    257 
    258 20031008:
    259 	/usr/include/sys/disklabel_mbr.h was removed.
    260 	It's necessary to "make cleandir" to ensure that
    261 	the dependencies will be rebuilt correctly.
    262 
    263 20031007:
    264 	A sign exension bug was fixed which set all the high bits
    265 	of our newly expanded ffs fs_flags.  This should only
    266 	affect users who installed or upgraded in September of 2003.
    267 	A small utility program was posted to tech-kern which
    268 	should fix this problem, and a warning message was added
    269 	to the kernel which should discover and warn about it.  See
    270 	http://mail-index.NetBSD.org/tech-kern/2003/10/07/0005.html
    271 
    272 20030906:
    273 	With the addition of siginfo support the old signal trampoline
    274 	code has been deprecated to COMPAT_16. Make sure that your running
    275 	kernel has COMPAT_16 enabled before building userland.
    276 
    277 20030801:
    278 	With the new openssl, there is some header and library shuffling.
    279 	rm -f /usr/include/des.h /usr/include/kerberosIV/* /lib/libdes* \
    280 	/usr/lib/libdes* before building.
    281 
    282 20030703:
    283 	Texinfo was updated to 4.6.  To avoid failures when trying to
    284 	build the included texinfo files, do:
    285 
    286 	cd src/gnu/usr.bin/texinfo
    287 	make MKINFO=no dependall install
    288 
    289 20030630:
    290 	Groff was updated to 1.19; it's probably necessary to do
    291 		cd share/mk && make install
    292 		cd src/gnu/usr.bin/groff
    293 		make MKMAN=no dependall install
    294 	(untested).
    295 
    296 20030516:
    297 	Due to bugs in the export handling code, invalid export lines
    298 	were accepted before and caused the kernel to panic when
    299 	mountd got restarted because it freed memory that had already
    300 	been freed. This has been fixed and the kernel checks
    301 	export addresses very strictly. If you upgrade your kernel,
    302 	make sure you also upgrade mountd, because if your export
    303 	file contains lines with an old inet4 address syntax (i.e.
    304 	a.b.c or a.b or a), they will get rejected by the new kernel.
    305 
    306 20030402:
    307 	The superblock layout for FFS was changed.  If you have 1.6
    308 	fsck binaries, they will signal a fatal superblock mismatch
    309 	with the first alternate, because they compare too many
    310 	fields (even ones that aren't useful).  If possible, upgrade
    311 	your fsck_ffs binary before using a new kernel.
    312 	None of this signals actual filesystem damage.
    313 
    314 20030324:
    315 	sendmail version 8.12.8 was imported.  Since sendmail is
    316 	now setgid to the smmsp group, and runs in "collection"
    317 	mode for most common activities, there is a new config
    318 	file called submit.cf that needs to live in /etc/mail.
    319 	The generic submit.cf sample in /usr/share/sendmail/cf
    320 	is named netbsd-msp.cf.  Upgrading your regular sendmail
    321 	configuration file is also strongly advised.
    322 
    323 	See the section named "MESSAGE SUBMISSION PROGRAM" in
    324 	the updated /usr/share/sendmail/README file for more
    325 	information.
    326 
    327 20030117:
    328 	Texinfo was updated to 4.3.  To avoid failures when trying to
    329 	build the included texinfo files, do:
    330 
    331 	cd src/gnu/usr.bin/texinfo
    332 	make MKINFO=no dependall install
    333 
    334 20021223:
    335 	The METALOG format changed slightly, to remove the leading
    336 	"${DESTDIR}" from path names.
    337 	This only affects people building with UNPRIVED.
    338 	For complete safety, remove the DESTDIR entirely and
    339 	update tools/mtree, before running make build.
    340 
    341 20021219:
    342 	CVS repository layout was changed.  See the following for details
    343 	if you are using (anonymous) cvs to update your tree.
    344 
    345 	http://mail-index.NetBSD.org/netbsd-announce/2002/12/19/0000.html
    346 
    347 20021219:
    348 	install(1) had a '-N dbdir' option added, to specify an
    349 	alternate location to look up users & groups (instead
    350 	of the host system passwd(5) and group(5) databases).
    351 
    352 	The build system was modified to take advantage of
    353 	this option (using ${NETBSDSRCDIR}/etc), so if you
    354 	use USETOOLS==no, you may have to rebuild and
    355 	reinstall usr.bin/xinstall first.
    356 
    357 20021130:
    358 	fparseln(3) moved from libutil to libc.
    359 	If building to DESTDIR=/, reinstall the includes
    360 	and rebuild libc:
    361 		make includes
    362 		make do-lib-libc
    363 	If using build.sh, "cd tools/compat && make clean"
    364 	before rebuilding the tools.
    365 
    366 20021126:
    367 	The mk.conf(5) variable SYS_INCLUDE has been deprecated,
    368 	including the optional "SYS_INCLUDE=symlinks" support.
    369 	All header files, including <sys/*.h> are copied into
    370 	/usr/include.
    371 
    372 20021121:
    373 	The C run-time support files crtbegin.o and crtend.o
    374 	(and their companions crtbeginS.o and crtendS.o) were
    375 	split up, with new crti.o and crtn.o files resulting.
    376 	This means that libtool needs to be rebuilt once the
    377 	new libraries are installed.  The process of rebuilding
    378 	libtool will cause it to automatically notice the new
    379 	required files, but it *must* be rebuilt in order to
    380 	do this.
    381 
    382 	An out-of-date libtool will result in shared libraries
    383 	which lack _init() and _fini() routines, which means that
    384 	their global contructors/destructors will not be invoked.
    385 
    386 20021121:
    387 	A bug related to how ARM ELF objects were tagged has been
    388 	corrected.
    389 
    390 	NetBSD ARM ELF uses the soft-VFP floating point model by
    391 	default.  However, the assembler lacked support for marking
    392 	objects as using the VFP floating point format, and the
    393 	compiler was not properly passing the flag indicating "soft-VFP"
    394 	to the assembler.
    395 
    396 	Unfortunately, this means that the linker will now consider
    397 	old (i.e. not marked "softvfp") NetBSD ARM ELF objects to be
    398 	incompatible with new (properly marked) objects.
    399 
    400 	The problem will only manifest itself if you attempt to compile
    401 	a new program using the fixed toolchain, and link that program
    402 	against old libraries which do not have the proper "softvfp"
    403 	markings.  ALL OF YOUR EXISTING BINARIES AND SHARED LIBRARIES
    404 	WILL CONTINUE TO WORK PROPERLY.
    405 
    406 	The only work-around for the problem is to recompile all of
    407 	the libraries on the system.  The easiest way to do this for
    408 	system libraries is to install a binary snapshot; they are
    409 	generally available on releng.NetBSD.org.  Any packages you
    410 	have installed which supply libraries will have to be recompiled
    411 	if you wish to link new programs against those libraries.
    412 
    413 	If you have questions about this matter, please contact
    414 	port-arm (a] NetBSD.org.
    415 
    416 20021011:
    417 	Systrace has been improved to support privilege elevation.
    418 	Updating the kernel requires the userland part of systrace
    419 	to be rebuilt.
    420 
    421 20021010:
    422 	The config(8) grammar was changed to allow options to register
    423 	dependencies on attributes, as well as other options.  Users
    424 	must update and reinstall usr.sbin/config before building a new
    425 	kernel.
    426 
    427 20021009:
    428 	A new attribute dependency syntax was introduced to config(8),
    429 	which is now used by the SCSI configuration description.  Users
    430 	must update and reinstall usr.sbin/config before building a new
    431 	kernel.
    432 
    433 20021003:
    434 	Several changes have been made to the autoconfiguration
    435 	framework.  Users must update and reinstall usr.sbin/config
    436 	before building a new kernel.
    437 
    438 20021001:
    439 	The i386mp branch has been merged.  To compile a kernel, users
    440 	will need to add the option 'cpu* at mainbus?' to their configuration
    441 	file.  Multiprocessor kernels will need
    442 	ioapic*		at mainbus? apid ?
    443 	options		MULTIPROCESSOR
    444 	options		COM_MPLOCK
    445 
    446 20020922:
    447 	MKDYNAMICROOT=yes enabled by default, which means that
    448 	certain shared libraries are installed into /lib, the shared
    449 	linker is installed into /libexec, and all programs in /bin
    450 	and /sbin are dynamically linked.
    451 	If you do not use "make build", you should ensure that
    452 	you have the libraries and shared linker in the new locations,
    453 	with:
    454 		make do-lib-csu do-lib-libc do-lib do-gnu-lib do-ld.elf_so
    455 
    456 20020917:
    457 	USE_NEW_TOOLCHAIN has been replaced with:
    458 	    -	TOOLCHAIN_MISSING -- set to "yes" on platforms for which
    459 		there is no working in-tree toolchain (hppa, ns32k, sh5,
    460 		x86_64).
    461 	    -	EXTERNAL_TOOLCHAIN -- if defined by the user, points to the
    462 		root of an external toolchain (e.g. /usr/local/gnu).  This
    463 		enables the cross-build framework even for TOOLCHAIN_MISSING
    464 		platforms.
    465 
    466 20020906:
    467 	gehenna-devsw has been merged into the trunk. Need to update and
    468 	reinstall usr.sbin/config before building the kernel.
    469 
    470 20020822:
    471 	Crunched rescue tools (contents of /bin and /sbin, plus others)
    472 	are now provided in /rescue.
    473 
    474 	To ensure that these are built statically linked (no matter
    475 	what the setting of LDSTATIC is), use a crunchgen(1) built
    476 	from sources newer than 20020820 (see the next entry).
    477 
    478 20020820:
    479 	crunchgen(1) changed to ensure that the generated program
    480 	is statically linked.
    481 
    482 	Solution: update and reinstall usr.bin/crunch
    483 
    484 20020605:
    485 	smmsp user/group has been added for sendmail.
    486 
    487 	Add the following into /etc/group:
    488 
    489 	smmsp:*:17:
    490 
    491 	and the following to /etc/master.passwd (via vipw):
    492 
    493 	smmsp:*:17:17::0:0:Sendmail Message Submission Program:/nonexistent:/sbin/nologin
    494 
    495 20020515:
    496 	sshd user/group has been added.  Need to hand add this in, or sshd
    497 	will not let you log in (with default, or UsePrivlegeSeparation=yes)
    498 
    499 	Add the following into /etc/group:
    500 
    501 	sshd:*:16:
    502 
    503 	and the following to /etc/master.passwd (via vipw):
    504 
    505 	sshd:*:16:16::0:0:& pseudo-user:/var/chroot/sshd:/sbin/nologin
    506 	
    507 	Also /var/chroot/sshd directory needs to be present (digged as part of
    508 	the build process).
    509 
    510 20020426:
    511 	NBUILDJOBS obsoleted in favor of just using -j.
    512 
    513 20020426:
    514 	etc/postinstall added, which performs various checks for 
    515 	configuration file updates and changes, and can fix most of
    516 	the problems identified.
    517 	This should make it much easier to upgrade a system's
    518 	configuration from earlier systems (as far back as NetBSD 1.5).
    519 
    520 20020320:
    521 	<bsd.lib.mk> needs a new install(1) for its "-a cmd" support.
    522 	Build and install at usr.bin/xinstall before the build.
    523 
    524 20020319:
    525 	Raw IPv6 socket now makes strict checking for sa_family and sa_len
    526 	on send(2) operation.  Be sure to have sbin/rtsol and usr.sbin/rtsold
    527 	newer than November 2001 when you upgrade the kernel.
    528 
    529 20020311:
    530 	ssh configuration files were moved from /etc to /etc/ssh.  Beware
    531 	if you restart your machine from remote.  Note that sshd.conf needs
    532 	to be changed (due to the use of "/etc" inside).
    533 
    534 20020223:
    535 	Users of the VAX port will need to rebuild and install gas
    536 	so it deal with the now present register prefix used in all
    537 	the VAX assembly files.
    538 
    539 20020118:
    540 	ntpd user/group has been added.  Need to hand add this in or builds
    541 	will break as mtree aborts early.
    542 
    543 	Add the following into /etc/group:
    544 
    545 	ntpd:*:15:
    546 
    547 	and the following to /etc/master.passwd (via vipw):
    548 
    549 	ntpd:*:15:15::0:0:Ntpd pseudo-user:/var/chroot/ntpd:/sbin/nologin
    550 
    551 20011207:
    552 	If you're attempting to build a snapshot on sparc64 and are getting
    553 	reloc errors from the toolchain groff binary this means your native
    554 	toolchain has some broken C++ bits.
    555 
    556 	To fix:
    557 
    558 	Build a new toolchain (i.e. build.sh -t)
    559 	Use the new toolchain to build and install natively (i.e. /usr/lib)
    560 
    561 	gnu/lib/libgcc
    562 	gnu/lib/libstdc++
    563 
    564 	After this a snapshot will be able to be built.
    565 
    566 20011201:
    567 	In order for a sparc64 build to work you must have a working awk. If
    568 	you've built and installed a system with the new toolchain up to this
    569 	point you do not have a working awk as its ability to do floating
    570 	point is broken. 
    571 
    572 	To build:
    573 
    574 	remake and install gnu/lib/libgcc
    575 	remake and install gnu/usr.bin/gawk into /usr/bin (make sure it links
    576 	against the new libgcc.a)
    577 
    578 20011128:
    579 	Kernel config information was changed to use defflag in
    580 	the various "files" files.  Bug fixes to config(8) are
    581 	required in order for this to work properly.  Make sure
    582 	to build and install in usr.sbin/config before attempting
    583 	to build a new kernel.
    584 
    585 20011030:
    586 	libc/locale/wcstod.c now needs new lint(1). Update lint(1)
    587 	before building libc.
    588 
    589 20011029:
    590 	The new document BUILDING.mdoc (view with nroff | more, or
    591 	see pre-generated .txt and .html versions) describes the build
    592 	procedure in great detail.  BUILDING, and the USE_NEW_TOOLCHAIN
    593 	build process, are intended in the long run to replace this
    594 	manual update log.
    595 
    596 	Users building a USE_NEW_TOOLCHAIN system should read the
    597 	BUILDING document for caveats.  Generally, BUILDING supersedes
    598 	UPDATING for these systems, as tool updating is taken care of
    599 	by the new build system.
    600 
    601 20011028:
    602 	src/etc/Makefile now needs install to be able to handle
    603 	symlinks that point to nowhere. A bug in install that
    604 	prevented this was corrected.
    605 
    606 	Solution: update and reinstall usr.bin/xinstall
    607 	Better Solution: Use the new toolchain and it will just work
    608 	for you.
    609 
    610 20011006:
    611 	/etc/mtree/NetBSD.dist has been updated to take advantage of
    612 	absolute path support added to mtree(8). Older mtree(8)s don't
    613 	understand the format.
    614 
    615 	Solution: update and reinstall usr.sbin/mtree
    616 
    617 20011004:
    618 	Crunchgen has been updated to work via reach-over makefiles. Updating
    619 	is suggested before running a snapshot build
    620 
    621 20010915:
    622 	The new "ubcperf" code committed by Chuck Silvers removed
    623 	a header file, uvm/uvm_vnode.h.  There may be stale .depend
    624 	files that still reference this file.
    625 
    626 	Solution: "make cleandir && make dependall" in affected
    627 	directories.
    628 
    629 20010803:
    630 	grep.info is now built from grep.texi using makeinfo.  Since it
    631 	requires makeinfo v4.0, you need to install new texinfo before
    632 	building gnu/usr.bin/grep.  To install new texinfo, please follow
    633 	the instruction described in 20010726 entry.
    634 
    635 20010803: 
    636 	(i386 only): i386 kernel now uses new instructions like
    637 	`fxsave' which old gas doesn't understand.  To build the
    638 	kernel successfully, you need to build and install a new toolchain, 
    639 	(i.e., build.sh -t) or 	(temporarily) comment out "options I686_CPU" 
    640 	from your kernel configuration until you rebuild your userland.
    641 	See 20011029 above and BUILDING file in this directory for more information.
    642 	[updated 20020630 since i386 gas moved when USE_NEW_TOOLCHAIN enabled]
    643 
    644 20010731:
    645 	Bootloader update on ELF platforms.  DDB in kernels from before
    646 	this will be unable to read symbol tables provided by newer
    647 	bootloaders.
    648 
    649 20010726:
    650 	Texinfo was updated to 4.0.  To avoid failures when trying to
    651 	build the included texinfo files, do:
    652 
    653 	cd src/gnu/usr.bin/texinfo
    654 	make MKINFO=no dependall install
    655 
    656 20010718:
    657 	Enabled correct .init/.fini processing in crt0.  The way this
    658 	was done was to change a -I directive to cc(1), which means
    659 	make(1) will have a stale dependency (it will be checking the
    660 	timestamp on the wrong "dot_init.h").
    661 
    662 	The symptom you will see is that new programs die with SIGSEGV
    663 	if you have a stale dependency.
    664 
    665 	Solution: "make cleandir" in both lib/csu and libexec/ld.elf_so
    666 	before starting your build.
    667 
    668 20010628:
    669 	A construct was added to uvm_page.h that uncovered a bug
    670 	in lint(1).  If you get a warning/error about a non-portable
    671 	bitfield, update your lint(1) before proceeding.
    672 
    673 20010226:
    674 	Added named user/group to system. Need to hand add this in or builds
    675 	will break as mtree aborts early.
    676 
    677 	To work around add by hand:
    678 
    679 	named:*:14:
    680 
    681 	to /etc/group and add:
    682 
    683 	named:*:14:14::0:0:Named pseudo-user:/var/named:/sbin/nologin
    684 
    685 	to master.passwd (use vipw for instance if doing by hand).
    686 
    687 	Now a make build should progress.
    688 
    689 20010219:
    690 	get/setprogname() added. Any hostprogs that may use this will need
    691 	to be bootstrapped manually until the host system is current.
    692 
    693 	Known problems: sys/arch/macppc/stand/fixcoff
    694 			usr.sbin/config (adding -DMAKE_BOOTSTRAP to
    695 			  CFLAGS and rebuilding should work)
    696 			usr.sbin/mdsetimage - Build a static copy if
    697 			  building a snapshot before fully bootstrapped.
    698 
    699 20010204:
    700 	prepare the code to compile with stricter gcc flags. in
    701 	particular start eliminating redundant declarations. Yacc
    702 	needs to be installed before make build.
    703 
    704 20010114:
    705 	introduce .if commands(target) in make(1). You need to
    706 	bring everything up-to-date first, then without installing
    707 	anything make and install in usr.bin/make, then proceed
    708 	with make build.
    709 
    710 20010101:
    711 	bsd.subdir.mk committed 20001230 had a bug which caused
    712 	afterinstall targets to run too soon; update again.
    713 
    714 20001230:
    715 	New share/mk files needed to support .WAIT in SUBDIR variables.
    716 	If you get make errors, 
    717 		(cd share/mk; make install)
    718 	Also, PRINTOBJDIR has changed and is now used more heavily.
    719 
    720 20001019:
    721 	The `ca' device driver has been replaced by `ld'; although the
    722 	major and minor numbers haven't changed, you should update your /dev
    723 	directory.
    724 
    725 20000929:
    726 	The following make directives are obsoleted.
    727 	MKCRYPTO_RSA NOCRYPTO_RSA NOCRYPTO_RC5 NOCRYPTO_IDEA 
    728 	By default, RSA is built into libcrypto.  IDEA and RC5 will not be
    729 	built into libcrypto.  By using MKCRYPTO_{RC5,IDEA}, you can build
    730 	additional library libcrypto_{idea,rc5}.
    731 
    732 
    733 Hints for a more successful build:
    734 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    735     Use build.sh, but do not use its "expert mode":
    736 	This will automatically build the tools in the
    737 	   correct order, and it will keep the tools and the
    738 	   new build products from interfering with the running
    739 	   system.  This will allow you to ignore most of the
    740 	   other advice in this file.
    741     Build a new kernel first:
    742 	This makes sure that any new system calls or features
    743 	   expected by the new userland will be present.  This
    744 	   helps to avoid critical errors when upgrading.
    745     Use object directories:
    746 	This helps to keep stale object
    747 	   files from polluting the build if a Makefile "forgets"
    748 	   about one.  It also makes it easier to clean up after
    749 	   a build.  It's also necessary if you want to use the
    750 	   same source tree for multiple machines.
    751 	   To use object directories with build.sh:
    752 	    a) invoke build.sh with the "-M" or "-O" options.
    753 	   To use object directories without using build.sh:
    754 	    a) cd /usr/src ; make cleandir
    755 	    b) Add "OBJMACHINE=yes" to /etc/mk.conf
    756 	    c) Add "MKOBJDIRS=yes" to /etc/mk.conf
    757 	    d) cd /usr/src ; make build
    758 	   Note that running "make obj" in a directory will create
    759 	   in obj.$MACHINE directory.
    760     Build to a DESTDIR:
    761 	This helps to keep old installed files (especially libraries)
    762 	   from interfering with the new build.
    763 	   To build to a DESTDIR with build.sh, use the "-D" option.
    764 	   To build to a DESTDIR without using build.sh, set the DESTDIR
    765 	   environment variable before running make build.  It should be
    766 	   set to the pathname of an initially empty directory.
    767 	   Problems: if you do not use build.sh, you might need to
    768 		update critical utilities without using DESTDIR since
    769 		nothing is executed from what is installed in DESTDIR.
    770 		(See critical utils, below.)
    771     Build often:
    772 	This keeps critical utilities current enough to not choke
    773 	on any other part of the source tree that depends on up to
    774 	date functionality.  If you use build.sh, you should not have
    775 	this problem.
    776  
    777 What to do if things don't work:
    778 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    779 When things don't work there is usually a few things that commonly
    780 should be done.
    781     1)	make includes
    782 	This should be done automatically by make build.
    783     2)  cd share/mk && make install
    784 	Again, automatically done by make build.
    785 
    786 Failsafe rebuild of a small part of the tree:
    787 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    788 To make sure you rebuild something correctly you want to do
    789 something like the following:
    790     1)  Make sure the includes and .mk files are up to date.
    791     2)  Make sure any program used to build the particular
    792 	utility is up to date.  (yacc, lex, etc...)
    793     3)  cd ...path/to/util...
    794 	make cleandir
    795 	rm ...all obj directories...
    796 	make cleandir			# yes, again
    797 	make obj
    798 	make depend && make
    799 
    800 Failsafe rebuild of the entire tree:
    801 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    802 If you really want to make sure the source tree is clean and
    803 ready for a build try the following.  Note that sourcing /etc/mk.conf
    804 (a make(1) Makefile) in this manner is not right, and will not work
    805 for anyone who uses any make(1) features in /etc/mk.conf.
    806 
    807 ---cut here---
    808 #!/bin/sh
    809 . /etc/mk.conf
    810 
    811 if [ -z $NETBSDSRCDIR ] ; then
    812     NETBSDSRCDIR=/usr/src
    813 fi
    814 if [ \! -d $NETBSDSRCDIR ] ; then
    815     echo Unable to find sources
    816     exit 1
    817 fi
    818 find $NETBSDSRCDIR -name \*.o -o -name obj.\* -o -name obj -exec rm \{\} \;
    819 
    820 if [ -z $BSDOBJDIR ] ; then
    821     BSDOBJDIR=/usr/obj
    822 fi
    823 if [ -d $BSDOBJDIR ] ; then
    824     rm -rf $BSDOBJDIR
    825 fi
    826 
    827 cd $NETBSDSRCDIR && make cleandir
    828 
    829 ---cut here---
    830 
    831 Critical utilities:
    832 ^^^^^^^^^^^^^^^^^^^
    833 	usr.bin/compile_et
    834 	usr.bin/make
    835 	usr.bin/yacc
    836 	usr.bin/lex
    837 	usr.bin/xlint
    838 	usr.bin/config
    839 
    840 Other problems and possible solutions:
    841 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    842 Symptom:Complaints involving a Makefile.
    843 Fix:	Rebuild usr.bin/make:
    844 	cd usr.bin/make && make && make install
    845 	Or, a failsafe method if that doesn't work:
    846 	cd usr.bin/make && cc *.c */*.c -I . -o make && mv make /usr/bin
    847 
    848 Fix:	Make sure .mk files are up to date.
    849 	cd share/mk && make install
    850 
    851 Symptom:Kernel `config' fails to configure any kernel, including GENERIC.
    852 Fix:	Rebuild usr.bin/config
    853 
    854 Symptom:
    855 Fix:	Rebuild usr.bin/yacc
    856 
    857 Symptom:
    858 Fix:	Rebuild usr.bin/lex
    859 
    860 Symptom:
    861 Fix:	rm /usr/lib/libbfd.a
    862 
    863 Symptom:Obsolete intermediate files are used during compilation
    864 Fix:	Try the following sequence of commands in the directory in question.
    865 	make cleandir; rm `make print-objdir`; make cleandir; make obj
    866 	(If you built the tree without "make obj" in the past, obsolete files
    867 	may remain.  The command tries to clean everything up)
    868 
    869 Symptom:.../sysinst/run.c:xx: warning: initialization from incompatible pointer type
    870 Fix:	Rebuild and install usr.bin/menuc
    871 
    872 Symptom:mklocale not found during build in share/locale/ctype
    873 Fix:	Build and install usr.bin/mklocale
    874 
    875 Symptom:undefined reference to `__assert13' or `__unsetenv13'
    876 Fix:    Rebuild and install lib/libc
    877 
    878 Symptom:usr.bin/config fails to build.
    879 Fix:	Try building with -DMAKE_BOOTSTRAP added to CFLAGS in Makefile.
    880 
    881 Symptom:undefined reference to `getprogname' or `setprogname'
    882 Fix:    Rebuild and install lib/libc
    883 
    884 Symptom:lint does not understand the '-X' option
    885 Fix:    May need to build & install libs with NOLINT=1 before rebuilding lint
    886