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