UPDATING revision 1.383
11.383Smartin$NetBSD: UPDATING,v 1.383 2025/07/21 17:07:26 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.382Smrg20250721: 231.382Smrg GCC 12.5 was imported and there may be weird build issues. 241.382Smrg Clean any GCC build dirs if you encounter weird things. 251.382Smrg 261.383Smartin20250720: 271.383Smartin New openssl and old objects for tests for libcrypto may 281.383Smartin cause spurious test failure, clean the src/tests/crypto/libcrypto 291.383Smartin object dirs. 301.383Smartin 311.380Smartin20250528: 321.380Smartin Changes in the tools build require removing all config.cache 331.380Smartin files in the object tools directories. 341.380Smartin 351.378Spgoyette20250427: 361.378Spgoyette The KERNEL_DIR option to build.sh is now functional. Set it 371.379Skre with ``-V KERNEL_DIR=yes'' on your build.sh command. 381.378Spgoyette With this, you can now colocate kernel and associated modules 391.378Spgoyette in /netbsd/{kernel,kernel.dbg,modules} instead of having the 401.378Spgoyette kernel in / but modules in /stand. 411.378Spgoyette 421.378Spgoyette Note that you'll need new bootstrap code to use this feature. 431.378Spgoyette 441.379Skre This completes work begun many years ago by christos@ :-) 451.378Spgoyette 461.377Sriastrad20250413: 471.377Sriastrad A change to bsd.lib.mk requires a clean build of all libraries. 481.377Sriastrad 491.375Schristos20250131: 501.375Schristos The switch to the new jemalloc requires cleaning in libc. 511.376Spalle 521.367Sriastrad20241122: 531.373Sriastrad Changes to various libraries' build options require cleaning 541.373Sriastrad their objdirs in update builds: 551.368Sriastrad 561.372Sriastrad cd external/bsd/file/lib && $TOOLDIR/bin/nbmake-$ARCH clean 571.370Sriastrad cd external/bsd/libarchive/lib && $TOOLDIR/bin/nbmake-$ARCH clean 581.372Sriastrad cd external/public-domain/xz/lib && $TOOLDIR/bin/nbmake-$ARCH clean 591.368Sriastrad 601.374Sriastrad Also, for architectures with MKCOMPAT, it is necessary to clean 611.374Sriastrad the compat objdirs too. The easiest way is: 621.374Sriastrad 631.374Sriastrad rm -rf OBJDIR/compat/*/*/external/bsd/file/lib 641.374Sriastrad rm -rf OBJDIR/compat/*/*/external/bsd/libarchive/lib 651.374Sriastrad rm -rf OBJDIR/compat/*/*/external/public-domain/xz/lib 661.374Sriastrad 671.367Sriastrad Changes to bsd.lib.mk to improve detecting differences in 681.367Sriastrad shared library symbol exports may cause some .actsym files in 691.367Sriastrad the objdir to become stale in update builds. 701.367Sriastrad 711.367Sriastrad To work around this, delete all files matching `*.actsym' in 721.367Sriastrad the objdir. For example: 731.367Sriastrad 741.367Sriastrad find OBJDIR -name '*.actsym' -type f -print0 | xargs -0 rm 751.367Sriastrad 761.363Smartin20241104: 771.363Smartin Changes around the integration of the zstd compression 781.363Smartin library may require manual deletion of some object directories 791.366Sriastrad if you update from a build from a few days ago: 801.366Sriastrad rm -rf DESTDIR/usr/lib/*/libarchive* 811.366Sriastrad rm -rf DESTDIR/usr/lib/*/libmagic* 821.366Sriastrad rm -rf DESTDIR/usr/lib/*/libzstd* 831.366Sriastrad rm -rf DESTDIR/usr/lib/libarchive* 841.366Sriastrad rm -rf DESTDIR/usr/lib/libmagic* 851.366Sriastrad rm -rf DESTDIR/usr/lib/libzstd* 861.366Sriastrad rm -rf OBJDIR/compat/*/*/external/bsd/file/ 871.366Sriastrad rm -rf OBJDIR/compat/*/*/external/bsd/libarchive/ 881.366Sriastrad rm -rf OBJDIR/compat/*/*/external/bsd/zstd/ 891.366Sriastrad rm -rf OBJDIR/external/bsd/file/ 901.366Sriastrad rm -rf OBJDIR/external/bsd/libarchive/ 911.366Sriastrad rm -rf OBJDIR/external/bsd/zstd/ 921.366Sriastrad rm -rf OBJDIR/external/gpl3/gcc/ 931.366Sriastrad rm -rf OBJDIR/tools/gcc/ 941.363Smartin 951.360Swiz20240926: 961.360Swiz Building -current when running on amd64 from about 20240924 971.360Swiz to about 20240926 will not work due to a "malloc_np.h" 981.360Swiz error. Please downgrade to a version from 20240924 or older, 991.360Swiz or upgrade to a newer version e.g. using a binary release from 1001.360Swiz the NetBSD build servers. 1011.360Swiz 1021.358Smartin20240923: 1031.358Smartin Update builds will require cleaning the object directories for 1041.359Smartin jemalloc (like: "rm -rf $OBJ/external/bsd/jemalloc*") and the 1051.359Smartin libc dependency files (like: "rm $OBJ/lib/libc/jemalloc.*"). 1061.359Smartin On architectures with COMPAT libs, those also have to be cleaned, 1071.359Smartin e.g. on sparc64: "rm -rf $OBJ/compat/sparc64/sparc/external/bsd/jemalloc*" 1081.359Smartin and "rm $OBJ/compat/sparc64/sparc/lib/libc/jemalloc.*". 1091.358Smartin 1101.381Sgutterid20240920: 1111.381Sgutterid Update builds will require cleaning in src/external/historical/nawk/bin 1121.381Sgutterid in order to remove the awk subdirectory since there is now a binary 1131.381Sgutterid called awk. 1141.381Sgutterid 1151.357Schristos20240817: 1161.357Schristos Update builds will require cleaning in src/external/historical/nawk/bin 1171.357Schristos in order to remove the awk binary since now there is a subdirectory 1181.357Schristos called awk. 1191.358Smartin 1201.355Smartin20240812: 1211.355Smartin Update builds will require removing the tools objdir for gdb 1221.355Smartin if building with MKCROSSGDB=yes. All architectures use gdb.old 1231.355Smartin now. 1241.356Sriastrad 1251.354Smartin20240630: 1261.353Smartin Update builds will require removing the tools objdir for binutils 1271.353Smartin (as most architectures should use binutils.old now). 1281.353Smartin 1291.352Skre20240610: 1301.352Skre Update builds are likely to require removing the objdir for 1311.352Skre distrib/<arch>/cdroms - or at least references to libarchive 1321.352Skre from within there after the recent libarchive update. 1331.352Skre 1341.350Sriastrad20240504: 1351.350Sriastrad Update builds on x86 require making the `cleandir' target in 1361.350Sriastrad lib/libm, or deleting the objdir for lib/libm. 1371.350Sriastrad 1381.349Smaya20240423: 1391.349Smaya Update builds with x11 may fail after switching to Mesa 21. 1401.349Smaya 1411.346Sriastrad20240410: 1421.346Sriastrad Update builds may require manually deleting 1431.346Sriastrad $DESTDIR/var/run/named (and, potentially, 1441.346Sriastrad $DESTDIR/var/run/lwresd) in order to avoid checkflist failure. 1451.346Sriastrad 1461.347Snia20240409: 1471.347Snia 32-bit compatibility libraries were moved into the base32 1481.347Snia and debug32 sets. HTML man pages were moved into the manhtml set. 1491.347Snia 1501.343Sriastrad20230828: 1511.343Sriastrad If: 1521.343Sriastrad - you updated to current and ran postinstall between 20230826 1531.343Sriastrad and 20230828 inclusive, and 1541.343Sriastrad - you are not using anything outside the base system to 1551.343Sriastrad populate /etc/openssl/certs (e.g., manually adding 1561.343Sriastrad certificates or using ca-certificates or mozilla-rootcerts or 1571.343Sriastrad mozilla-rootcerts-openssl from pkgsrc), 1581.343Sriastrad delete /etc/openssl/certs and rerun postinstall or just 1591.343Sriastrad `certctl rehash'. 1601.343Sriastrad 1611.343Sriastrad Otherwise, certctl(8) will think someone else has left 1621.343Sriastrad /etc/openssl/certs in the way and will avoid clobbering it on 1631.343Sriastrad upgrade from older NetBSD. 1641.343Sriastrad 1651.341Slukem20230718: 1661.341Slukem build.sh will use mk.conf in the same directory as build.sh instead 1671.341Slukem of /etc/mk.conf, unless MAKECONF is already defined in the environment. 1681.341Slukem 1691.342Smartin20230714: 1701.342Smartin Import of gcc 10.5 requires a clean build of at least tools/gcc 1711.342Smartin and external/gpl3/gcc* object directories. An update build 1721.342Smartin without cleaning will result in obscure failures in rare corner 1731.342Smartin cases. 1741.342Smartin 1751.339Smartin20230604: 1761.339Smartin Building native kernels with the installed make(1) instead of 1771.339Smartin the $TOOLDIR/bin/nbmake-${arch} wrapper will fail if userland 1781.339Smartin has not been updated. Note that this is an unsupported build 1791.339Smartin configuration (but usually works if userland is -current enough). 1801.338Slukem 1811.338Slukem20230523: 1821.338Slukem ctfmerge was fixed as macOS host tool. This may require a clean tools 1831.338Slukem rebuild to detect the update to tools/compat/configure. 1841.338Slukem 1851.340Smartin20230515: 1861.340Smartin New openssl build requires removal of the crypto/external/bsd/openssl 1871.345Sandvar and tests/crypto/libcrypto subdirectories in the ${OBJDIR} hierarchy. 1881.340Smartin Otherwise test results may be wrong due to wrong "golden" output 1891.340Smartin files being installed. 1901.340Smartin 1911.337Smrg20230322: 1921.337Smrg Fixes for moved /lib/libisns* mean that builds will complain about 1931.337Smrg ./usr/lib/libisns* being missing until src/lib/libisns is forced 1941.337Smrg to (re)install the files, including the symlinks. The simplest 1951.337Smrg way is to clean this subdir before building. 1961.337Smrg 1971.336Smartin20230112: 1981.336Smartin New binutils require an updated ld.elf_so. If you are doing 1991.336Smartin (unsupported) in-place self builds (with the -E flag to build.sh), 2001.336Smartin make sure to have installed latest ld.elf_so before you rebuild 2011.336Smartin userland. 2021.336Smartin 2031.335Schs20221116: 2041.335Schs The addition to NetBSD's version of UFS2 of support for extended 2051.335Schs attributes broke backward compatibility with previous releases 2061.335Schs of NetBSD, so UFS2 has been restored to being compatible with 2071.335Schs previous NetBSD releases by disabling extended attributes. 2081.335Schs (Note that ACLs are implemented as extended attributes, so 2091.335Schs this changes disables ACLs as well.) 2101.335Schs 2111.335Schs Support for UFS2 with extended attributes is now available in a new 2121.335Schs UFS variant called UFS2ea. If you have created extended attributes 2131.335Schs in an original UFS2 file system then "fsck -p" will now fail due to 2141.335Schs the unexpected presence of extended attributes and "fsck -y" will 2151.335Schs remove all extended attributes. If you wish to preserve extended 2161.335Schs attributes rather than delete them, there is a utility to convert 2171.335Schs a UFS2 file system to UFS2ea and leave extended attributes in place, 2181.335Schs but this should be used with caution since it will preserve any 2191.335Schs extended attributes that have been corrupted by the backward 2201.335Schs incompatibility too. 2211.335Schs 2221.335Schs If you wish to use a UFS2ea file system as your root file system, 2231.335Schs then you will need to update your boot loader to a version that 2241.335Schs supports UFS2ea. 2251.335Schs 2261.335Schs For more information, see: 2271.335Schs https://wiki.netbsd.org/features/UFS2ea 2281.335Schs 2291.334Smrg20221111: 2301.334Smrg The new libdrm import worsened the conflict issues for the 2311.334Smrg kdump/ktruss ioctl, and i915 now conflicts with base, and has 2321.334Smrg been turned off. This will cause update build issues like: 2331.334Smrg 2341.334Smrg kdump-ioctl.c:12175:143: error: 'DRM_IOCTL_I915_DESTROY_HEAP' 2351.334Smrg undeclared here (not in a function); 2361.334Smrg did you mean 'DRM_IOCTL_MODE_DESTROY_DUMB'? 2371.334Smrg 2381.334Smrg You'll need to clean usr.bin/ktruss, usr.bin/kdump, and rescue. 2391.334Smrg 2401.331Sriastrad20220921: 2411.331Sriastrad Since the kernel version was bumped to 9.99.100, the bootloader 2421.333Sriastrad must be updated on x86 or EFI boot platforms in order to load 2431.333Sriastrad modules from boot.cfg(5) or interactively at the bootloader 2441.333Sriastrad prompt. 2451.333Sriastrad 2461.333Sriastrad The kernel can still load modules at runtime, with modload(8) 2471.333Sriastrad or modules.conf(5), with no bootloader update. This will not 2481.333Sriastrad affect release branches because it only applies to patch 2491.333Sriastrad numbers >=100. 2501.333Sriastrad 2511.333Sriastrad On x86 (i386 or amd64) with BIOS boot, this requires copying a 2521.333Sriastrad new /usr/mdec/boot to /boot. You can build this in the destdir 2531.333Sriastrad by running `$TOOLDIR/bin/nbmake-$ARCH dependall install' in 2541.333Sriastrad sys/arch/i386/stand. 2551.333Sriastrad 2561.333Sriastrad On platforms with EFI boot (including x86 with EFI boot), this 2571.333Sriastrad requires copying a new /usr/mdec/boot*.efi to the EFI/BOOT/ 2581.333Sriastrad directory on the EFI system partition. The boot*.efi file is: 2591.333Sriastrad 2601.333Sriastrad aarch64 bootaa64.efi 2611.333Sriastrad amd64 bootx64.efi 2621.333Sriastrad arm bootarm.efi (32-bit arm) 2631.333Sriastrad i386 bootx32.efi 2641.333Sriastrad 2651.333Sriastrad You can build this in the destdir by running 2661.333Sriastrad `$TOOLDIR/bin/nbmake-$ARCH dependall install' in 2671.333Sriastrad sys/stand/efiboot/boot*. 2681.331Sriastrad 2691.330Slukem20220821: 2701.330Slukem Support for building extsrc/ has been deprecated. 2711.330Slukem EXTSRCSRCDIR and MKEXTSRC have been deprecated. 2721.330Slukem 2731.329Smrg20220714: 2741.329Smrg Updates to xorg-server and associated drivers may cause builds to 2751.329Smrg fail. Cleaning both DESTDIR and the xorg build tree may be needed. 2761.329Smrg 2771.328Smartin20220628: 2781.328Smartin Changes in the build of src/games/robots require a clean build 2791.328Smartin of that program. 2801.328Smartin 2811.324Smartin20211116: 2821.324Smartin Changes in the xorg build require clean obj dirs for external/mit/xorg 2831.325Smartin (or a full clean/non-update build). 2841.324Smartin 2851.323Snia20211112: 2861.323Snia Device tree sources were updated for evbarm. Some device nodes 2871.323Snia (in particular, ld(4) devices on the ROCKPro64) will be renumbered. 2881.323Snia 2891.322Smartin20211014: 2901.323Snia MKPIE default for aarch64 has changed, a clean build is required. 2911.322Smartin 2921.321Schristos20210917: 2931.321Schristos Changed MNT_ACLS to default to POSIX1e ACLs instead of NFSv4 2941.321Schristos ACLs, to be compatible with FreeBSD. If you are using NFSv4 ACLs 2951.321Schristos and have "acls" in /etc/fstab you'll need to change it to "nfs4acls". 2961.321Schristos 2971.319Smrg20210711: 2981.319Smrg Updated GMP sources may require cleaning in tools/gmp and/or in 2991.319Smrg external/lgpl3/gmp/lib, particularly if GCC itself does not build. 3001.319Smrg 3011.318Smrg20210417: 3021.318Smrg GCC 10 was enabled for several platforms. If builds fail in either 3031.351Sgutterid tools/gcc or external/gpl3/gcc, first try cleaning those objects and 3041.318Smrg removing the $DESTDIR/usr/include/g++ subdirectory. 3051.318Smrg 3061.316Smrg20201016: 3071.316Smrg MIPS kernel modules have been disabled until they work. This will 3081.316Smrg turn up in extra files in the DESTDIR, which should be cleaned. 3091.316Smrg 3101.315Smrg20200925: 3111.315Smrg GNU MPC and MPFR have been updated. At least MPFR needs cleaning 3121.315Smrg in both the tools and external dirs. 3131.315Smrg 3141.314Smrg20200912: 3151.314Smrg GCC 9 has arrived for Arm and x86 platforms, and will be coming 3161.314Smrg for several more, as will binutils 2.34. Clean as required. 3171.314Smrg 3181.313Smrg20200907: 3191.313Smrg GCC 9 is coming, and binutils has been updated for MIPS. This 3201.313Smrg probably requires cleaning the tools/binutils. 3211.313Smrg 3221.311Smrg20200811: 3231.312Smrg GCC updates may require cleaning the objdir. This may occur 3241.312Smrg due to GCC 7.5 update, GCC 8.4 move to gcc.old, or the upcoming 3251.312Smrg GCC 9 upgrade. 3261.311Smrg 3271.309Schristos20200614: 3281.310Schristos blacklist* has been renamed to blocklist*. postinstall(8) 3291.332Sgutterid should handle the migration. 3301.309Schristos 3311.308Schristos20200601: 3321.308Schristos Due to a mistake in LIBISPRIVATE handling, .so libraries were 3331.308Schristos created in the build directories and need cleaning. 3341.308Schristos 3351.307Smrg20200311: 3361.307Smrg GCC 8 ports will need cleaning in src/tools/gcc and 3371.307Smrg src/external/gpl3/gcc due to GCC 8.4 update. 3381.307Smrg 3391.306Schristos20191118: 3401.306Schristos More architectures were switched to gcc8: 3411.306Schristos i386, ia64 powerpc64, sparc, sparc64, arm 3421.306Schristos The same comments as in 20191022 apply. 3431.306Schristos 3441.305Smartin20191112: 3451.305Smartin The LLVM update requires a clean rebuild for all architectures using 3461.305Smartin LLVM during the tools build phase (i386, amd64, aarch64). 3471.305Smartin 3481.304Smartin20191022: 3491.304Smartin Ports amd64 and aarch64 switched to GCC 8.3 by default. 3501.304Smartin In-place ("expert mode", build.sh -E) builds are not supported 3511.304Smartin when going from a GCC 7 userland to GCC 8. Do a regular 3521.304Smartin build to a different DESTDIR (or preferably: build.sh -U) at least 3531.306Schristos once and install sets, or download comp.{tar.xz,tgz} from the 3541.304Smartin daily builds and install that before doing the next in-place build. 3551.304Smartin 3561.303Smrg20191001: 3571.303Smrg GCC 8.3 was imported. Builds of src/tools/gcc may fail if 3581.303Smrg old builds with GCC 7 output now uses GCC 8. Clean this 3591.303Smrg directory, and also clean src/external/gpl3/gcc. 3601.303Smrg 3611.302Sriastrad20190903: 3621.306Schristos Files with names that coincide with existing files' names on 3631.302Sriastrad case-insensitive file systems were inadvertently committed, for 3641.302Sriastrad radeon GPU firmware. We cannot mark these as obsolete for 3651.302Sriastrad postinstall to fix, so if you updated src since 2019-08-26, and 3661.302Sriastrad ran build.sh distribution or ran build.sh release, you must 3671.302Sriastrad manually delete the following files in your DESTDIR (which is 3681.302Sriastrad usually $OBJDIR/destir.$ARCH), or from / if you have installed 3691.302Sriastrad them: 3701.302Sriastrad 3711.302Sriastrad /libdata/firmware/radeon/bonaire_ce.bin 3721.302Sriastrad /libdata/firmware/radeon/bonaire_mc.bin 3731.302Sriastrad /libdata/firmware/radeon/bonaire_me.bin 3741.302Sriastrad /libdata/firmware/radeon/bonaire_mec.bin 3751.302Sriastrad /libdata/firmware/radeon/bonaire_pfp.bin 3761.302Sriastrad /libdata/firmware/radeon/bonaire_rlc.bin 3771.302Sriastrad /libdata/firmware/radeon/bonaire_sdma.bin 3781.302Sriastrad /libdata/firmware/radeon/bonaire_smc.bin 3791.302Sriastrad /libdata/firmware/radeon/bonaire_uvd.bin 3801.302Sriastrad /libdata/firmware/radeon/hainan_ce.bin 3811.302Sriastrad /libdata/firmware/radeon/hainan_mc.bin 3821.302Sriastrad /libdata/firmware/radeon/hainan_me.bin 3831.302Sriastrad /libdata/firmware/radeon/hainan_pfp.bin 3841.302Sriastrad /libdata/firmware/radeon/hainan_rlc.bin 3851.302Sriastrad /libdata/firmware/radeon/hainan_smc.bin 3861.302Sriastrad /libdata/firmware/radeon/hawaii_ce.bin 3871.302Sriastrad /libdata/firmware/radeon/hawaii_mc.bin 3881.302Sriastrad /libdata/firmware/radeon/hawaii_me.bin 3891.302Sriastrad /libdata/firmware/radeon/hawaii_mec.bin 3901.302Sriastrad /libdata/firmware/radeon/hawaii_pfp.bin 3911.302Sriastrad /libdata/firmware/radeon/hawaii_rlc.bin 3921.302Sriastrad /libdata/firmware/radeon/hawaii_sdma.bin 3931.302Sriastrad /libdata/firmware/radeon/hawaii_smc.bin 3941.302Sriastrad /libdata/firmware/radeon/kabini_ce.bin 3951.302Sriastrad /libdata/firmware/radeon/kabini_me.bin 3961.302Sriastrad /libdata/firmware/radeon/kabini_mec.bin 3971.302Sriastrad /libdata/firmware/radeon/kabini_pfp.bin 3981.302Sriastrad /libdata/firmware/radeon/kabini_rlc.bin 3991.302Sriastrad /libdata/firmware/radeon/kabini_sdma.bin 4001.302Sriastrad /libdata/firmware/radeon/kaveri_ce.bin 4011.302Sriastrad /libdata/firmware/radeon/kaveri_me.bin 4021.302Sriastrad /libdata/firmware/radeon/kaveri_mec.bin 4031.302Sriastrad /libdata/firmware/radeon/kaveri_mec2.bin 4041.302Sriastrad /libdata/firmware/radeon/kaveri_pfp.bin 4051.302Sriastrad /libdata/firmware/radeon/kaveri_rlc.bin 4061.302Sriastrad /libdata/firmware/radeon/kaveri_sdma.bin 4071.302Sriastrad /libdata/firmware/radeon/mullins_ce.bin 4081.302Sriastrad /libdata/firmware/radeon/mullins_me.bin 4091.302Sriastrad /libdata/firmware/radeon/mullins_mec.bin 4101.302Sriastrad /libdata/firmware/radeon/mullins_pfp.bin 4111.302Sriastrad /libdata/firmware/radeon/mullins_rlc.bin 4121.302Sriastrad /libdata/firmware/radeon/mullins_sdma.bin 4131.302Sriastrad /libdata/firmware/radeon/oland_ce.bin 4141.302Sriastrad /libdata/firmware/radeon/oland_mc.bin 4151.302Sriastrad /libdata/firmware/radeon/oland_me.bin 4161.302Sriastrad /libdata/firmware/radeon/oland_pfp.bin 4171.302Sriastrad /libdata/firmware/radeon/oland_rlc.bin 4181.302Sriastrad /libdata/firmware/radeon/oland_smc.bin 4191.302Sriastrad /libdata/firmware/radeon/pitcairn_ce.bin 4201.302Sriastrad /libdata/firmware/radeon/pitcairn_mc.bin 4211.302Sriastrad /libdata/firmware/radeon/pitcairn_me.bin 4221.302Sriastrad /libdata/firmware/radeon/pitcairn_pfp.bin 4231.302Sriastrad /libdata/firmware/radeon/pitcairn_rlc.bin 4241.302Sriastrad /libdata/firmware/radeon/pitcairn_smc.bin 4251.302Sriastrad /libdata/firmware/radeon/tahiti_ce.bin 4261.302Sriastrad /libdata/firmware/radeon/tahiti_mc.bin 4271.302Sriastrad /libdata/firmware/radeon/tahiti_me.bin 4281.302Sriastrad /libdata/firmware/radeon/tahiti_pfp.bin 4291.302Sriastrad /libdata/firmware/radeon/tahiti_rlc.bin 4301.302Sriastrad /libdata/firmware/radeon/tahiti_smc.bin 4311.302Sriastrad /libdata/firmware/radeon/verde_ce.bin 4321.302Sriastrad /libdata/firmware/radeon/verde_mc.bin 4331.302Sriastrad /libdata/firmware/radeon/verde_me.bin 4341.302Sriastrad /libdata/firmware/radeon/verde_pfp.bin 4351.302Sriastrad /libdata/firmware/radeon/verde_rlc.bin 4361.302Sriastrad /libdata/firmware/radeon/verde_smc.bin 4371.302Sriastrad 4381.302Sriastrad We will re-import these radeon firmware images another way 4391.302Sriastrad later. 4401.302Sriastrad 4411.301Smartin20190727: 4421.301Smartin The uefi bootloader has gained tftp support and needs a clean 4431.301Smartin build. If you do update builds, manually clean its object 4441.301Smartin directory by something like: 4451.301Smartin cd sys/arch/i386/stand/efiboot && make clean 4461.301Smartin 4471.300Smartin20190723: 4481.344Sgutterid The jemalloc allocator in libc is now built without extended 4491.300Smartin debugging (for performance reasons). In update builds make sure 4501.326Sandvar to rebuild it completely, by removing all affected object files, 4511.300Smartin including compat builds, something like: 4521.300Smartin cd /usr/obj && find . -type d -name jemalloc|xargs rm -rf 4531.300Smartin 4541.299Smrg20190207: 4551.299Smrg GCC 7 switched for many ports. Update builds are likely to fail. 4561.299Smrg 4571.1SabsHints for a more successful build: 4581.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4591.123Sjmc Use build.sh, but do not use its "expert mode": 4601.132Sjmmv This will automatically build the tools in the 4611.123Sjmc correct order, and it will keep the tools and the 4621.123Sjmc new build products from interfering with the running 4631.123Sjmc system. This will allow you to ignore most of the 4641.123Sjmc other advice in this file. 4651.2Smrg Build a new kernel first: 4661.2Smrg This makes sure that any new system calls or features 4671.2Smrg expected by the new userland will be present. This 4681.2Smrg helps to avoid critical errors when upgrading. 4691.1Sabs Use object directories: 4701.1Sabs This helps to keep stale object 4711.1Sabs files from polluting the build if a Makefile "forgets" 4721.1Sabs about one. It also makes it easier to clean up after 4731.1Sabs a build. It's also necessary if you want to use the 4741.1Sabs same source tree for multiple machines. 4751.123Sjmc To use object directories with build.sh: 4761.123Sjmc a) invoke build.sh with the "-M" or "-O" options. 4771.123Sjmc To use object directories without using build.sh: 4781.1Sabs a) cd /usr/src ; make cleandir 4791.2Smrg b) Add "OBJMACHINE=yes" to /etc/mk.conf 4801.2Smrg c) Add "MKOBJDIRS=yes" to /etc/mk.conf 4811.1Sabs d) cd /usr/src ; make build 4821.2Smrg Note that running "make obj" in a directory will create 4831.2Smrg in obj.$MACHINE directory. 4841.1Sabs Build to a DESTDIR: 4851.123Sjmc This helps to keep old installed files (especially libraries) 4861.123Sjmc from interfering with the new build. 4871.123Sjmc To build to a DESTDIR with build.sh, use the "-D" option. 4881.123Sjmc To build to a DESTDIR without using build.sh, set the DESTDIR 4891.123Sjmc environment variable before running make build. It should be 4901.123Sjmc set to the pathname of an initially empty directory. 4911.123Sjmc Problems: if you do not use build.sh, you might need to 4921.123Sjmc update critical utilities without using DESTDIR since 4931.123Sjmc nothing is executed from what is installed in DESTDIR. 4941.123Sjmc (See critical utils, below.) 4951.1Sabs Build often: 4961.1Sabs This keeps critical utilities current enough to not choke 4971.1Sabs on any other part of the source tree that depends on up to 4981.123Sjmc date functionality. If you use build.sh, you should not have 4991.123Sjmc this problem. 5001.241Swiz 5011.1SabsWhat to do if things don't work: 5021.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5031.230StlsWhen things don't work there are usually a few things that commonly 5041.1Sabsshould be done. 5051.1Sabs 1) make includes 5061.1Sabs This should be done automatically by make build. 5071.1Sabs 2) cd share/mk && make install 5081.1Sabs Again, automatically done by make build. 5091.1Sabs 5101.1SabsFailsafe rebuild of a small part of the tree: 5111.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5121.1SabsTo make sure you rebuild something correctly you want to do 5131.1Sabssomething like the following: 5141.1Sabs 1) Make sure the includes and .mk files are up to date. 5151.1Sabs 2) Make sure any program used to build the particular 5161.1Sabs utility is up to date. (yacc, lex, etc...) 5171.1Sabs 3) cd ...path/to/util... 5181.1Sabs make cleandir 5191.1Sabs rm ...all obj directories... 5201.1Sabs make cleandir # yes, again 5211.1Sabs make obj 5221.1Sabs make depend && make 5231.1Sabs 5241.1SabsFailsafe rebuild of the entire tree: 5251.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5261.1SabsIf you really want to make sure the source tree is clean and 5271.2Smrgready for a build try the following. Note that sourcing /etc/mk.conf 5281.2Smrg(a make(1) Makefile) in this manner is not right, and will not work 5291.2Smrgfor anyone who uses any make(1) features in /etc/mk.conf. 5301.1Sabs 5311.1Sabs---cut here--- 5321.1Sabs#!/bin/sh 5331.1Sabs. /etc/mk.conf 5341.1Sabs 5351.58Slukemif [ -z $NETBSDSRCDIR ] ; then 5361.58Slukem NETBSDSRCDIR=/usr/src 5371.1Sabsfi 5381.58Slukemif [ \! -d $NETBSDSRCDIR ] ; then 5391.1Sabs echo Unable to find sources 5401.1Sabs exit 1 5411.1Sabsfi 5421.58Slukemfind $NETBSDSRCDIR -name \*.o -o -name obj.\* -o -name obj -exec rm \{\} \; 5431.1Sabs 5441.1Sabsif [ -z $BSDOBJDIR ] ; then 5451.1Sabs BSDOBJDIR=/usr/obj 5461.1Sabsfi 5471.1Sabsif [ -d $BSDOBJDIR ] ; then 5481.1Sabs rm -rf $BSDOBJDIR 5491.1Sabsfi 5501.1Sabs 5511.58Slukemcd $NETBSDSRCDIR && make cleandir 5521.1Sabs 5531.1Sabs---cut here--- 5541.1Sabs 5551.1SabsCritical utilities: 5561.1Sabs^^^^^^^^^^^^^^^^^^^ 5571.1Sabs usr.bin/make 5581.1Sabs usr.bin/yacc 5591.1Sabs usr.bin/lex 5601.11Slukem usr.bin/xlint 5611.142Sdrochner usr.bin/config 5621.1Sabs 5631.34SsimonbOther problems and possible solutions: 5641.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5651.1SabsSymptom:Complaints involving a Makefile. 5661.17SerhFix: Rebuild usr.bin/make: 5671.17Serh cd usr.bin/make && make && make install 5681.111Ssimonb Or, a failsafe method if that doesn't work: 5691.348Srillig cd usr.bin/make && cc -DMAKE_NATIVE *.c -I. -o make \ 5701.348Srillig && install make /usr/bin 5711.17Serh 5721.1SabsFix: Make sure .mk files are up to date. 5731.1Sabs cd share/mk && make install 5741.2Smrg 5751.2SmrgSymptom:Kernel `config' fails to configure any kernel, including GENERIC. 5761.142SdrochnerFix: Rebuild usr.bin/config 5771.1Sabs 5781.4SitojunSymptom:Obsolete intermediate files are used during compilation 5791.4SitojunFix: Try the following sequence of commands in the directory in question. 5801.4Sitojun make cleandir; rm `make print-objdir`; make cleandir; make obj 5811.4Sitojun (If you built the tree without "make obj" in the past, obsolete files 5821.4Sitojun may remain. The command tries to clean everything up) 5831.5Swiz 5841.207SmbalmerSymptom:.../sysinst/run.c:xx: warning: initialization from incompatible 5851.207Smbalmer pointer type 5861.5SwizFix: Rebuild and install usr.bin/menuc 5871.12Sitojun 5881.12SitojunSymptom:mklocale not found during build in share/locale/ctype 5891.12SitojunFix: Build and install usr.bin/mklocale 5901.13Sdogcow 5911.86SkleinkSymptom:undefined reference to `__assert13' or `__unsetenv13' 5921.13SdogcowFix: Rebuild and install lib/libc 5931.13Sdogcow 5941.142SdrochnerSymptom:usr.bin/config fails to build. 5951.19ScgdFix: Try building with -DMAKE_BOOTSTRAP added to CFLAGS in Makefile. 5961.13Sdogcow 5971.19ScgdSymptom:undefined reference to `getprogname' or `setprogname' 5981.19ScgdFix: Rebuild and install lib/libc 5991.24Sabs 6001.223SjoergSymptom:Update build fails in src/tools/gcc complaining that a variable 6011.223Sjoerg (e.g. CPPFLAGS) has changed since the previous run. 6021.223SjoergFix: Run "nbmake-${ARCH} clean" in src/tools/gcc or do a clean build. 6031.257Sapb 6041.257SapbSymptom:cvs [update aborted]: cannot open directory /cvsroot/src/...: 6051.257Sapb No such file or directory. 6061.257SapbCause: If a directory is created by mistake, then it is sometimes 6071.257Sapb deleted from the CVS repository using administrative commands 6081.257Sapb that bypass the normal cvs access controls. If your cvs working tree 6091.257Sapb contains references to a directory that has been deleted on the 6101.257Sapb server in this way, then "cvs update" reports this error. 6111.257SapbFix: Recursively delete the affected directory from your working tree 6121.257Sapb and try the update again. 613