UPDATING revision 1.387
1$NetBSD: UPDATING,v 1.387 2025/11/23 22:11:41 riastradh Exp $
2
3This file (UPDATING) is intended to be a brief reference to recent
4changes that might cause problems in the build process, and a guide for
5what to do if something doesn't work.
6
7For a more detailed description of the recommended way to build NetBSD
8using build.sh, see the BUILDING file.
9
10Note that much of the advice in this UPDATING file was written before
11build.sh existed.  Nevertheless, the advice here may be useful for
12working around specific problems with build.sh.
13
14Sections are marked with "^^^^^".  After the section on "Recent changes"
15are several sections containing more general information.
16
17See also: BUILDING, build.sh, Makefile.
18
19Recent changes:
20^^^^^^^^^^^^^^^
21
2220251122:
23	Changes to libpthread for PR 59784 require you to make clean in
24	lib/libpthread so it is rebuilt with updated ld flags.
25
2620251028:
27	libpthread had it's shared library version go back (from 1.7 to
28	1.6). This may cause fallout during update builds, remove the
29	libpthread obj dir and all libpthread.so.1.7\* files in the
30	dest dir.
31	If you have build other software/packages on a -current system
32	from 20251026 or 20251027 you need to rebuild them after
33	updating your base system again.
34
3520251019:
36	Changes to how libcrypto got linked (libpthread not required
37	any more) cause failures in update builds. To fix, run
38	(as your build user) a "make cleandir" in the following
39	subdirectories:
40
41	crypto/external/apache2/openssl
42	crypto/external/bsd/heimdal
43	crypto/external/bsd/netpgp
44	crypto/external/bsd/openssh
45	external/bsd/libfido2
46	external/bsd/nsd
47	external/bsd/ntp
48	external/bsd/pam-u2f
49	external/bsd/ppp
50	external/bsd/tcpdump
51	external/bsd/wpa
52	games/factor
53	libexec/httpd
54	tests/crypto/libcrypto
55	tests/lib/libc/hash
56	usr.bin/dc
57	usr.bin/ftp
58	usr.bin/moduli
59	usr.bin/nbsvtool
60	usr.sbin/plainrsa-gen
61	usr.sbin/syslogd
62
6320250721:
64	GCC 12.5 was imported and there may be weird build issues.
65	Clean any GCC build dirs if you encounter weird things.
66
6720250720:
68	New openssl and old objects for tests for libcrypto may
69	cause spurious test failure, clean the src/tests/crypto/libcrypto
70	object dirs.
71
7220250528:
73	Changes in the tools build require removing all config.cache
74	files in the object tools directories.
75
7620250427:
77	The KERNEL_DIR option to build.sh is now functional.  Set it
78	with ``-V KERNEL_DIR=yes'' on your build.sh command.
79	With this, you can now colocate kernel and associated modules
80	in /netbsd/{kernel,kernel.dbg,modules} instead of having the
81	kernel in / but modules in /stand.
82
83	Note that you'll need new bootstrap code to use this feature.
84
85	This completes work begun many years ago by christos@ :-)
86
8720250413:
88	A change to bsd.lib.mk requires a clean build of all libraries.
89
9020250131:
91	The switch to the new jemalloc requires cleaning in libc.
92
9320241122:
94	Changes to various libraries' build options require cleaning
95	their objdirs in update builds:
96
97	cd external/bsd/file/lib && $TOOLDIR/bin/nbmake-$ARCH clean
98	cd external/bsd/libarchive/lib && $TOOLDIR/bin/nbmake-$ARCH clean
99	cd external/public-domain/xz/lib && $TOOLDIR/bin/nbmake-$ARCH clean
100
101	Also, for architectures with MKCOMPAT, it is necessary to clean
102	the compat objdirs too.  The easiest way is:
103
104	rm -rf OBJDIR/compat/*/*/external/bsd/file/lib
105	rm -rf OBJDIR/compat/*/*/external/bsd/libarchive/lib
106	rm -rf OBJDIR/compat/*/*/external/public-domain/xz/lib
107
108	Changes to bsd.lib.mk to improve detecting differences in
109	shared library symbol exports may cause some .actsym files in
110	the objdir to become stale in update builds.
111
112	To work around this, delete all files matching `*.actsym' in
113	the objdir.  For example:
114
115	find OBJDIR -name '*.actsym' -type f -print0 | xargs -0 rm
116
11720241104:
118	Changes around the integration of the zstd compression
119	library may require manual deletion of some object directories
120	if you update from a build from a few days ago:
121	rm -rf DESTDIR/usr/lib/*/libarchive*
122	rm -rf DESTDIR/usr/lib/*/libmagic*
123	rm -rf DESTDIR/usr/lib/*/libzstd*
124	rm -rf DESTDIR/usr/lib/libarchive*
125	rm -rf DESTDIR/usr/lib/libmagic*
126	rm -rf DESTDIR/usr/lib/libzstd*
127	rm -rf OBJDIR/compat/*/*/external/bsd/file/
128	rm -rf OBJDIR/compat/*/*/external/bsd/libarchive/
129	rm -rf OBJDIR/compat/*/*/external/bsd/zstd/
130	rm -rf OBJDIR/external/bsd/file/
131	rm -rf OBJDIR/external/bsd/libarchive/
132	rm -rf OBJDIR/external/bsd/zstd/
133	rm -rf OBJDIR/external/gpl3/gcc/
134	rm -rf OBJDIR/tools/gcc/
135
13620240926:
137	Building -current when running on amd64 from about 20240924
138	to about 20240926 will not work due to a "malloc_np.h"
139	error. Please downgrade to a version from 20240924 or older,
140	or upgrade to a newer version e.g. using a binary release from
141	the NetBSD build servers.
142
14320240923:
144	Update builds will require cleaning the object directories for
145	jemalloc (like: "rm -rf $OBJ/external/bsd/jemalloc*") and the
146	libc dependency files (like: "rm $OBJ/lib/libc/jemalloc.*").
147	On architectures with COMPAT libs, those also have to be cleaned,
148	e.g. on sparc64: "rm -rf $OBJ/compat/sparc64/sparc/external/bsd/jemalloc*"
149	and "rm $OBJ/compat/sparc64/sparc/lib/libc/jemalloc.*".
150
15120240920:
152	Update builds will require cleaning in src/external/historical/nawk/bin
153	in order to remove the awk subdirectory since there is now a binary
154	called awk.
155
15620240817:
157	Update builds will require cleaning in src/external/historical/nawk/bin
158	in order to remove the awk binary since now there is a subdirectory
159	called awk.
160
16120240812:
162	Update builds will require removing the tools objdir for gdb
163	if building with MKCROSSGDB=yes. All architectures use gdb.old
164	now.
165
16620240630:
167	Update builds will require removing the tools objdir for binutils
168	(as most architectures should use binutils.old now).
169
17020240610:
171	Update builds are likely to require removing the objdir for
172	distrib/<arch>/cdroms - or at least references to libarchive
173	from within there after the recent libarchive update.
174
17520240504:
176	Update builds on x86 require making the `cleandir' target in
177	lib/libm, or deleting the objdir for lib/libm.
178
17920240423:
180	Update builds with x11 may fail after switching to Mesa 21.
181
18220240410:
183	Update builds may require manually deleting
184	$DESTDIR/var/run/named (and, potentially,
185	$DESTDIR/var/run/lwresd) in order to avoid checkflist failure.
186
18720240409:
188	32-bit compatibility libraries were moved into the base32
189	and debug32 sets.  HTML man pages were moved into the manhtml set.
190
19120230828:
192	If:
193        - you updated to current and ran postinstall between 20230826
194	  and 20230828 inclusive, and
195        - you are not using anything outside the base system to
196	  populate /etc/openssl/certs (e.g., manually adding
197	  certificates or using ca-certificates or mozilla-rootcerts or
198	  mozilla-rootcerts-openssl from pkgsrc),
199	delete /etc/openssl/certs and rerun postinstall or just
200	`certctl rehash'.
201
202	Otherwise, certctl(8) will think someone else has left
203	/etc/openssl/certs in the way and will avoid clobbering it on
204	upgrade from older NetBSD.
205
20620230718:
207	build.sh will use mk.conf in the same directory as build.sh instead
208	of /etc/mk.conf, unless MAKECONF is already defined in the environment.
209
21020230714:
211	Import of gcc 10.5 requires a clean build of at least tools/gcc
212	and external/gpl3/gcc* object directories. An update build
213	without cleaning will result in obscure failures in rare corner
214	cases.
215
21620230604:
217	Building native kernels with the installed make(1) instead of
218	the $TOOLDIR/bin/nbmake-${arch} wrapper will fail if userland
219	has not been updated. Note that this is an unsupported build
220	configuration (but usually works if userland is -current enough).
221
22220230523:
223	ctfmerge was fixed as macOS host tool. This may require a clean tools
224	rebuild to detect the update to tools/compat/configure.
225
22620230515:
227	New openssl build requires removal of the crypto/external/bsd/openssl
228	and tests/crypto/libcrypto subdirectories in the ${OBJDIR} hierarchy.
229	Otherwise test results may be wrong due to wrong "golden" output
230	files being installed.
231
23220230322:
233	Fixes for moved /lib/libisns* mean that builds will complain about
234	./usr/lib/libisns* being missing until src/lib/libisns is forced
235	to (re)install the files, including the symlinks.  The simplest
236	way is to clean this subdir before building.
237
23820230112:
239	New binutils require an updated ld.elf_so. If you are doing
240	(unsupported) in-place self builds (with the -E flag to build.sh),
241	make sure to have installed latest ld.elf_so before you rebuild
242	userland.
243
24420221116:
245	The addition to NetBSD's version of UFS2 of support for extended
246	attributes broke backward compatibility with previous releases
247	of NetBSD, so UFS2 has been restored to being compatible with
248	previous NetBSD releases by disabling extended attributes.
249	(Note that ACLs are implemented as extended attributes, so
250	this changes disables ACLs as well.)
251
252	Support for UFS2 with extended attributes is now available in a new
253	UFS variant called UFS2ea.  If you have created extended attributes
254	in an original UFS2 file system then "fsck -p" will now fail due to
255	the unexpected presence of extended attributes and "fsck -y" will
256	remove all extended attributes.  If you wish to preserve extended
257	attributes rather than delete them, there is a utility to convert
258	a UFS2 file system to UFS2ea and leave extended attributes in place,
259	but this should be used with caution since it will preserve any
260	extended attributes that have been corrupted by the backward
261	incompatibility too.
262
263	If you wish to use a UFS2ea file system as your root file system,
264	then you will need to update your boot loader to a version that
265	supports UFS2ea.
266
267	For more information, see:
268	https://wiki.netbsd.org/features/UFS2ea
269
27020221111:
271	The new libdrm import worsened the conflict issues for the
272	kdump/ktruss ioctl, and i915 now conflicts with base, and has
273	been turned off.  This will cause update build issues like:
274
275		kdump-ioctl.c:12175:143: error: 'DRM_IOCTL_I915_DESTROY_HEAP'
276		   undeclared here (not in a function);
277		   did you mean 'DRM_IOCTL_MODE_DESTROY_DUMB'?
278
279	You'll need to clean usr.bin/ktruss, usr.bin/kdump, and rescue.
280
28120220921:
282	Since the kernel version was bumped to 9.99.100, the bootloader
283	must be updated on x86 or EFI boot platforms in order to load
284	modules from boot.cfg(5) or interactively at the bootloader
285	prompt.
286
287	The kernel can still load modules at runtime, with modload(8)
288	or modules.conf(5), with no bootloader update.  This will not
289	affect release branches because it only applies to patch
290	numbers >=100.
291
292	On x86 (i386 or amd64) with BIOS boot, this requires copying a
293	new /usr/mdec/boot to /boot.  You can build this in the destdir
294	by running `$TOOLDIR/bin/nbmake-$ARCH dependall install' in
295	sys/arch/i386/stand.
296
297	On platforms with EFI boot (including x86 with EFI boot), this
298	requires copying a new /usr/mdec/boot*.efi to the EFI/BOOT/
299	directory on the EFI system partition.  The boot*.efi file is:
300
301	aarch64	bootaa64.efi
302	amd64	bootx64.efi
303	arm	bootarm.efi	(32-bit arm)
304	i386	bootx32.efi
305
306	You can build this in the destdir by running
307	`$TOOLDIR/bin/nbmake-$ARCH dependall install' in
308	sys/stand/efiboot/boot*.
309
31020220821:
311	Support for building extsrc/ has been deprecated.
312	EXTSRCSRCDIR and MKEXTSRC have been deprecated.
313
31420220714:
315	Updates to xorg-server and associated drivers may cause builds to
316	fail.  Cleaning both DESTDIR and the xorg build tree may be needed.
317
31820220628:
319	Changes in the build of src/games/robots require a clean build
320	of that program.
321
32220211116:
323	Changes in the xorg build require clean obj dirs for external/mit/xorg
324	(or a full clean/non-update build).
325
32620211112:
327	Device tree sources were updated for evbarm.  Some device nodes
328	(in particular, ld(4) devices on the ROCKPro64) will be renumbered.
329
33020211014:
331	MKPIE default for aarch64 has changed, a clean build is required.
332
33320210917:
334	Changed MNT_ACLS to default to POSIX1e ACLs instead of NFSv4
335	ACLs, to be compatible with FreeBSD. If you are using NFSv4 ACLs
336	and have "acls" in /etc/fstab you'll need to change it to "nfs4acls".
337
33820210711:
339	Updated GMP sources may require cleaning in tools/gmp and/or in
340	external/lgpl3/gmp/lib, particularly if GCC itself does not build.
341
34220210417:
343	GCC 10 was enabled for several platforms.  If builds fail in either
344	tools/gcc or external/gpl3/gcc, first try cleaning those objects and
345	removing the $DESTDIR/usr/include/g++ subdirectory.
346
34720201016:
348	MIPS kernel modules have been disabled until they work.  This will
349	turn up in extra files in the DESTDIR, which should be cleaned.
350
35120200925:
352	GNU MPC and MPFR have been updated.  At least MPFR needs cleaning
353	in both the tools and external dirs.
354
35520200912:
356	GCC 9 has arrived for Arm and x86 platforms, and will be coming
357	for several more, as will binutils 2.34.  Clean as required.
358
35920200907:
360	GCC 9 is coming, and binutils has been updated for MIPS.  This
361	probably requires cleaning the tools/binutils.
362
36320200811:
364	GCC updates may require cleaning the objdir.  This may occur
365	due to GCC 7.5 update, GCC 8.4 move to gcc.old, or the upcoming
366	GCC 9 upgrade.
367
36820200614:
369	blacklist* has been renamed to blocklist*. postinstall(8)
370	should handle the migration.
371
37220200601:
373	Due to a mistake in LIBISPRIVATE handling, .so libraries were
374	created in the build directories and need cleaning.
375
37620200311:
377	GCC 8 ports will need cleaning in src/tools/gcc and
378	src/external/gpl3/gcc due to GCC 8.4 update.
379
38020191118:
381	More architectures were switched to gcc8:
382	    i386, ia64 powerpc64, sparc, sparc64, arm
383	The same comments as in 20191022 apply.
384
38520191112:
386	The LLVM update requires a clean rebuild for all architectures using
387	LLVM during the tools build phase (i386, amd64, aarch64).
388
38920191022:
390	Ports amd64 and aarch64 switched to GCC 8.3 by default.
391	In-place ("expert mode", build.sh -E) builds are not supported
392	when going from a GCC 7 userland to GCC 8. Do a regular
393	build to a different DESTDIR (or preferably: build.sh -U) at least
394	once and install sets, or download comp.{tar.xz,tgz} from the
395	daily builds and install that before doing the next in-place build.
396
39720191001:
398	GCC 8.3 was imported.  Builds of src/tools/gcc may fail if
399	old builds with GCC 7 output now uses GCC 8.  Clean this
400	directory, and also clean src/external/gpl3/gcc.
401
40220190903:
403	Files with names that coincide with existing files' names on
404	case-insensitive file systems were inadvertently committed, for
405	radeon GPU firmware.  We cannot mark these as obsolete for
406	postinstall to fix, so if you updated src since 2019-08-26, and
407	ran build.sh distribution or ran build.sh release, you must
408	manually delete the following files in your DESTDIR (which is
409	usually $OBJDIR/destir.$ARCH), or from / if you have installed
410	them:
411
412		/libdata/firmware/radeon/bonaire_ce.bin
413		/libdata/firmware/radeon/bonaire_mc.bin
414		/libdata/firmware/radeon/bonaire_me.bin
415		/libdata/firmware/radeon/bonaire_mec.bin
416		/libdata/firmware/radeon/bonaire_pfp.bin
417		/libdata/firmware/radeon/bonaire_rlc.bin
418		/libdata/firmware/radeon/bonaire_sdma.bin
419		/libdata/firmware/radeon/bonaire_smc.bin
420		/libdata/firmware/radeon/bonaire_uvd.bin
421		/libdata/firmware/radeon/hainan_ce.bin
422		/libdata/firmware/radeon/hainan_mc.bin
423		/libdata/firmware/radeon/hainan_me.bin
424		/libdata/firmware/radeon/hainan_pfp.bin
425		/libdata/firmware/radeon/hainan_rlc.bin
426		/libdata/firmware/radeon/hainan_smc.bin
427		/libdata/firmware/radeon/hawaii_ce.bin
428		/libdata/firmware/radeon/hawaii_mc.bin
429		/libdata/firmware/radeon/hawaii_me.bin
430		/libdata/firmware/radeon/hawaii_mec.bin
431		/libdata/firmware/radeon/hawaii_pfp.bin
432		/libdata/firmware/radeon/hawaii_rlc.bin
433		/libdata/firmware/radeon/hawaii_sdma.bin
434		/libdata/firmware/radeon/hawaii_smc.bin
435		/libdata/firmware/radeon/kabini_ce.bin
436		/libdata/firmware/radeon/kabini_me.bin
437		/libdata/firmware/radeon/kabini_mec.bin
438		/libdata/firmware/radeon/kabini_pfp.bin
439		/libdata/firmware/radeon/kabini_rlc.bin
440		/libdata/firmware/radeon/kabini_sdma.bin
441		/libdata/firmware/radeon/kaveri_ce.bin
442		/libdata/firmware/radeon/kaveri_me.bin
443		/libdata/firmware/radeon/kaveri_mec.bin
444		/libdata/firmware/radeon/kaveri_mec2.bin
445		/libdata/firmware/radeon/kaveri_pfp.bin
446		/libdata/firmware/radeon/kaveri_rlc.bin
447		/libdata/firmware/radeon/kaveri_sdma.bin
448		/libdata/firmware/radeon/mullins_ce.bin
449		/libdata/firmware/radeon/mullins_me.bin
450		/libdata/firmware/radeon/mullins_mec.bin
451		/libdata/firmware/radeon/mullins_pfp.bin
452		/libdata/firmware/radeon/mullins_rlc.bin
453		/libdata/firmware/radeon/mullins_sdma.bin
454		/libdata/firmware/radeon/oland_ce.bin
455		/libdata/firmware/radeon/oland_mc.bin
456		/libdata/firmware/radeon/oland_me.bin
457		/libdata/firmware/radeon/oland_pfp.bin
458		/libdata/firmware/radeon/oland_rlc.bin
459		/libdata/firmware/radeon/oland_smc.bin
460		/libdata/firmware/radeon/pitcairn_ce.bin
461		/libdata/firmware/radeon/pitcairn_mc.bin
462		/libdata/firmware/radeon/pitcairn_me.bin
463		/libdata/firmware/radeon/pitcairn_pfp.bin
464		/libdata/firmware/radeon/pitcairn_rlc.bin
465		/libdata/firmware/radeon/pitcairn_smc.bin
466		/libdata/firmware/radeon/tahiti_ce.bin
467		/libdata/firmware/radeon/tahiti_mc.bin
468		/libdata/firmware/radeon/tahiti_me.bin
469		/libdata/firmware/radeon/tahiti_pfp.bin
470		/libdata/firmware/radeon/tahiti_rlc.bin
471		/libdata/firmware/radeon/tahiti_smc.bin
472		/libdata/firmware/radeon/verde_ce.bin
473		/libdata/firmware/radeon/verde_mc.bin
474		/libdata/firmware/radeon/verde_me.bin
475		/libdata/firmware/radeon/verde_pfp.bin
476		/libdata/firmware/radeon/verde_rlc.bin
477		/libdata/firmware/radeon/verde_smc.bin
478
479	We will re-import these radeon firmware images another way
480	later.
481
48220190727:
483	The uefi bootloader has gained tftp support and needs a clean
484	build. If you do update builds, manually clean its object
485	directory by something like:
486	cd sys/arch/i386/stand/efiboot && make clean
487
48820190723:
489	The jemalloc allocator in libc is now built without extended
490	debugging (for performance reasons). In update builds make sure
491	to rebuild it completely, by removing all affected object files,
492	including compat builds, something like:
493	cd /usr/obj && find . -type d -name jemalloc|xargs rm -rf
494
49520190207:
496	GCC 7 switched for many ports.  Update builds are likely to fail.
497
498Hints for a more successful build:
499^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
500    Use build.sh, but do not use its "expert mode":
501	This will automatically build the tools in the
502	   correct order, and it will keep the tools and the
503	   new build products from interfering with the running
504	   system.  This will allow you to ignore most of the
505	   other advice in this file.
506    Build a new kernel first:
507	This makes sure that any new system calls or features
508	   expected by the new userland will be present.  This
509	   helps to avoid critical errors when upgrading.
510    Use object directories:
511	This helps to keep stale object
512	   files from polluting the build if a Makefile "forgets"
513	   about one.  It also makes it easier to clean up after
514	   a build.  It's also necessary if you want to use the
515	   same source tree for multiple machines.
516	   To use object directories with build.sh:
517	    a) invoke build.sh with the "-M" or "-O" options.
518	   To use object directories without using build.sh:
519	    a) cd /usr/src ; make cleandir
520	    b) Add "OBJMACHINE=yes" to /etc/mk.conf
521	    c) Add "MKOBJDIRS=yes" to /etc/mk.conf
522	    d) cd /usr/src ; make build
523	   Note that running "make obj" in a directory will create
524	   in obj.$MACHINE directory.
525    Build to a DESTDIR:
526	This helps to keep old installed files (especially libraries)
527	   from interfering with the new build.
528	   To build to a DESTDIR with build.sh, use the "-D" option.
529	   To build to a DESTDIR without using build.sh, set the DESTDIR
530	   environment variable before running make build.  It should be
531	   set to the pathname of an initially empty directory.
532	   Problems: if you do not use build.sh, you might need to
533		update critical utilities without using DESTDIR since
534		nothing is executed from what is installed in DESTDIR.
535		(See critical utils, below.)
536    Build often:
537	This keeps critical utilities current enough to not choke
538	on any other part of the source tree that depends on up to
539	date functionality.  If you use build.sh, you should not have
540	this problem.
541
542What to do if things don't work:
543^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
544When things don't work there are usually a few things that commonly
545should be done.
546    1)	make includes
547	This should be done automatically by make build.
548    2)  cd share/mk && make install
549	Again, automatically done by make build.
550
551Failsafe rebuild of a small part of the tree:
552^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
553To make sure you rebuild something correctly you want to do
554something like the following:
555    1)  Make sure the includes and .mk files are up to date.
556    2)  Make sure any program used to build the particular
557	utility is up to date.  (yacc, lex, etc...)
558    3)  cd ...path/to/util...
559	make cleandir
560	rm ...all obj directories...
561	make cleandir			# yes, again
562	make obj
563	make depend && make
564
565Failsafe rebuild of the entire tree:
566^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
567If you really want to make sure the source tree is clean and
568ready for a build try the following.  Note that sourcing /etc/mk.conf
569(a make(1) Makefile) in this manner is not right, and will not work
570for anyone who uses any make(1) features in /etc/mk.conf.
571
572---cut here---
573#!/bin/sh
574. /etc/mk.conf
575
576if [ -z $NETBSDSRCDIR ] ; then
577    NETBSDSRCDIR=/usr/src
578fi
579if [ \! -d $NETBSDSRCDIR ] ; then
580    echo Unable to find sources
581    exit 1
582fi
583find $NETBSDSRCDIR -name \*.o -o -name obj.\* -o -name obj -exec rm \{\} \;
584
585if [ -z $BSDOBJDIR ] ; then
586    BSDOBJDIR=/usr/obj
587fi
588if [ -d $BSDOBJDIR ] ; then
589    rm -rf $BSDOBJDIR
590fi
591
592cd $NETBSDSRCDIR && make cleandir
593
594---cut here---
595
596Critical utilities:
597^^^^^^^^^^^^^^^^^^^
598	usr.bin/make
599	usr.bin/yacc
600	usr.bin/lex
601	usr.bin/xlint
602	usr.bin/config
603
604Other problems and possible solutions:
605^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
606Symptom:Complaints involving a Makefile.
607Fix:	Rebuild usr.bin/make:
608	cd usr.bin/make && make && make install
609	Or, a failsafe method if that doesn't work:
610	cd usr.bin/make && cc -DMAKE_NATIVE *.c -I. -o make \
611	&& install make /usr/bin
612
613Fix:	Make sure .mk files are up to date.
614	cd share/mk && make install
615
616Symptom:Kernel `config' fails to configure any kernel, including GENERIC.
617Fix:	Rebuild usr.bin/config
618
619Symptom:Obsolete intermediate files are used during compilation
620Fix:	Try the following sequence of commands in the directory in question.
621	make cleandir; rm `make print-objdir`; make cleandir; make obj
622	(If you built the tree without "make obj" in the past, obsolete files
623	may remain.  The command tries to clean everything up)
624
625Symptom:.../sysinst/run.c:xx: warning: initialization from incompatible
626	pointer type
627Fix:	Rebuild and install usr.bin/menuc
628
629Symptom:mklocale not found during build in share/locale/ctype
630Fix:	Build and install usr.bin/mklocale
631
632Symptom:undefined reference to `__assert13' or `__unsetenv13'
633Fix:    Rebuild and install lib/libc
634
635Symptom:usr.bin/config fails to build.
636Fix:	Try building with -DMAKE_BOOTSTRAP added to CFLAGS in Makefile.
637
638Symptom:undefined reference to `getprogname' or `setprogname'
639Fix:    Rebuild and install lib/libc
640
641Symptom:Update build fails in src/tools/gcc complaining that a variable
642	(e.g. CPPFLAGS) has changed since the previous run.
643Fix:    Run "nbmake-${ARCH} clean" in src/tools/gcc or do a clean build.
644
645Symptom:cvs [update aborted]: cannot open directory /cvsroot/src/...:
646	No such file or directory.
647Cause:	If a directory is created by mistake, then it is sometimes
648	deleted from the CVS repository using administrative commands
649	that bypass the normal cvs access controls.  If your cvs working tree
650	contains references to a directory that has been deleted on the
651	server in this way, then "cvs update" reports this error.
652Fix:	Recursively delete the affected directory from your working tree
653	and try the update again.
654