UPDATING revision 1.384
11.384Smartin$NetBSD: UPDATING,v 1.384 2025/10/20 10:14:07 martin Exp $
21.1Sabs
31.123SjmcThis file (UPDATING) is intended to be a brief reference to recent
41.123Sjmcchanges that might cause problems in the build process, and a guide for
51.123Sjmcwhat to do if something doesn't work.
61.1Sabs
71.123SjmcFor a more detailed description of the recommended way to build NetBSD
81.123Sjmcusing build.sh, see the BUILDING file.
91.123Sjmc
101.123SjmcNote that much of the advice in this UPDATING file was written before
111.123Sjmcbuild.sh existed.  Nevertheless, the advice here may be useful for
121.123Sjmcworking around specific problems with build.sh.
131.123Sjmc
141.257SapbSections are marked with "^^^^^".  After the section on "Recent changes"
151.257Sapbare several sections containing more general information.
161.257Sapb
171.123SjmcSee also: BUILDING, build.sh, Makefile.
181.1Sabs
191.1SabsRecent changes:
201.1Sabs^^^^^^^^^^^^^^^
211.230Stls
221.384Smartin20251019:
231.384Smartin	Changes to how libcrypto got linked (libpthread not required
241.384Smartin	any more) cause failures in update builds. To fix, run
251.384Smartin	(as your build user) a "make cleandir" in the following
261.384Smartin	subdirectories:
271.384Smartin
281.384Smartin	crypto/external/apache2/openssl
291.384Smartin	crypto/external/bsd/heimdal
301.384Smartin	crypto/external/bsd/netpgp
311.384Smartin	crypto/external/bsd/openssh
321.384Smartin	external/bsd/libfido2
331.384Smartin	external/bsd/nsd
341.384Smartin	external/bsd/ntp
351.384Smartin	external/bsd/pam-u2f
361.384Smartin	external/bsd/ppp
371.384Smartin	external/bsd/tcpdump
381.384Smartin	external/bsd/wpa
391.384Smartin	games/factor
401.384Smartin	libexec/httpd
411.384Smartin	tests/crypto/libcrypto
421.384Smartin	tests/lib/libc/hash
431.384Smartin	usr.bin/dc
441.384Smartin	usr.bin/ftp
451.384Smartin	usr.bin/moduli
461.384Smartin	usr.bin/nbsvtool
471.384Smartin	usr.sbin/plainrsa-gen
481.384Smartin	usr.sbin/syslogd
491.384Smartin
501.382Smrg20250721:
511.382Smrg	GCC 12.5 was imported and there may be weird build issues.
521.382Smrg	Clean any GCC build dirs if you encounter weird things.
531.382Smrg
541.383Smartin20250720:
551.383Smartin	New openssl and old objects for tests for libcrypto may
561.383Smartin	cause spurious test failure, clean the src/tests/crypto/libcrypto
571.383Smartin	object dirs.
581.383Smartin
591.380Smartin20250528:
601.380Smartin	Changes in the tools build require removing all config.cache
611.380Smartin	files in the object tools directories.
621.380Smartin
631.378Spgoyette20250427:
641.378Spgoyette	The KERNEL_DIR option to build.sh is now functional.  Set it
651.379Skre	with ``-V KERNEL_DIR=yes'' on your build.sh command.
661.378Spgoyette	With this, you can now colocate kernel and associated modules
671.378Spgoyette	in /netbsd/{kernel,kernel.dbg,modules} instead of having the
681.378Spgoyette	kernel in / but modules in /stand.
691.378Spgoyette
701.378Spgoyette	Note that you'll need new bootstrap code to use this feature.
711.378Spgoyette
721.379Skre	This completes work begun many years ago by christos@ :-)
731.378Spgoyette
741.377Sriastrad20250413:
751.377Sriastrad	A change to bsd.lib.mk requires a clean build of all libraries.
761.377Sriastrad
771.375Schristos20250131:
781.375Schristos	The switch to the new jemalloc requires cleaning in libc.
791.376Spalle
801.367Sriastrad20241122:
811.373Sriastrad	Changes to various libraries' build options require cleaning
821.373Sriastrad	their objdirs in update builds:
831.368Sriastrad
841.372Sriastrad	cd external/bsd/file/lib && $TOOLDIR/bin/nbmake-$ARCH clean
851.370Sriastrad	cd external/bsd/libarchive/lib && $TOOLDIR/bin/nbmake-$ARCH clean
861.372Sriastrad	cd external/public-domain/xz/lib && $TOOLDIR/bin/nbmake-$ARCH clean
871.368Sriastrad
881.374Sriastrad	Also, for architectures with MKCOMPAT, it is necessary to clean
891.374Sriastrad	the compat objdirs too.  The easiest way is:
901.374Sriastrad
911.374Sriastrad	rm -rf OBJDIR/compat/*/*/external/bsd/file/lib
921.374Sriastrad	rm -rf OBJDIR/compat/*/*/external/bsd/libarchive/lib
931.374Sriastrad	rm -rf OBJDIR/compat/*/*/external/public-domain/xz/lib
941.374Sriastrad
951.367Sriastrad	Changes to bsd.lib.mk to improve detecting differences in
961.367Sriastrad	shared library symbol exports may cause some .actsym files in
971.367Sriastrad	the objdir to become stale in update builds.
981.367Sriastrad
991.367Sriastrad	To work around this, delete all files matching `*.actsym' in
1001.367Sriastrad	the objdir.  For example:
1011.367Sriastrad
1021.367Sriastrad	find OBJDIR -name '*.actsym' -type f -print0 | xargs -0 rm
1031.367Sriastrad
1041.363Smartin20241104:
1051.363Smartin	Changes around the integration of the zstd compression
1061.363Smartin	library may require manual deletion of some object directories
1071.366Sriastrad	if you update from a build from a few days ago:
1081.366Sriastrad	rm -rf DESTDIR/usr/lib/*/libarchive*
1091.366Sriastrad	rm -rf DESTDIR/usr/lib/*/libmagic*
1101.366Sriastrad	rm -rf DESTDIR/usr/lib/*/libzstd*
1111.366Sriastrad	rm -rf DESTDIR/usr/lib/libarchive*
1121.366Sriastrad	rm -rf DESTDIR/usr/lib/libmagic*
1131.366Sriastrad	rm -rf DESTDIR/usr/lib/libzstd*
1141.366Sriastrad	rm -rf OBJDIR/compat/*/*/external/bsd/file/
1151.366Sriastrad	rm -rf OBJDIR/compat/*/*/external/bsd/libarchive/
1161.366Sriastrad	rm -rf OBJDIR/compat/*/*/external/bsd/zstd/
1171.366Sriastrad	rm -rf OBJDIR/external/bsd/file/
1181.366Sriastrad	rm -rf OBJDIR/external/bsd/libarchive/
1191.366Sriastrad	rm -rf OBJDIR/external/bsd/zstd/
1201.366Sriastrad	rm -rf OBJDIR/external/gpl3/gcc/
1211.366Sriastrad	rm -rf OBJDIR/tools/gcc/
1221.363Smartin
1231.360Swiz20240926:
1241.360Swiz	Building -current when running on amd64 from about 20240924
1251.360Swiz	to about 20240926 will not work due to a "malloc_np.h"
1261.360Swiz	error. Please downgrade to a version from 20240924 or older,
1271.360Swiz	or upgrade to a newer version e.g. using a binary release from
1281.360Swiz	the NetBSD build servers.
1291.360Swiz
1301.358Smartin20240923:
1311.358Smartin	Update builds will require cleaning the object directories for
1321.359Smartin	jemalloc (like: "rm -rf $OBJ/external/bsd/jemalloc*") and the
1331.359Smartin	libc dependency files (like: "rm $OBJ/lib/libc/jemalloc.*").
1341.359Smartin	On architectures with COMPAT libs, those also have to be cleaned,
1351.359Smartin	e.g. on sparc64: "rm -rf $OBJ/compat/sparc64/sparc/external/bsd/jemalloc*"
1361.359Smartin	and "rm $OBJ/compat/sparc64/sparc/lib/libc/jemalloc.*".
1371.358Smartin
1381.381Sgutterid20240920:
1391.381Sgutterid	Update builds will require cleaning in src/external/historical/nawk/bin
1401.381Sgutterid	in order to remove the awk subdirectory since there is now a binary
1411.381Sgutterid	called awk.
1421.381Sgutterid
1431.357Schristos20240817:
1441.357Schristos	Update builds will require cleaning in src/external/historical/nawk/bin
1451.357Schristos	in order to remove the awk binary since now there is a subdirectory
1461.357Schristos	called awk.
1471.358Smartin
1481.355Smartin20240812:
1491.355Smartin	Update builds will require removing the tools objdir for gdb
1501.355Smartin	if building with MKCROSSGDB=yes. All architectures use gdb.old
1511.355Smartin	now.
1521.356Sriastrad
1531.354Smartin20240630:
1541.353Smartin	Update builds will require removing the tools objdir for binutils
1551.353Smartin	(as most architectures should use binutils.old now).
1561.353Smartin
1571.352Skre20240610:
1581.352Skre	Update builds are likely to require removing the objdir for
1591.352Skre	distrib/<arch>/cdroms - or at least references to libarchive
1601.352Skre	from within there after the recent libarchive update.
1611.352Skre
1621.350Sriastrad20240504:
1631.350Sriastrad	Update builds on x86 require making the `cleandir' target in
1641.350Sriastrad	lib/libm, or deleting the objdir for lib/libm.
1651.350Sriastrad
1661.349Smaya20240423:
1671.349Smaya	Update builds with x11 may fail after switching to Mesa 21.
1681.349Smaya
1691.346Sriastrad20240410:
1701.346Sriastrad	Update builds may require manually deleting
1711.346Sriastrad	$DESTDIR/var/run/named (and, potentially,
1721.346Sriastrad	$DESTDIR/var/run/lwresd) in order to avoid checkflist failure.
1731.346Sriastrad
1741.347Snia20240409:
1751.347Snia	32-bit compatibility libraries were moved into the base32
1761.347Snia	and debug32 sets.  HTML man pages were moved into the manhtml set.
1771.347Snia
1781.343Sriastrad20230828:
1791.343Sriastrad	If:
1801.343Sriastrad        - you updated to current and ran postinstall between 20230826
1811.343Sriastrad	  and 20230828 inclusive, and
1821.343Sriastrad        - you are not using anything outside the base system to
1831.343Sriastrad	  populate /etc/openssl/certs (e.g., manually adding
1841.343Sriastrad	  certificates or using ca-certificates or mozilla-rootcerts or
1851.343Sriastrad	  mozilla-rootcerts-openssl from pkgsrc),
1861.343Sriastrad	delete /etc/openssl/certs and rerun postinstall or just
1871.343Sriastrad	`certctl rehash'.
1881.343Sriastrad
1891.343Sriastrad	Otherwise, certctl(8) will think someone else has left
1901.343Sriastrad	/etc/openssl/certs in the way and will avoid clobbering it on
1911.343Sriastrad	upgrade from older NetBSD.
1921.343Sriastrad
1931.341Slukem20230718:
1941.341Slukem	build.sh will use mk.conf in the same directory as build.sh instead
1951.341Slukem	of /etc/mk.conf, unless MAKECONF is already defined in the environment.
1961.341Slukem
1971.342Smartin20230714:
1981.342Smartin	Import of gcc 10.5 requires a clean build of at least tools/gcc
1991.342Smartin	and external/gpl3/gcc* object directories. An update build
2001.342Smartin	without cleaning will result in obscure failures in rare corner
2011.342Smartin	cases.
2021.342Smartin
2031.339Smartin20230604:
2041.339Smartin	Building native kernels with the installed make(1) instead of
2051.339Smartin	the $TOOLDIR/bin/nbmake-${arch} wrapper will fail if userland
2061.339Smartin	has not been updated. Note that this is an unsupported build
2071.339Smartin	configuration (but usually works if userland is -current enough).
2081.338Slukem
2091.338Slukem20230523:
2101.338Slukem	ctfmerge was fixed as macOS host tool. This may require a clean tools
2111.338Slukem	rebuild to detect the update to tools/compat/configure.
2121.338Slukem
2131.340Smartin20230515:
2141.340Smartin	New openssl build requires removal of the crypto/external/bsd/openssl
2151.345Sandvar	and tests/crypto/libcrypto subdirectories in the ${OBJDIR} hierarchy.
2161.340Smartin	Otherwise test results may be wrong due to wrong "golden" output
2171.340Smartin	files being installed.
2181.340Smartin
2191.337Smrg20230322:
2201.337Smrg	Fixes for moved /lib/libisns* mean that builds will complain about
2211.337Smrg	./usr/lib/libisns* being missing until src/lib/libisns is forced
2221.337Smrg	to (re)install the files, including the symlinks.  The simplest
2231.337Smrg	way is to clean this subdir before building.
2241.337Smrg
2251.336Smartin20230112:
2261.336Smartin	New binutils require an updated ld.elf_so. If you are doing
2271.336Smartin	(unsupported) in-place self builds (with the -E flag to build.sh),
2281.336Smartin	make sure to have installed latest ld.elf_so before you rebuild
2291.336Smartin	userland.
2301.336Smartin
2311.335Schs20221116:
2321.335Schs	The addition to NetBSD's version of UFS2 of support for extended
2331.335Schs	attributes broke backward compatibility with previous releases
2341.335Schs	of NetBSD, so UFS2 has been restored to being compatible with
2351.335Schs	previous NetBSD releases by disabling extended attributes.
2361.335Schs	(Note that ACLs are implemented as extended attributes, so
2371.335Schs	this changes disables ACLs as well.)
2381.335Schs
2391.335Schs	Support for UFS2 with extended attributes is now available in a new
2401.335Schs	UFS variant called UFS2ea.  If you have created extended attributes
2411.335Schs	in an original UFS2 file system then "fsck -p" will now fail due to
2421.335Schs	the unexpected presence of extended attributes and "fsck -y" will
2431.335Schs	remove all extended attributes.  If you wish to preserve extended
2441.335Schs	attributes rather than delete them, there is a utility to convert
2451.335Schs	a UFS2 file system to UFS2ea and leave extended attributes in place,
2461.335Schs	but this should be used with caution since it will preserve any
2471.335Schs	extended attributes that have been corrupted by the backward
2481.335Schs	incompatibility too.
2491.335Schs
2501.335Schs	If you wish to use a UFS2ea file system as your root file system,
2511.335Schs	then you will need to update your boot loader to a version that
2521.335Schs	supports UFS2ea.
2531.335Schs
2541.335Schs	For more information, see:
2551.335Schs	https://wiki.netbsd.org/features/UFS2ea
2561.335Schs
2571.334Smrg20221111:
2581.334Smrg	The new libdrm import worsened the conflict issues for the
2591.334Smrg	kdump/ktruss ioctl, and i915 now conflicts with base, and has
2601.334Smrg	been turned off.  This will cause update build issues like:
2611.334Smrg
2621.334Smrg		kdump-ioctl.c:12175:143: error: 'DRM_IOCTL_I915_DESTROY_HEAP'
2631.334Smrg		   undeclared here (not in a function);
2641.334Smrg		   did you mean 'DRM_IOCTL_MODE_DESTROY_DUMB'?
2651.334Smrg
2661.334Smrg	You'll need to clean usr.bin/ktruss, usr.bin/kdump, and rescue.
2671.334Smrg
2681.331Sriastrad20220921:
2691.331Sriastrad	Since the kernel version was bumped to 9.99.100, the bootloader
2701.333Sriastrad	must be updated on x86 or EFI boot platforms in order to load
2711.333Sriastrad	modules from boot.cfg(5) or interactively at the bootloader
2721.333Sriastrad	prompt.
2731.333Sriastrad
2741.333Sriastrad	The kernel can still load modules at runtime, with modload(8)
2751.333Sriastrad	or modules.conf(5), with no bootloader update.  This will not
2761.333Sriastrad	affect release branches because it only applies to patch
2771.333Sriastrad	numbers >=100.
2781.333Sriastrad
2791.333Sriastrad	On x86 (i386 or amd64) with BIOS boot, this requires copying a
2801.333Sriastrad	new /usr/mdec/boot to /boot.  You can build this in the destdir
2811.333Sriastrad	by running `$TOOLDIR/bin/nbmake-$ARCH dependall install' in
2821.333Sriastrad	sys/arch/i386/stand.
2831.333Sriastrad
2841.333Sriastrad	On platforms with EFI boot (including x86 with EFI boot), this
2851.333Sriastrad	requires copying a new /usr/mdec/boot*.efi to the EFI/BOOT/
2861.333Sriastrad	directory on the EFI system partition.  The boot*.efi file is:
2871.333Sriastrad
2881.333Sriastrad	aarch64	bootaa64.efi
2891.333Sriastrad	amd64	bootx64.efi
2901.333Sriastrad	arm	bootarm.efi	(32-bit arm)
2911.333Sriastrad	i386	bootx32.efi
2921.333Sriastrad
2931.333Sriastrad	You can build this in the destdir by running
2941.333Sriastrad	`$TOOLDIR/bin/nbmake-$ARCH dependall install' in
2951.333Sriastrad	sys/stand/efiboot/boot*.
2961.331Sriastrad
2971.330Slukem20220821:
2981.330Slukem	Support for building extsrc/ has been deprecated.
2991.330Slukem	EXTSRCSRCDIR and MKEXTSRC have been deprecated.
3001.330Slukem
3011.329Smrg20220714:
3021.329Smrg	Updates to xorg-server and associated drivers may cause builds to
3031.329Smrg	fail.  Cleaning both DESTDIR and the xorg build tree may be needed.
3041.329Smrg
3051.328Smartin20220628:
3061.328Smartin	Changes in the build of src/games/robots require a clean build
3071.328Smartin	of that program.
3081.328Smartin
3091.324Smartin20211116:
3101.324Smartin	Changes in the xorg build require clean obj dirs for external/mit/xorg
3111.325Smartin	(or a full clean/non-update build).
3121.324Smartin
3131.323Snia20211112:
3141.323Snia	Device tree sources were updated for evbarm.  Some device nodes
3151.323Snia	(in particular, ld(4) devices on the ROCKPro64) will be renumbered.
3161.323Snia
3171.322Smartin20211014:
3181.323Snia	MKPIE default for aarch64 has changed, a clean build is required.
3191.322Smartin
3201.321Schristos20210917:
3211.321Schristos	Changed MNT_ACLS to default to POSIX1e ACLs instead of NFSv4
3221.321Schristos	ACLs, to be compatible with FreeBSD. If you are using NFSv4 ACLs
3231.321Schristos	and have "acls" in /etc/fstab you'll need to change it to "nfs4acls".
3241.321Schristos
3251.319Smrg20210711:
3261.319Smrg	Updated GMP sources may require cleaning in tools/gmp and/or in
3271.319Smrg	external/lgpl3/gmp/lib, particularly if GCC itself does not build.
3281.319Smrg
3291.318Smrg20210417:
3301.318Smrg	GCC 10 was enabled for several platforms.  If builds fail in either
3311.351Sgutterid	tools/gcc or external/gpl3/gcc, first try cleaning those objects and
3321.318Smrg	removing the $DESTDIR/usr/include/g++ subdirectory.
3331.318Smrg
3341.316Smrg20201016:
3351.316Smrg	MIPS kernel modules have been disabled until they work.  This will
3361.316Smrg	turn up in extra files in the DESTDIR, which should be cleaned.
3371.316Smrg
3381.315Smrg20200925:
3391.315Smrg	GNU MPC and MPFR have been updated.  At least MPFR needs cleaning
3401.315Smrg	in both the tools and external dirs.
3411.315Smrg
3421.314Smrg20200912:
3431.314Smrg	GCC 9 has arrived for Arm and x86 platforms, and will be coming
3441.314Smrg	for several more, as will binutils 2.34.  Clean as required.
3451.314Smrg
3461.313Smrg20200907:
3471.313Smrg	GCC 9 is coming, and binutils has been updated for MIPS.  This
3481.313Smrg	probably requires cleaning the tools/binutils.
3491.313Smrg
3501.311Smrg20200811:
3511.312Smrg	GCC updates may require cleaning the objdir.  This may occur
3521.312Smrg	due to GCC 7.5 update, GCC 8.4 move to gcc.old, or the upcoming
3531.312Smrg	GCC 9 upgrade.
3541.311Smrg
3551.309Schristos20200614:
3561.310Schristos	blacklist* has been renamed to blocklist*. postinstall(8)
3571.332Sgutterid	should handle the migration.
3581.309Schristos
3591.308Schristos20200601:
3601.308Schristos	Due to a mistake in LIBISPRIVATE handling, .so libraries were
3611.308Schristos	created in the build directories and need cleaning.
3621.308Schristos
3631.307Smrg20200311:
3641.307Smrg	GCC 8 ports will need cleaning in src/tools/gcc and
3651.307Smrg	src/external/gpl3/gcc due to GCC 8.4 update.
3661.307Smrg
3671.306Schristos20191118:
3681.306Schristos	More architectures were switched to gcc8:
3691.306Schristos	    i386, ia64 powerpc64, sparc, sparc64, arm
3701.306Schristos	The same comments as in 20191022 apply.
3711.306Schristos
3721.305Smartin20191112:
3731.305Smartin	The LLVM update requires a clean rebuild for all architectures using
3741.305Smartin	LLVM during the tools build phase (i386, amd64, aarch64).
3751.305Smartin
3761.304Smartin20191022:
3771.304Smartin	Ports amd64 and aarch64 switched to GCC 8.3 by default.
3781.304Smartin	In-place ("expert mode", build.sh -E) builds are not supported
3791.304Smartin	when going from a GCC 7 userland to GCC 8. Do a regular
3801.304Smartin	build to a different DESTDIR (or preferably: build.sh -U) at least
3811.306Schristos	once and install sets, or download comp.{tar.xz,tgz} from the
3821.304Smartin	daily builds and install that before doing the next in-place build.
3831.304Smartin
3841.303Smrg20191001:
3851.303Smrg	GCC 8.3 was imported.  Builds of src/tools/gcc may fail if
3861.303Smrg	old builds with GCC 7 output now uses GCC 8.  Clean this
3871.303Smrg	directory, and also clean src/external/gpl3/gcc.
3881.303Smrg
3891.302Sriastrad20190903:
3901.306Schristos	Files with names that coincide with existing files' names on
3911.302Sriastrad	case-insensitive file systems were inadvertently committed, for
3921.302Sriastrad	radeon GPU firmware.  We cannot mark these as obsolete for
3931.302Sriastrad	postinstall to fix, so if you updated src since 2019-08-26, and
3941.302Sriastrad	ran build.sh distribution or ran build.sh release, you must
3951.302Sriastrad	manually delete the following files in your DESTDIR (which is
3961.302Sriastrad	usually $OBJDIR/destir.$ARCH), or from / if you have installed
3971.302Sriastrad	them:
3981.302Sriastrad
3991.302Sriastrad		/libdata/firmware/radeon/bonaire_ce.bin
4001.302Sriastrad		/libdata/firmware/radeon/bonaire_mc.bin
4011.302Sriastrad		/libdata/firmware/radeon/bonaire_me.bin
4021.302Sriastrad		/libdata/firmware/radeon/bonaire_mec.bin
4031.302Sriastrad		/libdata/firmware/radeon/bonaire_pfp.bin
4041.302Sriastrad		/libdata/firmware/radeon/bonaire_rlc.bin
4051.302Sriastrad		/libdata/firmware/radeon/bonaire_sdma.bin
4061.302Sriastrad		/libdata/firmware/radeon/bonaire_smc.bin
4071.302Sriastrad		/libdata/firmware/radeon/bonaire_uvd.bin
4081.302Sriastrad		/libdata/firmware/radeon/hainan_ce.bin
4091.302Sriastrad		/libdata/firmware/radeon/hainan_mc.bin
4101.302Sriastrad		/libdata/firmware/radeon/hainan_me.bin
4111.302Sriastrad		/libdata/firmware/radeon/hainan_pfp.bin
4121.302Sriastrad		/libdata/firmware/radeon/hainan_rlc.bin
4131.302Sriastrad		/libdata/firmware/radeon/hainan_smc.bin
4141.302Sriastrad		/libdata/firmware/radeon/hawaii_ce.bin
4151.302Sriastrad		/libdata/firmware/radeon/hawaii_mc.bin
4161.302Sriastrad		/libdata/firmware/radeon/hawaii_me.bin
4171.302Sriastrad		/libdata/firmware/radeon/hawaii_mec.bin
4181.302Sriastrad		/libdata/firmware/radeon/hawaii_pfp.bin
4191.302Sriastrad		/libdata/firmware/radeon/hawaii_rlc.bin
4201.302Sriastrad		/libdata/firmware/radeon/hawaii_sdma.bin
4211.302Sriastrad		/libdata/firmware/radeon/hawaii_smc.bin
4221.302Sriastrad		/libdata/firmware/radeon/kabini_ce.bin
4231.302Sriastrad		/libdata/firmware/radeon/kabini_me.bin
4241.302Sriastrad		/libdata/firmware/radeon/kabini_mec.bin
4251.302Sriastrad		/libdata/firmware/radeon/kabini_pfp.bin
4261.302Sriastrad		/libdata/firmware/radeon/kabini_rlc.bin
4271.302Sriastrad		/libdata/firmware/radeon/kabini_sdma.bin
4281.302Sriastrad		/libdata/firmware/radeon/kaveri_ce.bin
4291.302Sriastrad		/libdata/firmware/radeon/kaveri_me.bin
4301.302Sriastrad		/libdata/firmware/radeon/kaveri_mec.bin
4311.302Sriastrad		/libdata/firmware/radeon/kaveri_mec2.bin
4321.302Sriastrad		/libdata/firmware/radeon/kaveri_pfp.bin
4331.302Sriastrad		/libdata/firmware/radeon/kaveri_rlc.bin
4341.302Sriastrad		/libdata/firmware/radeon/kaveri_sdma.bin
4351.302Sriastrad		/libdata/firmware/radeon/mullins_ce.bin
4361.302Sriastrad		/libdata/firmware/radeon/mullins_me.bin
4371.302Sriastrad		/libdata/firmware/radeon/mullins_mec.bin
4381.302Sriastrad		/libdata/firmware/radeon/mullins_pfp.bin
4391.302Sriastrad		/libdata/firmware/radeon/mullins_rlc.bin
4401.302Sriastrad		/libdata/firmware/radeon/mullins_sdma.bin
4411.302Sriastrad		/libdata/firmware/radeon/oland_ce.bin
4421.302Sriastrad		/libdata/firmware/radeon/oland_mc.bin
4431.302Sriastrad		/libdata/firmware/radeon/oland_me.bin
4441.302Sriastrad		/libdata/firmware/radeon/oland_pfp.bin
4451.302Sriastrad		/libdata/firmware/radeon/oland_rlc.bin
4461.302Sriastrad		/libdata/firmware/radeon/oland_smc.bin
4471.302Sriastrad		/libdata/firmware/radeon/pitcairn_ce.bin
4481.302Sriastrad		/libdata/firmware/radeon/pitcairn_mc.bin
4491.302Sriastrad		/libdata/firmware/radeon/pitcairn_me.bin
4501.302Sriastrad		/libdata/firmware/radeon/pitcairn_pfp.bin
4511.302Sriastrad		/libdata/firmware/radeon/pitcairn_rlc.bin
4521.302Sriastrad		/libdata/firmware/radeon/pitcairn_smc.bin
4531.302Sriastrad		/libdata/firmware/radeon/tahiti_ce.bin
4541.302Sriastrad		/libdata/firmware/radeon/tahiti_mc.bin
4551.302Sriastrad		/libdata/firmware/radeon/tahiti_me.bin
4561.302Sriastrad		/libdata/firmware/radeon/tahiti_pfp.bin
4571.302Sriastrad		/libdata/firmware/radeon/tahiti_rlc.bin
4581.302Sriastrad		/libdata/firmware/radeon/tahiti_smc.bin
4591.302Sriastrad		/libdata/firmware/radeon/verde_ce.bin
4601.302Sriastrad		/libdata/firmware/radeon/verde_mc.bin
4611.302Sriastrad		/libdata/firmware/radeon/verde_me.bin
4621.302Sriastrad		/libdata/firmware/radeon/verde_pfp.bin
4631.302Sriastrad		/libdata/firmware/radeon/verde_rlc.bin
4641.302Sriastrad		/libdata/firmware/radeon/verde_smc.bin
4651.302Sriastrad
4661.302Sriastrad	We will re-import these radeon firmware images another way
4671.302Sriastrad	later.
4681.302Sriastrad
4691.301Smartin20190727:
4701.301Smartin	The uefi bootloader has gained tftp support and needs a clean
4711.301Smartin	build. If you do update builds, manually clean its object
4721.301Smartin	directory by something like:
4731.301Smartin	cd sys/arch/i386/stand/efiboot && make clean
4741.301Smartin
4751.300Smartin20190723:
4761.344Sgutterid	The jemalloc allocator in libc is now built without extended
4771.300Smartin	debugging (for performance reasons). In update builds make sure
4781.326Sandvar	to rebuild it completely, by removing all affected object files,
4791.300Smartin	including compat builds, something like:
4801.300Smartin	cd /usr/obj && find . -type d -name jemalloc|xargs rm -rf
4811.300Smartin
4821.299Smrg20190207:
4831.299Smrg	GCC 7 switched for many ports.  Update builds are likely to fail.
4841.299Smrg
4851.1SabsHints for a more successful build:
4861.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4871.123Sjmc    Use build.sh, but do not use its "expert mode":
4881.132Sjmmv	This will automatically build the tools in the
4891.123Sjmc	   correct order, and it will keep the tools and the
4901.123Sjmc	   new build products from interfering with the running
4911.123Sjmc	   system.  This will allow you to ignore most of the
4921.123Sjmc	   other advice in this file.
4931.2Smrg    Build a new kernel first:
4941.2Smrg	This makes sure that any new system calls or features
4951.2Smrg	   expected by the new userland will be present.  This
4961.2Smrg	   helps to avoid critical errors when upgrading.
4971.1Sabs    Use object directories:
4981.1Sabs	This helps to keep stale object
4991.1Sabs	   files from polluting the build if a Makefile "forgets"
5001.1Sabs	   about one.  It also makes it easier to clean up after
5011.1Sabs	   a build.  It's also necessary if you want to use the
5021.1Sabs	   same source tree for multiple machines.
5031.123Sjmc	   To use object directories with build.sh:
5041.123Sjmc	    a) invoke build.sh with the "-M" or "-O" options.
5051.123Sjmc	   To use object directories without using build.sh:
5061.1Sabs	    a) cd /usr/src ; make cleandir
5071.2Smrg	    b) Add "OBJMACHINE=yes" to /etc/mk.conf
5081.2Smrg	    c) Add "MKOBJDIRS=yes" to /etc/mk.conf
5091.1Sabs	    d) cd /usr/src ; make build
5101.2Smrg	   Note that running "make obj" in a directory will create
5111.2Smrg	   in obj.$MACHINE directory.
5121.1Sabs    Build to a DESTDIR:
5131.123Sjmc	This helps to keep old installed files (especially libraries)
5141.123Sjmc	   from interfering with the new build.
5151.123Sjmc	   To build to a DESTDIR with build.sh, use the "-D" option.
5161.123Sjmc	   To build to a DESTDIR without using build.sh, set the DESTDIR
5171.123Sjmc	   environment variable before running make build.  It should be
5181.123Sjmc	   set to the pathname of an initially empty directory.
5191.123Sjmc	   Problems: if you do not use build.sh, you might need to
5201.123Sjmc		update critical utilities without using DESTDIR since
5211.123Sjmc		nothing is executed from what is installed in DESTDIR.
5221.123Sjmc		(See critical utils, below.)
5231.1Sabs    Build often:
5241.1Sabs	This keeps critical utilities current enough to not choke
5251.1Sabs	on any other part of the source tree that depends on up to
5261.123Sjmc	date functionality.  If you use build.sh, you should not have
5271.123Sjmc	this problem.
5281.241Swiz
5291.1SabsWhat to do if things don't work:
5301.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5311.230StlsWhen things don't work there are usually a few things that commonly
5321.1Sabsshould be done.
5331.1Sabs    1)	make includes
5341.1Sabs	This should be done automatically by make build.
5351.1Sabs    2)  cd share/mk && make install
5361.1Sabs	Again, automatically done by make build.
5371.1Sabs
5381.1SabsFailsafe rebuild of a small part of the tree:
5391.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5401.1SabsTo make sure you rebuild something correctly you want to do
5411.1Sabssomething like the following:
5421.1Sabs    1)  Make sure the includes and .mk files are up to date.
5431.1Sabs    2)  Make sure any program used to build the particular
5441.1Sabs	utility is up to date.  (yacc, lex, etc...)
5451.1Sabs    3)  cd ...path/to/util...
5461.1Sabs	make cleandir
5471.1Sabs	rm ...all obj directories...
5481.1Sabs	make cleandir			# yes, again
5491.1Sabs	make obj
5501.1Sabs	make depend && make
5511.1Sabs
5521.1SabsFailsafe rebuild of the entire tree:
5531.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5541.1SabsIf you really want to make sure the source tree is clean and
5551.2Smrgready for a build try the following.  Note that sourcing /etc/mk.conf
5561.2Smrg(a make(1) Makefile) in this manner is not right, and will not work
5571.2Smrgfor anyone who uses any make(1) features in /etc/mk.conf.
5581.1Sabs
5591.1Sabs---cut here---
5601.1Sabs#!/bin/sh
5611.1Sabs. /etc/mk.conf
5621.1Sabs
5631.58Slukemif [ -z $NETBSDSRCDIR ] ; then
5641.58Slukem    NETBSDSRCDIR=/usr/src
5651.1Sabsfi
5661.58Slukemif [ \! -d $NETBSDSRCDIR ] ; then
5671.1Sabs    echo Unable to find sources
5681.1Sabs    exit 1
5691.1Sabsfi
5701.58Slukemfind $NETBSDSRCDIR -name \*.o -o -name obj.\* -o -name obj -exec rm \{\} \;
5711.1Sabs
5721.1Sabsif [ -z $BSDOBJDIR ] ; then
5731.1Sabs    BSDOBJDIR=/usr/obj
5741.1Sabsfi
5751.1Sabsif [ -d $BSDOBJDIR ] ; then
5761.1Sabs    rm -rf $BSDOBJDIR
5771.1Sabsfi
5781.1Sabs
5791.58Slukemcd $NETBSDSRCDIR && make cleandir
5801.1Sabs
5811.1Sabs---cut here---
5821.1Sabs
5831.1SabsCritical utilities:
5841.1Sabs^^^^^^^^^^^^^^^^^^^
5851.1Sabs	usr.bin/make
5861.1Sabs	usr.bin/yacc
5871.1Sabs	usr.bin/lex
5881.11Slukem	usr.bin/xlint
5891.142Sdrochner	usr.bin/config
5901.1Sabs
5911.34SsimonbOther problems and possible solutions:
5921.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5931.1SabsSymptom:Complaints involving a Makefile.
5941.17SerhFix:	Rebuild usr.bin/make:
5951.17Serh	cd usr.bin/make && make && make install
5961.111Ssimonb	Or, a failsafe method if that doesn't work:
5971.348Srillig	cd usr.bin/make && cc -DMAKE_NATIVE *.c -I. -o make \
5981.348Srillig	&& install make /usr/bin
5991.17Serh
6001.1SabsFix:	Make sure .mk files are up to date.
6011.1Sabs	cd share/mk && make install
6021.2Smrg
6031.2SmrgSymptom:Kernel `config' fails to configure any kernel, including GENERIC.
6041.142SdrochnerFix:	Rebuild usr.bin/config
6051.1Sabs
6061.4SitojunSymptom:Obsolete intermediate files are used during compilation
6071.4SitojunFix:	Try the following sequence of commands in the directory in question.
6081.4Sitojun	make cleandir; rm `make print-objdir`; make cleandir; make obj
6091.4Sitojun	(If you built the tree without "make obj" in the past, obsolete files
6101.4Sitojun	may remain.  The command tries to clean everything up)
6111.5Swiz
6121.207SmbalmerSymptom:.../sysinst/run.c:xx: warning: initialization from incompatible
6131.207Smbalmer	pointer type
6141.5SwizFix:	Rebuild and install usr.bin/menuc
6151.12Sitojun
6161.12SitojunSymptom:mklocale not found during build in share/locale/ctype
6171.12SitojunFix:	Build and install usr.bin/mklocale
6181.13Sdogcow
6191.86SkleinkSymptom:undefined reference to `__assert13' or `__unsetenv13'
6201.13SdogcowFix:    Rebuild and install lib/libc
6211.13Sdogcow
6221.142SdrochnerSymptom:usr.bin/config fails to build.
6231.19ScgdFix:	Try building with -DMAKE_BOOTSTRAP added to CFLAGS in Makefile.
6241.13Sdogcow
6251.19ScgdSymptom:undefined reference to `getprogname' or `setprogname'
6261.19ScgdFix:    Rebuild and install lib/libc
6271.24Sabs
6281.223SjoergSymptom:Update build fails in src/tools/gcc complaining that a variable
6291.223Sjoerg	(e.g. CPPFLAGS) has changed since the previous run.
6301.223SjoergFix:    Run "nbmake-${ARCH} clean" in src/tools/gcc or do a clean build.
6311.257Sapb
6321.257SapbSymptom:cvs [update aborted]: cannot open directory /cvsroot/src/...:
6331.257Sapb	No such file or directory.
6341.257SapbCause:	If a directory is created by mistake, then it is sometimes
6351.257Sapb	deleted from the CVS repository using administrative commands
6361.257Sapb	that bypass the normal cvs access controls.  If your cvs working tree
6371.257Sapb	contains references to a directory that has been deleted on the
6381.257Sapb	server in this way, then "cvs update" reports this error.
6391.257SapbFix:	Recursively delete the affected directory from your working tree
6401.257Sapb	and try the update again.
641