UPDATING revision 1.382
11.382Smrg$NetBSD: UPDATING,v 1.382 2025/07/21 06:10:29 mrg 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.380Smartin20250528: 271.380Smartin Changes in the tools build require removing all config.cache 281.380Smartin files in the object tools directories. 291.380Smartin 301.378Spgoyette20250427: 311.378Spgoyette The KERNEL_DIR option to build.sh is now functional. Set it 321.379Skre with ``-V KERNEL_DIR=yes'' on your build.sh command. 331.378Spgoyette With this, you can now colocate kernel and associated modules 341.378Spgoyette in /netbsd/{kernel,kernel.dbg,modules} instead of having the 351.378Spgoyette kernel in / but modules in /stand. 361.378Spgoyette 371.378Spgoyette Note that you'll need new bootstrap code to use this feature. 381.378Spgoyette 391.379Skre This completes work begun many years ago by christos@ :-) 401.378Spgoyette 411.377Sriastrad20250413: 421.377Sriastrad A change to bsd.lib.mk requires a clean build of all libraries. 431.377Sriastrad 441.375Schristos20250131: 451.375Schristos The switch to the new jemalloc requires cleaning in libc. 461.376Spalle 471.367Sriastrad20241122: 481.373Sriastrad Changes to various libraries' build options require cleaning 491.373Sriastrad their objdirs in update builds: 501.368Sriastrad 511.372Sriastrad cd external/bsd/file/lib && $TOOLDIR/bin/nbmake-$ARCH clean 521.370Sriastrad cd external/bsd/libarchive/lib && $TOOLDIR/bin/nbmake-$ARCH clean 531.372Sriastrad cd external/public-domain/xz/lib && $TOOLDIR/bin/nbmake-$ARCH clean 541.368Sriastrad 551.374Sriastrad Also, for architectures with MKCOMPAT, it is necessary to clean 561.374Sriastrad the compat objdirs too. The easiest way is: 571.374Sriastrad 581.374Sriastrad rm -rf OBJDIR/compat/*/*/external/bsd/file/lib 591.374Sriastrad rm -rf OBJDIR/compat/*/*/external/bsd/libarchive/lib 601.374Sriastrad rm -rf OBJDIR/compat/*/*/external/public-domain/xz/lib 611.374Sriastrad 621.367Sriastrad Changes to bsd.lib.mk to improve detecting differences in 631.367Sriastrad shared library symbol exports may cause some .actsym files in 641.367Sriastrad the objdir to become stale in update builds. 651.367Sriastrad 661.367Sriastrad To work around this, delete all files matching `*.actsym' in 671.367Sriastrad the objdir. For example: 681.367Sriastrad 691.367Sriastrad find OBJDIR -name '*.actsym' -type f -print0 | xargs -0 rm 701.367Sriastrad 711.363Smartin20241104: 721.363Smartin Changes around the integration of the zstd compression 731.363Smartin library may require manual deletion of some object directories 741.366Sriastrad if you update from a build from a few days ago: 751.366Sriastrad rm -rf DESTDIR/usr/lib/*/libarchive* 761.366Sriastrad rm -rf DESTDIR/usr/lib/*/libmagic* 771.366Sriastrad rm -rf DESTDIR/usr/lib/*/libzstd* 781.366Sriastrad rm -rf DESTDIR/usr/lib/libarchive* 791.366Sriastrad rm -rf DESTDIR/usr/lib/libmagic* 801.366Sriastrad rm -rf DESTDIR/usr/lib/libzstd* 811.366Sriastrad rm -rf OBJDIR/compat/*/*/external/bsd/file/ 821.366Sriastrad rm -rf OBJDIR/compat/*/*/external/bsd/libarchive/ 831.366Sriastrad rm -rf OBJDIR/compat/*/*/external/bsd/zstd/ 841.366Sriastrad rm -rf OBJDIR/external/bsd/file/ 851.366Sriastrad rm -rf OBJDIR/external/bsd/libarchive/ 861.366Sriastrad rm -rf OBJDIR/external/bsd/zstd/ 871.366Sriastrad rm -rf OBJDIR/external/gpl3/gcc/ 881.366Sriastrad rm -rf OBJDIR/tools/gcc/ 891.363Smartin 901.360Swiz20240926: 911.360Swiz Building -current when running on amd64 from about 20240924 921.360Swiz to about 20240926 will not work due to a "malloc_np.h" 931.360Swiz error. Please downgrade to a version from 20240924 or older, 941.360Swiz or upgrade to a newer version e.g. using a binary release from 951.360Swiz the NetBSD build servers. 961.360Swiz 971.358Smartin20240923: 981.358Smartin Update builds will require cleaning the object directories for 991.359Smartin jemalloc (like: "rm -rf $OBJ/external/bsd/jemalloc*") and the 1001.359Smartin libc dependency files (like: "rm $OBJ/lib/libc/jemalloc.*"). 1011.359Smartin On architectures with COMPAT libs, those also have to be cleaned, 1021.359Smartin e.g. on sparc64: "rm -rf $OBJ/compat/sparc64/sparc/external/bsd/jemalloc*" 1031.359Smartin and "rm $OBJ/compat/sparc64/sparc/lib/libc/jemalloc.*". 1041.358Smartin 1051.381Sgutterid20240920: 1061.381Sgutterid Update builds will require cleaning in src/external/historical/nawk/bin 1071.381Sgutterid in order to remove the awk subdirectory since there is now a binary 1081.381Sgutterid called awk. 1091.381Sgutterid 1101.357Schristos20240817: 1111.357Schristos Update builds will require cleaning in src/external/historical/nawk/bin 1121.357Schristos in order to remove the awk binary since now there is a subdirectory 1131.357Schristos called awk. 1141.358Smartin 1151.355Smartin20240812: 1161.355Smartin Update builds will require removing the tools objdir for gdb 1171.355Smartin if building with MKCROSSGDB=yes. All architectures use gdb.old 1181.355Smartin now. 1191.356Sriastrad 1201.354Smartin20240630: 1211.353Smartin Update builds will require removing the tools objdir for binutils 1221.353Smartin (as most architectures should use binutils.old now). 1231.353Smartin 1241.352Skre20240610: 1251.352Skre Update builds are likely to require removing the objdir for 1261.352Skre distrib/<arch>/cdroms - or at least references to libarchive 1271.352Skre from within there after the recent libarchive update. 1281.352Skre 1291.350Sriastrad20240504: 1301.350Sriastrad Update builds on x86 require making the `cleandir' target in 1311.350Sriastrad lib/libm, or deleting the objdir for lib/libm. 1321.350Sriastrad 1331.349Smaya20240423: 1341.349Smaya Update builds with x11 may fail after switching to Mesa 21. 1351.349Smaya 1361.346Sriastrad20240410: 1371.346Sriastrad Update builds may require manually deleting 1381.346Sriastrad $DESTDIR/var/run/named (and, potentially, 1391.346Sriastrad $DESTDIR/var/run/lwresd) in order to avoid checkflist failure. 1401.346Sriastrad 1411.347Snia20240409: 1421.347Snia 32-bit compatibility libraries were moved into the base32 1431.347Snia and debug32 sets. HTML man pages were moved into the manhtml set. 1441.347Snia 1451.343Sriastrad20230828: 1461.343Sriastrad If: 1471.343Sriastrad - you updated to current and ran postinstall between 20230826 1481.343Sriastrad and 20230828 inclusive, and 1491.343Sriastrad - you are not using anything outside the base system to 1501.343Sriastrad populate /etc/openssl/certs (e.g., manually adding 1511.343Sriastrad certificates or using ca-certificates or mozilla-rootcerts or 1521.343Sriastrad mozilla-rootcerts-openssl from pkgsrc), 1531.343Sriastrad delete /etc/openssl/certs and rerun postinstall or just 1541.343Sriastrad `certctl rehash'. 1551.343Sriastrad 1561.343Sriastrad Otherwise, certctl(8) will think someone else has left 1571.343Sriastrad /etc/openssl/certs in the way and will avoid clobbering it on 1581.343Sriastrad upgrade from older NetBSD. 1591.343Sriastrad 1601.341Slukem20230718: 1611.341Slukem build.sh will use mk.conf in the same directory as build.sh instead 1621.341Slukem of /etc/mk.conf, unless MAKECONF is already defined in the environment. 1631.341Slukem 1641.342Smartin20230714: 1651.342Smartin Import of gcc 10.5 requires a clean build of at least tools/gcc 1661.342Smartin and external/gpl3/gcc* object directories. An update build 1671.342Smartin without cleaning will result in obscure failures in rare corner 1681.342Smartin cases. 1691.342Smartin 1701.339Smartin20230604: 1711.339Smartin Building native kernels with the installed make(1) instead of 1721.339Smartin the $TOOLDIR/bin/nbmake-${arch} wrapper will fail if userland 1731.339Smartin has not been updated. Note that this is an unsupported build 1741.339Smartin configuration (but usually works if userland is -current enough). 1751.338Slukem 1761.338Slukem20230523: 1771.338Slukem ctfmerge was fixed as macOS host tool. This may require a clean tools 1781.338Slukem rebuild to detect the update to tools/compat/configure. 1791.338Slukem 1801.340Smartin20230515: 1811.340Smartin New openssl build requires removal of the crypto/external/bsd/openssl 1821.345Sandvar and tests/crypto/libcrypto subdirectories in the ${OBJDIR} hierarchy. 1831.340Smartin Otherwise test results may be wrong due to wrong "golden" output 1841.340Smartin files being installed. 1851.340Smartin 1861.337Smrg20230322: 1871.337Smrg Fixes for moved /lib/libisns* mean that builds will complain about 1881.337Smrg ./usr/lib/libisns* being missing until src/lib/libisns is forced 1891.337Smrg to (re)install the files, including the symlinks. The simplest 1901.337Smrg way is to clean this subdir before building. 1911.337Smrg 1921.336Smartin20230112: 1931.336Smartin New binutils require an updated ld.elf_so. If you are doing 1941.336Smartin (unsupported) in-place self builds (with the -E flag to build.sh), 1951.336Smartin make sure to have installed latest ld.elf_so before you rebuild 1961.336Smartin userland. 1971.336Smartin 1981.335Schs20221116: 1991.335Schs The addition to NetBSD's version of UFS2 of support for extended 2001.335Schs attributes broke backward compatibility with previous releases 2011.335Schs of NetBSD, so UFS2 has been restored to being compatible with 2021.335Schs previous NetBSD releases by disabling extended attributes. 2031.335Schs (Note that ACLs are implemented as extended attributes, so 2041.335Schs this changes disables ACLs as well.) 2051.335Schs 2061.335Schs Support for UFS2 with extended attributes is now available in a new 2071.335Schs UFS variant called UFS2ea. If you have created extended attributes 2081.335Schs in an original UFS2 file system then "fsck -p" will now fail due to 2091.335Schs the unexpected presence of extended attributes and "fsck -y" will 2101.335Schs remove all extended attributes. If you wish to preserve extended 2111.335Schs attributes rather than delete them, there is a utility to convert 2121.335Schs a UFS2 file system to UFS2ea and leave extended attributes in place, 2131.335Schs but this should be used with caution since it will preserve any 2141.335Schs extended attributes that have been corrupted by the backward 2151.335Schs incompatibility too. 2161.335Schs 2171.335Schs If you wish to use a UFS2ea file system as your root file system, 2181.335Schs then you will need to update your boot loader to a version that 2191.335Schs supports UFS2ea. 2201.335Schs 2211.335Schs For more information, see: 2221.335Schs https://wiki.netbsd.org/features/UFS2ea 2231.335Schs 2241.334Smrg20221111: 2251.334Smrg The new libdrm import worsened the conflict issues for the 2261.334Smrg kdump/ktruss ioctl, and i915 now conflicts with base, and has 2271.334Smrg been turned off. This will cause update build issues like: 2281.334Smrg 2291.334Smrg kdump-ioctl.c:12175:143: error: 'DRM_IOCTL_I915_DESTROY_HEAP' 2301.334Smrg undeclared here (not in a function); 2311.334Smrg did you mean 'DRM_IOCTL_MODE_DESTROY_DUMB'? 2321.334Smrg 2331.334Smrg You'll need to clean usr.bin/ktruss, usr.bin/kdump, and rescue. 2341.334Smrg 2351.331Sriastrad20220921: 2361.331Sriastrad Since the kernel version was bumped to 9.99.100, the bootloader 2371.333Sriastrad must be updated on x86 or EFI boot platforms in order to load 2381.333Sriastrad modules from boot.cfg(5) or interactively at the bootloader 2391.333Sriastrad prompt. 2401.333Sriastrad 2411.333Sriastrad The kernel can still load modules at runtime, with modload(8) 2421.333Sriastrad or modules.conf(5), with no bootloader update. This will not 2431.333Sriastrad affect release branches because it only applies to patch 2441.333Sriastrad numbers >=100. 2451.333Sriastrad 2461.333Sriastrad On x86 (i386 or amd64) with BIOS boot, this requires copying a 2471.333Sriastrad new /usr/mdec/boot to /boot. You can build this in the destdir 2481.333Sriastrad by running `$TOOLDIR/bin/nbmake-$ARCH dependall install' in 2491.333Sriastrad sys/arch/i386/stand. 2501.333Sriastrad 2511.333Sriastrad On platforms with EFI boot (including x86 with EFI boot), this 2521.333Sriastrad requires copying a new /usr/mdec/boot*.efi to the EFI/BOOT/ 2531.333Sriastrad directory on the EFI system partition. The boot*.efi file is: 2541.333Sriastrad 2551.333Sriastrad aarch64 bootaa64.efi 2561.333Sriastrad amd64 bootx64.efi 2571.333Sriastrad arm bootarm.efi (32-bit arm) 2581.333Sriastrad i386 bootx32.efi 2591.333Sriastrad 2601.333Sriastrad You can build this in the destdir by running 2611.333Sriastrad `$TOOLDIR/bin/nbmake-$ARCH dependall install' in 2621.333Sriastrad sys/stand/efiboot/boot*. 2631.331Sriastrad 2641.330Slukem20220821: 2651.330Slukem Support for building extsrc/ has been deprecated. 2661.330Slukem EXTSRCSRCDIR and MKEXTSRC have been deprecated. 2671.330Slukem 2681.329Smrg20220714: 2691.329Smrg Updates to xorg-server and associated drivers may cause builds to 2701.329Smrg fail. Cleaning both DESTDIR and the xorg build tree may be needed. 2711.329Smrg 2721.328Smartin20220628: 2731.328Smartin Changes in the build of src/games/robots require a clean build 2741.328Smartin of that program. 2751.328Smartin 2761.324Smartin20211116: 2771.324Smartin Changes in the xorg build require clean obj dirs for external/mit/xorg 2781.325Smartin (or a full clean/non-update build). 2791.324Smartin 2801.323Snia20211112: 2811.323Snia Device tree sources were updated for evbarm. Some device nodes 2821.323Snia (in particular, ld(4) devices on the ROCKPro64) will be renumbered. 2831.323Snia 2841.322Smartin20211014: 2851.323Snia MKPIE default for aarch64 has changed, a clean build is required. 2861.322Smartin 2871.321Schristos20210917: 2881.321Schristos Changed MNT_ACLS to default to POSIX1e ACLs instead of NFSv4 2891.321Schristos ACLs, to be compatible with FreeBSD. If you are using NFSv4 ACLs 2901.321Schristos and have "acls" in /etc/fstab you'll need to change it to "nfs4acls". 2911.321Schristos 2921.319Smrg20210711: 2931.319Smrg Updated GMP sources may require cleaning in tools/gmp and/or in 2941.319Smrg external/lgpl3/gmp/lib, particularly if GCC itself does not build. 2951.319Smrg 2961.318Smrg20210417: 2971.318Smrg GCC 10 was enabled for several platforms. If builds fail in either 2981.351Sgutterid tools/gcc or external/gpl3/gcc, first try cleaning those objects and 2991.318Smrg removing the $DESTDIR/usr/include/g++ subdirectory. 3001.318Smrg 3011.316Smrg20201016: 3021.316Smrg MIPS kernel modules have been disabled until they work. This will 3031.316Smrg turn up in extra files in the DESTDIR, which should be cleaned. 3041.316Smrg 3051.315Smrg20200925: 3061.315Smrg GNU MPC and MPFR have been updated. At least MPFR needs cleaning 3071.315Smrg in both the tools and external dirs. 3081.315Smrg 3091.314Smrg20200912: 3101.314Smrg GCC 9 has arrived for Arm and x86 platforms, and will be coming 3111.314Smrg for several more, as will binutils 2.34. Clean as required. 3121.314Smrg 3131.313Smrg20200907: 3141.313Smrg GCC 9 is coming, and binutils has been updated for MIPS. This 3151.313Smrg probably requires cleaning the tools/binutils. 3161.313Smrg 3171.311Smrg20200811: 3181.312Smrg GCC updates may require cleaning the objdir. This may occur 3191.312Smrg due to GCC 7.5 update, GCC 8.4 move to gcc.old, or the upcoming 3201.312Smrg GCC 9 upgrade. 3211.311Smrg 3221.309Schristos20200614: 3231.310Schristos blacklist* has been renamed to blocklist*. postinstall(8) 3241.332Sgutterid should handle the migration. 3251.309Schristos 3261.308Schristos20200601: 3271.308Schristos Due to a mistake in LIBISPRIVATE handling, .so libraries were 3281.308Schristos created in the build directories and need cleaning. 3291.308Schristos 3301.307Smrg20200311: 3311.307Smrg GCC 8 ports will need cleaning in src/tools/gcc and 3321.307Smrg src/external/gpl3/gcc due to GCC 8.4 update. 3331.307Smrg 3341.306Schristos20191118: 3351.306Schristos More architectures were switched to gcc8: 3361.306Schristos i386, ia64 powerpc64, sparc, sparc64, arm 3371.306Schristos The same comments as in 20191022 apply. 3381.306Schristos 3391.305Smartin20191112: 3401.305Smartin The LLVM update requires a clean rebuild for all architectures using 3411.305Smartin LLVM during the tools build phase (i386, amd64, aarch64). 3421.305Smartin 3431.304Smartin20191022: 3441.304Smartin Ports amd64 and aarch64 switched to GCC 8.3 by default. 3451.304Smartin In-place ("expert mode", build.sh -E) builds are not supported 3461.304Smartin when going from a GCC 7 userland to GCC 8. Do a regular 3471.304Smartin build to a different DESTDIR (or preferably: build.sh -U) at least 3481.306Schristos once and install sets, or download comp.{tar.xz,tgz} from the 3491.304Smartin daily builds and install that before doing the next in-place build. 3501.304Smartin 3511.303Smrg20191001: 3521.303Smrg GCC 8.3 was imported. Builds of src/tools/gcc may fail if 3531.303Smrg old builds with GCC 7 output now uses GCC 8. Clean this 3541.303Smrg directory, and also clean src/external/gpl3/gcc. 3551.303Smrg 3561.302Sriastrad20190903: 3571.306Schristos Files with names that coincide with existing files' names on 3581.302Sriastrad case-insensitive file systems were inadvertently committed, for 3591.302Sriastrad radeon GPU firmware. We cannot mark these as obsolete for 3601.302Sriastrad postinstall to fix, so if you updated src since 2019-08-26, and 3611.302Sriastrad ran build.sh distribution or ran build.sh release, you must 3621.302Sriastrad manually delete the following files in your DESTDIR (which is 3631.302Sriastrad usually $OBJDIR/destir.$ARCH), or from / if you have installed 3641.302Sriastrad them: 3651.302Sriastrad 3661.302Sriastrad /libdata/firmware/radeon/bonaire_ce.bin 3671.302Sriastrad /libdata/firmware/radeon/bonaire_mc.bin 3681.302Sriastrad /libdata/firmware/radeon/bonaire_me.bin 3691.302Sriastrad /libdata/firmware/radeon/bonaire_mec.bin 3701.302Sriastrad /libdata/firmware/radeon/bonaire_pfp.bin 3711.302Sriastrad /libdata/firmware/radeon/bonaire_rlc.bin 3721.302Sriastrad /libdata/firmware/radeon/bonaire_sdma.bin 3731.302Sriastrad /libdata/firmware/radeon/bonaire_smc.bin 3741.302Sriastrad /libdata/firmware/radeon/bonaire_uvd.bin 3751.302Sriastrad /libdata/firmware/radeon/hainan_ce.bin 3761.302Sriastrad /libdata/firmware/radeon/hainan_mc.bin 3771.302Sriastrad /libdata/firmware/radeon/hainan_me.bin 3781.302Sriastrad /libdata/firmware/radeon/hainan_pfp.bin 3791.302Sriastrad /libdata/firmware/radeon/hainan_rlc.bin 3801.302Sriastrad /libdata/firmware/radeon/hainan_smc.bin 3811.302Sriastrad /libdata/firmware/radeon/hawaii_ce.bin 3821.302Sriastrad /libdata/firmware/radeon/hawaii_mc.bin 3831.302Sriastrad /libdata/firmware/radeon/hawaii_me.bin 3841.302Sriastrad /libdata/firmware/radeon/hawaii_mec.bin 3851.302Sriastrad /libdata/firmware/radeon/hawaii_pfp.bin 3861.302Sriastrad /libdata/firmware/radeon/hawaii_rlc.bin 3871.302Sriastrad /libdata/firmware/radeon/hawaii_sdma.bin 3881.302Sriastrad /libdata/firmware/radeon/hawaii_smc.bin 3891.302Sriastrad /libdata/firmware/radeon/kabini_ce.bin 3901.302Sriastrad /libdata/firmware/radeon/kabini_me.bin 3911.302Sriastrad /libdata/firmware/radeon/kabini_mec.bin 3921.302Sriastrad /libdata/firmware/radeon/kabini_pfp.bin 3931.302Sriastrad /libdata/firmware/radeon/kabini_rlc.bin 3941.302Sriastrad /libdata/firmware/radeon/kabini_sdma.bin 3951.302Sriastrad /libdata/firmware/radeon/kaveri_ce.bin 3961.302Sriastrad /libdata/firmware/radeon/kaveri_me.bin 3971.302Sriastrad /libdata/firmware/radeon/kaveri_mec.bin 3981.302Sriastrad /libdata/firmware/radeon/kaveri_mec2.bin 3991.302Sriastrad /libdata/firmware/radeon/kaveri_pfp.bin 4001.302Sriastrad /libdata/firmware/radeon/kaveri_rlc.bin 4011.302Sriastrad /libdata/firmware/radeon/kaveri_sdma.bin 4021.302Sriastrad /libdata/firmware/radeon/mullins_ce.bin 4031.302Sriastrad /libdata/firmware/radeon/mullins_me.bin 4041.302Sriastrad /libdata/firmware/radeon/mullins_mec.bin 4051.302Sriastrad /libdata/firmware/radeon/mullins_pfp.bin 4061.302Sriastrad /libdata/firmware/radeon/mullins_rlc.bin 4071.302Sriastrad /libdata/firmware/radeon/mullins_sdma.bin 4081.302Sriastrad /libdata/firmware/radeon/oland_ce.bin 4091.302Sriastrad /libdata/firmware/radeon/oland_mc.bin 4101.302Sriastrad /libdata/firmware/radeon/oland_me.bin 4111.302Sriastrad /libdata/firmware/radeon/oland_pfp.bin 4121.302Sriastrad /libdata/firmware/radeon/oland_rlc.bin 4131.302Sriastrad /libdata/firmware/radeon/oland_smc.bin 4141.302Sriastrad /libdata/firmware/radeon/pitcairn_ce.bin 4151.302Sriastrad /libdata/firmware/radeon/pitcairn_mc.bin 4161.302Sriastrad /libdata/firmware/radeon/pitcairn_me.bin 4171.302Sriastrad /libdata/firmware/radeon/pitcairn_pfp.bin 4181.302Sriastrad /libdata/firmware/radeon/pitcairn_rlc.bin 4191.302Sriastrad /libdata/firmware/radeon/pitcairn_smc.bin 4201.302Sriastrad /libdata/firmware/radeon/tahiti_ce.bin 4211.302Sriastrad /libdata/firmware/radeon/tahiti_mc.bin 4221.302Sriastrad /libdata/firmware/radeon/tahiti_me.bin 4231.302Sriastrad /libdata/firmware/radeon/tahiti_pfp.bin 4241.302Sriastrad /libdata/firmware/radeon/tahiti_rlc.bin 4251.302Sriastrad /libdata/firmware/radeon/tahiti_smc.bin 4261.302Sriastrad /libdata/firmware/radeon/verde_ce.bin 4271.302Sriastrad /libdata/firmware/radeon/verde_mc.bin 4281.302Sriastrad /libdata/firmware/radeon/verde_me.bin 4291.302Sriastrad /libdata/firmware/radeon/verde_pfp.bin 4301.302Sriastrad /libdata/firmware/radeon/verde_rlc.bin 4311.302Sriastrad /libdata/firmware/radeon/verde_smc.bin 4321.302Sriastrad 4331.302Sriastrad We will re-import these radeon firmware images another way 4341.302Sriastrad later. 4351.302Sriastrad 4361.301Smartin20190727: 4371.301Smartin The uefi bootloader has gained tftp support and needs a clean 4381.301Smartin build. If you do update builds, manually clean its object 4391.301Smartin directory by something like: 4401.301Smartin cd sys/arch/i386/stand/efiboot && make clean 4411.301Smartin 4421.300Smartin20190723: 4431.344Sgutterid The jemalloc allocator in libc is now built without extended 4441.300Smartin debugging (for performance reasons). In update builds make sure 4451.326Sandvar to rebuild it completely, by removing all affected object files, 4461.300Smartin including compat builds, something like: 4471.300Smartin cd /usr/obj && find . -type d -name jemalloc|xargs rm -rf 4481.300Smartin 4491.299Smrg20190207: 4501.299Smrg GCC 7 switched for many ports. Update builds are likely to fail. 4511.299Smrg 4521.1SabsHints for a more successful build: 4531.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4541.123Sjmc Use build.sh, but do not use its "expert mode": 4551.132Sjmmv This will automatically build the tools in the 4561.123Sjmc correct order, and it will keep the tools and the 4571.123Sjmc new build products from interfering with the running 4581.123Sjmc system. This will allow you to ignore most of the 4591.123Sjmc other advice in this file. 4601.2Smrg Build a new kernel first: 4611.2Smrg This makes sure that any new system calls or features 4621.2Smrg expected by the new userland will be present. This 4631.2Smrg helps to avoid critical errors when upgrading. 4641.1Sabs Use object directories: 4651.1Sabs This helps to keep stale object 4661.1Sabs files from polluting the build if a Makefile "forgets" 4671.1Sabs about one. It also makes it easier to clean up after 4681.1Sabs a build. It's also necessary if you want to use the 4691.1Sabs same source tree for multiple machines. 4701.123Sjmc To use object directories with build.sh: 4711.123Sjmc a) invoke build.sh with the "-M" or "-O" options. 4721.123Sjmc To use object directories without using build.sh: 4731.1Sabs a) cd /usr/src ; make cleandir 4741.2Smrg b) Add "OBJMACHINE=yes" to /etc/mk.conf 4751.2Smrg c) Add "MKOBJDIRS=yes" to /etc/mk.conf 4761.1Sabs d) cd /usr/src ; make build 4771.2Smrg Note that running "make obj" in a directory will create 4781.2Smrg in obj.$MACHINE directory. 4791.1Sabs Build to a DESTDIR: 4801.123Sjmc This helps to keep old installed files (especially libraries) 4811.123Sjmc from interfering with the new build. 4821.123Sjmc To build to a DESTDIR with build.sh, use the "-D" option. 4831.123Sjmc To build to a DESTDIR without using build.sh, set the DESTDIR 4841.123Sjmc environment variable before running make build. It should be 4851.123Sjmc set to the pathname of an initially empty directory. 4861.123Sjmc Problems: if you do not use build.sh, you might need to 4871.123Sjmc update critical utilities without using DESTDIR since 4881.123Sjmc nothing is executed from what is installed in DESTDIR. 4891.123Sjmc (See critical utils, below.) 4901.1Sabs Build often: 4911.1Sabs This keeps critical utilities current enough to not choke 4921.1Sabs on any other part of the source tree that depends on up to 4931.123Sjmc date functionality. If you use build.sh, you should not have 4941.123Sjmc this problem. 4951.241Swiz 4961.1SabsWhat to do if things don't work: 4971.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4981.230StlsWhen things don't work there are usually a few things that commonly 4991.1Sabsshould be done. 5001.1Sabs 1) make includes 5011.1Sabs This should be done automatically by make build. 5021.1Sabs 2) cd share/mk && make install 5031.1Sabs Again, automatically done by make build. 5041.1Sabs 5051.1SabsFailsafe rebuild of a small part of the tree: 5061.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5071.1SabsTo make sure you rebuild something correctly you want to do 5081.1Sabssomething like the following: 5091.1Sabs 1) Make sure the includes and .mk files are up to date. 5101.1Sabs 2) Make sure any program used to build the particular 5111.1Sabs utility is up to date. (yacc, lex, etc...) 5121.1Sabs 3) cd ...path/to/util... 5131.1Sabs make cleandir 5141.1Sabs rm ...all obj directories... 5151.1Sabs make cleandir # yes, again 5161.1Sabs make obj 5171.1Sabs make depend && make 5181.1Sabs 5191.1SabsFailsafe rebuild of the entire tree: 5201.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5211.1SabsIf you really want to make sure the source tree is clean and 5221.2Smrgready for a build try the following. Note that sourcing /etc/mk.conf 5231.2Smrg(a make(1) Makefile) in this manner is not right, and will not work 5241.2Smrgfor anyone who uses any make(1) features in /etc/mk.conf. 5251.1Sabs 5261.1Sabs---cut here--- 5271.1Sabs#!/bin/sh 5281.1Sabs. /etc/mk.conf 5291.1Sabs 5301.58Slukemif [ -z $NETBSDSRCDIR ] ; then 5311.58Slukem NETBSDSRCDIR=/usr/src 5321.1Sabsfi 5331.58Slukemif [ \! -d $NETBSDSRCDIR ] ; then 5341.1Sabs echo Unable to find sources 5351.1Sabs exit 1 5361.1Sabsfi 5371.58Slukemfind $NETBSDSRCDIR -name \*.o -o -name obj.\* -o -name obj -exec rm \{\} \; 5381.1Sabs 5391.1Sabsif [ -z $BSDOBJDIR ] ; then 5401.1Sabs BSDOBJDIR=/usr/obj 5411.1Sabsfi 5421.1Sabsif [ -d $BSDOBJDIR ] ; then 5431.1Sabs rm -rf $BSDOBJDIR 5441.1Sabsfi 5451.1Sabs 5461.58Slukemcd $NETBSDSRCDIR && make cleandir 5471.1Sabs 5481.1Sabs---cut here--- 5491.1Sabs 5501.1SabsCritical utilities: 5511.1Sabs^^^^^^^^^^^^^^^^^^^ 5521.1Sabs usr.bin/make 5531.1Sabs usr.bin/yacc 5541.1Sabs usr.bin/lex 5551.11Slukem usr.bin/xlint 5561.142Sdrochner usr.bin/config 5571.1Sabs 5581.34SsimonbOther problems and possible solutions: 5591.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5601.1SabsSymptom:Complaints involving a Makefile. 5611.17SerhFix: Rebuild usr.bin/make: 5621.17Serh cd usr.bin/make && make && make install 5631.111Ssimonb Or, a failsafe method if that doesn't work: 5641.348Srillig cd usr.bin/make && cc -DMAKE_NATIVE *.c -I. -o make \ 5651.348Srillig && install make /usr/bin 5661.17Serh 5671.1SabsFix: Make sure .mk files are up to date. 5681.1Sabs cd share/mk && make install 5691.2Smrg 5701.2SmrgSymptom:Kernel `config' fails to configure any kernel, including GENERIC. 5711.142SdrochnerFix: Rebuild usr.bin/config 5721.1Sabs 5731.4SitojunSymptom:Obsolete intermediate files are used during compilation 5741.4SitojunFix: Try the following sequence of commands in the directory in question. 5751.4Sitojun make cleandir; rm `make print-objdir`; make cleandir; make obj 5761.4Sitojun (If you built the tree without "make obj" in the past, obsolete files 5771.4Sitojun may remain. The command tries to clean everything up) 5781.5Swiz 5791.207SmbalmerSymptom:.../sysinst/run.c:xx: warning: initialization from incompatible 5801.207Smbalmer pointer type 5811.5SwizFix: Rebuild and install usr.bin/menuc 5821.12Sitojun 5831.12SitojunSymptom:mklocale not found during build in share/locale/ctype 5841.12SitojunFix: Build and install usr.bin/mklocale 5851.13Sdogcow 5861.86SkleinkSymptom:undefined reference to `__assert13' or `__unsetenv13' 5871.13SdogcowFix: Rebuild and install lib/libc 5881.13Sdogcow 5891.142SdrochnerSymptom:usr.bin/config fails to build. 5901.19ScgdFix: Try building with -DMAKE_BOOTSTRAP added to CFLAGS in Makefile. 5911.13Sdogcow 5921.19ScgdSymptom:undefined reference to `getprogname' or `setprogname' 5931.19ScgdFix: Rebuild and install lib/libc 5941.24Sabs 5951.223SjoergSymptom:Update build fails in src/tools/gcc complaining that a variable 5961.223Sjoerg (e.g. CPPFLAGS) has changed since the previous run. 5971.223SjoergFix: Run "nbmake-${ARCH} clean" in src/tools/gcc or do a clean build. 5981.257Sapb 5991.257SapbSymptom:cvs [update aborted]: cannot open directory /cvsroot/src/...: 6001.257Sapb No such file or directory. 6011.257SapbCause: If a directory is created by mistake, then it is sometimes 6021.257Sapb deleted from the CVS repository using administrative commands 6031.257Sapb that bypass the normal cvs access controls. If your cvs working tree 6041.257Sapb contains references to a directory that has been deleted on the 6051.257Sapb server in this way, then "cvs update" reports this error. 6061.257SapbFix: Recursively delete the affected directory from your working tree 6071.257Sapb and try the update again. 608