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