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