11.388Sriastrad$NetBSD: UPDATING,v 1.388 2025/11/29 14:39:36 riastradh 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.386Smartin If you have build other software/packages on a -current system 281.386Smartin from 20251026 or 20251027 you need to rebuild them after 291.386Smartin updating your base system again. 301.385Smartin 311.384Smartin20251019: 321.384Smartin Changes to how libcrypto got linked (libpthread not required 331.384Smartin any more) cause failures in update builds. To fix, run 341.384Smartin (as your build user) a "make cleandir" in the following 351.384Smartin subdirectories: 361.384Smartin 371.384Smartin crypto/external/apache2/openssl 381.384Smartin crypto/external/bsd/heimdal 391.384Smartin crypto/external/bsd/netpgp 401.384Smartin crypto/external/bsd/openssh 411.384Smartin external/bsd/libfido2 421.384Smartin external/bsd/nsd 431.384Smartin external/bsd/ntp 441.384Smartin external/bsd/pam-u2f 451.384Smartin external/bsd/ppp 461.384Smartin external/bsd/tcpdump 471.384Smartin external/bsd/wpa 481.384Smartin games/factor 491.384Smartin libexec/httpd 501.384Smartin tests/crypto/libcrypto 511.384Smartin tests/lib/libc/hash 521.384Smartin usr.bin/dc 531.384Smartin usr.bin/ftp 541.384Smartin usr.bin/moduli 551.384Smartin usr.bin/nbsvtool 561.384Smartin usr.sbin/plainrsa-gen 571.384Smartin usr.sbin/syslogd 581.384Smartin 591.382Smrg20250721: 601.382Smrg GCC 12.5 was imported and there may be weird build issues. 611.382Smrg Clean any GCC build dirs if you encounter weird things. 621.382Smrg 631.383Smartin20250720: 641.383Smartin New openssl and old objects for tests for libcrypto may 651.383Smartin cause spurious test failure, clean the src/tests/crypto/libcrypto 661.383Smartin object dirs. 671.383Smartin 681.380Smartin20250528: 691.380Smartin Changes in the tools build require removing all config.cache 701.380Smartin files in the object tools directories. 711.380Smartin 721.378Spgoyette20250427: 731.378Spgoyette The KERNEL_DIR option to build.sh is now functional. Set it 741.379Skre with ``-V KERNEL_DIR=yes'' on your build.sh command. 751.378Spgoyette With this, you can now colocate kernel and associated modules 761.378Spgoyette in /netbsd/{kernel,kernel.dbg,modules} instead of having the 771.378Spgoyette kernel in / but modules in /stand. 781.378Spgoyette 791.378Spgoyette Note that you'll need new bootstrap code to use this feature. 801.378Spgoyette 811.379Skre This completes work begun many years ago by christos@ :-) 821.378Spgoyette 831.377Sriastrad20250413: 841.377Sriastrad A change to bsd.lib.mk requires a clean build of all libraries. 851.377Sriastrad 861.375Schristos20250131: 871.375Schristos The switch to the new jemalloc requires cleaning in libc. 881.376Spalle 891.367Sriastrad20241122: 901.373Sriastrad Changes to various libraries' build options require cleaning 911.373Sriastrad their objdirs in update builds: 921.368Sriastrad 931.372Sriastrad cd external/bsd/file/lib && $TOOLDIR/bin/nbmake-$ARCH clean 941.370Sriastrad cd external/bsd/libarchive/lib && $TOOLDIR/bin/nbmake-$ARCH clean 951.372Sriastrad cd external/public-domain/xz/lib && $TOOLDIR/bin/nbmake-$ARCH clean 961.368Sriastrad 971.374Sriastrad Also, for architectures with MKCOMPAT, it is necessary to clean 981.374Sriastrad the compat objdirs too. The easiest way is: 991.374Sriastrad 1001.374Sriastrad rm -rf OBJDIR/compat/*/*/external/bsd/file/lib 1011.374Sriastrad rm -rf OBJDIR/compat/*/*/external/bsd/libarchive/lib 1021.374Sriastrad rm -rf OBJDIR/compat/*/*/external/public-domain/xz/lib 1031.374Sriastrad 1041.367Sriastrad Changes to bsd.lib.mk to improve detecting differences in 1051.367Sriastrad shared library symbol exports may cause some .actsym files in 1061.367Sriastrad the objdir to become stale in update builds. 1071.367Sriastrad 1081.367Sriastrad To work around this, delete all files matching `*.actsym' in 1091.367Sriastrad the objdir. For example: 1101.367Sriastrad 1111.367Sriastrad find OBJDIR -name '*.actsym' -type f -print0 | xargs -0 rm 1121.367Sriastrad 1131.363Smartin20241104: 1141.363Smartin Changes around the integration of the zstd compression 1151.363Smartin library may require manual deletion of some object directories 1161.366Sriastrad if you update from a build from a few days ago: 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 DESTDIR/usr/lib/libarchive* 1211.366Sriastrad rm -rf DESTDIR/usr/lib/libmagic* 1221.366Sriastrad rm -rf DESTDIR/usr/lib/libzstd* 1231.366Sriastrad rm -rf OBJDIR/compat/*/*/external/bsd/file/ 1241.366Sriastrad rm -rf OBJDIR/compat/*/*/external/bsd/libarchive/ 1251.366Sriastrad rm -rf OBJDIR/compat/*/*/external/bsd/zstd/ 1261.366Sriastrad rm -rf OBJDIR/external/bsd/file/ 1271.366Sriastrad rm -rf OBJDIR/external/bsd/libarchive/ 1281.366Sriastrad rm -rf OBJDIR/external/bsd/zstd/ 1291.366Sriastrad rm -rf OBJDIR/external/gpl3/gcc/ 1301.366Sriastrad rm -rf OBJDIR/tools/gcc/ 1311.363Smartin 1321.360Swiz20240926: 1331.360Swiz Building -current when running on amd64 from about 20240924 1341.360Swiz to about 20240926 will not work due to a "malloc_np.h" 1351.360Swiz error. Please downgrade to a version from 20240924 or older, 1361.360Swiz or upgrade to a newer version e.g. using a binary release from 1371.360Swiz the NetBSD build servers. 1381.360Swiz 1391.358Smartin20240923: 1401.358Smartin Update builds will require cleaning the object directories for 1411.359Smartin jemalloc (like: "rm -rf $OBJ/external/bsd/jemalloc*") and the 1421.359Smartin libc dependency files (like: "rm $OBJ/lib/libc/jemalloc.*"). 1431.359Smartin On architectures with COMPAT libs, those also have to be cleaned, 1441.359Smartin e.g. on sparc64: "rm -rf $OBJ/compat/sparc64/sparc/external/bsd/jemalloc*" 1451.359Smartin and "rm $OBJ/compat/sparc64/sparc/lib/libc/jemalloc.*". 1461.358Smartin 1471.381Sgutterid20240920: 1481.381Sgutterid Update builds will require cleaning in src/external/historical/nawk/bin 1491.381Sgutterid in order to remove the awk subdirectory since there is now a binary 1501.381Sgutterid called awk. 1511.381Sgutterid 1521.357Schristos20240817: 1531.357Schristos Update builds will require cleaning in src/external/historical/nawk/bin 1541.357Schristos in order to remove the awk binary since now there is a subdirectory 1551.357Schristos called awk. 1561.358Smartin 1571.355Smartin20240812: 1581.355Smartin Update builds will require removing the tools objdir for gdb 1591.355Smartin if building with MKCROSSGDB=yes. All architectures use gdb.old 1601.355Smartin now. 1611.356Sriastrad 1621.354Smartin20240630: 1631.353Smartin Update builds will require removing the tools objdir for binutils 1641.353Smartin (as most architectures should use binutils.old now). 1651.353Smartin 1661.352Skre20240610: 1671.352Skre Update builds are likely to require removing the objdir for 1681.352Skre distrib/<arch>/cdroms - or at least references to libarchive 1691.352Skre from within there after the recent libarchive update. 1701.352Skre 1711.350Sriastrad20240504: 1721.350Sriastrad Update builds on x86 require making the `cleandir' target in 1731.350Sriastrad lib/libm, or deleting the objdir for lib/libm. 1741.350Sriastrad 1751.349Smaya20240423: 1761.349Smaya Update builds with x11 may fail after switching to Mesa 21. 1771.349Smaya 1781.346Sriastrad20240410: 1791.346Sriastrad Update builds may require manually deleting 1801.346Sriastrad $DESTDIR/var/run/named (and, potentially, 1811.346Sriastrad $DESTDIR/var/run/lwresd) in order to avoid checkflist failure. 1821.346Sriastrad 1831.347Snia20240409: 1841.347Snia 32-bit compatibility libraries were moved into the base32 1851.347Snia and debug32 sets. HTML man pages were moved into the manhtml set. 1861.347Snia 1871.343Sriastrad20230828: 1881.343Sriastrad If: 1891.343Sriastrad - you updated to current and ran postinstall between 20230826 1901.343Sriastrad and 20230828 inclusive, and 1911.343Sriastrad - you are not using anything outside the base system to 1921.343Sriastrad populate /etc/openssl/certs (e.g., manually adding 1931.343Sriastrad certificates or using ca-certificates or mozilla-rootcerts or 1941.343Sriastrad mozilla-rootcerts-openssl from pkgsrc), 1951.343Sriastrad delete /etc/openssl/certs and rerun postinstall or just 1961.343Sriastrad `certctl rehash'. 1971.343Sriastrad 1981.343Sriastrad Otherwise, certctl(8) will think someone else has left 1991.343Sriastrad /etc/openssl/certs in the way and will avoid clobbering it on 2001.343Sriastrad upgrade from older NetBSD. 2011.343Sriastrad 2021.341Slukem20230718: 2031.341Slukem build.sh will use mk.conf in the same directory as build.sh instead 2041.341Slukem of /etc/mk.conf, unless MAKECONF is already defined in the environment. 2051.341Slukem 2061.342Smartin20230714: 2071.342Smartin Import of gcc 10.5 requires a clean build of at least tools/gcc 2081.342Smartin and external/gpl3/gcc* object directories. An update build 2091.342Smartin without cleaning will result in obscure failures in rare corner 2101.342Smartin cases. 2111.342Smartin 2121.339Smartin20230604: 2131.339Smartin Building native kernels with the installed make(1) instead of 2141.339Smartin the $TOOLDIR/bin/nbmake-${arch} wrapper will fail if userland 2151.339Smartin has not been updated. Note that this is an unsupported build 2161.339Smartin configuration (but usually works if userland is -current enough). 2171.338Slukem 2181.338Slukem20230523: 2191.338Slukem ctfmerge was fixed as macOS host tool. This may require a clean tools 2201.338Slukem rebuild to detect the update to tools/compat/configure. 2211.338Slukem 2221.340Smartin20230515: 2231.340Smartin New openssl build requires removal of the crypto/external/bsd/openssl 2241.345Sandvar and tests/crypto/libcrypto subdirectories in the ${OBJDIR} hierarchy. 2251.340Smartin Otherwise test results may be wrong due to wrong "golden" output 2261.340Smartin files being installed. 2271.340Smartin 2281.337Smrg20230322: 2291.337Smrg Fixes for moved /lib/libisns* mean that builds will complain about 2301.337Smrg ./usr/lib/libisns* being missing until src/lib/libisns is forced 2311.337Smrg to (re)install the files, including the symlinks. The simplest 2321.337Smrg way is to clean this subdir before building. 2331.337Smrg 2341.336Smartin20230112: 2351.336Smartin New binutils require an updated ld.elf_so. If you are doing 2361.336Smartin (unsupported) in-place self builds (with the -E flag to build.sh), 2371.336Smartin make sure to have installed latest ld.elf_so before you rebuild 2381.336Smartin userland. 2391.336Smartin 2401.335Schs20221116: 2411.335Schs The addition to NetBSD's version of UFS2 of support for extended 2421.335Schs attributes broke backward compatibility with previous releases 2431.335Schs of NetBSD, so UFS2 has been restored to being compatible with 2441.335Schs previous NetBSD releases by disabling extended attributes. 2451.335Schs (Note that ACLs are implemented as extended attributes, so 2461.335Schs this changes disables ACLs as well.) 2471.335Schs 2481.335Schs Support for UFS2 with extended attributes is now available in a new 2491.335Schs UFS variant called UFS2ea. If you have created extended attributes 2501.335Schs in an original UFS2 file system then "fsck -p" will now fail due to 2511.335Schs the unexpected presence of extended attributes and "fsck -y" will 2521.335Schs remove all extended attributes. If you wish to preserve extended 2531.335Schs attributes rather than delete them, there is a utility to convert 2541.335Schs a UFS2 file system to UFS2ea and leave extended attributes in place, 2551.335Schs but this should be used with caution since it will preserve any 2561.335Schs extended attributes that have been corrupted by the backward 2571.335Schs incompatibility too. 2581.335Schs 2591.335Schs If you wish to use a UFS2ea file system as your root file system, 2601.335Schs then you will need to update your boot loader to a version that 2611.335Schs supports UFS2ea. 2621.335Schs 2631.335Schs For more information, see: 2641.335Schs https://wiki.netbsd.org/features/UFS2ea 2651.335Schs 2661.334Smrg20221111: 2671.334Smrg The new libdrm import worsened the conflict issues for the 2681.334Smrg kdump/ktruss ioctl, and i915 now conflicts with base, and has 2691.334Smrg been turned off. This will cause update build issues like: 2701.334Smrg 2711.334Smrg kdump-ioctl.c:12175:143: error: 'DRM_IOCTL_I915_DESTROY_HEAP' 2721.334Smrg undeclared here (not in a function); 2731.334Smrg did you mean 'DRM_IOCTL_MODE_DESTROY_DUMB'? 2741.334Smrg 2751.334Smrg You'll need to clean usr.bin/ktruss, usr.bin/kdump, and rescue. 2761.334Smrg 2771.331Sriastrad20220921: 2781.331Sriastrad Since the kernel version was bumped to 9.99.100, the bootloader 2791.333Sriastrad must be updated on x86 or EFI boot platforms in order to load 2801.333Sriastrad modules from boot.cfg(5) or interactively at the bootloader 2811.333Sriastrad prompt. 2821.333Sriastrad 2831.333Sriastrad The kernel can still load modules at runtime, with modload(8) 2841.333Sriastrad or modules.conf(5), with no bootloader update. This will not 2851.333Sriastrad affect release branches because it only applies to patch 2861.333Sriastrad numbers >=100. 2871.333Sriastrad 2881.333Sriastrad On x86 (i386 or amd64) with BIOS boot, this requires copying a 2891.333Sriastrad new /usr/mdec/boot to /boot. You can build this in the destdir 2901.333Sriastrad by running `$TOOLDIR/bin/nbmake-$ARCH dependall install' in 2911.333Sriastrad sys/arch/i386/stand. 2921.333Sriastrad 2931.333Sriastrad On platforms with EFI boot (including x86 with EFI boot), this 2941.333Sriastrad requires copying a new /usr/mdec/boot*.efi to the EFI/BOOT/ 2951.333Sriastrad directory on the EFI system partition. The boot*.efi file is: 2961.333Sriastrad 2971.333Sriastrad aarch64 bootaa64.efi 2981.333Sriastrad amd64 bootx64.efi 2991.333Sriastrad arm bootarm.efi (32-bit arm) 3001.333Sriastrad i386 bootx32.efi 3011.333Sriastrad 3021.333Sriastrad You can build this in the destdir by running 3031.333Sriastrad `$TOOLDIR/bin/nbmake-$ARCH dependall install' in 3041.333Sriastrad sys/stand/efiboot/boot*. 3051.331Sriastrad 3061.330Slukem20220821: 3071.330Slukem Support for building extsrc/ has been deprecated. 3081.330Slukem EXTSRCSRCDIR and MKEXTSRC have been deprecated. 3091.330Slukem 3101.329Smrg20220714: 3111.329Smrg Updates to xorg-server and associated drivers may cause builds to 3121.329Smrg fail. Cleaning both DESTDIR and the xorg build tree may be needed. 3131.329Smrg 3141.328Smartin20220628: 3151.328Smartin Changes in the build of src/games/robots require a clean build 3161.328Smartin of that program. 3171.328Smartin 3181.324Smartin20211116: 3191.324Smartin Changes in the xorg build require clean obj dirs for external/mit/xorg 3201.325Smartin (or a full clean/non-update build). 3211.324Smartin 3221.323Snia20211112: 3231.323Snia Device tree sources were updated for evbarm. Some device nodes 3241.323Snia (in particular, ld(4) devices on the ROCKPro64) will be renumbered. 3251.323Snia 3261.322Smartin20211014: 3271.323Snia MKPIE default for aarch64 has changed, a clean build is required. 3281.322Smartin 3291.321Schristos20210917: 3301.321Schristos Changed MNT_ACLS to default to POSIX1e ACLs instead of NFSv4 3311.321Schristos ACLs, to be compatible with FreeBSD. If you are using NFSv4 ACLs 3321.321Schristos and have "acls" in /etc/fstab you'll need to change it to "nfs4acls". 3331.321Schristos 3341.319Smrg20210711: 3351.319Smrg Updated GMP sources may require cleaning in tools/gmp and/or in 3361.319Smrg external/lgpl3/gmp/lib, particularly if GCC itself does not build. 3371.319Smrg 3381.318Smrg20210417: 3391.318Smrg GCC 10 was enabled for several platforms. If builds fail in either 3401.351Sgutterid tools/gcc or external/gpl3/gcc, first try cleaning those objects and 3411.318Smrg removing the $DESTDIR/usr/include/g++ subdirectory. 3421.318Smrg 3431.316Smrg20201016: 3441.316Smrg MIPS kernel modules have been disabled until they work. This will 3451.316Smrg turn up in extra files in the DESTDIR, which should be cleaned. 3461.316Smrg 3471.315Smrg20200925: 3481.315Smrg GNU MPC and MPFR have been updated. At least MPFR needs cleaning 3491.315Smrg in both the tools and external dirs. 3501.315Smrg 3511.314Smrg20200912: 3521.314Smrg GCC 9 has arrived for Arm and x86 platforms, and will be coming 3531.314Smrg for several more, as will binutils 2.34. Clean as required. 3541.314Smrg 3551.313Smrg20200907: 3561.313Smrg GCC 9 is coming, and binutils has been updated for MIPS. This 3571.313Smrg probably requires cleaning the tools/binutils. 3581.313Smrg 3591.311Smrg20200811: 3601.312Smrg GCC updates may require cleaning the objdir. This may occur 3611.312Smrg due to GCC 7.5 update, GCC 8.4 move to gcc.old, or the upcoming 3621.312Smrg GCC 9 upgrade. 3631.311Smrg 3641.309Schristos20200614: 3651.310Schristos blacklist* has been renamed to blocklist*. postinstall(8) 3661.332Sgutterid should handle the migration. 3671.309Schristos 3681.308Schristos20200601: 3691.308Schristos Due to a mistake in LIBISPRIVATE handling, .so libraries were 3701.308Schristos created in the build directories and need cleaning. 3711.308Schristos 3721.307Smrg20200311: 3731.307Smrg GCC 8 ports will need cleaning in src/tools/gcc and 3741.307Smrg src/external/gpl3/gcc due to GCC 8.4 update. 3751.307Smrg 3761.306Schristos20191118: 3771.306Schristos More architectures were switched to gcc8: 3781.306Schristos i386, ia64 powerpc64, sparc, sparc64, arm 3791.306Schristos The same comments as in 20191022 apply. 3801.306Schristos 3811.305Smartin20191112: 3821.305Smartin The LLVM update requires a clean rebuild for all architectures using 3831.305Smartin LLVM during the tools build phase (i386, amd64, aarch64). 3841.305Smartin 3851.304Smartin20191022: 3861.304Smartin Ports amd64 and aarch64 switched to GCC 8.3 by default. 3871.304Smartin In-place ("expert mode", build.sh -E) builds are not supported 3881.304Smartin when going from a GCC 7 userland to GCC 8. Do a regular 3891.304Smartin build to a different DESTDIR (or preferably: build.sh -U) at least 3901.306Schristos once and install sets, or download comp.{tar.xz,tgz} from the 3911.304Smartin daily builds and install that before doing the next in-place build. 3921.304Smartin 3931.303Smrg20191001: 3941.303Smrg GCC 8.3 was imported. Builds of src/tools/gcc may fail if 3951.303Smrg old builds with GCC 7 output now uses GCC 8. Clean this 3961.303Smrg directory, and also clean src/external/gpl3/gcc. 3971.303Smrg 3981.302Sriastrad20190903: 3991.306Schristos Files with names that coincide with existing files' names on 4001.302Sriastrad case-insensitive file systems were inadvertently committed, for 4011.302Sriastrad radeon GPU firmware. We cannot mark these as obsolete for 4021.302Sriastrad postinstall to fix, so if you updated src since 2019-08-26, and 4031.302Sriastrad ran build.sh distribution or ran build.sh release, you must 4041.302Sriastrad manually delete the following files in your DESTDIR (which is 4051.302Sriastrad usually $OBJDIR/destir.$ARCH), or from / if you have installed 4061.302Sriastrad them: 4071.302Sriastrad 4081.302Sriastrad /libdata/firmware/radeon/bonaire_ce.bin 4091.302Sriastrad /libdata/firmware/radeon/bonaire_mc.bin 4101.302Sriastrad /libdata/firmware/radeon/bonaire_me.bin 4111.302Sriastrad /libdata/firmware/radeon/bonaire_mec.bin 4121.302Sriastrad /libdata/firmware/radeon/bonaire_pfp.bin 4131.302Sriastrad /libdata/firmware/radeon/bonaire_rlc.bin 4141.302Sriastrad /libdata/firmware/radeon/bonaire_sdma.bin 4151.302Sriastrad /libdata/firmware/radeon/bonaire_smc.bin 4161.302Sriastrad /libdata/firmware/radeon/bonaire_uvd.bin 4171.302Sriastrad /libdata/firmware/radeon/hainan_ce.bin 4181.302Sriastrad /libdata/firmware/radeon/hainan_mc.bin 4191.302Sriastrad /libdata/firmware/radeon/hainan_me.bin 4201.302Sriastrad /libdata/firmware/radeon/hainan_pfp.bin 4211.302Sriastrad /libdata/firmware/radeon/hainan_rlc.bin 4221.302Sriastrad /libdata/firmware/radeon/hainan_smc.bin 4231.302Sriastrad /libdata/firmware/radeon/hawaii_ce.bin 4241.302Sriastrad /libdata/firmware/radeon/hawaii_mc.bin 4251.302Sriastrad /libdata/firmware/radeon/hawaii_me.bin 4261.302Sriastrad /libdata/firmware/radeon/hawaii_mec.bin 4271.302Sriastrad /libdata/firmware/radeon/hawaii_pfp.bin 4281.302Sriastrad /libdata/firmware/radeon/hawaii_rlc.bin 4291.302Sriastrad /libdata/firmware/radeon/hawaii_sdma.bin 4301.302Sriastrad /libdata/firmware/radeon/hawaii_smc.bin 4311.302Sriastrad /libdata/firmware/radeon/kabini_ce.bin 4321.302Sriastrad /libdata/firmware/radeon/kabini_me.bin 4331.302Sriastrad /libdata/firmware/radeon/kabini_mec.bin 4341.302Sriastrad /libdata/firmware/radeon/kabini_pfp.bin 4351.302Sriastrad /libdata/firmware/radeon/kabini_rlc.bin 4361.302Sriastrad /libdata/firmware/radeon/kabini_sdma.bin 4371.302Sriastrad /libdata/firmware/radeon/kaveri_ce.bin 4381.302Sriastrad /libdata/firmware/radeon/kaveri_me.bin 4391.302Sriastrad /libdata/firmware/radeon/kaveri_mec.bin 4401.302Sriastrad /libdata/firmware/radeon/kaveri_mec2.bin 4411.302Sriastrad /libdata/firmware/radeon/kaveri_pfp.bin 4421.302Sriastrad /libdata/firmware/radeon/kaveri_rlc.bin 4431.302Sriastrad /libdata/firmware/radeon/kaveri_sdma.bin 4441.302Sriastrad /libdata/firmware/radeon/mullins_ce.bin 4451.302Sriastrad /libdata/firmware/radeon/mullins_me.bin 4461.302Sriastrad /libdata/firmware/radeon/mullins_mec.bin 4471.302Sriastrad /libdata/firmware/radeon/mullins_pfp.bin 4481.302Sriastrad /libdata/firmware/radeon/mullins_rlc.bin 4491.302Sriastrad /libdata/firmware/radeon/mullins_sdma.bin 4501.302Sriastrad /libdata/firmware/radeon/oland_ce.bin 4511.302Sriastrad /libdata/firmware/radeon/oland_mc.bin 4521.302Sriastrad /libdata/firmware/radeon/oland_me.bin 4531.302Sriastrad /libdata/firmware/radeon/oland_pfp.bin 4541.302Sriastrad /libdata/firmware/radeon/oland_rlc.bin 4551.302Sriastrad /libdata/firmware/radeon/oland_smc.bin 4561.302Sriastrad /libdata/firmware/radeon/pitcairn_ce.bin 4571.302Sriastrad /libdata/firmware/radeon/pitcairn_mc.bin 4581.302Sriastrad /libdata/firmware/radeon/pitcairn_me.bin 4591.302Sriastrad /libdata/firmware/radeon/pitcairn_pfp.bin 4601.302Sriastrad /libdata/firmware/radeon/pitcairn_rlc.bin 4611.302Sriastrad /libdata/firmware/radeon/pitcairn_smc.bin 4621.302Sriastrad /libdata/firmware/radeon/tahiti_ce.bin 4631.302Sriastrad /libdata/firmware/radeon/tahiti_mc.bin 4641.302Sriastrad /libdata/firmware/radeon/tahiti_me.bin 4651.302Sriastrad /libdata/firmware/radeon/tahiti_pfp.bin 4661.302Sriastrad /libdata/firmware/radeon/tahiti_rlc.bin 4671.302Sriastrad /libdata/firmware/radeon/tahiti_smc.bin 4681.302Sriastrad /libdata/firmware/radeon/verde_ce.bin 4691.302Sriastrad /libdata/firmware/radeon/verde_mc.bin 4701.302Sriastrad /libdata/firmware/radeon/verde_me.bin 4711.302Sriastrad /libdata/firmware/radeon/verde_pfp.bin 4721.302Sriastrad /libdata/firmware/radeon/verde_rlc.bin 4731.302Sriastrad /libdata/firmware/radeon/verde_smc.bin 4741.302Sriastrad 4751.302Sriastrad We will re-import these radeon firmware images another way 4761.302Sriastrad later. 4771.302Sriastrad 4781.301Smartin20190727: 4791.301Smartin The uefi bootloader has gained tftp support and needs a clean 4801.301Smartin build. If you do update builds, manually clean its object 4811.301Smartin directory by something like: 4821.301Smartin cd sys/arch/i386/stand/efiboot && make clean 4831.301Smartin 4841.300Smartin20190723: 4851.344Sgutterid The jemalloc allocator in libc is now built without extended 4861.300Smartin debugging (for performance reasons). In update builds make sure 4871.326Sandvar to rebuild it completely, by removing all affected object files, 4881.300Smartin including compat builds, something like: 4891.300Smartin cd /usr/obj && find . -type d -name jemalloc|xargs rm -rf 4901.300Smartin 4911.299Smrg20190207: 4921.299Smrg GCC 7 switched for many ports. Update builds are likely to fail. 4931.299Smrg 4941.1SabsHints for a more successful build: 4951.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4961.123Sjmc Use build.sh, but do not use its "expert mode": 4971.132Sjmmv This will automatically build the tools in the 4981.123Sjmc correct order, and it will keep the tools and the 4991.123Sjmc new build products from interfering with the running 5001.123Sjmc system. This will allow you to ignore most of the 5011.123Sjmc other advice in this file. 5021.2Smrg Build a new kernel first: 5031.2Smrg This makes sure that any new system calls or features 5041.2Smrg expected by the new userland will be present. This 5051.2Smrg helps to avoid critical errors when upgrading. 5061.1Sabs Use object directories: 5071.1Sabs This helps to keep stale object 5081.1Sabs files from polluting the build if a Makefile "forgets" 5091.1Sabs about one. It also makes it easier to clean up after 5101.1Sabs a build. It's also necessary if you want to use the 5111.1Sabs same source tree for multiple machines. 5121.123Sjmc To use object directories with build.sh: 5131.123Sjmc a) invoke build.sh with the "-M" or "-O" options. 5141.123Sjmc To use object directories without using build.sh: 5151.1Sabs a) cd /usr/src ; make cleandir 5161.2Smrg b) Add "OBJMACHINE=yes" to /etc/mk.conf 5171.2Smrg c) Add "MKOBJDIRS=yes" to /etc/mk.conf 5181.1Sabs d) cd /usr/src ; make build 5191.2Smrg Note that running "make obj" in a directory will create 5201.2Smrg in obj.$MACHINE directory. 5211.1Sabs Build to a DESTDIR: 5221.123Sjmc This helps to keep old installed files (especially libraries) 5231.123Sjmc from interfering with the new build. 5241.123Sjmc To build to a DESTDIR with build.sh, use the "-D" option. 5251.123Sjmc To build to a DESTDIR without using build.sh, set the DESTDIR 5261.123Sjmc environment variable before running make build. It should be 5271.123Sjmc set to the pathname of an initially empty directory. 5281.123Sjmc Problems: if you do not use build.sh, you might need to 5291.123Sjmc update critical utilities without using DESTDIR since 5301.123Sjmc nothing is executed from what is installed in DESTDIR. 5311.123Sjmc (See critical utils, below.) 5321.1Sabs Build often: 5331.1Sabs This keeps critical utilities current enough to not choke 5341.1Sabs on any other part of the source tree that depends on up to 5351.123Sjmc date functionality. If you use build.sh, you should not have 5361.123Sjmc this problem. 5371.241Swiz 5381.1SabsWhat to do if things don't work: 5391.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5401.230StlsWhen things don't work there are usually a few things that commonly 5411.1Sabsshould be done. 5421.1Sabs 1) make includes 5431.1Sabs This should be done automatically by make build. 5441.1Sabs 2) cd share/mk && make install 5451.1Sabs Again, automatically done by make build. 5461.1Sabs 5471.1SabsFailsafe rebuild of a small part of the tree: 5481.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5491.1SabsTo make sure you rebuild something correctly you want to do 5501.1Sabssomething like the following: 5511.1Sabs 1) Make sure the includes and .mk files are up to date. 5521.1Sabs 2) Make sure any program used to build the particular 5531.1Sabs utility is up to date. (yacc, lex, etc...) 5541.1Sabs 3) cd ...path/to/util... 5551.1Sabs make cleandir 5561.1Sabs rm ...all obj directories... 5571.1Sabs make cleandir # yes, again 5581.1Sabs make obj 5591.1Sabs make depend && make 5601.1Sabs 5611.1SabsFailsafe rebuild of the entire tree: 5621.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5631.1SabsIf you really want to make sure the source tree is clean and 5641.2Smrgready for a build try the following. Note that sourcing /etc/mk.conf 5651.2Smrg(a make(1) Makefile) in this manner is not right, and will not work 5661.2Smrgfor anyone who uses any make(1) features in /etc/mk.conf. 5671.1Sabs 5681.1Sabs---cut here--- 5691.1Sabs#!/bin/sh 5701.1Sabs. /etc/mk.conf 5711.1Sabs 5721.58Slukemif [ -z $NETBSDSRCDIR ] ; then 5731.58Slukem NETBSDSRCDIR=/usr/src 5741.1Sabsfi 5751.58Slukemif [ \! -d $NETBSDSRCDIR ] ; then 5761.1Sabs echo Unable to find sources 5771.1Sabs exit 1 5781.1Sabsfi 5791.58Slukemfind $NETBSDSRCDIR -name \*.o -o -name obj.\* -o -name obj -exec rm \{\} \; 5801.1Sabs 5811.1Sabsif [ -z $BSDOBJDIR ] ; then 5821.1Sabs BSDOBJDIR=/usr/obj 5831.1Sabsfi 5841.1Sabsif [ -d $BSDOBJDIR ] ; then 5851.1Sabs rm -rf $BSDOBJDIR 5861.1Sabsfi 5871.1Sabs 5881.58Slukemcd $NETBSDSRCDIR && make cleandir 5891.1Sabs 5901.1Sabs---cut here--- 5911.1Sabs 5921.1SabsCritical utilities: 5931.1Sabs^^^^^^^^^^^^^^^^^^^ 5941.1Sabs usr.bin/make 5951.1Sabs usr.bin/yacc 5961.1Sabs usr.bin/lex 5971.11Slukem usr.bin/xlint 5981.142Sdrochner usr.bin/config 5991.1Sabs 6001.34SsimonbOther problems and possible solutions: 6011.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 6021.1SabsSymptom:Complaints involving a Makefile. 6031.17SerhFix: Rebuild usr.bin/make: 6041.17Serh cd usr.bin/make && make && make install 6051.111Ssimonb Or, a failsafe method if that doesn't work: 6061.348Srillig cd usr.bin/make && cc -DMAKE_NATIVE *.c -I. -o make \ 6071.348Srillig && install make /usr/bin 6081.17Serh 6091.1SabsFix: Make sure .mk files are up to date. 6101.1Sabs cd share/mk && make install 6111.2Smrg 6121.2SmrgSymptom:Kernel `config' fails to configure any kernel, including GENERIC. 6131.142SdrochnerFix: Rebuild usr.bin/config 6141.1Sabs 6151.4SitojunSymptom:Obsolete intermediate files are used during compilation 6161.4SitojunFix: Try the following sequence of commands in the directory in question. 6171.4Sitojun make cleandir; rm `make print-objdir`; make cleandir; make obj 6181.4Sitojun (If you built the tree without "make obj" in the past, obsolete files 6191.4Sitojun may remain. The command tries to clean everything up) 6201.5Swiz 6211.207SmbalmerSymptom:.../sysinst/run.c:xx: warning: initialization from incompatible 6221.207Smbalmer pointer type 6231.5SwizFix: Rebuild and install usr.bin/menuc 6241.12Sitojun 6251.12SitojunSymptom:mklocale not found during build in share/locale/ctype 6261.12SitojunFix: Build and install usr.bin/mklocale 6271.13Sdogcow 6281.86SkleinkSymptom:undefined reference to `__assert13' or `__unsetenv13' 6291.13SdogcowFix: Rebuild and install lib/libc 6301.13Sdogcow 6311.142SdrochnerSymptom:usr.bin/config fails to build. 6321.19ScgdFix: Try building with -DMAKE_BOOTSTRAP added to CFLAGS in Makefile. 6331.13Sdogcow 6341.19ScgdSymptom:undefined reference to `getprogname' or `setprogname' 6351.19ScgdFix: Rebuild and install lib/libc 6361.24Sabs 6371.223SjoergSymptom:Update build fails in src/tools/gcc complaining that a variable 6381.223Sjoerg (e.g. CPPFLAGS) has changed since the previous run. 6391.223SjoergFix: Run "nbmake-${ARCH} clean" in src/tools/gcc or do a clean build. 6401.257Sapb 6411.257SapbSymptom:cvs [update aborted]: cannot open directory /cvsroot/src/...: 6421.257Sapb No such file or directory. 6431.257SapbCause: If a directory is created by mistake, then it is sometimes 6441.257Sapb deleted from the CVS repository using administrative commands 6451.257Sapb that bypass the normal cvs access controls. If your cvs working tree 6461.257Sapb contains references to a directory that has been deleted on the 6471.257Sapb server in this way, then "cvs update" reports this error. 6481.257SapbFix: Recursively delete the affected directory from your working tree 6491.257Sapb and try the update again. 650