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