Annotation of src/UPDATING, Revision 1.164
1.164 ! gdt 1: $NetBSD: UPDATING,v 1.163 2007/07/03 16:35:47 joerg 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.164 ! gdt 19: 20070913:
! 20: A latent bug in dhclient/dhcpd that caused it to be unable to
! 21: enumerate interfaces was fixed. The bug began to cause
! 22: problems after 20070911 when the kernel's SIOCGIFCONF
! 23: implementation was repaired. From 20070529 to 20070911 racoon
! 24: could not enumerate interfaces. (These are noted because
! 25: normal kernel/userspace version matching hygiene is not
! 26: sufficient to avoid this problem.) Ensure that both kernel
! 27: and userland are from after 20070913.
! 28:
1.163 joerg 29: 20070703:
30: nbinstall has been renamed as it calls the target specific and
31: the logic to pass down STRIP from mk been removed. This forces
32: a re-installation of tools.
33:
1.161 dsl 34: 20070422:
35: The way OS emulations lookup filenames inside the emulation root
36: has been changed. Rather than modify the pathname (and copy back
37: to userspace) namei() and lookup() directly check the emulation
38: root. One side effect is that absolute symlinks inside the emulated
39: root filesytem will be relative to that filesystem - unless they
40: start /../ this is useful when the emulated root is a real install
41: that has such links.
42: This might affect symlinks that have been added to reference outside
43: the emulated root.
44:
1.160 jmcneill 45: 20070412:
46: The pckbc driver on sgimips IP32 has been removed. Use macekbc
47: instead. See the GENERIC32_IP3x kernel configuration for an
48: example.
49:
1.159 gdt 50: 20070319:
51: src/lib/libc/Makefile revision 1.129 broke libc and ld.elf_so
52: on many platforms due to incorrect flags settings. If you
53: updated and built after about 20070315, do "nbmake-$arch
54: cleandir" in src/lib/libc and src/libexec/ld.elf_so to force a
55: rebuild of object files that might have been built
56: incorrectly, and ensure that you have at least
57: src/lib/libc/Makefile 1.130.
58:
1.158 dbj 59: 20070210:
60: src/sys/sys/{sa.h,savar.h} were removed.
61: find ${OBJDIR} \( -name .depend -o -name '*.d' \) -print \
62: | xargs egrep -l '/sa.h|/savar.h' | xargs rm
63: will allow dependencies on those files to get get rebuilt
64:
1.157 apb 65: 20070209:
66: The threading model was changed when the newlock2 branch
67: was merged to NetBSD-current. If you boot with a new
68: kernel (version 4.99.10), then you also need a new pthread
69: library (/usr/lib/libpthread.so.0.7). If you boot with
70: an old kernel, then you need the old pthread library
71: (/usr/lib/libpthread.so.0.6). Provided you keep the kernel and
72: the pthread library in sync, old threaded applications should
73: continue to work with an old or new kernel. Note that named(8)
74: is the only threaded application in the base system.
75:
1.154 he 76: 20061214:
77: Following the move of string_to_flags() and flags_to_string()
78: from the bin/ls/ sources to libutil, users doing UPDATE builds
79: will need to do a "make cleandir" in
80: tools/mtree/, tools/makefs/, tools/binstall/, tools/pax/,
81: bin/pax/, bin/ls/, usr.sbin/mtree/, usr.sbin/makefs/,
1.156 he 82: usr.bin/xinstall/, libexec/ftpd/, rescue/, as well
83: as the installation images in distrib/
1.154 he 84: in order to excise stale references to the old stat_flags.h header
85: file in the ls sources -- stat_flags.h has been removed.
86:
1.152 christos 87: 20061108:
88: The configure script used in the src/tools/gcc compiler has been
89: changed to indicate that our libc has ssp support built-in and
90: does not depend on -lssp and -lssp-nonshared. You'll need to
91: make clean in src/tools/gcc first to rebuild the compiler.
92:
1.151 rpaulo 93: 20061009:
94: The sysctl variables net.inet{,6}.tcp{,6}.newreno are no longer
95: available. Use net.inet{,6}.tcp{,6}.congctl.selected instead.
96:
1.150 bjh21 97: 20060814:
98: The vt, vidcconsole, kbd, and rpckbd drivers on acorn32 have been
99: withdrawn. Use vidcvideo and pckbd instead. See the GENERIC
100: kernel configuration for an example. X servers from the last
101: few years should cope.
102:
1.149 christos 103: 20060703:
104: MPACPI is no more. We always configure PCI interrupts using ACPI
105: if we have an ACPI kernel. The option MPACPI_SCANPCI has been renamed
106: to ACPI_SCANPCI. Thanks to work from fvdl.
107:
1.148 dogcow 108: 20060627:
109: socket(2) has changed, and its system call has been versioned.
110: For userlands with the old version of socket(2), make sure that
111: your kernel has 'options COMPAT_30' set, or else 'bad system call'
112: errors will result.
113:
1.1 abs 114: Hints for a more successful build:
115: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1.123 jmc 116: Use build.sh, but do not use its "expert mode":
1.132 jmmv 117: This will automatically build the tools in the
1.123 jmc 118: correct order, and it will keep the tools and the
119: new build products from interfering with the running
120: system. This will allow you to ignore most of the
121: other advice in this file.
1.2 mrg 122: Build a new kernel first:
123: This makes sure that any new system calls or features
124: expected by the new userland will be present. This
125: helps to avoid critical errors when upgrading.
1.1 abs 126: Use object directories:
127: This helps to keep stale object
128: files from polluting the build if a Makefile "forgets"
129: about one. It also makes it easier to clean up after
130: a build. It's also necessary if you want to use the
131: same source tree for multiple machines.
1.123 jmc 132: To use object directories with build.sh:
133: a) invoke build.sh with the "-M" or "-O" options.
134: To use object directories without using build.sh:
1.1 abs 135: a) cd /usr/src ; make cleandir
1.2 mrg 136: b) Add "OBJMACHINE=yes" to /etc/mk.conf
137: c) Add "MKOBJDIRS=yes" to /etc/mk.conf
1.1 abs 138: d) cd /usr/src ; make build
1.2 mrg 139: Note that running "make obj" in a directory will create
140: in obj.$MACHINE directory.
1.1 abs 141: Build to a DESTDIR:
1.123 jmc 142: This helps to keep old installed files (especially libraries)
143: from interfering with the new build.
144: To build to a DESTDIR with build.sh, use the "-D" option.
145: To build to a DESTDIR without using build.sh, set the DESTDIR
146: environment variable before running make build. It should be
147: set to the pathname of an initially empty directory.
148: Problems: if you do not use build.sh, you might need to
149: update critical utilities without using DESTDIR since
150: nothing is executed from what is installed in DESTDIR.
151: (See critical utils, below.)
1.1 abs 152: Build often:
153: This keeps critical utilities current enough to not choke
154: on any other part of the source tree that depends on up to
1.123 jmc 155: date functionality. If you use build.sh, you should not have
156: this problem.
1.1 abs 157:
158: What to do if things don't work:
159: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
160: When things don't work there is usually a few things that commonly
161: should be done.
162: 1) make includes
163: This should be done automatically by make build.
164: 2) cd share/mk && make install
165: Again, automatically done by make build.
166:
167: Failsafe rebuild of a small part of the tree:
168: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
169: To make sure you rebuild something correctly you want to do
170: something like the following:
171: 1) Make sure the includes and .mk files are up to date.
172: 2) Make sure any program used to build the particular
173: utility is up to date. (yacc, lex, etc...)
174: 3) cd ...path/to/util...
175: make cleandir
176: rm ...all obj directories...
177: make cleandir # yes, again
178: make obj
179: make depend && make
180:
181: Failsafe rebuild of the entire tree:
182: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
183: If you really want to make sure the source tree is clean and
1.2 mrg 184: ready for a build try the following. Note that sourcing /etc/mk.conf
185: (a make(1) Makefile) in this manner is not right, and will not work
186: for anyone who uses any make(1) features in /etc/mk.conf.
1.1 abs 187:
188: ---cut here---
189: #!/bin/sh
190: . /etc/mk.conf
191:
1.58 lukem 192: if [ -z $NETBSDSRCDIR ] ; then
193: NETBSDSRCDIR=/usr/src
1.1 abs 194: fi
1.58 lukem 195: if [ \! -d $NETBSDSRCDIR ] ; then
1.1 abs 196: echo Unable to find sources
197: exit 1
198: fi
1.58 lukem 199: find $NETBSDSRCDIR -name \*.o -o -name obj.\* -o -name obj -exec rm \{\} \;
1.1 abs 200:
201: if [ -z $BSDOBJDIR ] ; then
202: BSDOBJDIR=/usr/obj
203: fi
204: if [ -d $BSDOBJDIR ] ; then
205: rm -rf $BSDOBJDIR
206: fi
207:
1.58 lukem 208: cd $NETBSDSRCDIR && make cleandir
1.1 abs 209:
210: ---cut here---
211:
212: Critical utilities:
213: ^^^^^^^^^^^^^^^^^^^
1.3 itojun 214: usr.bin/compile_et
1.1 abs 215: usr.bin/make
216: usr.bin/yacc
217: usr.bin/lex
1.11 lukem 218: usr.bin/xlint
1.142 drochner 219: usr.bin/config
1.1 abs 220:
1.34 simonb 221: Other problems and possible solutions:
1.1 abs 222: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
223: Symptom:Complaints involving a Makefile.
1.17 erh 224: Fix: Rebuild usr.bin/make:
225: cd usr.bin/make && make && make install
1.111 simonb 226: Or, a failsafe method if that doesn't work:
1.17 erh 227: cd usr.bin/make && cc *.c */*.c -I . -o make && mv make /usr/bin
228:
1.1 abs 229: Fix: Make sure .mk files are up to date.
230: cd share/mk && make install
1.2 mrg 231:
232: Symptom:Kernel `config' fails to configure any kernel, including GENERIC.
1.142 drochner 233: Fix: Rebuild usr.bin/config
1.1 abs 234:
235: Symptom:
236: Fix: Rebuild usr.bin/yacc
237:
238: Symptom:
239: Fix: Rebuild usr.bin/lex
240:
241: Symptom:
242: Fix: rm /usr/lib/libbfd.a
1.4 itojun 243:
244: Symptom:Obsolete intermediate files are used during compilation
245: Fix: Try the following sequence of commands in the directory in question.
246: make cleandir; rm `make print-objdir`; make cleandir; make obj
247: (If you built the tree without "make obj" in the past, obsolete files
248: may remain. The command tries to clean everything up)
1.5 wiz 249:
250: Symptom:.../sysinst/run.c:xx: warning: initialization from incompatible pointer type
251: Fix: Rebuild and install usr.bin/menuc
1.12 itojun 252:
253: Symptom:mklocale not found during build in share/locale/ctype
254: Fix: Build and install usr.bin/mklocale
1.13 dogcow 255:
1.86 kleink 256: Symptom:undefined reference to `__assert13' or `__unsetenv13'
1.13 dogcow 257: Fix: Rebuild and install lib/libc
258:
1.142 drochner 259: Symptom:usr.bin/config fails to build.
1.19 cgd 260: Fix: Try building with -DMAKE_BOOTSTRAP added to CFLAGS in Makefile.
1.13 dogcow 261:
1.19 cgd 262: Symptom:undefined reference to `getprogname' or `setprogname'
263: Fix: Rebuild and install lib/libc
1.24 abs 264:
265: Symptom:lint does not understand the '-X' option
266: Fix: May need to build & install libs with NOLINT=1 before rebuilding lint
CVSweb <webmaster@jp.NetBSD.org>