UPDATING revision 1.385
11.385Smartin$NetBSD: UPDATING,v 1.385 2025/11/03 10:03:10 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.385Smartin20251028: 231.385Smartin libpthread had it's shared library version go back (from 1.7 to 241.385Smartin 1.6). This may cause fallout during update builds, remove the 251.385Smartin libpthread obj dir and all libpthread.so.1.7\* files in the 261.385Smartin dest dir. 271.385Smartin 281.384Smartin20251019: 291.384Smartin Changes to how libcrypto got linked (libpthread not required 301.384Smartin any more) cause failures in update builds. To fix, run 311.384Smartin (as your build user) a "make cleandir" in the following 321.384Smartin subdirectories: 331.384Smartin 341.384Smartin crypto/external/apache2/openssl 351.384Smartin crypto/external/bsd/heimdal 361.384Smartin crypto/external/bsd/netpgp 371.384Smartin crypto/external/bsd/openssh 381.384Smartin external/bsd/libfido2 391.384Smartin external/bsd/nsd 401.384Smartin external/bsd/ntp 411.384Smartin external/bsd/pam-u2f 421.384Smartin external/bsd/ppp 431.384Smartin external/bsd/tcpdump 441.384Smartin external/bsd/wpa 451.384Smartin games/factor 461.384Smartin libexec/httpd 471.384Smartin tests/crypto/libcrypto 481.384Smartin tests/lib/libc/hash 491.384Smartin usr.bin/dc 501.384Smartin usr.bin/ftp 511.384Smartin usr.bin/moduli 521.384Smartin usr.bin/nbsvtool 531.384Smartin usr.sbin/plainrsa-gen 541.384Smartin usr.sbin/syslogd 551.384Smartin 561.382Smrg20250721: 571.382Smrg GCC 12.5 was imported and there may be weird build issues. 581.382Smrg Clean any GCC build dirs if you encounter weird things. 591.382Smrg 601.383Smartin20250720: 611.383Smartin New openssl and old objects for tests for libcrypto may 621.383Smartin cause spurious test failure, clean the src/tests/crypto/libcrypto 631.383Smartin object dirs. 641.383Smartin 651.380Smartin20250528: 661.380Smartin Changes in the tools build require removing all config.cache 671.380Smartin files in the object tools directories. 681.380Smartin 691.378Spgoyette20250427: 701.378Spgoyette The KERNEL_DIR option to build.sh is now functional. Set it 711.379Skre with ``-V KERNEL_DIR=yes'' on your build.sh command. 721.378Spgoyette With this, you can now colocate kernel and associated modules 731.378Spgoyette in /netbsd/{kernel,kernel.dbg,modules} instead of having the 741.378Spgoyette kernel in / but modules in /stand. 751.378Spgoyette 761.378Spgoyette Note that you'll need new bootstrap code to use this feature. 771.378Spgoyette 781.379Skre This completes work begun many years ago by christos@ :-) 791.378Spgoyette 801.377Sriastrad20250413: 811.377Sriastrad A change to bsd.lib.mk requires a clean build of all libraries. 821.377Sriastrad 831.375Schristos20250131: 841.375Schristos The switch to the new jemalloc requires cleaning in libc. 851.376Spalle 861.367Sriastrad20241122: 871.373Sriastrad Changes to various libraries' build options require cleaning 881.373Sriastrad their objdirs in update builds: 891.368Sriastrad 901.372Sriastrad cd external/bsd/file/lib && $TOOLDIR/bin/nbmake-$ARCH clean 911.370Sriastrad cd external/bsd/libarchive/lib && $TOOLDIR/bin/nbmake-$ARCH clean 921.372Sriastrad cd external/public-domain/xz/lib && $TOOLDIR/bin/nbmake-$ARCH clean 931.368Sriastrad 941.374Sriastrad Also, for architectures with MKCOMPAT, it is necessary to clean 951.374Sriastrad the compat objdirs too. The easiest way is: 961.374Sriastrad 971.374Sriastrad rm -rf OBJDIR/compat/*/*/external/bsd/file/lib 981.374Sriastrad rm -rf OBJDIR/compat/*/*/external/bsd/libarchive/lib 991.374Sriastrad rm -rf OBJDIR/compat/*/*/external/public-domain/xz/lib 1001.374Sriastrad 1011.367Sriastrad Changes to bsd.lib.mk to improve detecting differences in 1021.367Sriastrad shared library symbol exports may cause some .actsym files in 1031.367Sriastrad the objdir to become stale in update builds. 1041.367Sriastrad 1051.367Sriastrad To work around this, delete all files matching `*.actsym' in 1061.367Sriastrad the objdir. For example: 1071.367Sriastrad 1081.367Sriastrad find OBJDIR -name '*.actsym' -type f -print0 | xargs -0 rm 1091.367Sriastrad 1101.363Smartin20241104: 1111.363Smartin Changes around the integration of the zstd compression 1121.363Smartin library may require manual deletion of some object directories 1131.366Sriastrad if you update from a build from a few days ago: 1141.366Sriastrad rm -rf DESTDIR/usr/lib/*/libarchive* 1151.366Sriastrad rm -rf DESTDIR/usr/lib/*/libmagic* 1161.366Sriastrad rm -rf DESTDIR/usr/lib/*/libzstd* 1171.366Sriastrad rm -rf DESTDIR/usr/lib/libarchive* 1181.366Sriastrad rm -rf DESTDIR/usr/lib/libmagic* 1191.366Sriastrad rm -rf DESTDIR/usr/lib/libzstd* 1201.366Sriastrad rm -rf OBJDIR/compat/*/*/external/bsd/file/ 1211.366Sriastrad rm -rf OBJDIR/compat/*/*/external/bsd/libarchive/ 1221.366Sriastrad rm -rf OBJDIR/compat/*/*/external/bsd/zstd/ 1231.366Sriastrad rm -rf OBJDIR/external/bsd/file/ 1241.366Sriastrad rm -rf OBJDIR/external/bsd/libarchive/ 1251.366Sriastrad rm -rf OBJDIR/external/bsd/zstd/ 1261.366Sriastrad rm -rf OBJDIR/external/gpl3/gcc/ 1271.366Sriastrad rm -rf OBJDIR/tools/gcc/ 1281.363Smartin 1291.360Swiz20240926: 1301.360Swiz Building -current when running on amd64 from about 20240924 1311.360Swiz to about 20240926 will not work due to a "malloc_np.h" 1321.360Swiz error. Please downgrade to a version from 20240924 or older, 1331.360Swiz or upgrade to a newer version e.g. using a binary release from 1341.360Swiz the NetBSD build servers. 1351.360Swiz 1361.358Smartin20240923: 1371.358Smartin Update builds will require cleaning the object directories for 1381.359Smartin jemalloc (like: "rm -rf $OBJ/external/bsd/jemalloc*") and the 1391.359Smartin libc dependency files (like: "rm $OBJ/lib/libc/jemalloc.*"). 1401.359Smartin On architectures with COMPAT libs, those also have to be cleaned, 1411.359Smartin e.g. on sparc64: "rm -rf $OBJ/compat/sparc64/sparc/external/bsd/jemalloc*" 1421.359Smartin and "rm $OBJ/compat/sparc64/sparc/lib/libc/jemalloc.*". 1431.358Smartin 1441.381Sgutterid20240920: 1451.381Sgutterid Update builds will require cleaning in src/external/historical/nawk/bin 1461.381Sgutterid in order to remove the awk subdirectory since there is now a binary 1471.381Sgutterid called awk. 1481.381Sgutterid 1491.357Schristos20240817: 1501.357Schristos Update builds will require cleaning in src/external/historical/nawk/bin 1511.357Schristos in order to remove the awk binary since now there is a subdirectory 1521.357Schristos called awk. 1531.358Smartin 1541.355Smartin20240812: 1551.355Smartin Update builds will require removing the tools objdir for gdb 1561.355Smartin if building with MKCROSSGDB=yes. All architectures use gdb.old 1571.355Smartin now. 1581.356Sriastrad 1591.354Smartin20240630: 1601.353Smartin Update builds will require removing the tools objdir for binutils 1611.353Smartin (as most architectures should use binutils.old now). 1621.353Smartin 1631.352Skre20240610: 1641.352Skre Update builds are likely to require removing the objdir for 1651.352Skre distrib/<arch>/cdroms - or at least references to libarchive 1661.352Skre from within there after the recent libarchive update. 1671.352Skre 1681.350Sriastrad20240504: 1691.350Sriastrad Update builds on x86 require making the `cleandir' target in 1701.350Sriastrad lib/libm, or deleting the objdir for lib/libm. 1711.350Sriastrad 1721.349Smaya20240423: 1731.349Smaya Update builds with x11 may fail after switching to Mesa 21. 1741.349Smaya 1751.346Sriastrad20240410: 1761.346Sriastrad Update builds may require manually deleting 1771.346Sriastrad $DESTDIR/var/run/named (and, potentially, 1781.346Sriastrad $DESTDIR/var/run/lwresd) in order to avoid checkflist failure. 1791.346Sriastrad 1801.347Snia20240409: 1811.347Snia 32-bit compatibility libraries were moved into the base32 1821.347Snia and debug32 sets. HTML man pages were moved into the manhtml set. 1831.347Snia 1841.343Sriastrad20230828: 1851.343Sriastrad If: 1861.343Sriastrad - you updated to current and ran postinstall between 20230826 1871.343Sriastrad and 20230828 inclusive, and 1881.343Sriastrad - you are not using anything outside the base system to 1891.343Sriastrad populate /etc/openssl/certs (e.g., manually adding 1901.343Sriastrad certificates or using ca-certificates or mozilla-rootcerts or 1911.343Sriastrad mozilla-rootcerts-openssl from pkgsrc), 1921.343Sriastrad delete /etc/openssl/certs and rerun postinstall or just 1931.343Sriastrad `certctl rehash'. 1941.343Sriastrad 1951.343Sriastrad Otherwise, certctl(8) will think someone else has left 1961.343Sriastrad /etc/openssl/certs in the way and will avoid clobbering it on 1971.343Sriastrad upgrade from older NetBSD. 1981.343Sriastrad 1991.341Slukem20230718: 2001.341Slukem build.sh will use mk.conf in the same directory as build.sh instead 2011.341Slukem of /etc/mk.conf, unless MAKECONF is already defined in the environment. 2021.341Slukem 2031.342Smartin20230714: 2041.342Smartin Import of gcc 10.5 requires a clean build of at least tools/gcc 2051.342Smartin and external/gpl3/gcc* object directories. An update build 2061.342Smartin without cleaning will result in obscure failures in rare corner 2071.342Smartin cases. 2081.342Smartin 2091.339Smartin20230604: 2101.339Smartin Building native kernels with the installed make(1) instead of 2111.339Smartin the $TOOLDIR/bin/nbmake-${arch} wrapper will fail if userland 2121.339Smartin has not been updated. Note that this is an unsupported build 2131.339Smartin configuration (but usually works if userland is -current enough). 2141.338Slukem 2151.338Slukem20230523: 2161.338Slukem ctfmerge was fixed as macOS host tool. This may require a clean tools 2171.338Slukem rebuild to detect the update to tools/compat/configure. 2181.338Slukem 2191.340Smartin20230515: 2201.340Smartin New openssl build requires removal of the crypto/external/bsd/openssl 2211.345Sandvar and tests/crypto/libcrypto subdirectories in the ${OBJDIR} hierarchy. 2221.340Smartin Otherwise test results may be wrong due to wrong "golden" output 2231.340Smartin files being installed. 2241.340Smartin 2251.337Smrg20230322: 2261.337Smrg Fixes for moved /lib/libisns* mean that builds will complain about 2271.337Smrg ./usr/lib/libisns* being missing until src/lib/libisns is forced 2281.337Smrg to (re)install the files, including the symlinks. The simplest 2291.337Smrg way is to clean this subdir before building. 2301.337Smrg 2311.336Smartin20230112: 2321.336Smartin New binutils require an updated ld.elf_so. If you are doing 2331.336Smartin (unsupported) in-place self builds (with the -E flag to build.sh), 2341.336Smartin make sure to have installed latest ld.elf_so before you rebuild 2351.336Smartin userland. 2361.336Smartin 2371.335Schs20221116: 2381.335Schs The addition to NetBSD's version of UFS2 of support for extended 2391.335Schs attributes broke backward compatibility with previous releases 2401.335Schs of NetBSD, so UFS2 has been restored to being compatible with 2411.335Schs previous NetBSD releases by disabling extended attributes. 2421.335Schs (Note that ACLs are implemented as extended attributes, so 2431.335Schs this changes disables ACLs as well.) 2441.335Schs 2451.335Schs Support for UFS2 with extended attributes is now available in a new 2461.335Schs UFS variant called UFS2ea. If you have created extended attributes 2471.335Schs in an original UFS2 file system then "fsck -p" will now fail due to 2481.335Schs the unexpected presence of extended attributes and "fsck -y" will 2491.335Schs remove all extended attributes. If you wish to preserve extended 2501.335Schs attributes rather than delete them, there is a utility to convert 2511.335Schs a UFS2 file system to UFS2ea and leave extended attributes in place, 2521.335Schs but this should be used with caution since it will preserve any 2531.335Schs extended attributes that have been corrupted by the backward 2541.335Schs incompatibility too. 2551.335Schs 2561.335Schs If you wish to use a UFS2ea file system as your root file system, 2571.335Schs then you will need to update your boot loader to a version that 2581.335Schs supports UFS2ea. 2591.335Schs 2601.335Schs For more information, see: 2611.335Schs https://wiki.netbsd.org/features/UFS2ea 2621.335Schs 2631.334Smrg20221111: 2641.334Smrg The new libdrm import worsened the conflict issues for the 2651.334Smrg kdump/ktruss ioctl, and i915 now conflicts with base, and has 2661.334Smrg been turned off. This will cause update build issues like: 2671.334Smrg 2681.334Smrg kdump-ioctl.c:12175:143: error: 'DRM_IOCTL_I915_DESTROY_HEAP' 2691.334Smrg undeclared here (not in a function); 2701.334Smrg did you mean 'DRM_IOCTL_MODE_DESTROY_DUMB'? 2711.334Smrg 2721.334Smrg You'll need to clean usr.bin/ktruss, usr.bin/kdump, and rescue. 2731.334Smrg 2741.331Sriastrad20220921: 2751.331Sriastrad Since the kernel version was bumped to 9.99.100, the bootloader 2761.333Sriastrad must be updated on x86 or EFI boot platforms in order to load 2771.333Sriastrad modules from boot.cfg(5) or interactively at the bootloader 2781.333Sriastrad prompt. 2791.333Sriastrad 2801.333Sriastrad The kernel can still load modules at runtime, with modload(8) 2811.333Sriastrad or modules.conf(5), with no bootloader update. This will not 2821.333Sriastrad affect release branches because it only applies to patch 2831.333Sriastrad numbers >=100. 2841.333Sriastrad 2851.333Sriastrad On x86 (i386 or amd64) with BIOS boot, this requires copying a 2861.333Sriastrad new /usr/mdec/boot to /boot. You can build this in the destdir 2871.333Sriastrad by running `$TOOLDIR/bin/nbmake-$ARCH dependall install' in 2881.333Sriastrad sys/arch/i386/stand. 2891.333Sriastrad 2901.333Sriastrad On platforms with EFI boot (including x86 with EFI boot), this 2911.333Sriastrad requires copying a new /usr/mdec/boot*.efi to the EFI/BOOT/ 2921.333Sriastrad directory on the EFI system partition. The boot*.efi file is: 2931.333Sriastrad 2941.333Sriastrad aarch64 bootaa64.efi 2951.333Sriastrad amd64 bootx64.efi 2961.333Sriastrad arm bootarm.efi (32-bit arm) 2971.333Sriastrad i386 bootx32.efi 2981.333Sriastrad 2991.333Sriastrad You can build this in the destdir by running 3001.333Sriastrad `$TOOLDIR/bin/nbmake-$ARCH dependall install' in 3011.333Sriastrad sys/stand/efiboot/boot*. 3021.331Sriastrad 3031.330Slukem20220821: 3041.330Slukem Support for building extsrc/ has been deprecated. 3051.330Slukem EXTSRCSRCDIR and MKEXTSRC have been deprecated. 3061.330Slukem 3071.329Smrg20220714: 3081.329Smrg Updates to xorg-server and associated drivers may cause builds to 3091.329Smrg fail. Cleaning both DESTDIR and the xorg build tree may be needed. 3101.329Smrg 3111.328Smartin20220628: 3121.328Smartin Changes in the build of src/games/robots require a clean build 3131.328Smartin of that program. 3141.328Smartin 3151.324Smartin20211116: 3161.324Smartin Changes in the xorg build require clean obj dirs for external/mit/xorg 3171.325Smartin (or a full clean/non-update build). 3181.324Smartin 3191.323Snia20211112: 3201.323Snia Device tree sources were updated for evbarm. Some device nodes 3211.323Snia (in particular, ld(4) devices on the ROCKPro64) will be renumbered. 3221.323Snia 3231.322Smartin20211014: 3241.323Snia MKPIE default for aarch64 has changed, a clean build is required. 3251.322Smartin 3261.321Schristos20210917: 3271.321Schristos Changed MNT_ACLS to default to POSIX1e ACLs instead of NFSv4 3281.321Schristos ACLs, to be compatible with FreeBSD. If you are using NFSv4 ACLs 3291.321Schristos and have "acls" in /etc/fstab you'll need to change it to "nfs4acls". 3301.321Schristos 3311.319Smrg20210711: 3321.319Smrg Updated GMP sources may require cleaning in tools/gmp and/or in 3331.319Smrg external/lgpl3/gmp/lib, particularly if GCC itself does not build. 3341.319Smrg 3351.318Smrg20210417: 3361.318Smrg GCC 10 was enabled for several platforms. If builds fail in either 3371.351Sgutterid tools/gcc or external/gpl3/gcc, first try cleaning those objects and 3381.318Smrg removing the $DESTDIR/usr/include/g++ subdirectory. 3391.318Smrg 3401.316Smrg20201016: 3411.316Smrg MIPS kernel modules have been disabled until they work. This will 3421.316Smrg turn up in extra files in the DESTDIR, which should be cleaned. 3431.316Smrg 3441.315Smrg20200925: 3451.315Smrg GNU MPC and MPFR have been updated. At least MPFR needs cleaning 3461.315Smrg in both the tools and external dirs. 3471.315Smrg 3481.314Smrg20200912: 3491.314Smrg GCC 9 has arrived for Arm and x86 platforms, and will be coming 3501.314Smrg for several more, as will binutils 2.34. Clean as required. 3511.314Smrg 3521.313Smrg20200907: 3531.313Smrg GCC 9 is coming, and binutils has been updated for MIPS. This 3541.313Smrg probably requires cleaning the tools/binutils. 3551.313Smrg 3561.311Smrg20200811: 3571.312Smrg GCC updates may require cleaning the objdir. This may occur 3581.312Smrg due to GCC 7.5 update, GCC 8.4 move to gcc.old, or the upcoming 3591.312Smrg GCC 9 upgrade. 3601.311Smrg 3611.309Schristos20200614: 3621.310Schristos blacklist* has been renamed to blocklist*. postinstall(8) 3631.332Sgutterid should handle the migration. 3641.309Schristos 3651.308Schristos20200601: 3661.308Schristos Due to a mistake in LIBISPRIVATE handling, .so libraries were 3671.308Schristos created in the build directories and need cleaning. 3681.308Schristos 3691.307Smrg20200311: 3701.307Smrg GCC 8 ports will need cleaning in src/tools/gcc and 3711.307Smrg src/external/gpl3/gcc due to GCC 8.4 update. 3721.307Smrg 3731.306Schristos20191118: 3741.306Schristos More architectures were switched to gcc8: 3751.306Schristos i386, ia64 powerpc64, sparc, sparc64, arm 3761.306Schristos The same comments as in 20191022 apply. 3771.306Schristos 3781.305Smartin20191112: 3791.305Smartin The LLVM update requires a clean rebuild for all architectures using 3801.305Smartin LLVM during the tools build phase (i386, amd64, aarch64). 3811.305Smartin 3821.304Smartin20191022: 3831.304Smartin Ports amd64 and aarch64 switched to GCC 8.3 by default. 3841.304Smartin In-place ("expert mode", build.sh -E) builds are not supported 3851.304Smartin when going from a GCC 7 userland to GCC 8. Do a regular 3861.304Smartin build to a different DESTDIR (or preferably: build.sh -U) at least 3871.306Schristos once and install sets, or download comp.{tar.xz,tgz} from the 3881.304Smartin daily builds and install that before doing the next in-place build. 3891.304Smartin 3901.303Smrg20191001: 3911.303Smrg GCC 8.3 was imported. Builds of src/tools/gcc may fail if 3921.303Smrg old builds with GCC 7 output now uses GCC 8. Clean this 3931.303Smrg directory, and also clean src/external/gpl3/gcc. 3941.303Smrg 3951.302Sriastrad20190903: 3961.306Schristos Files with names that coincide with existing files' names on 3971.302Sriastrad case-insensitive file systems were inadvertently committed, for 3981.302Sriastrad radeon GPU firmware. We cannot mark these as obsolete for 3991.302Sriastrad postinstall to fix, so if you updated src since 2019-08-26, and 4001.302Sriastrad ran build.sh distribution or ran build.sh release, you must 4011.302Sriastrad manually delete the following files in your DESTDIR (which is 4021.302Sriastrad usually $OBJDIR/destir.$ARCH), or from / if you have installed 4031.302Sriastrad them: 4041.302Sriastrad 4051.302Sriastrad /libdata/firmware/radeon/bonaire_ce.bin 4061.302Sriastrad /libdata/firmware/radeon/bonaire_mc.bin 4071.302Sriastrad /libdata/firmware/radeon/bonaire_me.bin 4081.302Sriastrad /libdata/firmware/radeon/bonaire_mec.bin 4091.302Sriastrad /libdata/firmware/radeon/bonaire_pfp.bin 4101.302Sriastrad /libdata/firmware/radeon/bonaire_rlc.bin 4111.302Sriastrad /libdata/firmware/radeon/bonaire_sdma.bin 4121.302Sriastrad /libdata/firmware/radeon/bonaire_smc.bin 4131.302Sriastrad /libdata/firmware/radeon/bonaire_uvd.bin 4141.302Sriastrad /libdata/firmware/radeon/hainan_ce.bin 4151.302Sriastrad /libdata/firmware/radeon/hainan_mc.bin 4161.302Sriastrad /libdata/firmware/radeon/hainan_me.bin 4171.302Sriastrad /libdata/firmware/radeon/hainan_pfp.bin 4181.302Sriastrad /libdata/firmware/radeon/hainan_rlc.bin 4191.302Sriastrad /libdata/firmware/radeon/hainan_smc.bin 4201.302Sriastrad /libdata/firmware/radeon/hawaii_ce.bin 4211.302Sriastrad /libdata/firmware/radeon/hawaii_mc.bin 4221.302Sriastrad /libdata/firmware/radeon/hawaii_me.bin 4231.302Sriastrad /libdata/firmware/radeon/hawaii_mec.bin 4241.302Sriastrad /libdata/firmware/radeon/hawaii_pfp.bin 4251.302Sriastrad /libdata/firmware/radeon/hawaii_rlc.bin 4261.302Sriastrad /libdata/firmware/radeon/hawaii_sdma.bin 4271.302Sriastrad /libdata/firmware/radeon/hawaii_smc.bin 4281.302Sriastrad /libdata/firmware/radeon/kabini_ce.bin 4291.302Sriastrad /libdata/firmware/radeon/kabini_me.bin 4301.302Sriastrad /libdata/firmware/radeon/kabini_mec.bin 4311.302Sriastrad /libdata/firmware/radeon/kabini_pfp.bin 4321.302Sriastrad /libdata/firmware/radeon/kabini_rlc.bin 4331.302Sriastrad /libdata/firmware/radeon/kabini_sdma.bin 4341.302Sriastrad /libdata/firmware/radeon/kaveri_ce.bin 4351.302Sriastrad /libdata/firmware/radeon/kaveri_me.bin 4361.302Sriastrad /libdata/firmware/radeon/kaveri_mec.bin 4371.302Sriastrad /libdata/firmware/radeon/kaveri_mec2.bin 4381.302Sriastrad /libdata/firmware/radeon/kaveri_pfp.bin 4391.302Sriastrad /libdata/firmware/radeon/kaveri_rlc.bin 4401.302Sriastrad /libdata/firmware/radeon/kaveri_sdma.bin 4411.302Sriastrad /libdata/firmware/radeon/mullins_ce.bin 4421.302Sriastrad /libdata/firmware/radeon/mullins_me.bin 4431.302Sriastrad /libdata/firmware/radeon/mullins_mec.bin 4441.302Sriastrad /libdata/firmware/radeon/mullins_pfp.bin 4451.302Sriastrad /libdata/firmware/radeon/mullins_rlc.bin 4461.302Sriastrad /libdata/firmware/radeon/mullins_sdma.bin 4471.302Sriastrad /libdata/firmware/radeon/oland_ce.bin 4481.302Sriastrad /libdata/firmware/radeon/oland_mc.bin 4491.302Sriastrad /libdata/firmware/radeon/oland_me.bin 4501.302Sriastrad /libdata/firmware/radeon/oland_pfp.bin 4511.302Sriastrad /libdata/firmware/radeon/oland_rlc.bin 4521.302Sriastrad /libdata/firmware/radeon/oland_smc.bin 4531.302Sriastrad /libdata/firmware/radeon/pitcairn_ce.bin 4541.302Sriastrad /libdata/firmware/radeon/pitcairn_mc.bin 4551.302Sriastrad /libdata/firmware/radeon/pitcairn_me.bin 4561.302Sriastrad /libdata/firmware/radeon/pitcairn_pfp.bin 4571.302Sriastrad /libdata/firmware/radeon/pitcairn_rlc.bin 4581.302Sriastrad /libdata/firmware/radeon/pitcairn_smc.bin 4591.302Sriastrad /libdata/firmware/radeon/tahiti_ce.bin 4601.302Sriastrad /libdata/firmware/radeon/tahiti_mc.bin 4611.302Sriastrad /libdata/firmware/radeon/tahiti_me.bin 4621.302Sriastrad /libdata/firmware/radeon/tahiti_pfp.bin 4631.302Sriastrad /libdata/firmware/radeon/tahiti_rlc.bin 4641.302Sriastrad /libdata/firmware/radeon/tahiti_smc.bin 4651.302Sriastrad /libdata/firmware/radeon/verde_ce.bin 4661.302Sriastrad /libdata/firmware/radeon/verde_mc.bin 4671.302Sriastrad /libdata/firmware/radeon/verde_me.bin 4681.302Sriastrad /libdata/firmware/radeon/verde_pfp.bin 4691.302Sriastrad /libdata/firmware/radeon/verde_rlc.bin 4701.302Sriastrad /libdata/firmware/radeon/verde_smc.bin 4711.302Sriastrad 4721.302Sriastrad We will re-import these radeon firmware images another way 4731.302Sriastrad later. 4741.302Sriastrad 4751.301Smartin20190727: 4761.301Smartin The uefi bootloader has gained tftp support and needs a clean 4771.301Smartin build. If you do update builds, manually clean its object 4781.301Smartin directory by something like: 4791.301Smartin cd sys/arch/i386/stand/efiboot && make clean 4801.301Smartin 4811.300Smartin20190723: 4821.344Sgutterid The jemalloc allocator in libc is now built without extended 4831.300Smartin debugging (for performance reasons). In update builds make sure 4841.326Sandvar to rebuild it completely, by removing all affected object files, 4851.300Smartin including compat builds, something like: 4861.300Smartin cd /usr/obj && find . -type d -name jemalloc|xargs rm -rf 4871.300Smartin 4881.299Smrg20190207: 4891.299Smrg GCC 7 switched for many ports. Update builds are likely to fail. 4901.299Smrg 4911.1SabsHints for a more successful build: 4921.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4931.123Sjmc Use build.sh, but do not use its "expert mode": 4941.132Sjmmv This will automatically build the tools in the 4951.123Sjmc correct order, and it will keep the tools and the 4961.123Sjmc new build products from interfering with the running 4971.123Sjmc system. This will allow you to ignore most of the 4981.123Sjmc other advice in this file. 4991.2Smrg Build a new kernel first: 5001.2Smrg This makes sure that any new system calls or features 5011.2Smrg expected by the new userland will be present. This 5021.2Smrg helps to avoid critical errors when upgrading. 5031.1Sabs Use object directories: 5041.1Sabs This helps to keep stale object 5051.1Sabs files from polluting the build if a Makefile "forgets" 5061.1Sabs about one. It also makes it easier to clean up after 5071.1Sabs a build. It's also necessary if you want to use the 5081.1Sabs same source tree for multiple machines. 5091.123Sjmc To use object directories with build.sh: 5101.123Sjmc a) invoke build.sh with the "-M" or "-O" options. 5111.123Sjmc To use object directories without using build.sh: 5121.1Sabs a) cd /usr/src ; make cleandir 5131.2Smrg b) Add "OBJMACHINE=yes" to /etc/mk.conf 5141.2Smrg c) Add "MKOBJDIRS=yes" to /etc/mk.conf 5151.1Sabs d) cd /usr/src ; make build 5161.2Smrg Note that running "make obj" in a directory will create 5171.2Smrg in obj.$MACHINE directory. 5181.1Sabs Build to a DESTDIR: 5191.123Sjmc This helps to keep old installed files (especially libraries) 5201.123Sjmc from interfering with the new build. 5211.123Sjmc To build to a DESTDIR with build.sh, use the "-D" option. 5221.123Sjmc To build to a DESTDIR without using build.sh, set the DESTDIR 5231.123Sjmc environment variable before running make build. It should be 5241.123Sjmc set to the pathname of an initially empty directory. 5251.123Sjmc Problems: if you do not use build.sh, you might need to 5261.123Sjmc update critical utilities without using DESTDIR since 5271.123Sjmc nothing is executed from what is installed in DESTDIR. 5281.123Sjmc (See critical utils, below.) 5291.1Sabs Build often: 5301.1Sabs This keeps critical utilities current enough to not choke 5311.1Sabs on any other part of the source tree that depends on up to 5321.123Sjmc date functionality. If you use build.sh, you should not have 5331.123Sjmc this problem. 5341.241Swiz 5351.1SabsWhat to do if things don't work: 5361.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5371.230StlsWhen things don't work there are usually a few things that commonly 5381.1Sabsshould be done. 5391.1Sabs 1) make includes 5401.1Sabs This should be done automatically by make build. 5411.1Sabs 2) cd share/mk && make install 5421.1Sabs Again, automatically done by make build. 5431.1Sabs 5441.1SabsFailsafe rebuild of a small part of the tree: 5451.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5461.1SabsTo make sure you rebuild something correctly you want to do 5471.1Sabssomething like the following: 5481.1Sabs 1) Make sure the includes and .mk files are up to date. 5491.1Sabs 2) Make sure any program used to build the particular 5501.1Sabs utility is up to date. (yacc, lex, etc...) 5511.1Sabs 3) cd ...path/to/util... 5521.1Sabs make cleandir 5531.1Sabs rm ...all obj directories... 5541.1Sabs make cleandir # yes, again 5551.1Sabs make obj 5561.1Sabs make depend && make 5571.1Sabs 5581.1SabsFailsafe rebuild of the entire tree: 5591.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5601.1SabsIf you really want to make sure the source tree is clean and 5611.2Smrgready for a build try the following. Note that sourcing /etc/mk.conf 5621.2Smrg(a make(1) Makefile) in this manner is not right, and will not work 5631.2Smrgfor anyone who uses any make(1) features in /etc/mk.conf. 5641.1Sabs 5651.1Sabs---cut here--- 5661.1Sabs#!/bin/sh 5671.1Sabs. /etc/mk.conf 5681.1Sabs 5691.58Slukemif [ -z $NETBSDSRCDIR ] ; then 5701.58Slukem NETBSDSRCDIR=/usr/src 5711.1Sabsfi 5721.58Slukemif [ \! -d $NETBSDSRCDIR ] ; then 5731.1Sabs echo Unable to find sources 5741.1Sabs exit 1 5751.1Sabsfi 5761.58Slukemfind $NETBSDSRCDIR -name \*.o -o -name obj.\* -o -name obj -exec rm \{\} \; 5771.1Sabs 5781.1Sabsif [ -z $BSDOBJDIR ] ; then 5791.1Sabs BSDOBJDIR=/usr/obj 5801.1Sabsfi 5811.1Sabsif [ -d $BSDOBJDIR ] ; then 5821.1Sabs rm -rf $BSDOBJDIR 5831.1Sabsfi 5841.1Sabs 5851.58Slukemcd $NETBSDSRCDIR && make cleandir 5861.1Sabs 5871.1Sabs---cut here--- 5881.1Sabs 5891.1SabsCritical utilities: 5901.1Sabs^^^^^^^^^^^^^^^^^^^ 5911.1Sabs usr.bin/make 5921.1Sabs usr.bin/yacc 5931.1Sabs usr.bin/lex 5941.11Slukem usr.bin/xlint 5951.142Sdrochner usr.bin/config 5961.1Sabs 5971.34SsimonbOther problems and possible solutions: 5981.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5991.1SabsSymptom:Complaints involving a Makefile. 6001.17SerhFix: Rebuild usr.bin/make: 6011.17Serh cd usr.bin/make && make && make install 6021.111Ssimonb Or, a failsafe method if that doesn't work: 6031.348Srillig cd usr.bin/make && cc -DMAKE_NATIVE *.c -I. -o make \ 6041.348Srillig && install make /usr/bin 6051.17Serh 6061.1SabsFix: Make sure .mk files are up to date. 6071.1Sabs cd share/mk && make install 6081.2Smrg 6091.2SmrgSymptom:Kernel `config' fails to configure any kernel, including GENERIC. 6101.142SdrochnerFix: Rebuild usr.bin/config 6111.1Sabs 6121.4SitojunSymptom:Obsolete intermediate files are used during compilation 6131.4SitojunFix: Try the following sequence of commands in the directory in question. 6141.4Sitojun make cleandir; rm `make print-objdir`; make cleandir; make obj 6151.4Sitojun (If you built the tree without "make obj" in the past, obsolete files 6161.4Sitojun may remain. The command tries to clean everything up) 6171.5Swiz 6181.207SmbalmerSymptom:.../sysinst/run.c:xx: warning: initialization from incompatible 6191.207Smbalmer pointer type 6201.5SwizFix: Rebuild and install usr.bin/menuc 6211.12Sitojun 6221.12SitojunSymptom:mklocale not found during build in share/locale/ctype 6231.12SitojunFix: Build and install usr.bin/mklocale 6241.13Sdogcow 6251.86SkleinkSymptom:undefined reference to `__assert13' or `__unsetenv13' 6261.13SdogcowFix: Rebuild and install lib/libc 6271.13Sdogcow 6281.142SdrochnerSymptom:usr.bin/config fails to build. 6291.19ScgdFix: Try building with -DMAKE_BOOTSTRAP added to CFLAGS in Makefile. 6301.13Sdogcow 6311.19ScgdSymptom:undefined reference to `getprogname' or `setprogname' 6321.19ScgdFix: Rebuild and install lib/libc 6331.24Sabs 6341.223SjoergSymptom:Update build fails in src/tools/gcc complaining that a variable 6351.223Sjoerg (e.g. CPPFLAGS) has changed since the previous run. 6361.223SjoergFix: Run "nbmake-${ARCH} clean" in src/tools/gcc or do a clean build. 6371.257Sapb 6381.257SapbSymptom:cvs [update aborted]: cannot open directory /cvsroot/src/...: 6391.257Sapb No such file or directory. 6401.257SapbCause: If a directory is created by mistake, then it is sometimes 6411.257Sapb deleted from the CVS repository using administrative commands 6421.257Sapb that bypass the normal cvs access controls. If your cvs working tree 6431.257Sapb contains references to a directory that has been deleted on the 6441.257Sapb server in this way, then "cvs update" reports this error. 6451.257SapbFix: Recursively delete the affected directory from your working tree 6461.257Sapb and try the update again. 647