UPDATING revision 1.348 1 1.348 rillig $NetBSD: UPDATING,v 1.348 2024/04/20 14:06:47 rillig Exp $
2 1.1 abs
3 1.123 jmc This file (UPDATING) is intended to be a brief reference to recent
4 1.123 jmc changes that might cause problems in the build process, and a guide for
5 1.123 jmc what to do if something doesn't work.
6 1.1 abs
7 1.123 jmc For a more detailed description of the recommended way to build NetBSD
8 1.123 jmc using build.sh, see the BUILDING file.
9 1.123 jmc
10 1.123 jmc Note that much of the advice in this UPDATING file was written before
11 1.123 jmc build.sh existed. Nevertheless, the advice here may be useful for
12 1.123 jmc working around specific problems with build.sh.
13 1.123 jmc
14 1.257 apb Sections are marked with "^^^^^". After the section on "Recent changes"
15 1.257 apb are several sections containing more general information.
16 1.257 apb
17 1.123 jmc See also: BUILDING, build.sh, Makefile.
18 1.1 abs
19 1.1 abs Recent changes:
20 1.1 abs ^^^^^^^^^^^^^^^
21 1.230 tls
22 1.346 riastrad 20240410:
23 1.346 riastrad Update builds may require manually deleting
24 1.346 riastrad $DESTDIR/var/run/named (and, potentially,
25 1.346 riastrad $DESTDIR/var/run/lwresd) in order to avoid checkflist failure.
26 1.346 riastrad
27 1.347 nia 20240409:
28 1.347 nia 32-bit compatibility libraries were moved into the base32
29 1.347 nia and debug32 sets. HTML man pages were moved into the manhtml set.
30 1.347 nia
31 1.343 riastrad 20230828:
32 1.343 riastrad If:
33 1.343 riastrad - you updated to current and ran postinstall between 20230826
34 1.343 riastrad and 20230828 inclusive, and
35 1.343 riastrad - you are not using anything outside the base system to
36 1.343 riastrad populate /etc/openssl/certs (e.g., manually adding
37 1.343 riastrad certificates or using ca-certificates or mozilla-rootcerts or
38 1.343 riastrad mozilla-rootcerts-openssl from pkgsrc),
39 1.343 riastrad delete /etc/openssl/certs and rerun postinstall or just
40 1.343 riastrad `certctl rehash'.
41 1.343 riastrad
42 1.343 riastrad Otherwise, certctl(8) will think someone else has left
43 1.343 riastrad /etc/openssl/certs in the way and will avoid clobbering it on
44 1.343 riastrad upgrade from older NetBSD.
45 1.343 riastrad
46 1.341 lukem 20230718:
47 1.341 lukem build.sh will use mk.conf in the same directory as build.sh instead
48 1.341 lukem of /etc/mk.conf, unless MAKECONF is already defined in the environment.
49 1.341 lukem
50 1.342 martin 20230714:
51 1.342 martin Import of gcc 10.5 requires a clean build of at least tools/gcc
52 1.342 martin and external/gpl3/gcc* object directories. An update build
53 1.342 martin without cleaning will result in obscure failures in rare corner
54 1.342 martin cases.
55 1.342 martin
56 1.339 martin 20230604:
57 1.339 martin Building native kernels with the installed make(1) instead of
58 1.339 martin the $TOOLDIR/bin/nbmake-${arch} wrapper will fail if userland
59 1.339 martin has not been updated. Note that this is an unsupported build
60 1.339 martin configuration (but usually works if userland is -current enough).
61 1.338 lukem
62 1.338 lukem 20230523:
63 1.338 lukem ctfmerge was fixed as macOS host tool. This may require a clean tools
64 1.338 lukem rebuild to detect the update to tools/compat/configure.
65 1.338 lukem
66 1.340 martin 20230515:
67 1.340 martin New openssl build requires removal of the crypto/external/bsd/openssl
68 1.345 andvar and tests/crypto/libcrypto subdirectories in the ${OBJDIR} hierarchy.
69 1.340 martin Otherwise test results may be wrong due to wrong "golden" output
70 1.340 martin files being installed.
71 1.340 martin
72 1.337 mrg 20230322:
73 1.337 mrg Fixes for moved /lib/libisns* mean that builds will complain about
74 1.337 mrg ./usr/lib/libisns* being missing until src/lib/libisns is forced
75 1.337 mrg to (re)install the files, including the symlinks. The simplest
76 1.337 mrg way is to clean this subdir before building.
77 1.337 mrg
78 1.336 martin 20230112:
79 1.336 martin New binutils require an updated ld.elf_so. If you are doing
80 1.336 martin (unsupported) in-place self builds (with the -E flag to build.sh),
81 1.336 martin make sure to have installed latest ld.elf_so before you rebuild
82 1.336 martin userland.
83 1.336 martin
84 1.335 chs 20221116:
85 1.335 chs The addition to NetBSD's version of UFS2 of support for extended
86 1.335 chs attributes broke backward compatibility with previous releases
87 1.335 chs of NetBSD, so UFS2 has been restored to being compatible with
88 1.335 chs previous NetBSD releases by disabling extended attributes.
89 1.335 chs (Note that ACLs are implemented as extended attributes, so
90 1.335 chs this changes disables ACLs as well.)
91 1.335 chs
92 1.335 chs Support for UFS2 with extended attributes is now available in a new
93 1.335 chs UFS variant called UFS2ea. If you have created extended attributes
94 1.335 chs in an original UFS2 file system then "fsck -p" will now fail due to
95 1.335 chs the unexpected presence of extended attributes and "fsck -y" will
96 1.335 chs remove all extended attributes. If you wish to preserve extended
97 1.335 chs attributes rather than delete them, there is a utility to convert
98 1.335 chs a UFS2 file system to UFS2ea and leave extended attributes in place,
99 1.335 chs but this should be used with caution since it will preserve any
100 1.335 chs extended attributes that have been corrupted by the backward
101 1.335 chs incompatibility too.
102 1.335 chs
103 1.335 chs If you wish to use a UFS2ea file system as your root file system,
104 1.335 chs then you will need to update your boot loader to a version that
105 1.335 chs supports UFS2ea.
106 1.335 chs
107 1.335 chs For more information, see:
108 1.335 chs https://wiki.netbsd.org/features/UFS2ea
109 1.335 chs
110 1.334 mrg 20221111:
111 1.334 mrg The new libdrm import worsened the conflict issues for the
112 1.334 mrg kdump/ktruss ioctl, and i915 now conflicts with base, and has
113 1.334 mrg been turned off. This will cause update build issues like:
114 1.334 mrg
115 1.334 mrg kdump-ioctl.c:12175:143: error: 'DRM_IOCTL_I915_DESTROY_HEAP'
116 1.334 mrg undeclared here (not in a function);
117 1.334 mrg did you mean 'DRM_IOCTL_MODE_DESTROY_DUMB'?
118 1.334 mrg
119 1.334 mrg You'll need to clean usr.bin/ktruss, usr.bin/kdump, and rescue.
120 1.334 mrg
121 1.331 riastrad 20220921:
122 1.331 riastrad Since the kernel version was bumped to 9.99.100, the bootloader
123 1.333 riastrad must be updated on x86 or EFI boot platforms in order to load
124 1.333 riastrad modules from boot.cfg(5) or interactively at the bootloader
125 1.333 riastrad prompt.
126 1.333 riastrad
127 1.333 riastrad The kernel can still load modules at runtime, with modload(8)
128 1.333 riastrad or modules.conf(5), with no bootloader update. This will not
129 1.333 riastrad affect release branches because it only applies to patch
130 1.333 riastrad numbers >=100.
131 1.333 riastrad
132 1.333 riastrad On x86 (i386 or amd64) with BIOS boot, this requires copying a
133 1.333 riastrad new /usr/mdec/boot to /boot. You can build this in the destdir
134 1.333 riastrad by running `$TOOLDIR/bin/nbmake-$ARCH dependall install' in
135 1.333 riastrad sys/arch/i386/stand.
136 1.333 riastrad
137 1.333 riastrad On platforms with EFI boot (including x86 with EFI boot), this
138 1.333 riastrad requires copying a new /usr/mdec/boot*.efi to the EFI/BOOT/
139 1.333 riastrad directory on the EFI system partition. The boot*.efi file is:
140 1.333 riastrad
141 1.333 riastrad aarch64 bootaa64.efi
142 1.333 riastrad amd64 bootx64.efi
143 1.333 riastrad arm bootarm.efi (32-bit arm)
144 1.333 riastrad i386 bootx32.efi
145 1.333 riastrad
146 1.333 riastrad You can build this in the destdir by running
147 1.333 riastrad `$TOOLDIR/bin/nbmake-$ARCH dependall install' in
148 1.333 riastrad sys/stand/efiboot/boot*.
149 1.331 riastrad
150 1.330 lukem 20220821:
151 1.330 lukem Support for building extsrc/ has been deprecated.
152 1.330 lukem EXTSRCSRCDIR and MKEXTSRC have been deprecated.
153 1.330 lukem
154 1.329 mrg 20220714:
155 1.329 mrg Updates to xorg-server and associated drivers may cause builds to
156 1.329 mrg fail. Cleaning both DESTDIR and the xorg build tree may be needed.
157 1.329 mrg
158 1.328 martin 20220628:
159 1.328 martin Changes in the build of src/games/robots require a clean build
160 1.328 martin of that program.
161 1.328 martin
162 1.324 martin 20211116:
163 1.324 martin Changes in the xorg build require clean obj dirs for external/mit/xorg
164 1.325 martin (or a full clean/non-update build).
165 1.324 martin
166 1.323 nia 20211112:
167 1.323 nia Device tree sources were updated for evbarm. Some device nodes
168 1.323 nia (in particular, ld(4) devices on the ROCKPro64) will be renumbered.
169 1.323 nia
170 1.322 martin 20211014:
171 1.323 nia MKPIE default for aarch64 has changed, a clean build is required.
172 1.322 martin
173 1.321 christos 20210917:
174 1.321 christos Changed MNT_ACLS to default to POSIX1e ACLs instead of NFSv4
175 1.321 christos ACLs, to be compatible with FreeBSD. If you are using NFSv4 ACLs
176 1.321 christos and have "acls" in /etc/fstab you'll need to change it to "nfs4acls".
177 1.321 christos
178 1.319 mrg 20210711:
179 1.319 mrg Updated GMP sources may require cleaning in tools/gmp and/or in
180 1.319 mrg external/lgpl3/gmp/lib, particularly if GCC itself does not build.
181 1.319 mrg
182 1.318 mrg 20210417:
183 1.318 mrg GCC 10 was enabled for several platforms. If builds fail in either
184 1.318 mrg tools/gcc or external/gpl/gcc, first try cleaning those objects and
185 1.318 mrg removing the $DESTDIR/usr/include/g++ subdirectory.
186 1.318 mrg
187 1.316 mrg 20201016:
188 1.316 mrg MIPS kernel modules have been disabled until they work. This will
189 1.316 mrg turn up in extra files in the DESTDIR, which should be cleaned.
190 1.316 mrg
191 1.315 mrg 20200925:
192 1.315 mrg GNU MPC and MPFR have been updated. At least MPFR needs cleaning
193 1.315 mrg in both the tools and external dirs.
194 1.315 mrg
195 1.314 mrg 20200912:
196 1.314 mrg GCC 9 has arrived for Arm and x86 platforms, and will be coming
197 1.314 mrg for several more, as will binutils 2.34. Clean as required.
198 1.314 mrg
199 1.313 mrg 20200907:
200 1.313 mrg GCC 9 is coming, and binutils has been updated for MIPS. This
201 1.313 mrg probably requires cleaning the tools/binutils.
202 1.313 mrg
203 1.311 mrg 20200811:
204 1.312 mrg GCC updates may require cleaning the objdir. This may occur
205 1.312 mrg due to GCC 7.5 update, GCC 8.4 move to gcc.old, or the upcoming
206 1.312 mrg GCC 9 upgrade.
207 1.311 mrg
208 1.309 christos 20200614:
209 1.310 christos blacklist* has been renamed to blocklist*. postinstall(8)
210 1.332 gutterid should handle the migration.
211 1.309 christos
212 1.308 christos 20200601:
213 1.308 christos Due to a mistake in LIBISPRIVATE handling, .so libraries were
214 1.308 christos created in the build directories and need cleaning.
215 1.308 christos
216 1.307 mrg 20200311:
217 1.307 mrg GCC 8 ports will need cleaning in src/tools/gcc and
218 1.307 mrg src/external/gpl3/gcc due to GCC 8.4 update.
219 1.307 mrg
220 1.306 christos 20191118:
221 1.306 christos More architectures were switched to gcc8:
222 1.306 christos i386, ia64 powerpc64, sparc, sparc64, arm
223 1.306 christos The same comments as in 20191022 apply.
224 1.306 christos
225 1.305 martin 20191112:
226 1.305 martin The LLVM update requires a clean rebuild for all architectures using
227 1.305 martin LLVM during the tools build phase (i386, amd64, aarch64).
228 1.305 martin
229 1.304 martin 20191022:
230 1.304 martin Ports amd64 and aarch64 switched to GCC 8.3 by default.
231 1.304 martin In-place ("expert mode", build.sh -E) builds are not supported
232 1.304 martin when going from a GCC 7 userland to GCC 8. Do a regular
233 1.304 martin build to a different DESTDIR (or preferably: build.sh -U) at least
234 1.306 christos once and install sets, or download comp.{tar.xz,tgz} from the
235 1.304 martin daily builds and install that before doing the next in-place build.
236 1.304 martin
237 1.303 mrg 20191001:
238 1.303 mrg GCC 8.3 was imported. Builds of src/tools/gcc may fail if
239 1.303 mrg old builds with GCC 7 output now uses GCC 8. Clean this
240 1.303 mrg directory, and also clean src/external/gpl3/gcc.
241 1.303 mrg
242 1.302 riastrad 20190903:
243 1.306 christos Files with names that coincide with existing files' names on
244 1.302 riastrad case-insensitive file systems were inadvertently committed, for
245 1.302 riastrad radeon GPU firmware. We cannot mark these as obsolete for
246 1.302 riastrad postinstall to fix, so if you updated src since 2019-08-26, and
247 1.302 riastrad ran build.sh distribution or ran build.sh release, you must
248 1.302 riastrad manually delete the following files in your DESTDIR (which is
249 1.302 riastrad usually $OBJDIR/destir.$ARCH), or from / if you have installed
250 1.302 riastrad them:
251 1.302 riastrad
252 1.302 riastrad /libdata/firmware/radeon/bonaire_ce.bin
253 1.302 riastrad /libdata/firmware/radeon/bonaire_mc.bin
254 1.302 riastrad /libdata/firmware/radeon/bonaire_me.bin
255 1.302 riastrad /libdata/firmware/radeon/bonaire_mec.bin
256 1.302 riastrad /libdata/firmware/radeon/bonaire_pfp.bin
257 1.302 riastrad /libdata/firmware/radeon/bonaire_rlc.bin
258 1.302 riastrad /libdata/firmware/radeon/bonaire_sdma.bin
259 1.302 riastrad /libdata/firmware/radeon/bonaire_smc.bin
260 1.302 riastrad /libdata/firmware/radeon/bonaire_uvd.bin
261 1.302 riastrad /libdata/firmware/radeon/hainan_ce.bin
262 1.302 riastrad /libdata/firmware/radeon/hainan_mc.bin
263 1.302 riastrad /libdata/firmware/radeon/hainan_me.bin
264 1.302 riastrad /libdata/firmware/radeon/hainan_pfp.bin
265 1.302 riastrad /libdata/firmware/radeon/hainan_rlc.bin
266 1.302 riastrad /libdata/firmware/radeon/hainan_smc.bin
267 1.302 riastrad /libdata/firmware/radeon/hawaii_ce.bin
268 1.302 riastrad /libdata/firmware/radeon/hawaii_mc.bin
269 1.302 riastrad /libdata/firmware/radeon/hawaii_me.bin
270 1.302 riastrad /libdata/firmware/radeon/hawaii_mec.bin
271 1.302 riastrad /libdata/firmware/radeon/hawaii_pfp.bin
272 1.302 riastrad /libdata/firmware/radeon/hawaii_rlc.bin
273 1.302 riastrad /libdata/firmware/radeon/hawaii_sdma.bin
274 1.302 riastrad /libdata/firmware/radeon/hawaii_smc.bin
275 1.302 riastrad /libdata/firmware/radeon/kabini_ce.bin
276 1.302 riastrad /libdata/firmware/radeon/kabini_me.bin
277 1.302 riastrad /libdata/firmware/radeon/kabini_mec.bin
278 1.302 riastrad /libdata/firmware/radeon/kabini_pfp.bin
279 1.302 riastrad /libdata/firmware/radeon/kabini_rlc.bin
280 1.302 riastrad /libdata/firmware/radeon/kabini_sdma.bin
281 1.302 riastrad /libdata/firmware/radeon/kaveri_ce.bin
282 1.302 riastrad /libdata/firmware/radeon/kaveri_me.bin
283 1.302 riastrad /libdata/firmware/radeon/kaveri_mec.bin
284 1.302 riastrad /libdata/firmware/radeon/kaveri_mec2.bin
285 1.302 riastrad /libdata/firmware/radeon/kaveri_pfp.bin
286 1.302 riastrad /libdata/firmware/radeon/kaveri_rlc.bin
287 1.302 riastrad /libdata/firmware/radeon/kaveri_sdma.bin
288 1.302 riastrad /libdata/firmware/radeon/mullins_ce.bin
289 1.302 riastrad /libdata/firmware/radeon/mullins_me.bin
290 1.302 riastrad /libdata/firmware/radeon/mullins_mec.bin
291 1.302 riastrad /libdata/firmware/radeon/mullins_pfp.bin
292 1.302 riastrad /libdata/firmware/radeon/mullins_rlc.bin
293 1.302 riastrad /libdata/firmware/radeon/mullins_sdma.bin
294 1.302 riastrad /libdata/firmware/radeon/oland_ce.bin
295 1.302 riastrad /libdata/firmware/radeon/oland_mc.bin
296 1.302 riastrad /libdata/firmware/radeon/oland_me.bin
297 1.302 riastrad /libdata/firmware/radeon/oland_pfp.bin
298 1.302 riastrad /libdata/firmware/radeon/oland_rlc.bin
299 1.302 riastrad /libdata/firmware/radeon/oland_smc.bin
300 1.302 riastrad /libdata/firmware/radeon/pitcairn_ce.bin
301 1.302 riastrad /libdata/firmware/radeon/pitcairn_mc.bin
302 1.302 riastrad /libdata/firmware/radeon/pitcairn_me.bin
303 1.302 riastrad /libdata/firmware/radeon/pitcairn_pfp.bin
304 1.302 riastrad /libdata/firmware/radeon/pitcairn_rlc.bin
305 1.302 riastrad /libdata/firmware/radeon/pitcairn_smc.bin
306 1.302 riastrad /libdata/firmware/radeon/tahiti_ce.bin
307 1.302 riastrad /libdata/firmware/radeon/tahiti_mc.bin
308 1.302 riastrad /libdata/firmware/radeon/tahiti_me.bin
309 1.302 riastrad /libdata/firmware/radeon/tahiti_pfp.bin
310 1.302 riastrad /libdata/firmware/radeon/tahiti_rlc.bin
311 1.302 riastrad /libdata/firmware/radeon/tahiti_smc.bin
312 1.302 riastrad /libdata/firmware/radeon/verde_ce.bin
313 1.302 riastrad /libdata/firmware/radeon/verde_mc.bin
314 1.302 riastrad /libdata/firmware/radeon/verde_me.bin
315 1.302 riastrad /libdata/firmware/radeon/verde_pfp.bin
316 1.302 riastrad /libdata/firmware/radeon/verde_rlc.bin
317 1.302 riastrad /libdata/firmware/radeon/verde_smc.bin
318 1.302 riastrad
319 1.302 riastrad We will re-import these radeon firmware images another way
320 1.302 riastrad later.
321 1.302 riastrad
322 1.301 martin 20190727:
323 1.301 martin The uefi bootloader has gained tftp support and needs a clean
324 1.301 martin build. If you do update builds, manually clean its object
325 1.301 martin directory by something like:
326 1.301 martin cd sys/arch/i386/stand/efiboot && make clean
327 1.301 martin
328 1.300 martin 20190723:
329 1.344 gutterid The jemalloc allocator in libc is now built without extended
330 1.300 martin debugging (for performance reasons). In update builds make sure
331 1.326 andvar to rebuild it completely, by removing all affected object files,
332 1.300 martin including compat builds, something like:
333 1.300 martin cd /usr/obj && find . -type d -name jemalloc|xargs rm -rf
334 1.300 martin
335 1.299 mrg 20190207:
336 1.299 mrg GCC 7 switched for many ports. Update builds are likely to fail.
337 1.299 mrg
338 1.1 abs Hints for a more successful build:
339 1.1 abs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
340 1.123 jmc Use build.sh, but do not use its "expert mode":
341 1.132 jmmv This will automatically build the tools in the
342 1.123 jmc correct order, and it will keep the tools and the
343 1.123 jmc new build products from interfering with the running
344 1.123 jmc system. This will allow you to ignore most of the
345 1.123 jmc other advice in this file.
346 1.2 mrg Build a new kernel first:
347 1.2 mrg This makes sure that any new system calls or features
348 1.2 mrg expected by the new userland will be present. This
349 1.2 mrg helps to avoid critical errors when upgrading.
350 1.1 abs Use object directories:
351 1.1 abs This helps to keep stale object
352 1.1 abs files from polluting the build if a Makefile "forgets"
353 1.1 abs about one. It also makes it easier to clean up after
354 1.1 abs a build. It's also necessary if you want to use the
355 1.1 abs same source tree for multiple machines.
356 1.123 jmc To use object directories with build.sh:
357 1.123 jmc a) invoke build.sh with the "-M" or "-O" options.
358 1.123 jmc To use object directories without using build.sh:
359 1.1 abs a) cd /usr/src ; make cleandir
360 1.2 mrg b) Add "OBJMACHINE=yes" to /etc/mk.conf
361 1.2 mrg c) Add "MKOBJDIRS=yes" to /etc/mk.conf
362 1.1 abs d) cd /usr/src ; make build
363 1.2 mrg Note that running "make obj" in a directory will create
364 1.2 mrg in obj.$MACHINE directory.
365 1.1 abs Build to a DESTDIR:
366 1.123 jmc This helps to keep old installed files (especially libraries)
367 1.123 jmc from interfering with the new build.
368 1.123 jmc To build to a DESTDIR with build.sh, use the "-D" option.
369 1.123 jmc To build to a DESTDIR without using build.sh, set the DESTDIR
370 1.123 jmc environment variable before running make build. It should be
371 1.123 jmc set to the pathname of an initially empty directory.
372 1.123 jmc Problems: if you do not use build.sh, you might need to
373 1.123 jmc update critical utilities without using DESTDIR since
374 1.123 jmc nothing is executed from what is installed in DESTDIR.
375 1.123 jmc (See critical utils, below.)
376 1.1 abs Build often:
377 1.1 abs This keeps critical utilities current enough to not choke
378 1.1 abs on any other part of the source tree that depends on up to
379 1.123 jmc date functionality. If you use build.sh, you should not have
380 1.123 jmc this problem.
381 1.241 wiz
382 1.1 abs What to do if things don't work:
383 1.1 abs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
384 1.230 tls When things don't work there are usually a few things that commonly
385 1.1 abs should be done.
386 1.1 abs 1) make includes
387 1.1 abs This should be done automatically by make build.
388 1.1 abs 2) cd share/mk && make install
389 1.1 abs Again, automatically done by make build.
390 1.1 abs
391 1.1 abs Failsafe rebuild of a small part of the tree:
392 1.1 abs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
393 1.1 abs To make sure you rebuild something correctly you want to do
394 1.1 abs something like the following:
395 1.1 abs 1) Make sure the includes and .mk files are up to date.
396 1.1 abs 2) Make sure any program used to build the particular
397 1.1 abs utility is up to date. (yacc, lex, etc...)
398 1.1 abs 3) cd ...path/to/util...
399 1.1 abs make cleandir
400 1.1 abs rm ...all obj directories...
401 1.1 abs make cleandir # yes, again
402 1.1 abs make obj
403 1.1 abs make depend && make
404 1.1 abs
405 1.1 abs Failsafe rebuild of the entire tree:
406 1.1 abs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
407 1.1 abs If you really want to make sure the source tree is clean and
408 1.2 mrg ready for a build try the following. Note that sourcing /etc/mk.conf
409 1.2 mrg (a make(1) Makefile) in this manner is not right, and will not work
410 1.2 mrg for anyone who uses any make(1) features in /etc/mk.conf.
411 1.1 abs
412 1.1 abs ---cut here---
413 1.1 abs #!/bin/sh
414 1.1 abs . /etc/mk.conf
415 1.1 abs
416 1.58 lukem if [ -z $NETBSDSRCDIR ] ; then
417 1.58 lukem NETBSDSRCDIR=/usr/src
418 1.1 abs fi
419 1.58 lukem if [ \! -d $NETBSDSRCDIR ] ; then
420 1.1 abs echo Unable to find sources
421 1.1 abs exit 1
422 1.1 abs fi
423 1.58 lukem find $NETBSDSRCDIR -name \*.o -o -name obj.\* -o -name obj -exec rm \{\} \;
424 1.1 abs
425 1.1 abs if [ -z $BSDOBJDIR ] ; then
426 1.1 abs BSDOBJDIR=/usr/obj
427 1.1 abs fi
428 1.1 abs if [ -d $BSDOBJDIR ] ; then
429 1.1 abs rm -rf $BSDOBJDIR
430 1.1 abs fi
431 1.1 abs
432 1.58 lukem cd $NETBSDSRCDIR && make cleandir
433 1.1 abs
434 1.1 abs ---cut here---
435 1.1 abs
436 1.1 abs Critical utilities:
437 1.1 abs ^^^^^^^^^^^^^^^^^^^
438 1.1 abs usr.bin/make
439 1.1 abs usr.bin/yacc
440 1.1 abs usr.bin/lex
441 1.11 lukem usr.bin/xlint
442 1.142 drochner usr.bin/config
443 1.1 abs
444 1.34 simonb Other problems and possible solutions:
445 1.1 abs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
446 1.1 abs Symptom:Complaints involving a Makefile.
447 1.17 erh Fix: Rebuild usr.bin/make:
448 1.17 erh cd usr.bin/make && make && make install
449 1.111 simonb Or, a failsafe method if that doesn't work:
450 1.348 rillig cd usr.bin/make && cc -DMAKE_NATIVE *.c -I. -o make \
451 1.348 rillig && install make /usr/bin
452 1.17 erh
453 1.1 abs Fix: Make sure .mk files are up to date.
454 1.1 abs cd share/mk && make install
455 1.2 mrg
456 1.2 mrg Symptom:Kernel `config' fails to configure any kernel, including GENERIC.
457 1.142 drochner Fix: Rebuild usr.bin/config
458 1.1 abs
459 1.4 itojun Symptom:Obsolete intermediate files are used during compilation
460 1.4 itojun Fix: Try the following sequence of commands in the directory in question.
461 1.4 itojun make cleandir; rm `make print-objdir`; make cleandir; make obj
462 1.4 itojun (If you built the tree without "make obj" in the past, obsolete files
463 1.4 itojun may remain. The command tries to clean everything up)
464 1.5 wiz
465 1.207 mbalmer Symptom:.../sysinst/run.c:xx: warning: initialization from incompatible
466 1.207 mbalmer pointer type
467 1.5 wiz Fix: Rebuild and install usr.bin/menuc
468 1.12 itojun
469 1.12 itojun Symptom:mklocale not found during build in share/locale/ctype
470 1.12 itojun Fix: Build and install usr.bin/mklocale
471 1.13 dogcow
472 1.86 kleink Symptom:undefined reference to `__assert13' or `__unsetenv13'
473 1.13 dogcow Fix: Rebuild and install lib/libc
474 1.13 dogcow
475 1.142 drochner Symptom:usr.bin/config fails to build.
476 1.19 cgd Fix: Try building with -DMAKE_BOOTSTRAP added to CFLAGS in Makefile.
477 1.13 dogcow
478 1.19 cgd Symptom:undefined reference to `getprogname' or `setprogname'
479 1.19 cgd Fix: Rebuild and install lib/libc
480 1.24 abs
481 1.223 joerg Symptom:Update build fails in src/tools/gcc complaining that a variable
482 1.223 joerg (e.g. CPPFLAGS) has changed since the previous run.
483 1.223 joerg Fix: Run "nbmake-${ARCH} clean" in src/tools/gcc or do a clean build.
484 1.257 apb
485 1.257 apb Symptom:cvs [update aborted]: cannot open directory /cvsroot/src/...:
486 1.257 apb No such file or directory.
487 1.257 apb Cause: If a directory is created by mistake, then it is sometimes
488 1.257 apb deleted from the CVS repository using administrative commands
489 1.257 apb that bypass the normal cvs access controls. If your cvs working tree
490 1.257 apb contains references to a directory that has been deleted on the
491 1.257 apb server in this way, then "cvs update" reports this error.
492 1.257 apb Fix: Recursively delete the affected directory from your working tree
493 1.257 apb and try the update again.
494