Annotation of src/UPDATING, Revision 1.116
1.116 ! christos 1: $NetBSD: UPDATING,v 1.115 2004/04/22 14:35:55 christos Exp $
1.1 abs 2:
3: This file is intended to be a brief introduction to the build
4: process and a reference on what to do if something doesn't work.
5:
6: For a more detailed description see Makefile.
7:
8: Recent changes:
9: ^^^^^^^^^^^^^^^
1.99 mrg 10:
1.115 christos 11: 20040418:
12: Statfs(2) and friends have been replaced with statvfs(2). Before
13: installing a newly build userland make sure that you are running
14: a newly built kernel with COMPAT_20 set. In addition your libc
15: build might not work (undefined SYS_statfs symbol) because make
16: clean does not know how to remove files it does not know about
1.116 ! christos 17: anymore. Manually remove all generated .S sources and objects
! 18: from the libc build directory.
1.115 christos 19:
1.114 jmc 20: 20040326:
21: The method by which athhal-elf.o gets pulled into i386 kernel builds
22: has been changed. The file is now stored as a uuencode file in CVS
23: and the generated Makefile will use the new .uue rules from bsd.file.mk
24: to build it.
25:
26: This means you must have the latest bsd.files.mk installed when
27: building a kernel without USETOOLS=yes.
28:
1.113 dan 29: 20040318:
30: A bug in the cgd(4) blowfish code was corrected, without
31: provision of backwards compatibility, after several public
32: notices over several months. Users of cgd with blowfish cipher
33: ONLY must dump their data before updating their kernels, and
34: recreate cgd's and restore data using the new kernel. See
35: (recent message to current-users, URL when mail-index has updated)
36:
1.108 bjh21 37: 20040313:
38: On acorn32, the opms and qms drivers have been withdrawn, and
39: the old wsqms driver is now called qms. Kernel config files
40: will need updating. See the ones in sys/arch/acorn32/conf
41: for examples.
42:
1.106 bjh21 43: 20040125:
44: On acorn32, the beep and sysbeep devices are no longer
45: needed, and will need to be deleted from kernel configuration
46: files.
1.105 bjh21 47:
1.102 dbj 48: 20040109:
49: Compatibility for old ffs superblock layouts has been
50: added, and the restrictive fsck checks have been reenabled
51: when using those layouts. If you have been using -current
52: since 20030402, you may find that fsck again signals fatal
1.110 dbj 53: superblock mismatches. To repair, make sure you have
1.111 simonb 54: an updated fsck_ffs and then you can use fsck_ffs -b 16 -c 4
1.109 dbj 55: to complete the filesystem upgrade. A message has
1.111 simonb 56: been added to the kernel which should detect this problem.
57: See the following discussion for more information:
1.112 keihan 58: http://mail-index.NetBSD.org/current-users/2004/01/11/0022.html
1.102 dbj 59:
1.99 mrg 60: 20031203:
1.100 keihan 61: New binutils builds may fail due to old dependencies.
1.99 mrg 62: It's necessary to "make cleandir" to ensure that
63: the dependencies will be rebuilt correctly.
1.98 wiz 64:
65: 20031111:
66: A newer mkdep is needed. Error noting that is
67: cc: Ambiguous abbreviation --
1.97 lukem 68:
69: 20031008:
70: /usr/include/sys/disklabel_mbr.h was removed.
71: It's necessary to "make cleandir" to ensure that
72: the dependencies will be rebuilt correctly.
1.96 christos 73:
1.109 dbj 74: 20031007:
1.111 simonb 75: A sign exension bug was fixed which set all the high bits
76: of our newly expanded ffs fs_flags. This should only
77: affect users who installed or upgraded in September of 2003.
1.109 dbj 78: A small utility program was posted to tech-kern which
1.111 simonb 79: should fix this problem, and a warning message was added
80: to the kernel which should discover and warn about it. See
81: http://mail-index.NetBSD.org/tech-kern/2003/10/07/0005.html
1.109 dbj 82:
1.96 christos 83: 20030906:
84: With the addition of siginfo support the old signal trampoline
85: code has been deprecated to COMPAT_16. Make sure that your running
86: kernel has COMPAT_16 enabled before building userland.
1.94 christos 87:
88: 20030801:
1.95 wiz 89: With the new openssl, there is some header and library shuffling.
1.94 christos 90: rm -f /usr/include/des.h /usr/include/kerberosIV/* /lib/libdes* \
1.95 wiz 91: /usr/lib/libdes* before building.
1.92 wiz 92:
93: 20030703:
94: Texinfo was updated to 4.6. To avoid failures when trying to
95: build the included texinfo files, do:
96:
97: cd src/gnu/usr.bin/texinfo
98: make MKINFO=no dependall install
1.90 wiz 99:
100: 20030630:
1.101 junyoung 101: Groff was updated to 1.19; it's probably necessary to do
1.91 wiz 102: cd share/mk && make install
1.90 wiz 103: cd src/gnu/usr.bin/groff
104: make MKMAN=no dependall install
105: (untested).
1.89 christos 106:
107: 20030516:
108: Due to bugs in the export handling code, invalid export lines
109: were accepted before and caused the kernel to panic when
110: mountd got restarted because it freed memory that had already
111: been freed. This has been fixed and the kernel checks
112: export addresses very strictly. If you upgrade your kernel,
113: make sure you also upgrade mountd, because if your export
114: file contains lines with an old inet4 address syntax (i.e.
115: a.b.c or a.b or a), they will get rejected by the new kernel.
1.87 bjh21 116:
117: 20030402:
118: The superblock layout for FFS was changed. If you have 1.6
119: fsck binaries, they will signal a fatal superblock mismatch
120: with the first alternate, because they compare too many
121: fields (even ones that aren't useful). If possible, upgrade
122: your fsck_ffs binary before using a new kernel.
123: None of this signals actual filesystem damage.
1.85 atatat 124:
125: 20030324:
126: sendmail version 8.12.8 was imported. Since sendmail is
127: now setgid to the smmsp group, and runs in "collection"
128: mode for most common activities, there is a new config
129: file called submit.cf that needs to live in /etc/mail.
130: The generic submit.cf sample in /usr/share/sendmail/cf
131: is named netbsd-msp.cf. Upgrading your regular sendmail
132: configuration file is also strongly advised.
133:
134: See the section named "MESSAGE SUBMISSION PROGRAM" in
135: the updated /usr/share/sendmail/README file for more
136: information.
1.82 wiz 137:
138: 20030117:
139: Texinfo was updated to 4.3. To avoid failures when trying to
140: build the included texinfo files, do:
141:
142: cd src/gnu/usr.bin/texinfo
143: make MKINFO=no dependall install
1.81 lukem 144:
145: 20021223:
146: The METALOG format changed slightly, to remove the leading
147: "${DESTDIR}" from path names.
148: This only affects people building with UNPRIVED.
149: For complete safety, remove the DESTDIR entirely and
150: update tools/mtree, before running make build.
1.88 itojun 151:
152: 20021219:
153: CVS repository layout was changed. See the following for details
154: if you are using (anonymous) cvs to update your tree.
155:
1.93 salo 156: http://mail-index.NetBSD.org/netbsd-announce/2002/12/19/0000.html
1.80 lukem 157:
158: 20021219:
159: install(1) had a '-N dbdir' option added, to specify an
160: alternate location to look up users & groups (instead
161: of the host system passwd(5) and group(5) databases).
162:
163: The build system was modified to take advantage of
164: this option (using ${NETBSDSRCDIR}/etc), so if you
1.83 kei 165: use USETOOLS==no, you may have to rebuild and
1.80 lukem 166: reinstall usr.bin/xinstall first.
1.78 lukem 167:
168: 20021130:
169: fparseln(3) moved from libutil to libc.
170: If building to DESTDIR=/, reinstall the includes
171: and rebuild libc:
172: make includes
173: make do-lib-libc
174: If using build.sh, "cd tools/compat && make clean"
175: before rebuilding the tools.
1.77 lukem 176:
177: 20021126:
178: The mk.conf(5) variable SYS_INCLUDE has been deprecated,
179: including the optional "SYS_INCLUDE=symlinks" support.
180: All header files, including <sys/*.h> are copied into
181: /usr/include.
1.76 thorpej 182:
183: 20021121:
184: The C run-time support files crtbegin.o and crtend.o
185: (and their companions crtbeginS.o and crtendS.o) were
186: split up, with new crti.o and crtn.o files resulting.
187: This means that libtool needs to be rebuilt once the
188: new libraries are installed. The process of rebuilding
189: libtool will cause it to automatically notice the new
190: required files, but it *must* be rebuilt in order to
191: do this.
192:
193: An out-of-date libtool will result in shared libraries
194: which lack _init() and _fini() routines, which means that
195: their global contructors/destructors will not be invoked.
1.75 thorpej 196:
197: 20021121:
198: A bug related to how ARM ELF objects were tagged has been
199: corrected.
200:
201: NetBSD ARM ELF uses the soft-VFP floating point model by
202: default. However, the assembler lacked support for marking
203: objects as using the VFP floating point format, and the
1.79 wiz 204: compiler was not properly passing the flag indicating "soft-VFP"
1.75 thorpej 205: to the assembler.
206:
207: Unfortunately, this means that the linker will now consider
208: old (i.e. not marked "softvfp") NetBSD ARM ELF objects to be
209: incompatible with new (properly marked) objects.
210:
211: The problem will only manifest itself if you attempt to compile
212: a new program using the fixed toolchain, and link that program
213: against old libraries which do not have the proper "softvfp"
214: markings. ALL OF YOUR EXISTING BINARIES AND SHARED LIBRARIES
215: WILL CONTINUE TO WORK PROPERLY.
216:
217: The only work-around for the problem is to recompile all of
218: the libraries on the system. The easiest way to do this for
1.79 wiz 219: system libraries is to install a binary snapshot; they are
1.93 salo 220: generally available on releng.NetBSD.org. Any packages you
1.75 thorpej 221: have installed which supply libraries will have to be recompiled
222: if you wish to link new programs against those libraries.
223:
224: If you have questions about this matter, please contact
1.93 salo 225: port-arm@NetBSD.org.
1.73 provos 226:
227: 20021011:
228: Systrace has been improved to support privilege elevation.
229: Updating the kernel requires the userland part of systrace
1.79 wiz 230: to be rebuilt.
1.72 thorpej 231:
232: 20021010:
233: The config(8) grammar was changed to allow options to register
234: dependencies on attributes, as well as other options. Users
235: must update and reinstall usr.sbin/config before building a new
236: kernel.
1.70 thorpej 237:
238: 20021009:
239: A new attribute dependency syntax was introduced to config(8),
240: which is now used by the SCSI configuration description. Users
1.71 wiz 241: must update and reinstall usr.sbin/config before building a new
1.70 thorpej 242: kernel.
1.69 thorpej 243:
244: 20021003:
245: Several changes have been made to the autoconfiguration
246: framework. Users must update and reinstall usr.sbin/config
247: before building a new kernel.
1.74 jschauma 248:
249: 20021001:
250: The i386mp branch has been merged. To compile a kernel, users
251: will need to add the option 'cpu* at mainbus?' to their configuration
252: file. Multiprocessor kernels will need
253: ioapic* at mainbus? apid ?
254: options MULTIPROCESSOR
255: options COM_MPLOCK
1.68 lukem 256:
257: 20020922:
258: MKDYNAMICROOT=yes enabled by default, which means that
259: certain shared libraries are installed into /lib, the shared
260: linker is installed into /libexec, and all programs in /bin
261: and /sbin are dynamically linked.
262: If you do not use "make build", you should ensure that
263: you have the libraries and shared linker in the new locations,
264: with:
265: make do-lib-csu do-lib-libc do-lib do-gnu-lib do-ld.elf_so
1.67 lukem 266:
267: 20020917:
268: USE_NEW_TOOLCHAIN has been replaced with:
269: - TOOLCHAIN_MISSING -- set to "yes" on platforms for which
270: there is no working in-tree toolchain (hppa, ns32k, sh5,
271: x86_64).
272: - EXTERNAL_TOOLCHAIN -- if defined by the user, points to the
1.79 wiz 273: root of an external toolchain (e.g. /usr/local/gnu). This
1.67 lukem 274: enables the cross-build framework even for TOOLCHAIN_MISSING
275: platforms.
1.66 gehenna 276:
277: 20020906:
278: gehenna-devsw has been merged into the trunk. Need to update and
1.79 wiz 279: reinstall usr.sbin/config before building the kernel.
1.65 lukem 280:
281: 20020822:
282: Crunched rescue tools (contents of /bin and /sbin, plus others)
283: are now provided in /rescue.
284:
285: To ensure that these are built statically linked (no matter
286: what the setting of LDSTATIC is), use a crunchgen(1) built
287: from sources newer than 20020820 (see the next entry).
288:
289: 20020820:
290: crunchgen(1) changed to ensure that the generated program
291: is statically linked.
292:
293: Solution: update and reinstall usr.bin/crunch
1.84 grant 294:
295: 20020605:
296: smmsp user/group has been added for sendmail.
297:
298: Add the following into /etc/group:
299:
300: smmsp:*:17:
301:
302: and the following to /etc/master.passwd (via vipw):
303:
304: smmsp:*:17:17::0:0:Sendmail Message Submission Program:/nonexistent:/sbin/nologin
1.61 itojun 305:
306: 20020515:
307: sshd user/group has been added. Need to hand add this in, or sshd
308: will not let you log in (with default, or UsePrivlegeSeparation=yes)
309:
310: Add the following into /etc/group:
311:
312: sshd:*:16:
313:
314: and the following to /etc/master.passwd (via vipw):
315:
1.63 enami 316: sshd:*:16:16::0:0:& pseudo-user:/var/chroot/sshd:/sbin/nologin
1.61 itojun 317:
1.79 wiz 318: Also /var/chroot/sshd directory needs to be present (digged as part of
319: the build process).
1.60 sommerfe 320:
321: 20020426:
322: NBUILDJOBS obsoleted in favor of just using -j.
1.59 lukem 323:
324: 20020426:
325: etc/postinstall added, which performs various checks for
326: configuration file updates and changes, and can fix most of
327: the problems identified.
328: This should make it much easier to upgrade a system's
329: configuration from earlier systems (as far back as NetBSD 1.5).
1.56 lukem 330:
331: 20020320:
1.79 wiz 332: <bsd.lib.mk> needs a new install(1) for its "-a cmd" support.
333: Build and install at usr.bin/xinstall before the build.
1.56 lukem 334:
1.55 itojun 335: 20020319:
1.79 wiz 336: Raw IPv6 socket now makes strict checking for sa_family and sa_len
337: on send(2) operation. Be sure to have sbin/rtsol and usr.sbin/rtsold
1.55 itojun 338: newer than November 2001 when you upgrade the kernel.
339:
1.54 itojun 340: 20020311:
341: ssh configuration files were moved from /etc to /etc/ssh. Beware
342: if you restart your machine from remote. Note that sshd.conf needs
343: to be changed (due to the use of "/etc" inside).
344:
345: 20020223:
1.53 matt 346: Users of the VAX port will need to rebuild and install gas
347: so it deal with the now present register prefix used in all
348: the VAX assembly files.
349:
1.50 itojun 350: 20020118:
351: ntpd user/group has been added. Need to hand add this in or builds
352: will break as mtree aborts early.
353:
354: Add the following into /etc/group:
355:
356: ntpd:*:15:
357:
358: and the following to /etc/master.passwd (via vipw):
359:
360: ntpd:*:15:15::0:0:Ntpd pseudo-user:/var/chroot/ntpd:/sbin/nologin
361:
1.49 jmc 362: 20011207:
363: If you're attempting to build a snapshot on sparc64 and are getting
364: reloc errors from the toolchain groff binary this means your native
365: toolchain has some broken C++ bits.
366:
367: To fix:
368:
369: Build a new toolchain (i.e. build.sh -t)
370: Use the new toolchain to build and install natively (i.e. /usr/lib)
371:
372: gnu/lib/libgcc
1.51 pooka 373: gnu/lib/libstdc++
1.49 jmc 374:
375: After this a snapshot will be able to be built.
376:
1.47 jmc 377: 20011201:
378: In order for a sparc64 build to work you must have a working awk. If
379: you've built and installed a system with the new toolchain up to this
1.52 wiz 380: point you do not have a working awk as its ability to do floating
1.47 jmc 381: point is broken.
382:
383: To build:
384:
385: remake and install gnu/lib/libgcc
386: remake and install gnu/usr.bin/gawk into /usr/bin (make sure it links
1.48 jmc 387: against the new libgcc.a)
1.47 jmc 388:
1.46 thorpej 389: 20011128:
390: Kernel config information was changed to use defflag in
391: the various "files" files. Bug fixes to config(8) are
392: required in order for this to work properly. Make sure
393: to build and install in usr.sbin/config before attempting
394: to build a new kernel.
395:
1.45 yamt 396: 20011030:
397: libc/locale/wcstod.c now needs new lint(1). Update lint(1)
398: before building libc.
1.43 mason 399:
1.44 tv 400: 20011029:
401: The new document BUILDING.mdoc (view with nroff | more, or
402: see pre-generated .txt and .html versions) describes the build
403: procedure in great detail. BUILDING, and the USE_NEW_TOOLCHAIN
404: build process, are intended in the long run to replace this
405: manual update log.
406:
407: Users building a USE_NEW_TOOLCHAIN system should read the
408: BUILDING document for caveats. Generally, BUILDING supersedes
409: UPDATING for these systems, as tool updating is taken care of
410: by the new build system.
1.42 perry 411:
412: 20011028:
413: src/etc/Makefile now needs install to be able to handle
414: symlinks that point to nowhere. A bug in install that
415: prevented this was corrected.
416:
417: Solution: update and reinstall usr.bin/xinstall
418: Better Solution: Use the new toolchain and it will just work
419: for you.
1.40 lukem 420:
421: 20011006:
422: /etc/mtree/NetBSD.dist has been updated to take advantage of
423: absolute path support added to mtree(8). Older mtree(8)s don't
424: understand the format.
425:
426: Solution: update and reinstall usr.sbin/mtree
1.39 jmc 427:
428: 20011004:
429: Crunchgen has been updated to work via reach-over makefiles. Updating
430: is suggested before running a snapshot build
1.36 tv 431:
1.35 thorpej 432: 20010915:
433: The new "ubcperf" code committed by Chuck Silvers removed
434: a header file, uvm/uvm_vnode.h. There may be stale .depend
435: files that still reference this file.
436:
437: Solution: "make cleandir && make dependall" in affected
438: directories.
1.31 enami 439:
440: 20010803:
441: grep.info is now built from grep.texi using makeinfo. Since it
442: requires makeinfo v4.0, you need to install new texinfo before
443: building gnu/usr.bin/grep. To install new texinfo, please follow
444: the instruction described in 20010726 entry.
1.30 enami 445:
1.64 sommerfe 446: 20010803:
1.41 wiz 447: (i386 only): i386 kernel now uses new instructions like
1.111 simonb 448: `fxsave' which old gas doesn't understand. To build the
1.64 sommerfe 449: kernel successfully, you need to build and install a new toolchain,
450: (i.e., build.sh -t) or (temporarily) comment out "options I686_CPU"
451: from your kernel configuration until you rebuild your userland.
452: See 20011029 above and BUILDING file in this directory for more information.
453: [updated 20020630 since i386 gas moved when USE_NEW_TOOLCHAIN enabled]
1.29 bjh21 454:
455: 20010731:
456: Bootloader update on ELF platforms. DDB in kernels from before
457: this will be unable to read symbol tables provided by newer
458: bootloaders.
1.27 assar 459:
460: 20010726:
461: Texinfo was updated to 4.0. To avoid failures when trying to
1.28 assar 462: build the included texinfo files, do:
463:
464: cd src/gnu/usr.bin/texinfo
465: make MKINFO=no dependall install
1.25 thorpej 466:
467: 20010718:
468: Enabled correct .init/.fini processing in crt0. The way this
469: was done was to change a -I directive to cc(1), which means
470: make(1) will have a stale dependency (it will be checking the
471: timestamp on the wrong "dot_init.h").
472:
473: The symptom you will see is that new programs die with SIGSEGV
474: if you have a stale dependency.
475:
476: Solution: "make cleandir" in both lib/csu and libexec/ld.elf_so
477: before starting your build.
1.26 thorpej 478:
479: 20010628:
480: A construct was added to uvm_page.h that uncovered a bug
481: in lint(1). If you get a warning/error about a non-portable
482: bitfield, update your lint(1) before proceeding.
1.21 jmc 483:
484: 20010226:
1.22 jmc 485: Added named user/group to system. Need to hand add this in or builds
1.21 jmc 486: will break as mtree aborts early.
487:
488: To work around add by hand:
489:
490: named:*:14:
491:
1.22 jmc 492: to /etc/group and add:
493:
494: named:*:14:14::0:0:Named pseudo-user:/var/named:/sbin/nologin
495:
496: to master.passwd (use vipw for instance if doing by hand).
497:
498: Now a make build should progress.
1.18 jmc 499:
500: 20010219:
1.52 wiz 501: get/setprogname() added. Any hostprogs that may use this will need
1.111 simonb 502: to be bootstrapped manually until the host system is current.
1.18 jmc 503:
1.111 simonb 504: Known problems: sys/arch/macppc/stand/fixcoff
1.19 cgd 505: usr.sbin/config (adding -DMAKE_BOOTSTRAP to
506: CFLAGS and rebuilding should work)
1.20 jmc 507: usr.sbin/mdsetimage - Build a static copy if
1.111 simonb 508: building a snapshot before fully bootstrapped.
1.15 christos 509:
510: 20010204:
511: prepare the code to compile with stricter gcc flags. in
512: particular start eliminating redundant declarations. Yacc
513: needs to be installed before make build.
1.10 christos 514:
515: 20010114:
516: introduce .if commands(target) in make(1). You need to
517: bring everything up-to-date first, then without installing
1.23 tron 518: anything make and install in usr.bin/make, then proceed
1.10 christos 519: with make build.
1.9 sommerfe 520:
521: 20010101:
522: bsd.subdir.mk committed 20001230 had a bug which caused
523: afterinstall targets to run too soon; update again.
1.8 sommerfe 524:
525: 20001230:
526: New share/mk files needed to support .WAIT in SUBDIR variables.
527: If you get make errors,
528: (cd share/mk; make install)
529: Also, PRINTOBJDIR has changed and is now used more heavily.
1.6 ad 530:
531: 20001019:
1.7 ad 532: The `ca' device driver has been replaced by `ld'; although the
1.6 ad 533: major and minor numbers haven't changed, you should update your /dev
534: directory.
1.1 abs 535:
1.4 itojun 536: 20000929:
537: The following make directives are obsoleted.
538: MKCRYPTO_RSA NOCRYPTO_RSA NOCRYPTO_RC5 NOCRYPTO_IDEA
539: By default, RSA is built into libcrypto. IDEA and RC5 will not be
1.16 wiz 540: built into libcrypto. By using MKCRYPTO_{RC5,IDEA}, you can build
1.4 itojun 541: additional library libcrypto_{idea,rc5}.
1.1 abs 542:
543:
544: Hints for a more successful build:
545: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1.2 mrg 546: Build a new kernel first:
547: This makes sure that any new system calls or features
548: expected by the new userland will be present. This
549: helps to avoid critical errors when upgrading.
1.1 abs 550: Use object directories:
551: This helps to keep stale object
552: files from polluting the build if a Makefile "forgets"
553: about one. It also makes it easier to clean up after
554: a build. It's also necessary if you want to use the
555: same source tree for multiple machines.
556: To use object directories:
557: a) cd /usr/src ; make cleandir
1.2 mrg 558: b) Add "OBJMACHINE=yes" to /etc/mk.conf
559: c) Add "MKOBJDIRS=yes" to /etc/mk.conf
1.1 abs 560: d) cd /usr/src ; make build
1.2 mrg 561: Note that running "make obj" in a directory will create
562: in obj.$MACHINE directory.
1.1 abs 563: Build to a DESTDIR:
564: This helps to keep old
565: installed files (especially libraries) from interfering
566: with the new build.
567: To build to a DESTDIR, set the DESTDIR environment
1.2 mrg 568: variable before running make build. It should be set to
569: the pathname of an initially empty directory.
1.1 abs 570: Problems: you might need to update critical utilities
571: without using DESTDIR since nothing is executed
572: from what is installed in DESTDIR.
573: (See critical utils, below)
574: Build often:
575: This keeps critical utilities current enough to not choke
576: on any other part of the source tree that depends on up to
577: date functionality.
578:
579: What to do if things don't work:
580: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
581: When things don't work there is usually a few things that commonly
582: should be done.
583: 1) make includes
584: This should be done automatically by make build.
585: 2) cd share/mk && make install
586: Again, automatically done by make build.
587:
588: Failsafe rebuild of a small part of the tree:
589: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
590: To make sure you rebuild something correctly you want to do
591: something like the following:
592: 1) Make sure the includes and .mk files are up to date.
593: 2) Make sure any program used to build the particular
594: utility is up to date. (yacc, lex, etc...)
595: 3) cd ...path/to/util...
596: make cleandir
597: rm ...all obj directories...
598: make cleandir # yes, again
599: make obj
600: make depend && make
601:
602: Failsafe rebuild of the entire tree:
603: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
604: If you really want to make sure the source tree is clean and
1.2 mrg 605: ready for a build try the following. Note that sourcing /etc/mk.conf
606: (a make(1) Makefile) in this manner is not right, and will not work
607: for anyone who uses any make(1) features in /etc/mk.conf.
1.1 abs 608:
609: ---cut here---
610: #!/bin/sh
611: . /etc/mk.conf
612:
1.58 lukem 613: if [ -z $NETBSDSRCDIR ] ; then
614: NETBSDSRCDIR=/usr/src
1.1 abs 615: fi
1.58 lukem 616: if [ \! -d $NETBSDSRCDIR ] ; then
1.1 abs 617: echo Unable to find sources
618: exit 1
619: fi
1.58 lukem 620: find $NETBSDSRCDIR -name \*.o -o -name obj.\* -o -name obj -exec rm \{\} \;
1.1 abs 621:
622: if [ -z $BSDOBJDIR ] ; then
623: BSDOBJDIR=/usr/obj
624: fi
625: if [ -d $BSDOBJDIR ] ; then
626: rm -rf $BSDOBJDIR
627: fi
628:
1.58 lukem 629: cd $NETBSDSRCDIR && make cleandir
1.1 abs 630:
631: ---cut here---
632:
633: Critical utilities:
634: ^^^^^^^^^^^^^^^^^^^
635: gnu/usr.bin/egcs
1.3 itojun 636: usr.bin/compile_et
1.1 abs 637: usr.bin/make
638: usr.bin/yacc
639: usr.bin/lex
1.11 lukem 640: usr.bin/xlint
1.2 mrg 641: usr.sbin/config
1.1 abs 642:
1.34 simonb 643: Other problems and possible solutions:
1.1 abs 644: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
645: Symptom:Unreasonable compiler errors.
646: Fix: Rebuild gnu/usr.bin/egcs
647:
648: Symptom:Complaints involving a Makefile.
1.17 erh 649: Fix: Rebuild usr.bin/make:
650: cd usr.bin/make && make && make install
1.111 simonb 651: Or, a failsafe method if that doesn't work:
1.17 erh 652: cd usr.bin/make && cc *.c */*.c -I . -o make && mv make /usr/bin
653:
1.1 abs 654: Fix: Make sure .mk files are up to date.
655: cd share/mk && make install
1.2 mrg 656:
657: Symptom:Kernel `config' fails to configure any kernel, including GENERIC.
658: Fix: Rebuild usr.sbin/config
1.1 abs 659:
660: Symptom:
661: Fix: Rebuild usr.bin/yacc
662:
663: Symptom:
664: Fix: Rebuild usr.bin/lex
665:
666: Symptom:
667: Fix: rm /usr/lib/libbfd.a
1.4 itojun 668:
669: Symptom:Obsolete intermediate files are used during compilation
670: Fix: Try the following sequence of commands in the directory in question.
671: make cleandir; rm `make print-objdir`; make cleandir; make obj
672: (If you built the tree without "make obj" in the past, obsolete files
673: may remain. The command tries to clean everything up)
1.5 wiz 674:
675: Symptom:.../sysinst/run.c:xx: warning: initialization from incompatible pointer type
676: Fix: Rebuild and install usr.bin/menuc
1.12 itojun 677:
678: Symptom:mklocale not found during build in share/locale/ctype
679: Fix: Build and install usr.bin/mklocale
1.13 dogcow 680:
1.86 kleink 681: Symptom:undefined reference to `__assert13' or `__unsetenv13'
1.13 dogcow 682: Fix: Rebuild and install lib/libc
683:
1.19 cgd 684: Symptom:usr.sbin/config fails to build.
685: Fix: Try building with -DMAKE_BOOTSTRAP added to CFLAGS in Makefile.
1.13 dogcow 686:
1.19 cgd 687: Symptom:undefined reference to `getprogname' or `setprogname'
688: Fix: Rebuild and install lib/libc
1.24 abs 689:
690: Symptom:lint does not understand the '-X' option
691: Fix: May need to build & install libs with NOLINT=1 before rebuilding lint
CVSweb <webmaster@jp.NetBSD.org>