UPDATING revision 1.376
11.376Spalle$NetBSD: UPDATING,v 1.376 2025/02/06 19:58:50 palle 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.375Schristos20250131:
231.375Schristos	The switch to the new jemalloc requires cleaning in libc.
241.376Spalle
251.367Sriastrad20241122:
261.373Sriastrad	Changes to various libraries' build options require cleaning
271.373Sriastrad	their objdirs in update builds:
281.368Sriastrad
291.372Sriastrad	cd external/bsd/file/lib && $TOOLDIR/bin/nbmake-$ARCH clean
301.370Sriastrad	cd external/bsd/libarchive/lib && $TOOLDIR/bin/nbmake-$ARCH clean
311.372Sriastrad	cd external/public-domain/xz/lib && $TOOLDIR/bin/nbmake-$ARCH clean
321.368Sriastrad
331.374Sriastrad	Also, for architectures with MKCOMPAT, it is necessary to clean
341.374Sriastrad	the compat objdirs too.  The easiest way is:
351.374Sriastrad
361.374Sriastrad	rm -rf OBJDIR/compat/*/*/external/bsd/file/lib
371.374Sriastrad	rm -rf OBJDIR/compat/*/*/external/bsd/libarchive/lib
381.374Sriastrad	rm -rf OBJDIR/compat/*/*/external/public-domain/xz/lib
391.374Sriastrad
401.367Sriastrad	Changes to bsd.lib.mk to improve detecting differences in
411.367Sriastrad	shared library symbol exports may cause some .actsym files in
421.367Sriastrad	the objdir to become stale in update builds.
431.367Sriastrad
441.367Sriastrad	To work around this, delete all files matching `*.actsym' in
451.367Sriastrad	the objdir.  For example:
461.367Sriastrad
471.367Sriastrad	find OBJDIR -name '*.actsym' -type f -print0 | xargs -0 rm
481.367Sriastrad
491.363Smartin20241104:
501.363Smartin	Changes around the integration of the zstd compression
511.363Smartin	library may require manual deletion of some object directories
521.366Sriastrad	if you update from a build from a few days ago:
531.366Sriastrad	rm -rf DESTDIR/usr/lib/*/libarchive*
541.366Sriastrad	rm -rf DESTDIR/usr/lib/*/libmagic*
551.366Sriastrad	rm -rf DESTDIR/usr/lib/*/libzstd*
561.366Sriastrad	rm -rf DESTDIR/usr/lib/libarchive*
571.366Sriastrad	rm -rf DESTDIR/usr/lib/libmagic*
581.366Sriastrad	rm -rf DESTDIR/usr/lib/libzstd*
591.366Sriastrad	rm -rf OBJDIR/compat/*/*/external/bsd/file/
601.366Sriastrad	rm -rf OBJDIR/compat/*/*/external/bsd/libarchive/
611.366Sriastrad	rm -rf OBJDIR/compat/*/*/external/bsd/zstd/
621.366Sriastrad	rm -rf OBJDIR/external/bsd/file/
631.366Sriastrad	rm -rf OBJDIR/external/bsd/libarchive/
641.366Sriastrad	rm -rf OBJDIR/external/bsd/zstd/
651.366Sriastrad	rm -rf OBJDIR/external/gpl3/gcc/
661.366Sriastrad	rm -rf OBJDIR/tools/gcc/
671.363Smartin
681.360Swiz20240926:
691.360Swiz	Building -current when running on amd64 from about 20240924
701.360Swiz	to about 20240926 will not work due to a "malloc_np.h"
711.360Swiz	error. Please downgrade to a version from 20240924 or older,
721.360Swiz	or upgrade to a newer version e.g. using a binary release from
731.360Swiz	the NetBSD build servers.
741.360Swiz
751.358Smartin20240923:
761.358Smartin	Update builds will require cleaning the object directories for
771.359Smartin	jemalloc (like: "rm -rf $OBJ/external/bsd/jemalloc*") and the
781.359Smartin	libc dependency files (like: "rm $OBJ/lib/libc/jemalloc.*").
791.359Smartin	On architectures with COMPAT libs, those also have to be cleaned,
801.359Smartin	e.g. on sparc64: "rm -rf $OBJ/compat/sparc64/sparc/external/bsd/jemalloc*"
811.359Smartin	and "rm $OBJ/compat/sparc64/sparc/lib/libc/jemalloc.*".
821.358Smartin
831.357Schristos20240817:
841.357Schristos	Update builds will require cleaning in src/external/historical/nawk/bin
851.357Schristos	in order to remove the awk binary since now there is a subdirectory
861.357Schristos	called awk.
871.358Smartin
881.355Smartin20240812:
891.355Smartin	Update builds will require removing the tools objdir for gdb
901.355Smartin	if building with MKCROSSGDB=yes. All architectures use gdb.old
911.355Smartin	now.
921.356Sriastrad
931.354Smartin20240630:
941.353Smartin	Update builds will require removing the tools objdir for binutils
951.353Smartin	(as most architectures should use binutils.old now).
961.353Smartin
971.352Skre20240610:
981.352Skre	Update builds are likely to require removing the objdir for
991.352Skre	distrib/<arch>/cdroms - or at least references to libarchive
1001.352Skre	from within there after the recent libarchive update.
1011.352Skre
1021.350Sriastrad20240504:
1031.350Sriastrad	Update builds on x86 require making the `cleandir' target in
1041.350Sriastrad	lib/libm, or deleting the objdir for lib/libm.
1051.350Sriastrad
1061.349Smaya20240423:
1071.349Smaya	Update builds with x11 may fail after switching to Mesa 21.
1081.349Smaya
1091.346Sriastrad20240410:
1101.346Sriastrad	Update builds may require manually deleting
1111.346Sriastrad	$DESTDIR/var/run/named (and, potentially,
1121.346Sriastrad	$DESTDIR/var/run/lwresd) in order to avoid checkflist failure.
1131.346Sriastrad
1141.347Snia20240409:
1151.347Snia	32-bit compatibility libraries were moved into the base32
1161.347Snia	and debug32 sets.  HTML man pages were moved into the manhtml set.
1171.347Snia
1181.343Sriastrad20230828:
1191.343Sriastrad	If:
1201.343Sriastrad        - you updated to current and ran postinstall between 20230826
1211.343Sriastrad	  and 20230828 inclusive, and
1221.343Sriastrad        - you are not using anything outside the base system to
1231.343Sriastrad	  populate /etc/openssl/certs (e.g., manually adding
1241.343Sriastrad	  certificates or using ca-certificates or mozilla-rootcerts or
1251.343Sriastrad	  mozilla-rootcerts-openssl from pkgsrc),
1261.343Sriastrad	delete /etc/openssl/certs and rerun postinstall or just
1271.343Sriastrad	`certctl rehash'.
1281.343Sriastrad
1291.343Sriastrad	Otherwise, certctl(8) will think someone else has left
1301.343Sriastrad	/etc/openssl/certs in the way and will avoid clobbering it on
1311.343Sriastrad	upgrade from older NetBSD.
1321.343Sriastrad
1331.341Slukem20230718:
1341.341Slukem	build.sh will use mk.conf in the same directory as build.sh instead
1351.341Slukem	of /etc/mk.conf, unless MAKECONF is already defined in the environment.
1361.341Slukem
1371.342Smartin20230714:
1381.342Smartin	Import of gcc 10.5 requires a clean build of at least tools/gcc
1391.342Smartin	and external/gpl3/gcc* object directories. An update build
1401.342Smartin	without cleaning will result in obscure failures in rare corner
1411.342Smartin	cases.
1421.342Smartin
1431.339Smartin20230604:
1441.339Smartin	Building native kernels with the installed make(1) instead of
1451.339Smartin	the $TOOLDIR/bin/nbmake-${arch} wrapper will fail if userland
1461.339Smartin	has not been updated. Note that this is an unsupported build
1471.339Smartin	configuration (but usually works if userland is -current enough).
1481.338Slukem
1491.338Slukem20230523:
1501.338Slukem	ctfmerge was fixed as macOS host tool. This may require a clean tools
1511.338Slukem	rebuild to detect the update to tools/compat/configure.
1521.338Slukem
1531.340Smartin20230515:
1541.340Smartin	New openssl build requires removal of the crypto/external/bsd/openssl
1551.345Sandvar	and tests/crypto/libcrypto subdirectories in the ${OBJDIR} hierarchy.
1561.340Smartin	Otherwise test results may be wrong due to wrong "golden" output
1571.340Smartin	files being installed.
1581.340Smartin
1591.337Smrg20230322:
1601.337Smrg	Fixes for moved /lib/libisns* mean that builds will complain about
1611.337Smrg	./usr/lib/libisns* being missing until src/lib/libisns is forced
1621.337Smrg	to (re)install the files, including the symlinks.  The simplest
1631.337Smrg	way is to clean this subdir before building.
1641.337Smrg
1651.336Smartin20230112:
1661.336Smartin	New binutils require an updated ld.elf_so. If you are doing
1671.336Smartin	(unsupported) in-place self builds (with the -E flag to build.sh),
1681.336Smartin	make sure to have installed latest ld.elf_so before you rebuild
1691.336Smartin	userland.
1701.336Smartin
1711.335Schs20221116:
1721.335Schs	The addition to NetBSD's version of UFS2 of support for extended
1731.335Schs	attributes broke backward compatibility with previous releases
1741.335Schs	of NetBSD, so UFS2 has been restored to being compatible with
1751.335Schs	previous NetBSD releases by disabling extended attributes.
1761.335Schs	(Note that ACLs are implemented as extended attributes, so
1771.335Schs	this changes disables ACLs as well.)
1781.335Schs
1791.335Schs	Support for UFS2 with extended attributes is now available in a new
1801.335Schs	UFS variant called UFS2ea.  If you have created extended attributes
1811.335Schs	in an original UFS2 file system then "fsck -p" will now fail due to
1821.335Schs	the unexpected presence of extended attributes and "fsck -y" will
1831.335Schs	remove all extended attributes.  If you wish to preserve extended
1841.335Schs	attributes rather than delete them, there is a utility to convert
1851.335Schs	a UFS2 file system to UFS2ea and leave extended attributes in place,
1861.335Schs	but this should be used with caution since it will preserve any
1871.335Schs	extended attributes that have been corrupted by the backward
1881.335Schs	incompatibility too.
1891.335Schs
1901.335Schs	If you wish to use a UFS2ea file system as your root file system,
1911.335Schs	then you will need to update your boot loader to a version that
1921.335Schs	supports UFS2ea.
1931.335Schs
1941.335Schs	For more information, see:
1951.335Schs	https://wiki.netbsd.org/features/UFS2ea
1961.335Schs
1971.334Smrg20221111:
1981.334Smrg	The new libdrm import worsened the conflict issues for the
1991.334Smrg	kdump/ktruss ioctl, and i915 now conflicts with base, and has
2001.334Smrg	been turned off.  This will cause update build issues like:
2011.334Smrg
2021.334Smrg		kdump-ioctl.c:12175:143: error: 'DRM_IOCTL_I915_DESTROY_HEAP'
2031.334Smrg		   undeclared here (not in a function);
2041.334Smrg		   did you mean 'DRM_IOCTL_MODE_DESTROY_DUMB'?
2051.334Smrg
2061.334Smrg	You'll need to clean usr.bin/ktruss, usr.bin/kdump, and rescue.
2071.334Smrg
2081.331Sriastrad20220921:
2091.331Sriastrad	Since the kernel version was bumped to 9.99.100, the bootloader
2101.333Sriastrad	must be updated on x86 or EFI boot platforms in order to load
2111.333Sriastrad	modules from boot.cfg(5) or interactively at the bootloader
2121.333Sriastrad	prompt.
2131.333Sriastrad
2141.333Sriastrad	The kernel can still load modules at runtime, with modload(8)
2151.333Sriastrad	or modules.conf(5), with no bootloader update.  This will not
2161.333Sriastrad	affect release branches because it only applies to patch
2171.333Sriastrad	numbers >=100.
2181.333Sriastrad
2191.333Sriastrad	On x86 (i386 or amd64) with BIOS boot, this requires copying a
2201.333Sriastrad	new /usr/mdec/boot to /boot.  You can build this in the destdir
2211.333Sriastrad	by running `$TOOLDIR/bin/nbmake-$ARCH dependall install' in
2221.333Sriastrad	sys/arch/i386/stand.
2231.333Sriastrad
2241.333Sriastrad	On platforms with EFI boot (including x86 with EFI boot), this
2251.333Sriastrad	requires copying a new /usr/mdec/boot*.efi to the EFI/BOOT/
2261.333Sriastrad	directory on the EFI system partition.  The boot*.efi file is:
2271.333Sriastrad
2281.333Sriastrad	aarch64	bootaa64.efi
2291.333Sriastrad	amd64	bootx64.efi
2301.333Sriastrad	arm	bootarm.efi	(32-bit arm)
2311.333Sriastrad	i386	bootx32.efi
2321.333Sriastrad
2331.333Sriastrad	You can build this in the destdir by running
2341.333Sriastrad	`$TOOLDIR/bin/nbmake-$ARCH dependall install' in
2351.333Sriastrad	sys/stand/efiboot/boot*.
2361.331Sriastrad
2371.330Slukem20220821:
2381.330Slukem	Support for building extsrc/ has been deprecated.
2391.330Slukem	EXTSRCSRCDIR and MKEXTSRC have been deprecated.
2401.330Slukem
2411.329Smrg20220714:
2421.329Smrg	Updates to xorg-server and associated drivers may cause builds to
2431.329Smrg	fail.  Cleaning both DESTDIR and the xorg build tree may be needed.
2441.329Smrg
2451.328Smartin20220628:
2461.328Smartin	Changes in the build of src/games/robots require a clean build
2471.328Smartin	of that program.
2481.328Smartin
2491.324Smartin20211116:
2501.324Smartin	Changes in the xorg build require clean obj dirs for external/mit/xorg
2511.325Smartin	(or a full clean/non-update build).
2521.324Smartin
2531.323Snia20211112:
2541.323Snia	Device tree sources were updated for evbarm.  Some device nodes
2551.323Snia	(in particular, ld(4) devices on the ROCKPro64) will be renumbered.
2561.323Snia
2571.322Smartin20211014:
2581.323Snia	MKPIE default for aarch64 has changed, a clean build is required.
2591.322Smartin
2601.321Schristos20210917:
2611.321Schristos	Changed MNT_ACLS to default to POSIX1e ACLs instead of NFSv4
2621.321Schristos	ACLs, to be compatible with FreeBSD. If you are using NFSv4 ACLs
2631.321Schristos	and have "acls" in /etc/fstab you'll need to change it to "nfs4acls".
2641.321Schristos
2651.319Smrg20210711:
2661.319Smrg	Updated GMP sources may require cleaning in tools/gmp and/or in
2671.319Smrg	external/lgpl3/gmp/lib, particularly if GCC itself does not build.
2681.319Smrg
2691.318Smrg20210417:
2701.318Smrg	GCC 10 was enabled for several platforms.  If builds fail in either
2711.351Sgutterid	tools/gcc or external/gpl3/gcc, first try cleaning those objects and
2721.318Smrg	removing the $DESTDIR/usr/include/g++ subdirectory.
2731.318Smrg
2741.316Smrg20201016:
2751.316Smrg	MIPS kernel modules have been disabled until they work.  This will
2761.316Smrg	turn up in extra files in the DESTDIR, which should be cleaned.
2771.316Smrg
2781.315Smrg20200925:
2791.315Smrg	GNU MPC and MPFR have been updated.  At least MPFR needs cleaning
2801.315Smrg	in both the tools and external dirs.
2811.315Smrg
2821.314Smrg20200912:
2831.314Smrg	GCC 9 has arrived for Arm and x86 platforms, and will be coming
2841.314Smrg	for several more, as will binutils 2.34.  Clean as required.
2851.314Smrg
2861.313Smrg20200907:
2871.313Smrg	GCC 9 is coming, and binutils has been updated for MIPS.  This
2881.313Smrg	probably requires cleaning the tools/binutils.
2891.313Smrg
2901.311Smrg20200811:
2911.312Smrg	GCC updates may require cleaning the objdir.  This may occur
2921.312Smrg	due to GCC 7.5 update, GCC 8.4 move to gcc.old, or the upcoming
2931.312Smrg	GCC 9 upgrade.
2941.311Smrg
2951.309Schristos20200614:
2961.310Schristos	blacklist* has been renamed to blocklist*. postinstall(8)
2971.332Sgutterid	should handle the migration.
2981.309Schristos
2991.308Schristos20200601:
3001.308Schristos	Due to a mistake in LIBISPRIVATE handling, .so libraries were
3011.308Schristos	created in the build directories and need cleaning.
3021.308Schristos
3031.307Smrg20200311:
3041.307Smrg	GCC 8 ports will need cleaning in src/tools/gcc and
3051.307Smrg	src/external/gpl3/gcc due to GCC 8.4 update.
3061.307Smrg
3071.306Schristos20191118:
3081.306Schristos	More architectures were switched to gcc8:
3091.306Schristos	    i386, ia64 powerpc64, sparc, sparc64, arm
3101.306Schristos	The same comments as in 20191022 apply.
3111.306Schristos
3121.305Smartin20191112:
3131.305Smartin	The LLVM update requires a clean rebuild for all architectures using
3141.305Smartin	LLVM during the tools build phase (i386, amd64, aarch64).
3151.305Smartin
3161.304Smartin20191022:
3171.304Smartin	Ports amd64 and aarch64 switched to GCC 8.3 by default.
3181.304Smartin	In-place ("expert mode", build.sh -E) builds are not supported
3191.304Smartin	when going from a GCC 7 userland to GCC 8. Do a regular
3201.304Smartin	build to a different DESTDIR (or preferably: build.sh -U) at least
3211.306Schristos	once and install sets, or download comp.{tar.xz,tgz} from the
3221.304Smartin	daily builds and install that before doing the next in-place build.
3231.304Smartin
3241.303Smrg20191001:
3251.303Smrg	GCC 8.3 was imported.  Builds of src/tools/gcc may fail if
3261.303Smrg	old builds with GCC 7 output now uses GCC 8.  Clean this
3271.303Smrg	directory, and also clean src/external/gpl3/gcc.
3281.303Smrg
3291.302Sriastrad20190903:
3301.306Schristos	Files with names that coincide with existing files' names on
3311.302Sriastrad	case-insensitive file systems were inadvertently committed, for
3321.302Sriastrad	radeon GPU firmware.  We cannot mark these as obsolete for
3331.302Sriastrad	postinstall to fix, so if you updated src since 2019-08-26, and
3341.302Sriastrad	ran build.sh distribution or ran build.sh release, you must
3351.302Sriastrad	manually delete the following files in your DESTDIR (which is
3361.302Sriastrad	usually $OBJDIR/destir.$ARCH), or from / if you have installed
3371.302Sriastrad	them:
3381.302Sriastrad
3391.302Sriastrad		/libdata/firmware/radeon/bonaire_ce.bin
3401.302Sriastrad		/libdata/firmware/radeon/bonaire_mc.bin
3411.302Sriastrad		/libdata/firmware/radeon/bonaire_me.bin
3421.302Sriastrad		/libdata/firmware/radeon/bonaire_mec.bin
3431.302Sriastrad		/libdata/firmware/radeon/bonaire_pfp.bin
3441.302Sriastrad		/libdata/firmware/radeon/bonaire_rlc.bin
3451.302Sriastrad		/libdata/firmware/radeon/bonaire_sdma.bin
3461.302Sriastrad		/libdata/firmware/radeon/bonaire_smc.bin
3471.302Sriastrad		/libdata/firmware/radeon/bonaire_uvd.bin
3481.302Sriastrad		/libdata/firmware/radeon/hainan_ce.bin
3491.302Sriastrad		/libdata/firmware/radeon/hainan_mc.bin
3501.302Sriastrad		/libdata/firmware/radeon/hainan_me.bin
3511.302Sriastrad		/libdata/firmware/radeon/hainan_pfp.bin
3521.302Sriastrad		/libdata/firmware/radeon/hainan_rlc.bin
3531.302Sriastrad		/libdata/firmware/radeon/hainan_smc.bin
3541.302Sriastrad		/libdata/firmware/radeon/hawaii_ce.bin
3551.302Sriastrad		/libdata/firmware/radeon/hawaii_mc.bin
3561.302Sriastrad		/libdata/firmware/radeon/hawaii_me.bin
3571.302Sriastrad		/libdata/firmware/radeon/hawaii_mec.bin
3581.302Sriastrad		/libdata/firmware/radeon/hawaii_pfp.bin
3591.302Sriastrad		/libdata/firmware/radeon/hawaii_rlc.bin
3601.302Sriastrad		/libdata/firmware/radeon/hawaii_sdma.bin
3611.302Sriastrad		/libdata/firmware/radeon/hawaii_smc.bin
3621.302Sriastrad		/libdata/firmware/radeon/kabini_ce.bin
3631.302Sriastrad		/libdata/firmware/radeon/kabini_me.bin
3641.302Sriastrad		/libdata/firmware/radeon/kabini_mec.bin
3651.302Sriastrad		/libdata/firmware/radeon/kabini_pfp.bin
3661.302Sriastrad		/libdata/firmware/radeon/kabini_rlc.bin
3671.302Sriastrad		/libdata/firmware/radeon/kabini_sdma.bin
3681.302Sriastrad		/libdata/firmware/radeon/kaveri_ce.bin
3691.302Sriastrad		/libdata/firmware/radeon/kaveri_me.bin
3701.302Sriastrad		/libdata/firmware/radeon/kaveri_mec.bin
3711.302Sriastrad		/libdata/firmware/radeon/kaveri_mec2.bin
3721.302Sriastrad		/libdata/firmware/radeon/kaveri_pfp.bin
3731.302Sriastrad		/libdata/firmware/radeon/kaveri_rlc.bin
3741.302Sriastrad		/libdata/firmware/radeon/kaveri_sdma.bin
3751.302Sriastrad		/libdata/firmware/radeon/mullins_ce.bin
3761.302Sriastrad		/libdata/firmware/radeon/mullins_me.bin
3771.302Sriastrad		/libdata/firmware/radeon/mullins_mec.bin
3781.302Sriastrad		/libdata/firmware/radeon/mullins_pfp.bin
3791.302Sriastrad		/libdata/firmware/radeon/mullins_rlc.bin
3801.302Sriastrad		/libdata/firmware/radeon/mullins_sdma.bin
3811.302Sriastrad		/libdata/firmware/radeon/oland_ce.bin
3821.302Sriastrad		/libdata/firmware/radeon/oland_mc.bin
3831.302Sriastrad		/libdata/firmware/radeon/oland_me.bin
3841.302Sriastrad		/libdata/firmware/radeon/oland_pfp.bin
3851.302Sriastrad		/libdata/firmware/radeon/oland_rlc.bin
3861.302Sriastrad		/libdata/firmware/radeon/oland_smc.bin
3871.302Sriastrad		/libdata/firmware/radeon/pitcairn_ce.bin
3881.302Sriastrad		/libdata/firmware/radeon/pitcairn_mc.bin
3891.302Sriastrad		/libdata/firmware/radeon/pitcairn_me.bin
3901.302Sriastrad		/libdata/firmware/radeon/pitcairn_pfp.bin
3911.302Sriastrad		/libdata/firmware/radeon/pitcairn_rlc.bin
3921.302Sriastrad		/libdata/firmware/radeon/pitcairn_smc.bin
3931.302Sriastrad		/libdata/firmware/radeon/tahiti_ce.bin
3941.302Sriastrad		/libdata/firmware/radeon/tahiti_mc.bin
3951.302Sriastrad		/libdata/firmware/radeon/tahiti_me.bin
3961.302Sriastrad		/libdata/firmware/radeon/tahiti_pfp.bin
3971.302Sriastrad		/libdata/firmware/radeon/tahiti_rlc.bin
3981.302Sriastrad		/libdata/firmware/radeon/tahiti_smc.bin
3991.302Sriastrad		/libdata/firmware/radeon/verde_ce.bin
4001.302Sriastrad		/libdata/firmware/radeon/verde_mc.bin
4011.302Sriastrad		/libdata/firmware/radeon/verde_me.bin
4021.302Sriastrad		/libdata/firmware/radeon/verde_pfp.bin
4031.302Sriastrad		/libdata/firmware/radeon/verde_rlc.bin
4041.302Sriastrad		/libdata/firmware/radeon/verde_smc.bin
4051.302Sriastrad
4061.302Sriastrad	We will re-import these radeon firmware images another way
4071.302Sriastrad	later.
4081.302Sriastrad
4091.301Smartin20190727:
4101.301Smartin	The uefi bootloader has gained tftp support and needs a clean
4111.301Smartin	build. If you do update builds, manually clean its object
4121.301Smartin	directory by something like:
4131.301Smartin	cd sys/arch/i386/stand/efiboot && make clean
4141.301Smartin
4151.300Smartin20190723:
4161.344Sgutterid	The jemalloc allocator in libc is now built without extended
4171.300Smartin	debugging (for performance reasons). In update builds make sure
4181.326Sandvar	to rebuild it completely, by removing all affected object files,
4191.300Smartin	including compat builds, something like:
4201.300Smartin	cd /usr/obj && find . -type d -name jemalloc|xargs rm -rf
4211.300Smartin
4221.299Smrg20190207:
4231.299Smrg	GCC 7 switched for many ports.  Update builds are likely to fail.
4241.299Smrg
4251.1SabsHints for a more successful build:
4261.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4271.123Sjmc    Use build.sh, but do not use its "expert mode":
4281.132Sjmmv	This will automatically build the tools in the
4291.123Sjmc	   correct order, and it will keep the tools and the
4301.123Sjmc	   new build products from interfering with the running
4311.123Sjmc	   system.  This will allow you to ignore most of the
4321.123Sjmc	   other advice in this file.
4331.2Smrg    Build a new kernel first:
4341.2Smrg	This makes sure that any new system calls or features
4351.2Smrg	   expected by the new userland will be present.  This
4361.2Smrg	   helps to avoid critical errors when upgrading.
4371.1Sabs    Use object directories:
4381.1Sabs	This helps to keep stale object
4391.1Sabs	   files from polluting the build if a Makefile "forgets"
4401.1Sabs	   about one.  It also makes it easier to clean up after
4411.1Sabs	   a build.  It's also necessary if you want to use the
4421.1Sabs	   same source tree for multiple machines.
4431.123Sjmc	   To use object directories with build.sh:
4441.123Sjmc	    a) invoke build.sh with the "-M" or "-O" options.
4451.123Sjmc	   To use object directories without using build.sh:
4461.1Sabs	    a) cd /usr/src ; make cleandir
4471.2Smrg	    b) Add "OBJMACHINE=yes" to /etc/mk.conf
4481.2Smrg	    c) Add "MKOBJDIRS=yes" to /etc/mk.conf
4491.1Sabs	    d) cd /usr/src ; make build
4501.2Smrg	   Note that running "make obj" in a directory will create
4511.2Smrg	   in obj.$MACHINE directory.
4521.1Sabs    Build to a DESTDIR:
4531.123Sjmc	This helps to keep old installed files (especially libraries)
4541.123Sjmc	   from interfering with the new build.
4551.123Sjmc	   To build to a DESTDIR with build.sh, use the "-D" option.
4561.123Sjmc	   To build to a DESTDIR without using build.sh, set the DESTDIR
4571.123Sjmc	   environment variable before running make build.  It should be
4581.123Sjmc	   set to the pathname of an initially empty directory.
4591.123Sjmc	   Problems: if you do not use build.sh, you might need to
4601.123Sjmc		update critical utilities without using DESTDIR since
4611.123Sjmc		nothing is executed from what is installed in DESTDIR.
4621.123Sjmc		(See critical utils, below.)
4631.1Sabs    Build often:
4641.1Sabs	This keeps critical utilities current enough to not choke
4651.1Sabs	on any other part of the source tree that depends on up to
4661.123Sjmc	date functionality.  If you use build.sh, you should not have
4671.123Sjmc	this problem.
4681.241Swiz
4691.1SabsWhat to do if things don't work:
4701.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4711.230StlsWhen things don't work there are usually a few things that commonly
4721.1Sabsshould be done.
4731.1Sabs    1)	make includes
4741.1Sabs	This should be done automatically by make build.
4751.1Sabs    2)  cd share/mk && make install
4761.1Sabs	Again, automatically done by make build.
4771.1Sabs
4781.1SabsFailsafe rebuild of a small part of the tree:
4791.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4801.1SabsTo make sure you rebuild something correctly you want to do
4811.1Sabssomething like the following:
4821.1Sabs    1)  Make sure the includes and .mk files are up to date.
4831.1Sabs    2)  Make sure any program used to build the particular
4841.1Sabs	utility is up to date.  (yacc, lex, etc...)
4851.1Sabs    3)  cd ...path/to/util...
4861.1Sabs	make cleandir
4871.1Sabs	rm ...all obj directories...
4881.1Sabs	make cleandir			# yes, again
4891.1Sabs	make obj
4901.1Sabs	make depend && make
4911.1Sabs
4921.1SabsFailsafe rebuild of the entire tree:
4931.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4941.1SabsIf you really want to make sure the source tree is clean and
4951.2Smrgready for a build try the following.  Note that sourcing /etc/mk.conf
4961.2Smrg(a make(1) Makefile) in this manner is not right, and will not work
4971.2Smrgfor anyone who uses any make(1) features in /etc/mk.conf.
4981.1Sabs
4991.1Sabs---cut here---
5001.1Sabs#!/bin/sh
5011.1Sabs. /etc/mk.conf
5021.1Sabs
5031.58Slukemif [ -z $NETBSDSRCDIR ] ; then
5041.58Slukem    NETBSDSRCDIR=/usr/src
5051.1Sabsfi
5061.58Slukemif [ \! -d $NETBSDSRCDIR ] ; then
5071.1Sabs    echo Unable to find sources
5081.1Sabs    exit 1
5091.1Sabsfi
5101.58Slukemfind $NETBSDSRCDIR -name \*.o -o -name obj.\* -o -name obj -exec rm \{\} \;
5111.1Sabs
5121.1Sabsif [ -z $BSDOBJDIR ] ; then
5131.1Sabs    BSDOBJDIR=/usr/obj
5141.1Sabsfi
5151.1Sabsif [ -d $BSDOBJDIR ] ; then
5161.1Sabs    rm -rf $BSDOBJDIR
5171.1Sabsfi
5181.1Sabs
5191.58Slukemcd $NETBSDSRCDIR && make cleandir
5201.1Sabs
5211.1Sabs---cut here---
5221.1Sabs
5231.1SabsCritical utilities:
5241.1Sabs^^^^^^^^^^^^^^^^^^^
5251.1Sabs	usr.bin/make
5261.1Sabs	usr.bin/yacc
5271.1Sabs	usr.bin/lex
5281.11Slukem	usr.bin/xlint
5291.142Sdrochner	usr.bin/config
5301.1Sabs
5311.34SsimonbOther problems and possible solutions:
5321.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5331.1SabsSymptom:Complaints involving a Makefile.
5341.17SerhFix:	Rebuild usr.bin/make:
5351.17Serh	cd usr.bin/make && make && make install
5361.111Ssimonb	Or, a failsafe method if that doesn't work:
5371.348Srillig	cd usr.bin/make && cc -DMAKE_NATIVE *.c -I. -o make \
5381.348Srillig	&& install make /usr/bin
5391.17Serh
5401.1SabsFix:	Make sure .mk files are up to date.
5411.1Sabs	cd share/mk && make install
5421.2Smrg
5431.2SmrgSymptom:Kernel `config' fails to configure any kernel, including GENERIC.
5441.142SdrochnerFix:	Rebuild usr.bin/config
5451.1Sabs
5461.4SitojunSymptom:Obsolete intermediate files are used during compilation
5471.4SitojunFix:	Try the following sequence of commands in the directory in question.
5481.4Sitojun	make cleandir; rm `make print-objdir`; make cleandir; make obj
5491.4Sitojun	(If you built the tree without "make obj" in the past, obsolete files
5501.4Sitojun	may remain.  The command tries to clean everything up)
5511.5Swiz
5521.207SmbalmerSymptom:.../sysinst/run.c:xx: warning: initialization from incompatible
5531.207Smbalmer	pointer type
5541.5SwizFix:	Rebuild and install usr.bin/menuc
5551.12Sitojun
5561.12SitojunSymptom:mklocale not found during build in share/locale/ctype
5571.12SitojunFix:	Build and install usr.bin/mklocale
5581.13Sdogcow
5591.86SkleinkSymptom:undefined reference to `__assert13' or `__unsetenv13'
5601.13SdogcowFix:    Rebuild and install lib/libc
5611.13Sdogcow
5621.142SdrochnerSymptom:usr.bin/config fails to build.
5631.19ScgdFix:	Try building with -DMAKE_BOOTSTRAP added to CFLAGS in Makefile.
5641.13Sdogcow
5651.19ScgdSymptom:undefined reference to `getprogname' or `setprogname'
5661.19ScgdFix:    Rebuild and install lib/libc
5671.24Sabs
5681.223SjoergSymptom:Update build fails in src/tools/gcc complaining that a variable
5691.223Sjoerg	(e.g. CPPFLAGS) has changed since the previous run.
5701.223SjoergFix:    Run "nbmake-${ARCH} clean" in src/tools/gcc or do a clean build.
5711.257Sapb
5721.257SapbSymptom:cvs [update aborted]: cannot open directory /cvsroot/src/...:
5731.257Sapb	No such file or directory.
5741.257SapbCause:	If a directory is created by mistake, then it is sometimes
5751.257Sapb	deleted from the CVS repository using administrative commands
5761.257Sapb	that bypass the normal cvs access controls.  If your cvs working tree
5771.257Sapb	contains references to a directory that has been deleted on the
5781.257Sapb	server in this way, then "cvs update" reports this error.
5791.257SapbFix:	Recursively delete the affected directory from your working tree
5801.257Sapb	and try the update again.
581