Annotation of src/UPDATING, Revision 1.56
1.56 ! lukem 1: $NetBSD: UPDATING,v 1.55 2002/03/19 01:23:32 itojun Exp $
1.1 abs 2:
3: This file is intended to be a brief introduction to the build
4: process and a reference on what to do if something doesn't work.
5:
6: For a more detailed description see Makefile.
7:
8: Recent changes:
9: ^^^^^^^^^^^^^^^
1.56 ! lukem 10:
! 11: 20020320:
! 12: <bsd.lib.mk> needs a new install(1) for it's "-a cmd" support.
! 13:
1.55 itojun 14: 20020319:
15: raw IPv6 socket now makes strict checking for sa_family and sa_len
16: on send(2) operation. be sure to have sbin/rtsol and usr.sbin/rtsold
17: newer than November 2001 when you upgrade the kernel.
18:
1.54 itojun 19: 20020311:
20: ssh configuration files were moved from /etc to /etc/ssh. Beware
21: if you restart your machine from remote. Note that sshd.conf needs
22: to be changed (due to the use of "/etc" inside).
23:
24: 20020223:
1.53 matt 25: Users of the VAX port will need to rebuild and install gas
26: so it deal with the now present register prefix used in all
27: the VAX assembly files.
28:
1.50 itojun 29: 20020118:
30:
31: ntpd user/group has been added. Need to hand add this in or builds
32: will break as mtree aborts early.
33:
34: Add the following into /etc/group:
35:
36: ntpd:*:15:
37:
38: and the following to /etc/master.passwd (via vipw):
39:
40: ntpd:*:15:15::0:0:Ntpd pseudo-user:/var/chroot/ntpd:/sbin/nologin
41:
1.49 jmc 42: 20011207:
43:
44: If you're attempting to build a snapshot on sparc64 and are getting
45: reloc errors from the toolchain groff binary this means your native
46: toolchain has some broken C++ bits.
47:
48: To fix:
49:
50: Build a new toolchain (i.e. build.sh -t)
51: Use the new toolchain to build and install natively (i.e. /usr/lib)
52:
53: gnu/lib/libgcc
1.51 pooka 54: gnu/lib/libstdc++
1.49 jmc 55:
56: After this a snapshot will be able to be built.
57:
1.47 jmc 58: 20011201:
59: In order for a sparc64 build to work you must have a working awk. If
60: you've built and installed a system with the new toolchain up to this
1.52 wiz 61: point you do not have a working awk as its ability to do floating
1.47 jmc 62: point is broken.
63:
64: To build:
65:
66: remake and install gnu/lib/libgcc
67: remake and install gnu/usr.bin/gawk into /usr/bin (make sure it links
1.48 jmc 68: against the new libgcc.a)
1.47 jmc 69:
1.46 thorpej 70: 20011128:
71: Kernel config information was changed to use defflag in
72: the various "files" files. Bug fixes to config(8) are
73: required in order for this to work properly. Make sure
74: to build and install in usr.sbin/config before attempting
75: to build a new kernel.
76:
1.45 yamt 77: 20011030:
78: libc/locale/wcstod.c now needs new lint(1). Update lint(1)
79: before building libc.
1.43 mason 80:
1.44 tv 81: 20011029:
82: The new document BUILDING.mdoc (view with nroff | more, or
83: see pre-generated .txt and .html versions) describes the build
84: procedure in great detail. BUILDING, and the USE_NEW_TOOLCHAIN
85: build process, are intended in the long run to replace this
86: manual update log.
87:
88: Users building a USE_NEW_TOOLCHAIN system should read the
89: BUILDING document for caveats. Generally, BUILDING supersedes
90: UPDATING for these systems, as tool updating is taken care of
91: by the new build system.
1.42 perry 92:
93: 20011028:
94: src/etc/Makefile now needs install to be able to handle
95: symlinks that point to nowhere. A bug in install that
96: prevented this was corrected.
97:
98: Solution: update and reinstall usr.bin/xinstall
99: Better Solution: Use the new toolchain and it will just work
100: for you.
1.40 lukem 101:
102: 20011006:
103: /etc/mtree/NetBSD.dist has been updated to take advantage of
104: absolute path support added to mtree(8). Older mtree(8)s don't
105: understand the format.
106:
107: Solution: update and reinstall usr.sbin/mtree
1.39 jmc 108:
109: 20011004:
110: Crunchgen has been updated to work via reach-over makefiles. Updating
111: is suggested before running a snapshot build
1.36 tv 112:
1.35 thorpej 113: 20010915:
114: The new "ubcperf" code committed by Chuck Silvers removed
115: a header file, uvm/uvm_vnode.h. There may be stale .depend
116: files that still reference this file.
117:
118: Solution: "make cleandir && make dependall" in affected
119: directories.
1.31 enami 120:
121: 20010803:
122: grep.info is now built from grep.texi using makeinfo. Since it
123: requires makeinfo v4.0, you need to install new texinfo before
124: building gnu/usr.bin/grep. To install new texinfo, please follow
125: the instruction described in 20010726 entry.
1.30 enami 126:
127: 20010803:
1.41 wiz 128: (i386 only): i386 kernel now uses new instructions like
129: `fxsave' which old gas doesn't understand. To build the
1.52 wiz 130: kernel successfully, you need to build and install new gas
1.41 wiz 131: (gnu/usr.bin/gas.new), or (temporarily) comment out
132: "options I686_CPU" from your kernel configuration until you
133: rebuilt your userland (and got a new gas).
1.29 bjh21 134:
135: 20010731:
136: Bootloader update on ELF platforms. DDB in kernels from before
137: this will be unable to read symbol tables provided by newer
138: bootloaders.
1.27 assar 139:
140: 20010726:
141: Texinfo was updated to 4.0. To avoid failures when trying to
1.28 assar 142: build the included texinfo files, do:
143:
144: cd src/gnu/usr.bin/texinfo
145: make MKINFO=no dependall install
1.25 thorpej 146:
147: 20010718:
148: Enabled correct .init/.fini processing in crt0. The way this
149: was done was to change a -I directive to cc(1), which means
150: make(1) will have a stale dependency (it will be checking the
151: timestamp on the wrong "dot_init.h").
152:
153: The symptom you will see is that new programs die with SIGSEGV
154: if you have a stale dependency.
155:
156: Solution: "make cleandir" in both lib/csu and libexec/ld.elf_so
157: before starting your build.
1.26 thorpej 158:
159: 20010628:
160: A construct was added to uvm_page.h that uncovered a bug
161: in lint(1). If you get a warning/error about a non-portable
162: bitfield, update your lint(1) before proceeding.
1.21 jmc 163:
164: 20010226:
1.22 jmc 165: Added named user/group to system. Need to hand add this in or builds
1.21 jmc 166: will break as mtree aborts early.
167:
168: To work around add by hand:
169:
170: named:*:14:
171:
1.22 jmc 172: to /etc/group and add:
173:
174: named:*:14:14::0:0:Named pseudo-user:/var/named:/sbin/nologin
175:
176: to master.passwd (use vipw for instance if doing by hand).
177:
178: Now a make build should progress.
1.18 jmc 179:
180: 20010219:
1.52 wiz 181: get/setprogname() added. Any hostprogs that may use this will need
1.20 jmc 182: to be bootstrapped manually until the host system is current.
1.18 jmc 183:
184: Known problems: sys/arch/macppc/stand/fixcoff
1.19 cgd 185: usr.sbin/config (adding -DMAKE_BOOTSTRAP to
186: CFLAGS and rebuilding should work)
1.20 jmc 187: usr.sbin/mdsetimage - Build a static copy if
188: building a snapshot before fully bootstrapped.
1.15 christos 189:
190: 20010204:
191: prepare the code to compile with stricter gcc flags. in
192: particular start eliminating redundant declarations. Yacc
193: needs to be installed before make build.
1.10 christos 194:
195: 20010114:
196: introduce .if commands(target) in make(1). You need to
197: bring everything up-to-date first, then without installing
1.23 tron 198: anything make and install in usr.bin/make, then proceed
1.10 christos 199: with make build.
1.9 sommerfe 200:
201: 20010101:
202: bsd.subdir.mk committed 20001230 had a bug which caused
203: afterinstall targets to run too soon; update again.
1.8 sommerfe 204:
205: 20001230:
206: New share/mk files needed to support .WAIT in SUBDIR variables.
207: If you get make errors,
208: (cd share/mk; make install)
209: Also, PRINTOBJDIR has changed and is now used more heavily.
1.6 ad 210:
211: 20001019:
1.7 ad 212: The `ca' device driver has been replaced by `ld'; although the
1.6 ad 213: major and minor numbers haven't changed, you should update your /dev
214: directory.
1.1 abs 215:
1.4 itojun 216: 20000929:
217: The following make directives are obsoleted.
218: MKCRYPTO_RSA NOCRYPTO_RSA NOCRYPTO_RC5 NOCRYPTO_IDEA
219: By default, RSA is built into libcrypto. IDEA and RC5 will not be
1.16 wiz 220: built into libcrypto. By using MKCRYPTO_{RC5,IDEA}, you can build
1.4 itojun 221: additional library libcrypto_{idea,rc5}.
1.1 abs 222:
223:
224: Hints for a more successful build:
225: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1.2 mrg 226: Build a new kernel first:
227: This makes sure that any new system calls or features
228: expected by the new userland will be present. This
229: helps to avoid critical errors when upgrading.
1.1 abs 230: Use object directories:
231: This helps to keep stale object
232: files from polluting the build if a Makefile "forgets"
233: about one. It also makes it easier to clean up after
234: a build. It's also necessary if you want to use the
235: same source tree for multiple machines.
236: To use object directories:
237: a) cd /usr/src ; make cleandir
1.2 mrg 238: b) Add "OBJMACHINE=yes" to /etc/mk.conf
239: c) Add "MKOBJDIRS=yes" to /etc/mk.conf
1.1 abs 240: d) cd /usr/src ; make build
1.2 mrg 241: Note that running "make obj" in a directory will create
242: in obj.$MACHINE directory.
1.1 abs 243: Build to a DESTDIR:
244: This helps to keep old
245: installed files (especially libraries) from interfering
246: with the new build.
247: To build to a DESTDIR, set the DESTDIR environment
1.2 mrg 248: variable before running make build. It should be set to
249: the pathname of an initially empty directory.
1.1 abs 250: Problems: you might need to update critical utilities
251: without using DESTDIR since nothing is executed
252: from what is installed in DESTDIR.
253: (See critical utils, below)
254: Build often:
255: This keeps critical utilities current enough to not choke
256: on any other part of the source tree that depends on up to
257: date functionality.
258:
259: What to do if things don't work:
260: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
261: When things don't work there is usually a few things that commonly
262: should be done.
263: 1) make includes
264: This should be done automatically by make build.
265: 2) cd share/mk && make install
266: Again, automatically done by make build.
267:
268: Failsafe rebuild of a small part of the tree:
269: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
270: To make sure you rebuild something correctly you want to do
271: something like the following:
272: 1) Make sure the includes and .mk files are up to date.
273: 2) Make sure any program used to build the particular
274: utility is up to date. (yacc, lex, etc...)
275: 3) cd ...path/to/util...
276: make cleandir
277: rm ...all obj directories...
278: make cleandir # yes, again
279: make obj
280: make depend && make
281:
282: Failsafe rebuild of the entire tree:
283: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
284: If you really want to make sure the source tree is clean and
1.2 mrg 285: ready for a build try the following. Note that sourcing /etc/mk.conf
286: (a make(1) Makefile) in this manner is not right, and will not work
287: for anyone who uses any make(1) features in /etc/mk.conf.
1.1 abs 288:
289: ---cut here---
290: #!/bin/sh
291: . /etc/mk.conf
292:
293: if [ -z $BSDSRCDIR ] ; then
294: BSDSRCDIR=/usr/src
295: fi
296: if [ \! -d $BSDSRCDIR ] ; then
297: echo Unable to find sources
298: exit 1
299: fi
300: find $BSDSRCDIR -name \*.o -o -name obj.\* -o -name obj -exec rm \{\} \;
301:
302: if [ -z $BSDOBJDIR ] ; then
303: BSDOBJDIR=/usr/obj
304: fi
305: if [ -d $BSDOBJDIR ] ; then
306: rm -rf $BSDOBJDIR
307: fi
308:
309: cd $BSDSRCDIR && make cleandir
310:
311: ---cut here---
312:
313: Critical utilities:
314: ^^^^^^^^^^^^^^^^^^^
315: gnu/usr.bin/egcs
1.3 itojun 316: usr.bin/compile_et
1.1 abs 317: usr.bin/make
318: usr.bin/yacc
319: usr.bin/lex
1.11 lukem 320: usr.bin/xlint
1.2 mrg 321: usr.sbin/config
1.1 abs 322:
1.34 simonb 323: Other problems and possible solutions:
1.1 abs 324: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
325: Symptom:Unreasonable compiler errors.
326: Fix: Rebuild gnu/usr.bin/egcs
327:
328: Symptom:Complaints involving a Makefile.
1.17 erh 329: Fix: Rebuild usr.bin/make:
330: cd usr.bin/make && make && make install
331: Or, a failsafe method if that doesn't work:
332: cd usr.bin/make && cc *.c */*.c -I . -o make && mv make /usr/bin
333:
1.1 abs 334: Fix: Make sure .mk files are up to date.
335: cd share/mk && make install
1.2 mrg 336:
337: Symptom:Kernel `config' fails to configure any kernel, including GENERIC.
338: Fix: Rebuild usr.sbin/config
1.1 abs 339:
340: Symptom:
341: Fix: Rebuild usr.bin/yacc
342:
343: Symptom:
344: Fix: Rebuild usr.bin/lex
345:
346: Symptom:
347: Fix: rm /usr/lib/libbfd.a
1.4 itojun 348:
349: Symptom:Obsolete intermediate files are used during compilation
350: Fix: Try the following sequence of commands in the directory in question.
351: make cleandir; rm `make print-objdir`; make cleandir; make obj
352: (If you built the tree without "make obj" in the past, obsolete files
353: may remain. The command tries to clean everything up)
1.5 wiz 354:
355: Symptom:.../sysinst/run.c:xx: warning: initialization from incompatible pointer type
356: Fix: Rebuild and install usr.bin/menuc
1.12 itojun 357:
358: Symptom:mklocale not found during build in share/locale/ctype
359: Fix: Build and install usr.bin/mklocale
1.13 dogcow 360:
361: Symptom:undefined reference to `__assert13'
362: Fix: Rebuild and install lib/libc
363:
1.19 cgd 364: Symptom:usr.sbin/config fails to build.
365: Fix: Try building with -DMAKE_BOOTSTRAP added to CFLAGS in Makefile.
1.13 dogcow 366:
1.19 cgd 367: Symptom:undefined reference to `getprogname' or `setprogname'
368: Fix: Rebuild and install lib/libc
1.24 abs 369:
370: Symptom:lint does not understand the '-X' option
371: Fix: May need to build & install libs with NOLINT=1 before rebuilding lint
CVSweb <webmaster@jp.NetBSD.org>