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