UPDATING revision 1.378
11.378Spgoyette$NetBSD: UPDATING,v 1.378 2025/04/27 22:03:22 pgoyette 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.378Spgoyette20250427: 231.378Spgoyette The KERNEL_DIR option to build.sh is now functional. Set it 241.378Spgoyette with ``-V KERNEL_DIR=yes'' on yuor build.sh command. 251.378Spgoyette With this, you can now colocate kernel and associated modules 261.378Spgoyette in /netbsd/{kernel,kernel.dbg,modules} instead of having the 271.378Spgoyette kernel in / but modules in /stand. 281.378Spgoyette 291.378Spgoyette Note that you'll need new bootstrap code to use this feature. 301.378Spgoyette 311.378Spgoyette This compleetes work begun many years ago by christos@ :-) 321.378Spgoyette 331.377Sriastrad20250413: 341.377Sriastrad A change to bsd.lib.mk requires a clean build of all libraries. 351.377Sriastrad 361.375Schristos20250131: 371.375Schristos The switch to the new jemalloc requires cleaning in libc. 381.376Spalle 391.367Sriastrad20241122: 401.373Sriastrad Changes to various libraries' build options require cleaning 411.373Sriastrad their objdirs in update builds: 421.368Sriastrad 431.372Sriastrad cd external/bsd/file/lib && $TOOLDIR/bin/nbmake-$ARCH clean 441.370Sriastrad cd external/bsd/libarchive/lib && $TOOLDIR/bin/nbmake-$ARCH clean 451.372Sriastrad cd external/public-domain/xz/lib && $TOOLDIR/bin/nbmake-$ARCH clean 461.368Sriastrad 471.374Sriastrad Also, for architectures with MKCOMPAT, it is necessary to clean 481.374Sriastrad the compat objdirs too. The easiest way is: 491.374Sriastrad 501.374Sriastrad rm -rf OBJDIR/compat/*/*/external/bsd/file/lib 511.374Sriastrad rm -rf OBJDIR/compat/*/*/external/bsd/libarchive/lib 521.374Sriastrad rm -rf OBJDIR/compat/*/*/external/public-domain/xz/lib 531.374Sriastrad 541.367Sriastrad Changes to bsd.lib.mk to improve detecting differences in 551.367Sriastrad shared library symbol exports may cause some .actsym files in 561.367Sriastrad the objdir to become stale in update builds. 571.367Sriastrad 581.367Sriastrad To work around this, delete all files matching `*.actsym' in 591.367Sriastrad the objdir. For example: 601.367Sriastrad 611.367Sriastrad find OBJDIR -name '*.actsym' -type f -print0 | xargs -0 rm 621.367Sriastrad 631.363Smartin20241104: 641.363Smartin Changes around the integration of the zstd compression 651.363Smartin library may require manual deletion of some object directories 661.366Sriastrad if you update from a build from a few days ago: 671.366Sriastrad rm -rf DESTDIR/usr/lib/*/libarchive* 681.366Sriastrad rm -rf DESTDIR/usr/lib/*/libmagic* 691.366Sriastrad rm -rf DESTDIR/usr/lib/*/libzstd* 701.366Sriastrad rm -rf DESTDIR/usr/lib/libarchive* 711.366Sriastrad rm -rf DESTDIR/usr/lib/libmagic* 721.366Sriastrad rm -rf DESTDIR/usr/lib/libzstd* 731.366Sriastrad rm -rf OBJDIR/compat/*/*/external/bsd/file/ 741.366Sriastrad rm -rf OBJDIR/compat/*/*/external/bsd/libarchive/ 751.366Sriastrad rm -rf OBJDIR/compat/*/*/external/bsd/zstd/ 761.366Sriastrad rm -rf OBJDIR/external/bsd/file/ 771.366Sriastrad rm -rf OBJDIR/external/bsd/libarchive/ 781.366Sriastrad rm -rf OBJDIR/external/bsd/zstd/ 791.366Sriastrad rm -rf OBJDIR/external/gpl3/gcc/ 801.366Sriastrad rm -rf OBJDIR/tools/gcc/ 811.363Smartin 821.360Swiz20240926: 831.360Swiz Building -current when running on amd64 from about 20240924 841.360Swiz to about 20240926 will not work due to a "malloc_np.h" 851.360Swiz error. Please downgrade to a version from 20240924 or older, 861.360Swiz or upgrade to a newer version e.g. using a binary release from 871.360Swiz the NetBSD build servers. 881.360Swiz 891.358Smartin20240923: 901.358Smartin Update builds will require cleaning the object directories for 911.359Smartin jemalloc (like: "rm -rf $OBJ/external/bsd/jemalloc*") and the 921.359Smartin libc dependency files (like: "rm $OBJ/lib/libc/jemalloc.*"). 931.359Smartin On architectures with COMPAT libs, those also have to be cleaned, 941.359Smartin e.g. on sparc64: "rm -rf $OBJ/compat/sparc64/sparc/external/bsd/jemalloc*" 951.359Smartin and "rm $OBJ/compat/sparc64/sparc/lib/libc/jemalloc.*". 961.358Smartin 971.357Schristos20240817: 981.357Schristos Update builds will require cleaning in src/external/historical/nawk/bin 991.357Schristos in order to remove the awk binary since now there is a subdirectory 1001.357Schristos called awk. 1011.358Smartin 1021.355Smartin20240812: 1031.355Smartin Update builds will require removing the tools objdir for gdb 1041.355Smartin if building with MKCROSSGDB=yes. All architectures use gdb.old 1051.355Smartin now. 1061.356Sriastrad 1071.354Smartin20240630: 1081.353Smartin Update builds will require removing the tools objdir for binutils 1091.353Smartin (as most architectures should use binutils.old now). 1101.353Smartin 1111.352Skre20240610: 1121.352Skre Update builds are likely to require removing the objdir for 1131.352Skre distrib/<arch>/cdroms - or at least references to libarchive 1141.352Skre from within there after the recent libarchive update. 1151.352Skre 1161.350Sriastrad20240504: 1171.350Sriastrad Update builds on x86 require making the `cleandir' target in 1181.350Sriastrad lib/libm, or deleting the objdir for lib/libm. 1191.350Sriastrad 1201.349Smaya20240423: 1211.349Smaya Update builds with x11 may fail after switching to Mesa 21. 1221.349Smaya 1231.346Sriastrad20240410: 1241.346Sriastrad Update builds may require manually deleting 1251.346Sriastrad $DESTDIR/var/run/named (and, potentially, 1261.346Sriastrad $DESTDIR/var/run/lwresd) in order to avoid checkflist failure. 1271.346Sriastrad 1281.347Snia20240409: 1291.347Snia 32-bit compatibility libraries were moved into the base32 1301.347Snia and debug32 sets. HTML man pages were moved into the manhtml set. 1311.347Snia 1321.343Sriastrad20230828: 1331.343Sriastrad If: 1341.343Sriastrad - you updated to current and ran postinstall between 20230826 1351.343Sriastrad and 20230828 inclusive, and 1361.343Sriastrad - you are not using anything outside the base system to 1371.343Sriastrad populate /etc/openssl/certs (e.g., manually adding 1381.343Sriastrad certificates or using ca-certificates or mozilla-rootcerts or 1391.343Sriastrad mozilla-rootcerts-openssl from pkgsrc), 1401.343Sriastrad delete /etc/openssl/certs and rerun postinstall or just 1411.343Sriastrad `certctl rehash'. 1421.343Sriastrad 1431.343Sriastrad Otherwise, certctl(8) will think someone else has left 1441.343Sriastrad /etc/openssl/certs in the way and will avoid clobbering it on 1451.343Sriastrad upgrade from older NetBSD. 1461.343Sriastrad 1471.341Slukem20230718: 1481.341Slukem build.sh will use mk.conf in the same directory as build.sh instead 1491.341Slukem of /etc/mk.conf, unless MAKECONF is already defined in the environment. 1501.341Slukem 1511.342Smartin20230714: 1521.342Smartin Import of gcc 10.5 requires a clean build of at least tools/gcc 1531.342Smartin and external/gpl3/gcc* object directories. An update build 1541.342Smartin without cleaning will result in obscure failures in rare corner 1551.342Smartin cases. 1561.342Smartin 1571.339Smartin20230604: 1581.339Smartin Building native kernels with the installed make(1) instead of 1591.339Smartin the $TOOLDIR/bin/nbmake-${arch} wrapper will fail if userland 1601.339Smartin has not been updated. Note that this is an unsupported build 1611.339Smartin configuration (but usually works if userland is -current enough). 1621.338Slukem 1631.338Slukem20230523: 1641.338Slukem ctfmerge was fixed as macOS host tool. This may require a clean tools 1651.338Slukem rebuild to detect the update to tools/compat/configure. 1661.338Slukem 1671.340Smartin20230515: 1681.340Smartin New openssl build requires removal of the crypto/external/bsd/openssl 1691.345Sandvar and tests/crypto/libcrypto subdirectories in the ${OBJDIR} hierarchy. 1701.340Smartin Otherwise test results may be wrong due to wrong "golden" output 1711.340Smartin files being installed. 1721.340Smartin 1731.337Smrg20230322: 1741.337Smrg Fixes for moved /lib/libisns* mean that builds will complain about 1751.337Smrg ./usr/lib/libisns* being missing until src/lib/libisns is forced 1761.337Smrg to (re)install the files, including the symlinks. The simplest 1771.337Smrg way is to clean this subdir before building. 1781.337Smrg 1791.336Smartin20230112: 1801.336Smartin New binutils require an updated ld.elf_so. If you are doing 1811.336Smartin (unsupported) in-place self builds (with the -E flag to build.sh), 1821.336Smartin make sure to have installed latest ld.elf_so before you rebuild 1831.336Smartin userland. 1841.336Smartin 1851.335Schs20221116: 1861.335Schs The addition to NetBSD's version of UFS2 of support for extended 1871.335Schs attributes broke backward compatibility with previous releases 1881.335Schs of NetBSD, so UFS2 has been restored to being compatible with 1891.335Schs previous NetBSD releases by disabling extended attributes. 1901.335Schs (Note that ACLs are implemented as extended attributes, so 1911.335Schs this changes disables ACLs as well.) 1921.335Schs 1931.335Schs Support for UFS2 with extended attributes is now available in a new 1941.335Schs UFS variant called UFS2ea. If you have created extended attributes 1951.335Schs in an original UFS2 file system then "fsck -p" will now fail due to 1961.335Schs the unexpected presence of extended attributes and "fsck -y" will 1971.335Schs remove all extended attributes. If you wish to preserve extended 1981.335Schs attributes rather than delete them, there is a utility to convert 1991.335Schs a UFS2 file system to UFS2ea and leave extended attributes in place, 2001.335Schs but this should be used with caution since it will preserve any 2011.335Schs extended attributes that have been corrupted by the backward 2021.335Schs incompatibility too. 2031.335Schs 2041.335Schs If you wish to use a UFS2ea file system as your root file system, 2051.335Schs then you will need to update your boot loader to a version that 2061.335Schs supports UFS2ea. 2071.335Schs 2081.335Schs For more information, see: 2091.335Schs https://wiki.netbsd.org/features/UFS2ea 2101.335Schs 2111.334Smrg20221111: 2121.334Smrg The new libdrm import worsened the conflict issues for the 2131.334Smrg kdump/ktruss ioctl, and i915 now conflicts with base, and has 2141.334Smrg been turned off. This will cause update build issues like: 2151.334Smrg 2161.334Smrg kdump-ioctl.c:12175:143: error: 'DRM_IOCTL_I915_DESTROY_HEAP' 2171.334Smrg undeclared here (not in a function); 2181.334Smrg did you mean 'DRM_IOCTL_MODE_DESTROY_DUMB'? 2191.334Smrg 2201.334Smrg You'll need to clean usr.bin/ktruss, usr.bin/kdump, and rescue. 2211.334Smrg 2221.331Sriastrad20220921: 2231.331Sriastrad Since the kernel version was bumped to 9.99.100, the bootloader 2241.333Sriastrad must be updated on x86 or EFI boot platforms in order to load 2251.333Sriastrad modules from boot.cfg(5) or interactively at the bootloader 2261.333Sriastrad prompt. 2271.333Sriastrad 2281.333Sriastrad The kernel can still load modules at runtime, with modload(8) 2291.333Sriastrad or modules.conf(5), with no bootloader update. This will not 2301.333Sriastrad affect release branches because it only applies to patch 2311.333Sriastrad numbers >=100. 2321.333Sriastrad 2331.333Sriastrad On x86 (i386 or amd64) with BIOS boot, this requires copying a 2341.333Sriastrad new /usr/mdec/boot to /boot. You can build this in the destdir 2351.333Sriastrad by running `$TOOLDIR/bin/nbmake-$ARCH dependall install' in 2361.333Sriastrad sys/arch/i386/stand. 2371.333Sriastrad 2381.333Sriastrad On platforms with EFI boot (including x86 with EFI boot), this 2391.333Sriastrad requires copying a new /usr/mdec/boot*.efi to the EFI/BOOT/ 2401.333Sriastrad directory on the EFI system partition. The boot*.efi file is: 2411.333Sriastrad 2421.333Sriastrad aarch64 bootaa64.efi 2431.333Sriastrad amd64 bootx64.efi 2441.333Sriastrad arm bootarm.efi (32-bit arm) 2451.333Sriastrad i386 bootx32.efi 2461.333Sriastrad 2471.333Sriastrad You can build this in the destdir by running 2481.333Sriastrad `$TOOLDIR/bin/nbmake-$ARCH dependall install' in 2491.333Sriastrad sys/stand/efiboot/boot*. 2501.331Sriastrad 2511.330Slukem20220821: 2521.330Slukem Support for building extsrc/ has been deprecated. 2531.330Slukem EXTSRCSRCDIR and MKEXTSRC have been deprecated. 2541.330Slukem 2551.329Smrg20220714: 2561.329Smrg Updates to xorg-server and associated drivers may cause builds to 2571.329Smrg fail. Cleaning both DESTDIR and the xorg build tree may be needed. 2581.329Smrg 2591.328Smartin20220628: 2601.328Smartin Changes in the build of src/games/robots require a clean build 2611.328Smartin of that program. 2621.328Smartin 2631.324Smartin20211116: 2641.324Smartin Changes in the xorg build require clean obj dirs for external/mit/xorg 2651.325Smartin (or a full clean/non-update build). 2661.324Smartin 2671.323Snia20211112: 2681.323Snia Device tree sources were updated for evbarm. Some device nodes 2691.323Snia (in particular, ld(4) devices on the ROCKPro64) will be renumbered. 2701.323Snia 2711.322Smartin20211014: 2721.323Snia MKPIE default for aarch64 has changed, a clean build is required. 2731.322Smartin 2741.321Schristos20210917: 2751.321Schristos Changed MNT_ACLS to default to POSIX1e ACLs instead of NFSv4 2761.321Schristos ACLs, to be compatible with FreeBSD. If you are using NFSv4 ACLs 2771.321Schristos and have "acls" in /etc/fstab you'll need to change it to "nfs4acls". 2781.321Schristos 2791.319Smrg20210711: 2801.319Smrg Updated GMP sources may require cleaning in tools/gmp and/or in 2811.319Smrg external/lgpl3/gmp/lib, particularly if GCC itself does not build. 2821.319Smrg 2831.318Smrg20210417: 2841.318Smrg GCC 10 was enabled for several platforms. If builds fail in either 2851.351Sgutterid tools/gcc or external/gpl3/gcc, first try cleaning those objects and 2861.318Smrg removing the $DESTDIR/usr/include/g++ subdirectory. 2871.318Smrg 2881.316Smrg20201016: 2891.316Smrg MIPS kernel modules have been disabled until they work. This will 2901.316Smrg turn up in extra files in the DESTDIR, which should be cleaned. 2911.316Smrg 2921.315Smrg20200925: 2931.315Smrg GNU MPC and MPFR have been updated. At least MPFR needs cleaning 2941.315Smrg in both the tools and external dirs. 2951.315Smrg 2961.314Smrg20200912: 2971.314Smrg GCC 9 has arrived for Arm and x86 platforms, and will be coming 2981.314Smrg for several more, as will binutils 2.34. Clean as required. 2991.314Smrg 3001.313Smrg20200907: 3011.313Smrg GCC 9 is coming, and binutils has been updated for MIPS. This 3021.313Smrg probably requires cleaning the tools/binutils. 3031.313Smrg 3041.311Smrg20200811: 3051.312Smrg GCC updates may require cleaning the objdir. This may occur 3061.312Smrg due to GCC 7.5 update, GCC 8.4 move to gcc.old, or the upcoming 3071.312Smrg GCC 9 upgrade. 3081.311Smrg 3091.309Schristos20200614: 3101.310Schristos blacklist* has been renamed to blocklist*. postinstall(8) 3111.332Sgutterid should handle the migration. 3121.309Schristos 3131.308Schristos20200601: 3141.308Schristos Due to a mistake in LIBISPRIVATE handling, .so libraries were 3151.308Schristos created in the build directories and need cleaning. 3161.308Schristos 3171.307Smrg20200311: 3181.307Smrg GCC 8 ports will need cleaning in src/tools/gcc and 3191.307Smrg src/external/gpl3/gcc due to GCC 8.4 update. 3201.307Smrg 3211.306Schristos20191118: 3221.306Schristos More architectures were switched to gcc8: 3231.306Schristos i386, ia64 powerpc64, sparc, sparc64, arm 3241.306Schristos The same comments as in 20191022 apply. 3251.306Schristos 3261.305Smartin20191112: 3271.305Smartin The LLVM update requires a clean rebuild for all architectures using 3281.305Smartin LLVM during the tools build phase (i386, amd64, aarch64). 3291.305Smartin 3301.304Smartin20191022: 3311.304Smartin Ports amd64 and aarch64 switched to GCC 8.3 by default. 3321.304Smartin In-place ("expert mode", build.sh -E) builds are not supported 3331.304Smartin when going from a GCC 7 userland to GCC 8. Do a regular 3341.304Smartin build to a different DESTDIR (or preferably: build.sh -U) at least 3351.306Schristos once and install sets, or download comp.{tar.xz,tgz} from the 3361.304Smartin daily builds and install that before doing the next in-place build. 3371.304Smartin 3381.303Smrg20191001: 3391.303Smrg GCC 8.3 was imported. Builds of src/tools/gcc may fail if 3401.303Smrg old builds with GCC 7 output now uses GCC 8. Clean this 3411.303Smrg directory, and also clean src/external/gpl3/gcc. 3421.303Smrg 3431.302Sriastrad20190903: 3441.306Schristos Files with names that coincide with existing files' names on 3451.302Sriastrad case-insensitive file systems were inadvertently committed, for 3461.302Sriastrad radeon GPU firmware. We cannot mark these as obsolete for 3471.302Sriastrad postinstall to fix, so if you updated src since 2019-08-26, and 3481.302Sriastrad ran build.sh distribution or ran build.sh release, you must 3491.302Sriastrad manually delete the following files in your DESTDIR (which is 3501.302Sriastrad usually $OBJDIR/destir.$ARCH), or from / if you have installed 3511.302Sriastrad them: 3521.302Sriastrad 3531.302Sriastrad /libdata/firmware/radeon/bonaire_ce.bin 3541.302Sriastrad /libdata/firmware/radeon/bonaire_mc.bin 3551.302Sriastrad /libdata/firmware/radeon/bonaire_me.bin 3561.302Sriastrad /libdata/firmware/radeon/bonaire_mec.bin 3571.302Sriastrad /libdata/firmware/radeon/bonaire_pfp.bin 3581.302Sriastrad /libdata/firmware/radeon/bonaire_rlc.bin 3591.302Sriastrad /libdata/firmware/radeon/bonaire_sdma.bin 3601.302Sriastrad /libdata/firmware/radeon/bonaire_smc.bin 3611.302Sriastrad /libdata/firmware/radeon/bonaire_uvd.bin 3621.302Sriastrad /libdata/firmware/radeon/hainan_ce.bin 3631.302Sriastrad /libdata/firmware/radeon/hainan_mc.bin 3641.302Sriastrad /libdata/firmware/radeon/hainan_me.bin 3651.302Sriastrad /libdata/firmware/radeon/hainan_pfp.bin 3661.302Sriastrad /libdata/firmware/radeon/hainan_rlc.bin 3671.302Sriastrad /libdata/firmware/radeon/hainan_smc.bin 3681.302Sriastrad /libdata/firmware/radeon/hawaii_ce.bin 3691.302Sriastrad /libdata/firmware/radeon/hawaii_mc.bin 3701.302Sriastrad /libdata/firmware/radeon/hawaii_me.bin 3711.302Sriastrad /libdata/firmware/radeon/hawaii_mec.bin 3721.302Sriastrad /libdata/firmware/radeon/hawaii_pfp.bin 3731.302Sriastrad /libdata/firmware/radeon/hawaii_rlc.bin 3741.302Sriastrad /libdata/firmware/radeon/hawaii_sdma.bin 3751.302Sriastrad /libdata/firmware/radeon/hawaii_smc.bin 3761.302Sriastrad /libdata/firmware/radeon/kabini_ce.bin 3771.302Sriastrad /libdata/firmware/radeon/kabini_me.bin 3781.302Sriastrad /libdata/firmware/radeon/kabini_mec.bin 3791.302Sriastrad /libdata/firmware/radeon/kabini_pfp.bin 3801.302Sriastrad /libdata/firmware/radeon/kabini_rlc.bin 3811.302Sriastrad /libdata/firmware/radeon/kabini_sdma.bin 3821.302Sriastrad /libdata/firmware/radeon/kaveri_ce.bin 3831.302Sriastrad /libdata/firmware/radeon/kaveri_me.bin 3841.302Sriastrad /libdata/firmware/radeon/kaveri_mec.bin 3851.302Sriastrad /libdata/firmware/radeon/kaveri_mec2.bin 3861.302Sriastrad /libdata/firmware/radeon/kaveri_pfp.bin 3871.302Sriastrad /libdata/firmware/radeon/kaveri_rlc.bin 3881.302Sriastrad /libdata/firmware/radeon/kaveri_sdma.bin 3891.302Sriastrad /libdata/firmware/radeon/mullins_ce.bin 3901.302Sriastrad /libdata/firmware/radeon/mullins_me.bin 3911.302Sriastrad /libdata/firmware/radeon/mullins_mec.bin 3921.302Sriastrad /libdata/firmware/radeon/mullins_pfp.bin 3931.302Sriastrad /libdata/firmware/radeon/mullins_rlc.bin 3941.302Sriastrad /libdata/firmware/radeon/mullins_sdma.bin 3951.302Sriastrad /libdata/firmware/radeon/oland_ce.bin 3961.302Sriastrad /libdata/firmware/radeon/oland_mc.bin 3971.302Sriastrad /libdata/firmware/radeon/oland_me.bin 3981.302Sriastrad /libdata/firmware/radeon/oland_pfp.bin 3991.302Sriastrad /libdata/firmware/radeon/oland_rlc.bin 4001.302Sriastrad /libdata/firmware/radeon/oland_smc.bin 4011.302Sriastrad /libdata/firmware/radeon/pitcairn_ce.bin 4021.302Sriastrad /libdata/firmware/radeon/pitcairn_mc.bin 4031.302Sriastrad /libdata/firmware/radeon/pitcairn_me.bin 4041.302Sriastrad /libdata/firmware/radeon/pitcairn_pfp.bin 4051.302Sriastrad /libdata/firmware/radeon/pitcairn_rlc.bin 4061.302Sriastrad /libdata/firmware/radeon/pitcairn_smc.bin 4071.302Sriastrad /libdata/firmware/radeon/tahiti_ce.bin 4081.302Sriastrad /libdata/firmware/radeon/tahiti_mc.bin 4091.302Sriastrad /libdata/firmware/radeon/tahiti_me.bin 4101.302Sriastrad /libdata/firmware/radeon/tahiti_pfp.bin 4111.302Sriastrad /libdata/firmware/radeon/tahiti_rlc.bin 4121.302Sriastrad /libdata/firmware/radeon/tahiti_smc.bin 4131.302Sriastrad /libdata/firmware/radeon/verde_ce.bin 4141.302Sriastrad /libdata/firmware/radeon/verde_mc.bin 4151.302Sriastrad /libdata/firmware/radeon/verde_me.bin 4161.302Sriastrad /libdata/firmware/radeon/verde_pfp.bin 4171.302Sriastrad /libdata/firmware/radeon/verde_rlc.bin 4181.302Sriastrad /libdata/firmware/radeon/verde_smc.bin 4191.302Sriastrad 4201.302Sriastrad We will re-import these radeon firmware images another way 4211.302Sriastrad later. 4221.302Sriastrad 4231.301Smartin20190727: 4241.301Smartin The uefi bootloader has gained tftp support and needs a clean 4251.301Smartin build. If you do update builds, manually clean its object 4261.301Smartin directory by something like: 4271.301Smartin cd sys/arch/i386/stand/efiboot && make clean 4281.301Smartin 4291.300Smartin20190723: 4301.344Sgutterid The jemalloc allocator in libc is now built without extended 4311.300Smartin debugging (for performance reasons). In update builds make sure 4321.326Sandvar to rebuild it completely, by removing all affected object files, 4331.300Smartin including compat builds, something like: 4341.300Smartin cd /usr/obj && find . -type d -name jemalloc|xargs rm -rf 4351.300Smartin 4361.299Smrg20190207: 4371.299Smrg GCC 7 switched for many ports. Update builds are likely to fail. 4381.299Smrg 4391.1SabsHints for a more successful build: 4401.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4411.123Sjmc Use build.sh, but do not use its "expert mode": 4421.132Sjmmv This will automatically build the tools in the 4431.123Sjmc correct order, and it will keep the tools and the 4441.123Sjmc new build products from interfering with the running 4451.123Sjmc system. This will allow you to ignore most of the 4461.123Sjmc other advice in this file. 4471.2Smrg Build a new kernel first: 4481.2Smrg This makes sure that any new system calls or features 4491.2Smrg expected by the new userland will be present. This 4501.2Smrg helps to avoid critical errors when upgrading. 4511.1Sabs Use object directories: 4521.1Sabs This helps to keep stale object 4531.1Sabs files from polluting the build if a Makefile "forgets" 4541.1Sabs about one. It also makes it easier to clean up after 4551.1Sabs a build. It's also necessary if you want to use the 4561.1Sabs same source tree for multiple machines. 4571.123Sjmc To use object directories with build.sh: 4581.123Sjmc a) invoke build.sh with the "-M" or "-O" options. 4591.123Sjmc To use object directories without using build.sh: 4601.1Sabs a) cd /usr/src ; make cleandir 4611.2Smrg b) Add "OBJMACHINE=yes" to /etc/mk.conf 4621.2Smrg c) Add "MKOBJDIRS=yes" to /etc/mk.conf 4631.1Sabs d) cd /usr/src ; make build 4641.2Smrg Note that running "make obj" in a directory will create 4651.2Smrg in obj.$MACHINE directory. 4661.1Sabs Build to a DESTDIR: 4671.123Sjmc This helps to keep old installed files (especially libraries) 4681.123Sjmc from interfering with the new build. 4691.123Sjmc To build to a DESTDIR with build.sh, use the "-D" option. 4701.123Sjmc To build to a DESTDIR without using build.sh, set the DESTDIR 4711.123Sjmc environment variable before running make build. It should be 4721.123Sjmc set to the pathname of an initially empty directory. 4731.123Sjmc Problems: if you do not use build.sh, you might need to 4741.123Sjmc update critical utilities without using DESTDIR since 4751.123Sjmc nothing is executed from what is installed in DESTDIR. 4761.123Sjmc (See critical utils, below.) 4771.1Sabs Build often: 4781.1Sabs This keeps critical utilities current enough to not choke 4791.1Sabs on any other part of the source tree that depends on up to 4801.123Sjmc date functionality. If you use build.sh, you should not have 4811.123Sjmc this problem. 4821.241Swiz 4831.1SabsWhat to do if things don't work: 4841.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4851.230StlsWhen things don't work there are usually a few things that commonly 4861.1Sabsshould be done. 4871.1Sabs 1) make includes 4881.1Sabs This should be done automatically by make build. 4891.1Sabs 2) cd share/mk && make install 4901.1Sabs Again, automatically done by make build. 4911.1Sabs 4921.1SabsFailsafe rebuild of a small part of the tree: 4931.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4941.1SabsTo make sure you rebuild something correctly you want to do 4951.1Sabssomething like the following: 4961.1Sabs 1) Make sure the includes and .mk files are up to date. 4971.1Sabs 2) Make sure any program used to build the particular 4981.1Sabs utility is up to date. (yacc, lex, etc...) 4991.1Sabs 3) cd ...path/to/util... 5001.1Sabs make cleandir 5011.1Sabs rm ...all obj directories... 5021.1Sabs make cleandir # yes, again 5031.1Sabs make obj 5041.1Sabs make depend && make 5051.1Sabs 5061.1SabsFailsafe rebuild of the entire tree: 5071.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5081.1SabsIf you really want to make sure the source tree is clean and 5091.2Smrgready for a build try the following. Note that sourcing /etc/mk.conf 5101.2Smrg(a make(1) Makefile) in this manner is not right, and will not work 5111.2Smrgfor anyone who uses any make(1) features in /etc/mk.conf. 5121.1Sabs 5131.1Sabs---cut here--- 5141.1Sabs#!/bin/sh 5151.1Sabs. /etc/mk.conf 5161.1Sabs 5171.58Slukemif [ -z $NETBSDSRCDIR ] ; then 5181.58Slukem NETBSDSRCDIR=/usr/src 5191.1Sabsfi 5201.58Slukemif [ \! -d $NETBSDSRCDIR ] ; then 5211.1Sabs echo Unable to find sources 5221.1Sabs exit 1 5231.1Sabsfi 5241.58Slukemfind $NETBSDSRCDIR -name \*.o -o -name obj.\* -o -name obj -exec rm \{\} \; 5251.1Sabs 5261.1Sabsif [ -z $BSDOBJDIR ] ; then 5271.1Sabs BSDOBJDIR=/usr/obj 5281.1Sabsfi 5291.1Sabsif [ -d $BSDOBJDIR ] ; then 5301.1Sabs rm -rf $BSDOBJDIR 5311.1Sabsfi 5321.1Sabs 5331.58Slukemcd $NETBSDSRCDIR && make cleandir 5341.1Sabs 5351.1Sabs---cut here--- 5361.1Sabs 5371.1SabsCritical utilities: 5381.1Sabs^^^^^^^^^^^^^^^^^^^ 5391.1Sabs usr.bin/make 5401.1Sabs usr.bin/yacc 5411.1Sabs usr.bin/lex 5421.11Slukem usr.bin/xlint 5431.142Sdrochner usr.bin/config 5441.1Sabs 5451.34SsimonbOther problems and possible solutions: 5461.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5471.1SabsSymptom:Complaints involving a Makefile. 5481.17SerhFix: Rebuild usr.bin/make: 5491.17Serh cd usr.bin/make && make && make install 5501.111Ssimonb Or, a failsafe method if that doesn't work: 5511.348Srillig cd usr.bin/make && cc -DMAKE_NATIVE *.c -I. -o make \ 5521.348Srillig && install make /usr/bin 5531.17Serh 5541.1SabsFix: Make sure .mk files are up to date. 5551.1Sabs cd share/mk && make install 5561.2Smrg 5571.2SmrgSymptom:Kernel `config' fails to configure any kernel, including GENERIC. 5581.142SdrochnerFix: Rebuild usr.bin/config 5591.1Sabs 5601.4SitojunSymptom:Obsolete intermediate files are used during compilation 5611.4SitojunFix: Try the following sequence of commands in the directory in question. 5621.4Sitojun make cleandir; rm `make print-objdir`; make cleandir; make obj 5631.4Sitojun (If you built the tree without "make obj" in the past, obsolete files 5641.4Sitojun may remain. The command tries to clean everything up) 5651.5Swiz 5661.207SmbalmerSymptom:.../sysinst/run.c:xx: warning: initialization from incompatible 5671.207Smbalmer pointer type 5681.5SwizFix: Rebuild and install usr.bin/menuc 5691.12Sitojun 5701.12SitojunSymptom:mklocale not found during build in share/locale/ctype 5711.12SitojunFix: Build and install usr.bin/mklocale 5721.13Sdogcow 5731.86SkleinkSymptom:undefined reference to `__assert13' or `__unsetenv13' 5741.13SdogcowFix: Rebuild and install lib/libc 5751.13Sdogcow 5761.142SdrochnerSymptom:usr.bin/config fails to build. 5771.19ScgdFix: Try building with -DMAKE_BOOTSTRAP added to CFLAGS in Makefile. 5781.13Sdogcow 5791.19ScgdSymptom:undefined reference to `getprogname' or `setprogname' 5801.19ScgdFix: Rebuild and install lib/libc 5811.24Sabs 5821.223SjoergSymptom:Update build fails in src/tools/gcc complaining that a variable 5831.223Sjoerg (e.g. CPPFLAGS) has changed since the previous run. 5841.223SjoergFix: Run "nbmake-${ARCH} clean" in src/tools/gcc or do a clean build. 5851.257Sapb 5861.257SapbSymptom:cvs [update aborted]: cannot open directory /cvsroot/src/...: 5871.257Sapb No such file or directory. 5881.257SapbCause: If a directory is created by mistake, then it is sometimes 5891.257Sapb deleted from the CVS repository using administrative commands 5901.257Sapb that bypass the normal cvs access controls. If your cvs working tree 5911.257Sapb contains references to a directory that has been deleted on the 5921.257Sapb server in this way, then "cvs update" reports this error. 5931.257SapbFix: Recursively delete the affected directory from your working tree 5941.257Sapb and try the update again. 595