UPDATING revision 1.389
1$NetBSD: UPDATING,v 1.389 2025/12/20 15:33:26 martin Exp $ 2 3This file (UPDATING) is intended to be a brief reference to recent 4changes that might cause problems in the build process, and a guide for 5what to do if something doesn't work. 6 7For a more detailed description of the recommended way to build NetBSD 8using build.sh, see the BUILDING file. 9 10Note that much of the advice in this UPDATING file was written before 11build.sh existed. Nevertheless, the advice here may be useful for 12working around specific problems with build.sh. 13 14Sections are marked with "^^^^^". After the section on "Recent changes" 15are several sections containing more general information. 16 17See also: BUILDING, build.sh, Makefile. 18 19Recent changes: 20^^^^^^^^^^^^^^^ 21 2220251219: 23 Reorganization of libraries for PR 58648 requires a new enough 24 nbcrunchgen tool (this should be build automatically) and manual 25 removal of $DESTDIR/usr/lib/libssh* and $DESTDIR/usr/lib/*/libssh*. 26 2720251028: 28 libpthread had it's shared library version go back (from 1.7 to 29 1.6). This may cause fallout during update builds, remove the 30 libpthread obj dir and all libpthread.so.1.7\* files in the 31 dest dir. 32 If you have build other software/packages on a -current system 33 from 20251026 or 20251027 you need to rebuild them after 34 updating your base system again. 35 3620251019: 37 Changes to how libcrypto got linked (libpthread not required 38 any more) cause failures in update builds. To fix, run 39 (as your build user) a "make cleandir" in the following 40 subdirectories: 41 42 crypto/external/apache2/openssl 43 crypto/external/bsd/heimdal 44 crypto/external/bsd/netpgp 45 crypto/external/bsd/openssh 46 external/bsd/libfido2 47 external/bsd/nsd 48 external/bsd/ntp 49 external/bsd/pam-u2f 50 external/bsd/ppp 51 external/bsd/tcpdump 52 external/bsd/wpa 53 games/factor 54 libexec/httpd 55 tests/crypto/libcrypto 56 tests/lib/libc/hash 57 usr.bin/dc 58 usr.bin/ftp 59 usr.bin/moduli 60 usr.bin/nbsvtool 61 usr.sbin/plainrsa-gen 62 usr.sbin/syslogd 63 6420250721: 65 GCC 12.5 was imported and there may be weird build issues. 66 Clean any GCC build dirs if you encounter weird things. 67 6820250720: 69 New openssl and old objects for tests for libcrypto may 70 cause spurious test failure, clean the src/tests/crypto/libcrypto 71 object dirs. 72 7320250528: 74 Changes in the tools build require removing all config.cache 75 files in the object tools directories. 76 7720250427: 78 The KERNEL_DIR option to build.sh is now functional. Set it 79 with ``-V KERNEL_DIR=yes'' on your build.sh command. 80 With this, you can now colocate kernel and associated modules 81 in /netbsd/{kernel,kernel.dbg,modules} instead of having the 82 kernel in / but modules in /stand. 83 84 Note that you'll need new bootstrap code to use this feature. 85 86 This completes work begun many years ago by christos@ :-) 87 8820250413: 89 A change to bsd.lib.mk requires a clean build of all libraries. 90 9120250131: 92 The switch to the new jemalloc requires cleaning in libc. 93 9420241122: 95 Changes to various libraries' build options require cleaning 96 their objdirs in update builds: 97 98 cd external/bsd/file/lib && $TOOLDIR/bin/nbmake-$ARCH clean 99 cd external/bsd/libarchive/lib && $TOOLDIR/bin/nbmake-$ARCH clean 100 cd external/public-domain/xz/lib && $TOOLDIR/bin/nbmake-$ARCH clean 101 102 Also, for architectures with MKCOMPAT, it is necessary to clean 103 the compat objdirs too. The easiest way is: 104 105 rm -rf OBJDIR/compat/*/*/external/bsd/file/lib 106 rm -rf OBJDIR/compat/*/*/external/bsd/libarchive/lib 107 rm -rf OBJDIR/compat/*/*/external/public-domain/xz/lib 108 109 Changes to bsd.lib.mk to improve detecting differences in 110 shared library symbol exports may cause some .actsym files in 111 the objdir to become stale in update builds. 112 113 To work around this, delete all files matching `*.actsym' in 114 the objdir. For example: 115 116 find OBJDIR -name '*.actsym' -type f -print0 | xargs -0 rm 117 11820241104: 119 Changes around the integration of the zstd compression 120 library may require manual deletion of some object directories 121 if you update from a build from a few days ago: 122 rm -rf DESTDIR/usr/lib/*/libarchive* 123 rm -rf DESTDIR/usr/lib/*/libmagic* 124 rm -rf DESTDIR/usr/lib/*/libzstd* 125 rm -rf DESTDIR/usr/lib/libarchive* 126 rm -rf DESTDIR/usr/lib/libmagic* 127 rm -rf DESTDIR/usr/lib/libzstd* 128 rm -rf OBJDIR/compat/*/*/external/bsd/file/ 129 rm -rf OBJDIR/compat/*/*/external/bsd/libarchive/ 130 rm -rf OBJDIR/compat/*/*/external/bsd/zstd/ 131 rm -rf OBJDIR/external/bsd/file/ 132 rm -rf OBJDIR/external/bsd/libarchive/ 133 rm -rf OBJDIR/external/bsd/zstd/ 134 rm -rf OBJDIR/external/gpl3/gcc/ 135 rm -rf OBJDIR/tools/gcc/ 136 13720240926: 138 Building -current when running on amd64 from about 20240924 139 to about 20240926 will not work due to a "malloc_np.h" 140 error. Please downgrade to a version from 20240924 or older, 141 or upgrade to a newer version e.g. using a binary release from 142 the NetBSD build servers. 143 14420240923: 145 Update builds will require cleaning the object directories for 146 jemalloc (like: "rm -rf $OBJ/external/bsd/jemalloc*") and the 147 libc dependency files (like: "rm $OBJ/lib/libc/jemalloc.*"). 148 On architectures with COMPAT libs, those also have to be cleaned, 149 e.g. on sparc64: "rm -rf $OBJ/compat/sparc64/sparc/external/bsd/jemalloc*" 150 and "rm $OBJ/compat/sparc64/sparc/lib/libc/jemalloc.*". 151 15220240920: 153 Update builds will require cleaning in src/external/historical/nawk/bin 154 in order to remove the awk subdirectory since there is now a binary 155 called awk. 156 15720240817: 158 Update builds will require cleaning in src/external/historical/nawk/bin 159 in order to remove the awk binary since now there is a subdirectory 160 called awk. 161 16220240812: 163 Update builds will require removing the tools objdir for gdb 164 if building with MKCROSSGDB=yes. All architectures use gdb.old 165 now. 166 16720240630: 168 Update builds will require removing the tools objdir for binutils 169 (as most architectures should use binutils.old now). 170 17120240610: 172 Update builds are likely to require removing the objdir for 173 distrib/<arch>/cdroms - or at least references to libarchive 174 from within there after the recent libarchive update. 175 17620240504: 177 Update builds on x86 require making the `cleandir' target in 178 lib/libm, or deleting the objdir for lib/libm. 179 18020240423: 181 Update builds with x11 may fail after switching to Mesa 21. 182 18320240410: 184 Update builds may require manually deleting 185 $DESTDIR/var/run/named (and, potentially, 186 $DESTDIR/var/run/lwresd) in order to avoid checkflist failure. 187 18820240409: 189 32-bit compatibility libraries were moved into the base32 190 and debug32 sets. HTML man pages were moved into the manhtml set. 191 19220230828: 193 If: 194 - you updated to current and ran postinstall between 20230826 195 and 20230828 inclusive, and 196 - you are not using anything outside the base system to 197 populate /etc/openssl/certs (e.g., manually adding 198 certificates or using ca-certificates or mozilla-rootcerts or 199 mozilla-rootcerts-openssl from pkgsrc), 200 delete /etc/openssl/certs and rerun postinstall or just 201 `certctl rehash'. 202 203 Otherwise, certctl(8) will think someone else has left 204 /etc/openssl/certs in the way and will avoid clobbering it on 205 upgrade from older NetBSD. 206 20720230718: 208 build.sh will use mk.conf in the same directory as build.sh instead 209 of /etc/mk.conf, unless MAKECONF is already defined in the environment. 210 21120230714: 212 Import of gcc 10.5 requires a clean build of at least tools/gcc 213 and external/gpl3/gcc* object directories. An update build 214 without cleaning will result in obscure failures in rare corner 215 cases. 216 21720230604: 218 Building native kernels with the installed make(1) instead of 219 the $TOOLDIR/bin/nbmake-${arch} wrapper will fail if userland 220 has not been updated. Note that this is an unsupported build 221 configuration (but usually works if userland is -current enough). 222 22320230523: 224 ctfmerge was fixed as macOS host tool. This may require a clean tools 225 rebuild to detect the update to tools/compat/configure. 226 22720230515: 228 New openssl build requires removal of the crypto/external/bsd/openssl 229 and tests/crypto/libcrypto subdirectories in the ${OBJDIR} hierarchy. 230 Otherwise test results may be wrong due to wrong "golden" output 231 files being installed. 232 23320230322: 234 Fixes for moved /lib/libisns* mean that builds will complain about 235 ./usr/lib/libisns* being missing until src/lib/libisns is forced 236 to (re)install the files, including the symlinks. The simplest 237 way is to clean this subdir before building. 238 23920230112: 240 New binutils require an updated ld.elf_so. If you are doing 241 (unsupported) in-place self builds (with the -E flag to build.sh), 242 make sure to have installed latest ld.elf_so before you rebuild 243 userland. 244 24520221116: 246 The addition to NetBSD's version of UFS2 of support for extended 247 attributes broke backward compatibility with previous releases 248 of NetBSD, so UFS2 has been restored to being compatible with 249 previous NetBSD releases by disabling extended attributes. 250 (Note that ACLs are implemented as extended attributes, so 251 this changes disables ACLs as well.) 252 253 Support for UFS2 with extended attributes is now available in a new 254 UFS variant called UFS2ea. If you have created extended attributes 255 in an original UFS2 file system then "fsck -p" will now fail due to 256 the unexpected presence of extended attributes and "fsck -y" will 257 remove all extended attributes. If you wish to preserve extended 258 attributes rather than delete them, there is a utility to convert 259 a UFS2 file system to UFS2ea and leave extended attributes in place, 260 but this should be used with caution since it will preserve any 261 extended attributes that have been corrupted by the backward 262 incompatibility too. 263 264 If you wish to use a UFS2ea file system as your root file system, 265 then you will need to update your boot loader to a version that 266 supports UFS2ea. 267 268 For more information, see: 269 https://wiki.netbsd.org/features/UFS2ea 270 27120221111: 272 The new libdrm import worsened the conflict issues for the 273 kdump/ktruss ioctl, and i915 now conflicts with base, and has 274 been turned off. This will cause update build issues like: 275 276 kdump-ioctl.c:12175:143: error: 'DRM_IOCTL_I915_DESTROY_HEAP' 277 undeclared here (not in a function); 278 did you mean 'DRM_IOCTL_MODE_DESTROY_DUMB'? 279 280 You'll need to clean usr.bin/ktruss, usr.bin/kdump, and rescue. 281 28220220921: 283 Since the kernel version was bumped to 9.99.100, the bootloader 284 must be updated on x86 or EFI boot platforms in order to load 285 modules from boot.cfg(5) or interactively at the bootloader 286 prompt. 287 288 The kernel can still load modules at runtime, with modload(8) 289 or modules.conf(5), with no bootloader update. This will not 290 affect release branches because it only applies to patch 291 numbers >=100. 292 293 On x86 (i386 or amd64) with BIOS boot, this requires copying a 294 new /usr/mdec/boot to /boot. You can build this in the destdir 295 by running `$TOOLDIR/bin/nbmake-$ARCH dependall install' in 296 sys/arch/i386/stand. 297 298 On platforms with EFI boot (including x86 with EFI boot), this 299 requires copying a new /usr/mdec/boot*.efi to the EFI/BOOT/ 300 directory on the EFI system partition. The boot*.efi file is: 301 302 aarch64 bootaa64.efi 303 amd64 bootx64.efi 304 arm bootarm.efi (32-bit arm) 305 i386 bootx32.efi 306 307 You can build this in the destdir by running 308 `$TOOLDIR/bin/nbmake-$ARCH dependall install' in 309 sys/stand/efiboot/boot*. 310 31120220821: 312 Support for building extsrc/ has been deprecated. 313 EXTSRCSRCDIR and MKEXTSRC have been deprecated. 314 31520220714: 316 Updates to xorg-server and associated drivers may cause builds to 317 fail. Cleaning both DESTDIR and the xorg build tree may be needed. 318 31920220628: 320 Changes in the build of src/games/robots require a clean build 321 of that program. 322 32320211116: 324 Changes in the xorg build require clean obj dirs for external/mit/xorg 325 (or a full clean/non-update build). 326 32720211112: 328 Device tree sources were updated for evbarm. Some device nodes 329 (in particular, ld(4) devices on the ROCKPro64) will be renumbered. 330 33120211014: 332 MKPIE default for aarch64 has changed, a clean build is required. 333 33420210917: 335 Changed MNT_ACLS to default to POSIX1e ACLs instead of NFSv4 336 ACLs, to be compatible with FreeBSD. If you are using NFSv4 ACLs 337 and have "acls" in /etc/fstab you'll need to change it to "nfs4acls". 338 33920210711: 340 Updated GMP sources may require cleaning in tools/gmp and/or in 341 external/lgpl3/gmp/lib, particularly if GCC itself does not build. 342 34320210417: 344 GCC 10 was enabled for several platforms. If builds fail in either 345 tools/gcc or external/gpl3/gcc, first try cleaning those objects and 346 removing the $DESTDIR/usr/include/g++ subdirectory. 347 34820201016: 349 MIPS kernel modules have been disabled until they work. This will 350 turn up in extra files in the DESTDIR, which should be cleaned. 351 35220200925: 353 GNU MPC and MPFR have been updated. At least MPFR needs cleaning 354 in both the tools and external dirs. 355 35620200912: 357 GCC 9 has arrived for Arm and x86 platforms, and will be coming 358 for several more, as will binutils 2.34. Clean as required. 359 36020200907: 361 GCC 9 is coming, and binutils has been updated for MIPS. This 362 probably requires cleaning the tools/binutils. 363 36420200811: 365 GCC updates may require cleaning the objdir. This may occur 366 due to GCC 7.5 update, GCC 8.4 move to gcc.old, or the upcoming 367 GCC 9 upgrade. 368 36920200614: 370 blacklist* has been renamed to blocklist*. postinstall(8) 371 should handle the migration. 372 37320200601: 374 Due to a mistake in LIBISPRIVATE handling, .so libraries were 375 created in the build directories and need cleaning. 376 37720200311: 378 GCC 8 ports will need cleaning in src/tools/gcc and 379 src/external/gpl3/gcc due to GCC 8.4 update. 380 38120191118: 382 More architectures were switched to gcc8: 383 i386, ia64 powerpc64, sparc, sparc64, arm 384 The same comments as in 20191022 apply. 385 38620191112: 387 The LLVM update requires a clean rebuild for all architectures using 388 LLVM during the tools build phase (i386, amd64, aarch64). 389 39020191022: 391 Ports amd64 and aarch64 switched to GCC 8.3 by default. 392 In-place ("expert mode", build.sh -E) builds are not supported 393 when going from a GCC 7 userland to GCC 8. Do a regular 394 build to a different DESTDIR (or preferably: build.sh -U) at least 395 once and install sets, or download comp.{tar.xz,tgz} from the 396 daily builds and install that before doing the next in-place build. 397 39820191001: 399 GCC 8.3 was imported. Builds of src/tools/gcc may fail if 400 old builds with GCC 7 output now uses GCC 8. Clean this 401 directory, and also clean src/external/gpl3/gcc. 402 40320190903: 404 Files with names that coincide with existing files' names on 405 case-insensitive file systems were inadvertently committed, for 406 radeon GPU firmware. We cannot mark these as obsolete for 407 postinstall to fix, so if you updated src since 2019-08-26, and 408 ran build.sh distribution or ran build.sh release, you must 409 manually delete the following files in your DESTDIR (which is 410 usually $OBJDIR/destir.$ARCH), or from / if you have installed 411 them: 412 413 /libdata/firmware/radeon/bonaire_ce.bin 414 /libdata/firmware/radeon/bonaire_mc.bin 415 /libdata/firmware/radeon/bonaire_me.bin 416 /libdata/firmware/radeon/bonaire_mec.bin 417 /libdata/firmware/radeon/bonaire_pfp.bin 418 /libdata/firmware/radeon/bonaire_rlc.bin 419 /libdata/firmware/radeon/bonaire_sdma.bin 420 /libdata/firmware/radeon/bonaire_smc.bin 421 /libdata/firmware/radeon/bonaire_uvd.bin 422 /libdata/firmware/radeon/hainan_ce.bin 423 /libdata/firmware/radeon/hainan_mc.bin 424 /libdata/firmware/radeon/hainan_me.bin 425 /libdata/firmware/radeon/hainan_pfp.bin 426 /libdata/firmware/radeon/hainan_rlc.bin 427 /libdata/firmware/radeon/hainan_smc.bin 428 /libdata/firmware/radeon/hawaii_ce.bin 429 /libdata/firmware/radeon/hawaii_mc.bin 430 /libdata/firmware/radeon/hawaii_me.bin 431 /libdata/firmware/radeon/hawaii_mec.bin 432 /libdata/firmware/radeon/hawaii_pfp.bin 433 /libdata/firmware/radeon/hawaii_rlc.bin 434 /libdata/firmware/radeon/hawaii_sdma.bin 435 /libdata/firmware/radeon/hawaii_smc.bin 436 /libdata/firmware/radeon/kabini_ce.bin 437 /libdata/firmware/radeon/kabini_me.bin 438 /libdata/firmware/radeon/kabini_mec.bin 439 /libdata/firmware/radeon/kabini_pfp.bin 440 /libdata/firmware/radeon/kabini_rlc.bin 441 /libdata/firmware/radeon/kabini_sdma.bin 442 /libdata/firmware/radeon/kaveri_ce.bin 443 /libdata/firmware/radeon/kaveri_me.bin 444 /libdata/firmware/radeon/kaveri_mec.bin 445 /libdata/firmware/radeon/kaveri_mec2.bin 446 /libdata/firmware/radeon/kaveri_pfp.bin 447 /libdata/firmware/radeon/kaveri_rlc.bin 448 /libdata/firmware/radeon/kaveri_sdma.bin 449 /libdata/firmware/radeon/mullins_ce.bin 450 /libdata/firmware/radeon/mullins_me.bin 451 /libdata/firmware/radeon/mullins_mec.bin 452 /libdata/firmware/radeon/mullins_pfp.bin 453 /libdata/firmware/radeon/mullins_rlc.bin 454 /libdata/firmware/radeon/mullins_sdma.bin 455 /libdata/firmware/radeon/oland_ce.bin 456 /libdata/firmware/radeon/oland_mc.bin 457 /libdata/firmware/radeon/oland_me.bin 458 /libdata/firmware/radeon/oland_pfp.bin 459 /libdata/firmware/radeon/oland_rlc.bin 460 /libdata/firmware/radeon/oland_smc.bin 461 /libdata/firmware/radeon/pitcairn_ce.bin 462 /libdata/firmware/radeon/pitcairn_mc.bin 463 /libdata/firmware/radeon/pitcairn_me.bin 464 /libdata/firmware/radeon/pitcairn_pfp.bin 465 /libdata/firmware/radeon/pitcairn_rlc.bin 466 /libdata/firmware/radeon/pitcairn_smc.bin 467 /libdata/firmware/radeon/tahiti_ce.bin 468 /libdata/firmware/radeon/tahiti_mc.bin 469 /libdata/firmware/radeon/tahiti_me.bin 470 /libdata/firmware/radeon/tahiti_pfp.bin 471 /libdata/firmware/radeon/tahiti_rlc.bin 472 /libdata/firmware/radeon/tahiti_smc.bin 473 /libdata/firmware/radeon/verde_ce.bin 474 /libdata/firmware/radeon/verde_mc.bin 475 /libdata/firmware/radeon/verde_me.bin 476 /libdata/firmware/radeon/verde_pfp.bin 477 /libdata/firmware/radeon/verde_rlc.bin 478 /libdata/firmware/radeon/verde_smc.bin 479 480 We will re-import these radeon firmware images another way 481 later. 482 48320190727: 484 The uefi bootloader has gained tftp support and needs a clean 485 build. If you do update builds, manually clean its object 486 directory by something like: 487 cd sys/arch/i386/stand/efiboot && make clean 488 48920190723: 490 The jemalloc allocator in libc is now built without extended 491 debugging (for performance reasons). In update builds make sure 492 to rebuild it completely, by removing all affected object files, 493 including compat builds, something like: 494 cd /usr/obj && find . -type d -name jemalloc|xargs rm -rf 495 49620190207: 497 GCC 7 switched for many ports. Update builds are likely to fail. 498 499Hints for a more successful build: 500^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 501 Use build.sh, but do not use its "expert mode": 502 This will automatically build the tools in the 503 correct order, and it will keep the tools and the 504 new build products from interfering with the running 505 system. This will allow you to ignore most of the 506 other advice in this file. 507 Build a new kernel first: 508 This makes sure that any new system calls or features 509 expected by the new userland will be present. This 510 helps to avoid critical errors when upgrading. 511 Use object directories: 512 This helps to keep stale object 513 files from polluting the build if a Makefile "forgets" 514 about one. It also makes it easier to clean up after 515 a build. It's also necessary if you want to use the 516 same source tree for multiple machines. 517 To use object directories with build.sh: 518 a) invoke build.sh with the "-M" or "-O" options. 519 To use object directories without using build.sh: 520 a) cd /usr/src ; make cleandir 521 b) Add "OBJMACHINE=yes" to /etc/mk.conf 522 c) Add "MKOBJDIRS=yes" to /etc/mk.conf 523 d) cd /usr/src ; make build 524 Note that running "make obj" in a directory will create 525 in obj.$MACHINE directory. 526 Build to a DESTDIR: 527 This helps to keep old installed files (especially libraries) 528 from interfering with the new build. 529 To build to a DESTDIR with build.sh, use the "-D" option. 530 To build to a DESTDIR without using build.sh, set the DESTDIR 531 environment variable before running make build. It should be 532 set to the pathname of an initially empty directory. 533 Problems: if you do not use build.sh, you might need to 534 update critical utilities without using DESTDIR since 535 nothing is executed from what is installed in DESTDIR. 536 (See critical utils, below.) 537 Build often: 538 This keeps critical utilities current enough to not choke 539 on any other part of the source tree that depends on up to 540 date functionality. If you use build.sh, you should not have 541 this problem. 542 543What to do if things don't work: 544^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 545When things don't work there are usually a few things that commonly 546should be done. 547 1) make includes 548 This should be done automatically by make build. 549 2) cd share/mk && make install 550 Again, automatically done by make build. 551 552Failsafe rebuild of a small part of the tree: 553^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 554To make sure you rebuild something correctly you want to do 555something like the following: 556 1) Make sure the includes and .mk files are up to date. 557 2) Make sure any program used to build the particular 558 utility is up to date. (yacc, lex, etc...) 559 3) cd ...path/to/util... 560 make cleandir 561 rm ...all obj directories... 562 make cleandir # yes, again 563 make obj 564 make depend && make 565 566Failsafe rebuild of the entire tree: 567^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 568If you really want to make sure the source tree is clean and 569ready for a build try the following. Note that sourcing /etc/mk.conf 570(a make(1) Makefile) in this manner is not right, and will not work 571for anyone who uses any make(1) features in /etc/mk.conf. 572 573---cut here--- 574#!/bin/sh 575. /etc/mk.conf 576 577if [ -z $NETBSDSRCDIR ] ; then 578 NETBSDSRCDIR=/usr/src 579fi 580if [ \! -d $NETBSDSRCDIR ] ; then 581 echo Unable to find sources 582 exit 1 583fi 584find $NETBSDSRCDIR -name \*.o -o -name obj.\* -o -name obj -exec rm \{\} \; 585 586if [ -z $BSDOBJDIR ] ; then 587 BSDOBJDIR=/usr/obj 588fi 589if [ -d $BSDOBJDIR ] ; then 590 rm -rf $BSDOBJDIR 591fi 592 593cd $NETBSDSRCDIR && make cleandir 594 595---cut here--- 596 597Critical utilities: 598^^^^^^^^^^^^^^^^^^^ 599 usr.bin/make 600 usr.bin/yacc 601 usr.bin/lex 602 usr.bin/xlint 603 usr.bin/config 604 605Other problems and possible solutions: 606^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 607Symptom:Complaints involving a Makefile. 608Fix: Rebuild usr.bin/make: 609 cd usr.bin/make && make && make install 610 Or, a failsafe method if that doesn't work: 611 cd usr.bin/make && cc -DMAKE_NATIVE *.c -I. -o make \ 612 && install make /usr/bin 613 614Fix: Make sure .mk files are up to date. 615 cd share/mk && make install 616 617Symptom:Kernel `config' fails to configure any kernel, including GENERIC. 618Fix: Rebuild usr.bin/config 619 620Symptom:Obsolete intermediate files are used during compilation 621Fix: Try the following sequence of commands in the directory in question. 622 make cleandir; rm `make print-objdir`; make cleandir; make obj 623 (If you built the tree without "make obj" in the past, obsolete files 624 may remain. The command tries to clean everything up) 625 626Symptom:.../sysinst/run.c:xx: warning: initialization from incompatible 627 pointer type 628Fix: Rebuild and install usr.bin/menuc 629 630Symptom:mklocale not found during build in share/locale/ctype 631Fix: Build and install usr.bin/mklocale 632 633Symptom:undefined reference to `__assert13' or `__unsetenv13' 634Fix: Rebuild and install lib/libc 635 636Symptom:usr.bin/config fails to build. 637Fix: Try building with -DMAKE_BOOTSTRAP added to CFLAGS in Makefile. 638 639Symptom:undefined reference to `getprogname' or `setprogname' 640Fix: Rebuild and install lib/libc 641 642Symptom:Update build fails in src/tools/gcc complaining that a variable 643 (e.g. CPPFLAGS) has changed since the previous run. 644Fix: Run "nbmake-${ARCH} clean" in src/tools/gcc or do a clean build. 645 646Symptom:cvs [update aborted]: cannot open directory /cvsroot/src/...: 647 No such file or directory. 648Cause: If a directory is created by mistake, then it is sometimes 649 deleted from the CVS repository using administrative commands 650 that bypass the normal cvs access controls. If your cvs working tree 651 contains references to a directory that has been deleted on the 652 server in this way, then "cvs update" reports this error. 653Fix: Recursively delete the affected directory from your working tree 654 and try the update again. 655