UPDATING revision 1.142
11.142Sdrochner$NetBSD: UPDATING,v 1.142 2005/08/25 16:01:14 drochner Exp $
21.1Sabs
31.123SjmcThis file (UPDATING) is intended to be a brief reference to recent
41.123Sjmcchanges that might cause problems in the build process, and a guide for
51.123Sjmcwhat to do if something doesn't work.
61.1Sabs
71.123SjmcFor a more detailed description of the recommended way to build NetBSD
81.123Sjmcusing build.sh, see the BUILDING file.
91.123Sjmc
101.123SjmcNote that much of the advice in this UPDATING file was written before
111.123Sjmcbuild.sh existed.  Nevertheless, the advice here may be useful for
121.123Sjmcworking around specific problems with build.sh.
131.123Sjmc
141.123SjmcSee also: BUILDING, build.sh, Makefile.
151.1Sabs
161.1SabsRecent changes:
171.1Sabs^^^^^^^^^^^^^^^
181.138Slukem
191.142Sdrochner20050825:
201.142Sdrochner	Some data structures in sys/device.h, related to interface
211.142Sdrochner	attributes and locator names, were changed. config(1) was
221.142Sdrochner	modified to emit the new data structures.
231.142Sdrochner	Thus usr.bin/config must be updated (and run on the kernel
241.142Sdrochner	configuration file) before a new kernel can be built.
251.142Sdrochner
261.139Schristos20050531:
271.141Saugustss	genassym.sh(8) was moved to genassym(1). You need to either build
281.141Saugustss	tools first or install the version of genassym from /usr/bin before
291.139Schristos	you can build a kernel again.
301.139Schristos
311.140Syamt20050520:
321.140Syamt	Because a kernfs bug which xentools relies on was fixed,
331.140Syamt	xentools up to xentools20-2.0.3nb4 won't work with new kernel.
341.140Syamt
351.138Slukem20050417:
361.138Slukem	postinstall(8) was moved from /etc to /usr/sbin and made part
371.138Slukem	of the "base" set, to make it easier to invoke after an
381.138Slukem	upgrade.
391.138Slukem
401.136Scube20050325:
411.136Scube	pcppi(4) was separated in two devices, adding attimer(4).  Be sure
421.136Scube	to add a config line for an attimer(4) device in your kernel
431.136Scube	configuration, or you won't be able to set the pitch of the beep
441.137Scube	with wsconsctl.  Depending on the default value for the pitch, you
451.137Scube	might even not hear any more beep.  Also, it is advised to attach both
461.137Scube	devices the same way (i.e., both on isa or both on acpi) or the
471.137Scube	pcppi(4) device may fail to find the attimer(4) one.
481.136Scube
491.135Sjmc20050211:
501.135Sjmc	Fixes to tools/Makefile.gnuhost may cause UPDATE=1 builds in
511.135Sjmc	some of the cross tools to fail if they use configure. Some configure's
521.135Sjmc	cache the environment passed in and notice the new environment is
531.135Sjmc	different and abort. Doing a clean in tools/ should be enough to
541.135Sjmc	make a build continue.
551.135Sjmc
561.134Schristos20050109:
571.134Schristos	Since su is using pam by default now, make sure that you have
581.134Schristos	/etc/pam.d populated (postinstall will do that automatically
591.134Schristos	for you). Otherwise su will fail open (i.e. will not require
601.134Schristos	a password).
611.134Schristos
621.133Schristos20041229:
631.133Schristos	Make had a path resolution bug that manifested itself as not
641.133Schristos	being able to install openpam.3. This bug has been fixed, but
651.133Schristos	you might need to rebuild make manually first to get through
661.133Schristos	the build.
671.133Schristos
681.130Schristos20041201:
691.130Schristos	Userland programs have been changed to use /dev/bpf instead of
701.130Schristos	/dev/bpfX. You need to create that device by installing a new
711.131Swiz	MAKEDEV and running it, or mv /dev/bpf0 /dev/bpf && rm /dev/bpf[0-9]*
721.99Smrg
731.129Sjmc20041006:
741.129Sjmc
751.129Sjmc	A bug was introduced into /bin/sh (var.c rev 1.35) which causes
761.129Sjmc	variables to not export correctly to subshells in all cases. This
771.129Sjmc	will cause builds to break if that version of /bin/sh is installed
781.129Sjmc	on the system. The proper version of /bin/sh can be verified with:
791.129Sjmc
801.129Sjmc        ident /bin/sh | grep var
811.129Sjmc
821.129Sjmc	Any /bin/sh w. version 1.35 will not work and needs to be updated
831.129Sjmc	before attempting a build.
841.129Sjmc	
851.127Schristos20041001:
861.127Schristos	The ipfilter kernel sources moved from sys/netinet to
871.127Schristos	dist/sys/ipf/netinet. Due to the move some Makefile
881.127Schristos	dependencies are now dangling requiring a make cleandir
891.128She	before they work again (kdump, ktruss, rescue, ipf, and
901.128She	ftp-proxy are the victims).
911.127Schristos
921.125Satatat20040715:
931.125Satatat	The rc.d/sendmail script now uses a heuristic to determine
941.125Satatat	if sendmail should be started at boot time.  It checks the
951.125Satatat	contents of /etc/mailer.conf, /etc/mail/submit.cf, and the
961.125Satatat	owner and mode of the sendmail binary to see if any changes
971.125Satatat	to the mail infrastructure have been made.  If no changes
981.125Satatat	are detected, it will start an SMTP listener.
991.125Satatat
1001.125Satatat	Setting sendmail=NO in /etc/rc.conf will override this.
1011.125Satatat
1021.125Satatat	If you are only using sendmail by default and only for
1031.125Satatat	local delivery, it is important that you also update your
1041.125Satatat	sendmail.cf so that the SMTP listener only listens on the
1051.125Satatat	loopback interface.
1061.125Satatat
1071.125Satatat20040715:
1081.125Satatat	The method by which athhal-elf.o gets pulled into i386
1091.125Satatat	kernel builds has been changed again.  The latest version
1101.125Satatat	of bsd.files.mk is no longer required.
1111.125Satatat
1121.124Sjmc20040621:
1131.124Sjmc	Due to the recent rototill of tools/compat it's crucial one starts
1141.124Sjmc	from a clean objdir under tools/*.
1151.124Sjmc
1161.124Sjmc	This is mostly due to generated files (yacc and lex sources) needing
1171.125Satatat	to be generated with new rules from bsd.hostprog.mk.
1181.124Sjmc
1191.124Sjmc	The safest course is to rm -rf all objects under tools before building.
1201.124Sjmc
1211.121Slukem20040516:
1221.121Slukem	The end-user modifiable X11 configuration has been moved
1231.121Slukem	from /usr/X11R6/lib/X11/<dir> to /etc/X11/<dir>.
1241.121Slukem	Ensure that src and xsrc is up to date, and run
1251.121Slukem	"make cleandir" in src/x11 before your next build.
1261.121Slukem
1271.126Slukem	postinstall currently doesn't migrate the files from
1281.126Slukem	/usr/X11R6/lib/X11/* to /etc/X11/* although it does
1291.126Slukem	detect that this needs to occur, so you'll have to
1301.126Slukem	manually move these files yourself.
1311.126Slukem
1321.119Satatat20040426:
1331.119Satatat	Support for the original dynamic sysctl node structure has
1341.119Satatat	been removed in favor of the newer layout.  This affects
1351.119Satatat	consumers of the create and delete interface, as well as
1361.119Satatat	the dynamic discovery mechanism.  This is believed only to
1371.119Satatat	be the sysctl(8) binary itself, at this point in time, so
1381.119Satatat	the only effect of this should be that a sysctl binary
1391.119Satatat	built from sources dated between 2003/12/04 and 2004/03/24
1401.119Satatat	will not work on a kernel built from sources dated after
1411.119Satatat	2004/04/25.  If you need a new sysctl binary but build.sh
1421.119Satatat	does not work, make sure that your revision of
1431.120Satatat	src/sys/sys/sysctl.h is 1.112 (or later), and then the
1441.120Satatat	do the following:
1451.119Satatat
1461.120Satatat	cd /usr/src (or wherever your source tree is)
1471.120Satatat	make USETOOLS=no includes
1481.120Satatat	cd lib/libc
1491.120Satatat	make USETOOLS=no dependall install
1501.120Satatat	cd ../../sbin/sysctl
1511.119Satatat	make USETOOLS=no dependall install
1521.119Satatat
1531.122Sitojun	If you are using older sysctl binary, GNU autoconf would fail to
1541.122Sitojun	identify your machine architecture, and tries to build binary for
1551.122Sitojun	"unknown-unknown-netbsd20F" or something like that.  if that happens,
1561.122Sitojun	make sure to follow the above steps.
1571.122Sitojun
1581.118Sdbj20040425:
1591.118Sdbj	The ffs superblock issues listed below under 20040109 and 20030402
1601.118Sdbj	are now automatically addressed by the /etc/rc.d/fixsb script or by
1611.118Sdbj	sysinst when it checks a a filesystem. The manual fsck_ffs -b16 -c4
1621.118Sdbj	invocation mentioned below will continue to work and is now
1631.118Sdbj	automated by those scripts.  Note that under certain circumstances,
1641.118Sdbj	affected filesystems upgraded to a -current kernel first before
1651.118Sdbj	upgrading their userland with the fixsb and fsck_ffs fixes may
1661.118Sdbj	encounter a 'freeing free inode' panic when writing to the affected
1671.118Sdbj	filesystem, so it is a good idea to repair the filesystem as soon as
1681.118Sdbj	possible.  For more details on the fixsb script, see pr install/25138.
1691.118Sdbj
1701.115Schristos20040418:
1711.121Slukem	statfs(2) and friends have been replaced with statvfs(2). Before
1721.115Schristos	installing a newly build userland make sure that you are running
1731.115Schristos	a newly built kernel with COMPAT_20 set. In addition your libc
1741.115Schristos	build might not work (undefined SYS_statfs symbol) because make
1751.115Schristos	clean does not know how to remove files it does not know about
1761.116Schristos	anymore. Manually remove all generated .S sources and objects
1771.116Schristos	from the libc build directory.
1781.115Schristos
1791.114Sjmc20040326:
1801.114Sjmc	The method by which athhal-elf.o gets pulled into i386 kernel builds
1811.117Sjmc	has been changed. The file is now stored as a uuencoded file in CVS
1821.114Sjmc	and the generated Makefile will use the new .uue rules from bsd.file.mk
1831.114Sjmc	to build it.
1841.114Sjmc
1851.114Sjmc	This means you must have the latest bsd.files.mk installed when
1861.114Sjmc	building a kernel without USETOOLS=yes.
1871.114Sjmc
1881.113Sdan20040318:
1891.113Sdan	A bug in the cgd(4) blowfish code was corrected, without
1901.113Sdan	provision of backwards compatibility, after several public
1911.113Sdan	notices over several months. Users of cgd with blowfish cipher
1921.113Sdan	ONLY must dump their data before updating their kernels, and
1931.113Sdan	recreate cgd's and restore data using the new kernel. See
1941.113Sdan	(recent message to current-users, URL when mail-index has updated)
1951.113Sdan
1961.108Sbjh2120040313:
1971.108Sbjh21	On acorn32, the opms and qms drivers have been withdrawn, and
1981.108Sbjh21	the old wsqms driver is now called qms.  Kernel config files
1991.108Sbjh21	will need updating.  See the ones in sys/arch/acorn32/conf
2001.108Sbjh21	for examples.
2011.108Sbjh21
2021.106Sbjh2120040125:
2031.106Sbjh21	On acorn32, the beep and sysbeep devices are no longer
2041.106Sbjh21	needed, and will need to be deleted from kernel configuration
2051.106Sbjh21	files.
2061.105Sbjh21
2071.102Sdbj20040109:
2081.102Sdbj	Compatibility for old ffs superblock layouts has been
2091.102Sdbj	added, and the restrictive fsck checks have been reenabled
2101.102Sdbj	when using those layouts.  If you have been using -current
2111.102Sdbj	since 20030402, you may find that fsck again signals fatal
2121.110Sdbj	superblock mismatches.  To repair, make sure you have
2131.111Ssimonb	an updated fsck_ffs and then you can use fsck_ffs -b 16 -c 4
2141.109Sdbj	to complete the filesystem upgrade.  A message has
2151.111Ssimonb	been added to the kernel which should detect this problem.
2161.111Ssimonb	See the following discussion for more information:
2171.112Skeihan	http://mail-index.NetBSD.org/current-users/2004/01/11/0022.html
2181.102Sdbj
2191.99Smrg20031203:
2201.100Skeihan	New binutils builds may fail due to old dependencies.
2211.99Smrg	It's necessary to "make cleandir" to ensure that
2221.99Smrg	the dependencies will be rebuilt correctly.
2231.98Swiz
2241.98Swiz20031111:
2251.98Swiz	A newer mkdep is needed.  Error noting that is
2261.98Swiz		cc: Ambiguous abbreviation --
2271.97Slukem
2281.97Slukem20031008:
2291.97Slukem	/usr/include/sys/disklabel_mbr.h was removed.
2301.97Slukem	It's necessary to "make cleandir" to ensure that
2311.97Slukem	the dependencies will be rebuilt correctly.
2321.96Schristos
2331.109Sdbj20031007:
2341.111Ssimonb	A sign exension bug was fixed which set all the high bits
2351.111Ssimonb	of our newly expanded ffs fs_flags.  This should only
2361.111Ssimonb	affect users who installed or upgraded in September of 2003.
2371.109Sdbj	A small utility program was posted to tech-kern which
2381.111Ssimonb	should fix this problem, and a warning message was added
2391.111Ssimonb	to the kernel which should discover and warn about it.  See
2401.111Ssimonb	http://mail-index.NetBSD.org/tech-kern/2003/10/07/0005.html
2411.109Sdbj
2421.96Schristos20030906:
2431.96Schristos	With the addition of siginfo support the old signal trampoline
2441.96Schristos	code has been deprecated to COMPAT_16. Make sure that your running
2451.96Schristos	kernel has COMPAT_16 enabled before building userland.
2461.94Schristos
2471.94Schristos20030801:
2481.95Swiz	With the new openssl, there is some header and library shuffling.
2491.94Schristos	rm -f /usr/include/des.h /usr/include/kerberosIV/* /lib/libdes* \
2501.95Swiz	/usr/lib/libdes* before building.
2511.92Swiz
2521.92Swiz20030703:
2531.92Swiz	Texinfo was updated to 4.6.  To avoid failures when trying to
2541.92Swiz	build the included texinfo files, do:
2551.92Swiz
2561.92Swiz	cd src/gnu/usr.bin/texinfo
2571.92Swiz	make MKINFO=no dependall install
2581.90Swiz
2591.90Swiz20030630:
2601.101Sjunyoung	Groff was updated to 1.19; it's probably necessary to do
2611.91Swiz		cd share/mk && make install
2621.90Swiz		cd src/gnu/usr.bin/groff
2631.90Swiz		make MKMAN=no dependall install
2641.90Swiz	(untested).
2651.89Schristos
2661.89Schristos20030516:
2671.89Schristos	Due to bugs in the export handling code, invalid export lines
2681.89Schristos	were accepted before and caused the kernel to panic when
2691.89Schristos	mountd got restarted because it freed memory that had already
2701.89Schristos	been freed. This has been fixed and the kernel checks
2711.89Schristos	export addresses very strictly. If you upgrade your kernel,
2721.89Schristos	make sure you also upgrade mountd, because if your export
2731.89Schristos	file contains lines with an old inet4 address syntax (i.e.
2741.89Schristos	a.b.c or a.b or a), they will get rejected by the new kernel.
2751.87Sbjh21
2761.87Sbjh2120030402:
2771.87Sbjh21	The superblock layout for FFS was changed.  If you have 1.6
2781.87Sbjh21	fsck binaries, they will signal a fatal superblock mismatch
2791.87Sbjh21	with the first alternate, because they compare too many
2801.87Sbjh21	fields (even ones that aren't useful).  If possible, upgrade
2811.87Sbjh21	your fsck_ffs binary before using a new kernel.
2821.87Sbjh21	None of this signals actual filesystem damage.
2831.85Satatat
2841.85Satatat20030324:
2851.85Satatat	sendmail version 8.12.8 was imported.  Since sendmail is
2861.85Satatat	now setgid to the smmsp group, and runs in "collection"
2871.85Satatat	mode for most common activities, there is a new config
2881.85Satatat	file called submit.cf that needs to live in /etc/mail.
2891.85Satatat	The generic submit.cf sample in /usr/share/sendmail/cf
2901.85Satatat	is named netbsd-msp.cf.  Upgrading your regular sendmail
2911.85Satatat	configuration file is also strongly advised.
2921.85Satatat
2931.85Satatat	See the section named "MESSAGE SUBMISSION PROGRAM" in
2941.85Satatat	the updated /usr/share/sendmail/README file for more
2951.85Satatat	information.
2961.82Swiz
2971.82Swiz20030117:
2981.82Swiz	Texinfo was updated to 4.3.  To avoid failures when trying to
2991.82Swiz	build the included texinfo files, do:
3001.82Swiz
3011.82Swiz	cd src/gnu/usr.bin/texinfo
3021.82Swiz	make MKINFO=no dependall install
3031.81Slukem
3041.81Slukem20021223:
3051.81Slukem	The METALOG format changed slightly, to remove the leading
3061.81Slukem	"${DESTDIR}" from path names.
3071.81Slukem	This only affects people building with UNPRIVED.
3081.81Slukem	For complete safety, remove the DESTDIR entirely and
3091.81Slukem	update tools/mtree, before running make build.
3101.88Sitojun
3111.88Sitojun20021219:
3121.88Sitojun	CVS repository layout was changed.  See the following for details
3131.88Sitojun	if you are using (anonymous) cvs to update your tree.
3141.88Sitojun
3151.93Ssalo	http://mail-index.NetBSD.org/netbsd-announce/2002/12/19/0000.html
3161.80Slukem
3171.80Slukem20021219:
3181.80Slukem	install(1) had a '-N dbdir' option added, to specify an
3191.80Slukem	alternate location to look up users & groups (instead
3201.80Slukem	of the host system passwd(5) and group(5) databases).
3211.80Slukem
3221.80Slukem	The build system was modified to take advantage of
3231.80Slukem	this option (using ${NETBSDSRCDIR}/etc), so if you
3241.83Skei	use USETOOLS==no, you may have to rebuild and
3251.80Slukem	reinstall usr.bin/xinstall first.
3261.78Slukem
3271.78Slukem20021130:
3281.78Slukem	fparseln(3) moved from libutil to libc.
3291.78Slukem	If building to DESTDIR=/, reinstall the includes
3301.78Slukem	and rebuild libc:
3311.78Slukem		make includes
3321.78Slukem		make do-lib-libc
3331.78Slukem	If using build.sh, "cd tools/compat && make clean"
3341.78Slukem	before rebuilding the tools.
3351.77Slukem
3361.77Slukem20021126:
3371.77Slukem	The mk.conf(5) variable SYS_INCLUDE has been deprecated,
3381.77Slukem	including the optional "SYS_INCLUDE=symlinks" support.
3391.77Slukem	All header files, including <sys/*.h> are copied into
3401.77Slukem	/usr/include.
3411.76Sthorpej
3421.76Sthorpej20021121:
3431.76Sthorpej	The C run-time support files crtbegin.o and crtend.o
3441.76Sthorpej	(and their companions crtbeginS.o and crtendS.o) were
3451.76Sthorpej	split up, with new crti.o and crtn.o files resulting.
3461.76Sthorpej	This means that libtool needs to be rebuilt once the
3471.76Sthorpej	new libraries are installed.  The process of rebuilding
3481.76Sthorpej	libtool will cause it to automatically notice the new
3491.76Sthorpej	required files, but it *must* be rebuilt in order to
3501.76Sthorpej	do this.
3511.76Sthorpej
3521.76Sthorpej	An out-of-date libtool will result in shared libraries
3531.76Sthorpej	which lack _init() and _fini() routines, which means that
3541.76Sthorpej	their global contructors/destructors will not be invoked.
3551.75Sthorpej
3561.75Sthorpej20021121:
3571.75Sthorpej	A bug related to how ARM ELF objects were tagged has been
3581.75Sthorpej	corrected.
3591.75Sthorpej
3601.75Sthorpej	NetBSD ARM ELF uses the soft-VFP floating point model by
3611.75Sthorpej	default.  However, the assembler lacked support for marking
3621.75Sthorpej	objects as using the VFP floating point format, and the
3631.79Swiz	compiler was not properly passing the flag indicating "soft-VFP"
3641.75Sthorpej	to the assembler.
3651.75Sthorpej
3661.75Sthorpej	Unfortunately, this means that the linker will now consider
3671.75Sthorpej	old (i.e. not marked "softvfp") NetBSD ARM ELF objects to be
3681.75Sthorpej	incompatible with new (properly marked) objects.
3691.75Sthorpej
3701.75Sthorpej	The problem will only manifest itself if you attempt to compile
3711.75Sthorpej	a new program using the fixed toolchain, and link that program
3721.75Sthorpej	against old libraries which do not have the proper "softvfp"
3731.75Sthorpej	markings.  ALL OF YOUR EXISTING BINARIES AND SHARED LIBRARIES
3741.75Sthorpej	WILL CONTINUE TO WORK PROPERLY.
3751.75Sthorpej
3761.75Sthorpej	The only work-around for the problem is to recompile all of
3771.75Sthorpej	the libraries on the system.  The easiest way to do this for
3781.79Swiz	system libraries is to install a binary snapshot; they are
3791.93Ssalo	generally available on releng.NetBSD.org.  Any packages you
3801.75Sthorpej	have installed which supply libraries will have to be recompiled
3811.75Sthorpej	if you wish to link new programs against those libraries.
3821.75Sthorpej
3831.75Sthorpej	If you have questions about this matter, please contact
3841.93Ssalo	port-arm@NetBSD.org.
3851.73Sprovos
3861.73Sprovos20021011:
3871.73Sprovos	Systrace has been improved to support privilege elevation.
3881.73Sprovos	Updating the kernel requires the userland part of systrace
3891.79Swiz	to be rebuilt.
3901.72Sthorpej
3911.72Sthorpej20021010:
3921.72Sthorpej	The config(8) grammar was changed to allow options to register
3931.72Sthorpej	dependencies on attributes, as well as other options.  Users
3941.72Sthorpej	must update and reinstall usr.sbin/config before building a new
3951.72Sthorpej	kernel.
3961.70Sthorpej
3971.70Sthorpej20021009:
3981.70Sthorpej	A new attribute dependency syntax was introduced to config(8),
3991.70Sthorpej	which is now used by the SCSI configuration description.  Users
4001.71Swiz	must update and reinstall usr.sbin/config before building a new
4011.70Sthorpej	kernel.
4021.69Sthorpej
4031.69Sthorpej20021003:
4041.69Sthorpej	Several changes have been made to the autoconfiguration
4051.69Sthorpej	framework.  Users must update and reinstall usr.sbin/config
4061.69Sthorpej	before building a new kernel.
4071.74Sjschauma
4081.74Sjschauma20021001:
4091.74Sjschauma	The i386mp branch has been merged.  To compile a kernel, users
4101.74Sjschauma	will need to add the option 'cpu* at mainbus?' to their configuration
4111.74Sjschauma	file.  Multiprocessor kernels will need
4121.74Sjschauma	ioapic*		at mainbus? apid ?
4131.74Sjschauma	options		MULTIPROCESSOR
4141.74Sjschauma	options		COM_MPLOCK
4151.68Slukem
4161.68Slukem20020922:
4171.68Slukem	MKDYNAMICROOT=yes enabled by default, which means that
4181.68Slukem	certain shared libraries are installed into /lib, the shared
4191.68Slukem	linker is installed into /libexec, and all programs in /bin
4201.68Slukem	and /sbin are dynamically linked.
4211.68Slukem	If you do not use "make build", you should ensure that
4221.68Slukem	you have the libraries and shared linker in the new locations,
4231.68Slukem	with:
4241.68Slukem		make do-lib-csu do-lib-libc do-lib do-gnu-lib do-ld.elf_so
4251.67Slukem
4261.67Slukem20020917:
4271.67Slukem	USE_NEW_TOOLCHAIN has been replaced with:
4281.67Slukem	    -	TOOLCHAIN_MISSING -- set to "yes" on platforms for which
4291.67Slukem		there is no working in-tree toolchain (hppa, ns32k, sh5,
4301.67Slukem		x86_64).
4311.67Slukem	    -	EXTERNAL_TOOLCHAIN -- if defined by the user, points to the
4321.79Swiz		root of an external toolchain (e.g. /usr/local/gnu).  This
4331.67Slukem		enables the cross-build framework even for TOOLCHAIN_MISSING
4341.67Slukem		platforms.
4351.66Sgehenna
4361.66Sgehenna20020906:
4371.66Sgehenna	gehenna-devsw has been merged into the trunk. Need to update and
4381.79Swiz	reinstall usr.sbin/config before building the kernel.
4391.65Slukem
4401.65Slukem20020822:
4411.65Slukem	Crunched rescue tools (contents of /bin and /sbin, plus others)
4421.65Slukem	are now provided in /rescue.
4431.65Slukem
4441.65Slukem	To ensure that these are built statically linked (no matter
4451.65Slukem	what the setting of LDSTATIC is), use a crunchgen(1) built
4461.65Slukem	from sources newer than 20020820 (see the next entry).
4471.65Slukem
4481.65Slukem20020820:
4491.65Slukem	crunchgen(1) changed to ensure that the generated program
4501.65Slukem	is statically linked.
4511.65Slukem
4521.65Slukem	Solution: update and reinstall usr.bin/crunch
4531.84Sgrant
4541.84Sgrant20020605:
4551.84Sgrant	smmsp user/group has been added for sendmail.
4561.84Sgrant
4571.84Sgrant	Add the following into /etc/group:
4581.84Sgrant
4591.84Sgrant	smmsp:*:17:
4601.84Sgrant
4611.84Sgrant	and the following to /etc/master.passwd (via vipw):
4621.84Sgrant
4631.84Sgrant	smmsp:*:17:17::0:0:Sendmail Message Submission Program:/nonexistent:/sbin/nologin
4641.61Sitojun
4651.61Sitojun20020515:
4661.61Sitojun	sshd user/group has been added.  Need to hand add this in, or sshd
4671.61Sitojun	will not let you log in (with default, or UsePrivlegeSeparation=yes)
4681.61Sitojun
4691.61Sitojun	Add the following into /etc/group:
4701.61Sitojun
4711.61Sitojun	sshd:*:16:
4721.61Sitojun
4731.61Sitojun	and the following to /etc/master.passwd (via vipw):
4741.61Sitojun
4751.63Senami	sshd:*:16:16::0:0:& pseudo-user:/var/chroot/sshd:/sbin/nologin
4761.61Sitojun	
4771.79Swiz	Also /var/chroot/sshd directory needs to be present (digged as part of
4781.79Swiz	the build process).
4791.60Ssommerfe
4801.60Ssommerfe20020426:
4811.60Ssommerfe	NBUILDJOBS obsoleted in favor of just using -j.
4821.59Slukem
4831.59Slukem20020426:
4841.59Slukem	etc/postinstall added, which performs various checks for 
4851.59Slukem	configuration file updates and changes, and can fix most of
4861.59Slukem	the problems identified.
4871.59Slukem	This should make it much easier to upgrade a system's
4881.59Slukem	configuration from earlier systems (as far back as NetBSD 1.5).
4891.56Slukem
4901.56Slukem20020320:
4911.79Swiz	<bsd.lib.mk> needs a new install(1) for its "-a cmd" support.
4921.79Swiz	Build and install at usr.bin/xinstall before the build.
4931.56Slukem
4941.55Sitojun20020319:
4951.79Swiz	Raw IPv6 socket now makes strict checking for sa_family and sa_len
4961.79Swiz	on send(2) operation.  Be sure to have sbin/rtsol and usr.sbin/rtsold
4971.55Sitojun	newer than November 2001 when you upgrade the kernel.
4981.55Sitojun
4991.54Sitojun20020311:
5001.54Sitojun	ssh configuration files were moved from /etc to /etc/ssh.  Beware
5011.54Sitojun	if you restart your machine from remote.  Note that sshd.conf needs
5021.54Sitojun	to be changed (due to the use of "/etc" inside).
5031.54Sitojun
5041.54Sitojun20020223:
5051.53Smatt	Users of the VAX port will need to rebuild and install gas
5061.53Smatt	so it deal with the now present register prefix used in all
5071.53Smatt	the VAX assembly files.
5081.53Smatt
5091.50Sitojun20020118:
5101.50Sitojun	ntpd user/group has been added.  Need to hand add this in or builds
5111.50Sitojun	will break as mtree aborts early.
5121.50Sitojun
5131.50Sitojun	Add the following into /etc/group:
5141.50Sitojun
5151.50Sitojun	ntpd:*:15:
5161.50Sitojun
5171.50Sitojun	and the following to /etc/master.passwd (via vipw):
5181.50Sitojun
5191.50Sitojun	ntpd:*:15:15::0:0:Ntpd pseudo-user:/var/chroot/ntpd:/sbin/nologin
5201.50Sitojun
5211.49Sjmc20011207:
5221.49Sjmc	If you're attempting to build a snapshot on sparc64 and are getting
5231.49Sjmc	reloc errors from the toolchain groff binary this means your native
5241.49Sjmc	toolchain has some broken C++ bits.
5251.49Sjmc
5261.49Sjmc	To fix:
5271.49Sjmc
5281.49Sjmc	Build a new toolchain (i.e. build.sh -t)
5291.49Sjmc	Use the new toolchain to build and install natively (i.e. /usr/lib)
5301.49Sjmc
5311.49Sjmc	gnu/lib/libgcc
5321.51Spooka	gnu/lib/libstdc++
5331.49Sjmc
5341.49Sjmc	After this a snapshot will be able to be built.
5351.49Sjmc
5361.47Sjmc20011201:
5371.47Sjmc	In order for a sparc64 build to work you must have a working awk. If
5381.47Sjmc	you've built and installed a system with the new toolchain up to this
5391.52Swiz	point you do not have a working awk as its ability to do floating
5401.47Sjmc	point is broken. 
5411.47Sjmc
5421.47Sjmc	To build:
5431.47Sjmc
5441.47Sjmc	remake and install gnu/lib/libgcc
5451.47Sjmc	remake and install gnu/usr.bin/gawk into /usr/bin (make sure it links
5461.48Sjmc	against the new libgcc.a)
5471.47Sjmc
5481.46Sthorpej20011128:
5491.46Sthorpej	Kernel config information was changed to use defflag in
5501.46Sthorpej	the various "files" files.  Bug fixes to config(8) are
5511.46Sthorpej	required in order for this to work properly.  Make sure
5521.46Sthorpej	to build and install in usr.sbin/config before attempting
5531.46Sthorpej	to build a new kernel.
5541.46Sthorpej
5551.45Syamt20011030:
5561.45Syamt	libc/locale/wcstod.c now needs new lint(1). Update lint(1)
5571.45Syamt	before building libc.
5581.43Smason
5591.44Stv20011029:
5601.44Stv	The new document BUILDING.mdoc (view with nroff | more, or
5611.44Stv	see pre-generated .txt and .html versions) describes the build
5621.44Stv	procedure in great detail.  BUILDING, and the USE_NEW_TOOLCHAIN
5631.44Stv	build process, are intended in the long run to replace this
5641.44Stv	manual update log.
5651.44Stv
5661.44Stv	Users building a USE_NEW_TOOLCHAIN system should read the
5671.44Stv	BUILDING document for caveats.  Generally, BUILDING supersedes
5681.44Stv	UPDATING for these systems, as tool updating is taken care of
5691.44Stv	by the new build system.
5701.42Sperry
5711.42Sperry20011028:
5721.42Sperry	src/etc/Makefile now needs install to be able to handle
5731.42Sperry	symlinks that point to nowhere. A bug in install that
5741.42Sperry	prevented this was corrected.
5751.42Sperry
5761.42Sperry	Solution: update and reinstall usr.bin/xinstall
5771.42Sperry	Better Solution: Use the new toolchain and it will just work
5781.42Sperry	for you.
5791.40Slukem
5801.40Slukem20011006:
5811.40Slukem	/etc/mtree/NetBSD.dist has been updated to take advantage of
5821.40Slukem	absolute path support added to mtree(8). Older mtree(8)s don't
5831.40Slukem	understand the format.
5841.40Slukem
5851.40Slukem	Solution: update and reinstall usr.sbin/mtree
5861.39Sjmc
5871.39Sjmc20011004:
5881.39Sjmc	Crunchgen has been updated to work via reach-over makefiles. Updating
5891.39Sjmc	is suggested before running a snapshot build
5901.36Stv
5911.35Sthorpej20010915:
5921.35Sthorpej	The new "ubcperf" code committed by Chuck Silvers removed
5931.35Sthorpej	a header file, uvm/uvm_vnode.h.  There may be stale .depend
5941.35Sthorpej	files that still reference this file.
5951.35Sthorpej
5961.35Sthorpej	Solution: "make cleandir && make dependall" in affected
5971.35Sthorpej	directories.
5981.31Senami
5991.31Senami20010803:
6001.31Senami	grep.info is now built from grep.texi using makeinfo.  Since it
6011.31Senami	requires makeinfo v4.0, you need to install new texinfo before
6021.31Senami	building gnu/usr.bin/grep.  To install new texinfo, please follow
6031.31Senami	the instruction described in 20010726 entry.
6041.30Senami
6051.64Ssommerfe20010803: 
6061.41Swiz	(i386 only): i386 kernel now uses new instructions like
6071.111Ssimonb	`fxsave' which old gas doesn't understand.  To build the
6081.64Ssommerfe	kernel successfully, you need to build and install a new toolchain, 
6091.64Ssommerfe	(i.e., build.sh -t) or 	(temporarily) comment out "options I686_CPU" 
6101.64Ssommerfe	from your kernel configuration until you rebuild your userland.
6111.64Ssommerfe	See 20011029 above and BUILDING file in this directory for more information.
6121.64Ssommerfe	[updated 20020630 since i386 gas moved when USE_NEW_TOOLCHAIN enabled]
6131.29Sbjh21
6141.29Sbjh2120010731:
6151.29Sbjh21	Bootloader update on ELF platforms.  DDB in kernels from before
6161.29Sbjh21	this will be unable to read symbol tables provided by newer
6171.29Sbjh21	bootloaders.
6181.27Sassar
6191.27Sassar20010726:
6201.27Sassar	Texinfo was updated to 4.0.  To avoid failures when trying to
6211.28Sassar	build the included texinfo files, do:
6221.28Sassar
6231.28Sassar	cd src/gnu/usr.bin/texinfo
6241.28Sassar	make MKINFO=no dependall install
6251.25Sthorpej
6261.25Sthorpej20010718:
6271.25Sthorpej	Enabled correct .init/.fini processing in crt0.  The way this
6281.25Sthorpej	was done was to change a -I directive to cc(1), which means
6291.25Sthorpej	make(1) will have a stale dependency (it will be checking the
6301.25Sthorpej	timestamp on the wrong "dot_init.h").
6311.25Sthorpej
6321.25Sthorpej	The symptom you will see is that new programs die with SIGSEGV
6331.25Sthorpej	if you have a stale dependency.
6341.25Sthorpej
6351.25Sthorpej	Solution: "make cleandir" in both lib/csu and libexec/ld.elf_so
6361.25Sthorpej	before starting your build.
6371.26Sthorpej
6381.26Sthorpej20010628:
6391.26Sthorpej	A construct was added to uvm_page.h that uncovered a bug
6401.26Sthorpej	in lint(1).  If you get a warning/error about a non-portable
6411.26Sthorpej	bitfield, update your lint(1) before proceeding.
6421.21Sjmc
6431.21Sjmc20010226:
6441.22Sjmc	Added named user/group to system. Need to hand add this in or builds
6451.21Sjmc	will break as mtree aborts early.
6461.21Sjmc
6471.21Sjmc	To work around add by hand:
6481.21Sjmc
6491.21Sjmc	named:*:14:
6501.21Sjmc
6511.22Sjmc	to /etc/group and add:
6521.22Sjmc
6531.22Sjmc	named:*:14:14::0:0:Named pseudo-user:/var/named:/sbin/nologin
6541.22Sjmc
6551.22Sjmc	to master.passwd (use vipw for instance if doing by hand).
6561.22Sjmc
6571.22Sjmc	Now a make build should progress.
6581.18Sjmc
6591.18Sjmc20010219:
6601.52Swiz	get/setprogname() added. Any hostprogs that may use this will need
6611.111Ssimonb	to be bootstrapped manually until the host system is current.
6621.18Sjmc
6631.111Ssimonb	Known problems: sys/arch/macppc/stand/fixcoff
6641.19Scgd			usr.sbin/config (adding -DMAKE_BOOTSTRAP to
6651.19Scgd			  CFLAGS and rebuilding should work)
6661.20Sjmc			usr.sbin/mdsetimage - Build a static copy if
6671.111Ssimonb			  building a snapshot before fully bootstrapped.
6681.15Schristos
6691.15Schristos20010204:
6701.15Schristos	prepare the code to compile with stricter gcc flags. in
6711.15Schristos	particular start eliminating redundant declarations. Yacc
6721.15Schristos	needs to be installed before make build.
6731.10Schristos
6741.10Schristos20010114:
6751.10Schristos	introduce .if commands(target) in make(1). You need to
6761.10Schristos	bring everything up-to-date first, then without installing
6771.23Stron	anything make and install in usr.bin/make, then proceed
6781.10Schristos	with make build.
6791.9Ssommerfe
6801.9Ssommerfe20010101:
6811.9Ssommerfe	bsd.subdir.mk committed 20001230 had a bug which caused
6821.9Ssommerfe	afterinstall targets to run too soon; update again.
6831.8Ssommerfe
6841.8Ssommerfe20001230:
6851.8Ssommerfe	New share/mk files needed to support .WAIT in SUBDIR variables.
6861.8Ssommerfe	If you get make errors, 
6871.8Ssommerfe		(cd share/mk; make install)
6881.8Ssommerfe	Also, PRINTOBJDIR has changed and is now used more heavily.
6891.6Sad
6901.6Sad20001019:
6911.7Sad	The `ca' device driver has been replaced by `ld'; although the
6921.6Sad	major and minor numbers haven't changed, you should update your /dev
6931.6Sad	directory.
6941.1Sabs
6951.4Sitojun20000929:
6961.4Sitojun	The following make directives are obsoleted.
6971.4Sitojun	MKCRYPTO_RSA NOCRYPTO_RSA NOCRYPTO_RC5 NOCRYPTO_IDEA 
6981.4Sitojun	By default, RSA is built into libcrypto.  IDEA and RC5 will not be
6991.16Swiz	built into libcrypto.  By using MKCRYPTO_{RC5,IDEA}, you can build
7001.4Sitojun	additional library libcrypto_{idea,rc5}.
7011.1Sabs
7021.1Sabs
7031.1SabsHints for a more successful build:
7041.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7051.123Sjmc    Use build.sh, but do not use its "expert mode":
7061.132Sjmmv	This will automatically build the tools in the
7071.123Sjmc	   correct order, and it will keep the tools and the
7081.123Sjmc	   new build products from interfering with the running
7091.123Sjmc	   system.  This will allow you to ignore most of the
7101.123Sjmc	   other advice in this file.
7111.2Smrg    Build a new kernel first:
7121.2Smrg	This makes sure that any new system calls or features
7131.2Smrg	   expected by the new userland will be present.  This
7141.2Smrg	   helps to avoid critical errors when upgrading.
7151.1Sabs    Use object directories:
7161.1Sabs	This helps to keep stale object
7171.1Sabs	   files from polluting the build if a Makefile "forgets"
7181.1Sabs	   about one.  It also makes it easier to clean up after
7191.1Sabs	   a build.  It's also necessary if you want to use the
7201.1Sabs	   same source tree for multiple machines.
7211.123Sjmc	   To use object directories with build.sh:
7221.123Sjmc	    a) invoke build.sh with the "-M" or "-O" options.
7231.123Sjmc	   To use object directories without using build.sh:
7241.1Sabs	    a) cd /usr/src ; make cleandir
7251.2Smrg	    b) Add "OBJMACHINE=yes" to /etc/mk.conf
7261.2Smrg	    c) Add "MKOBJDIRS=yes" to /etc/mk.conf
7271.1Sabs	    d) cd /usr/src ; make build
7281.2Smrg	   Note that running "make obj" in a directory will create
7291.2Smrg	   in obj.$MACHINE directory.
7301.1Sabs    Build to a DESTDIR:
7311.123Sjmc	This helps to keep old installed files (especially libraries)
7321.123Sjmc	   from interfering with the new build.
7331.123Sjmc	   To build to a DESTDIR with build.sh, use the "-D" option.
7341.123Sjmc	   To build to a DESTDIR without using build.sh, set the DESTDIR
7351.123Sjmc	   environment variable before running make build.  It should be
7361.123Sjmc	   set to the pathname of an initially empty directory.
7371.123Sjmc	   Problems: if you do not use build.sh, you might need to
7381.123Sjmc		update critical utilities without using DESTDIR since
7391.123Sjmc		nothing is executed from what is installed in DESTDIR.
7401.123Sjmc		(See critical utils, below.)
7411.1Sabs    Build often:
7421.1Sabs	This keeps critical utilities current enough to not choke
7431.1Sabs	on any other part of the source tree that depends on up to
7441.123Sjmc	date functionality.  If you use build.sh, you should not have
7451.123Sjmc	this problem.
7461.1Sabs 
7471.1SabsWhat to do if things don't work:
7481.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7491.1SabsWhen things don't work there is usually a few things that commonly
7501.1Sabsshould be done.
7511.1Sabs    1)	make includes
7521.1Sabs	This should be done automatically by make build.
7531.1Sabs    2)  cd share/mk && make install
7541.1Sabs	Again, automatically done by make build.
7551.1Sabs
7561.1SabsFailsafe rebuild of a small part of the tree:
7571.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7581.1SabsTo make sure you rebuild something correctly you want to do
7591.1Sabssomething like the following:
7601.1Sabs    1)  Make sure the includes and .mk files are up to date.
7611.1Sabs    2)  Make sure any program used to build the particular
7621.1Sabs	utility is up to date.  (yacc, lex, etc...)
7631.1Sabs    3)  cd ...path/to/util...
7641.1Sabs	make cleandir
7651.1Sabs	rm ...all obj directories...
7661.1Sabs	make cleandir			# yes, again
7671.1Sabs	make obj
7681.1Sabs	make depend && make
7691.1Sabs
7701.1SabsFailsafe rebuild of the entire tree:
7711.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7721.1SabsIf you really want to make sure the source tree is clean and
7731.2Smrgready for a build try the following.  Note that sourcing /etc/mk.conf
7741.2Smrg(a make(1) Makefile) in this manner is not right, and will not work
7751.2Smrgfor anyone who uses any make(1) features in /etc/mk.conf.
7761.1Sabs
7771.1Sabs---cut here---
7781.1Sabs#!/bin/sh
7791.1Sabs. /etc/mk.conf
7801.1Sabs
7811.58Slukemif [ -z $NETBSDSRCDIR ] ; then
7821.58Slukem    NETBSDSRCDIR=/usr/src
7831.1Sabsfi
7841.58Slukemif [ \! -d $NETBSDSRCDIR ] ; then
7851.1Sabs    echo Unable to find sources
7861.1Sabs    exit 1
7871.1Sabsfi
7881.58Slukemfind $NETBSDSRCDIR -name \*.o -o -name obj.\* -o -name obj -exec rm \{\} \;
7891.1Sabs
7901.1Sabsif [ -z $BSDOBJDIR ] ; then
7911.1Sabs    BSDOBJDIR=/usr/obj
7921.1Sabsfi
7931.1Sabsif [ -d $BSDOBJDIR ] ; then
7941.1Sabs    rm -rf $BSDOBJDIR
7951.1Sabsfi
7961.1Sabs
7971.58Slukemcd $NETBSDSRCDIR && make cleandir
7981.1Sabs
7991.1Sabs---cut here---
8001.1Sabs
8011.1SabsCritical utilities:
8021.1Sabs^^^^^^^^^^^^^^^^^^^
8031.3Sitojun	usr.bin/compile_et
8041.1Sabs	usr.bin/make
8051.1Sabs	usr.bin/yacc
8061.1Sabs	usr.bin/lex
8071.11Slukem	usr.bin/xlint
8081.142Sdrochner	usr.bin/config
8091.1Sabs
8101.34SsimonbOther problems and possible solutions:
8111.1Sabs^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8121.1SabsSymptom:Complaints involving a Makefile.
8131.17SerhFix:	Rebuild usr.bin/make:
8141.17Serh	cd usr.bin/make && make && make install
8151.111Ssimonb	Or, a failsafe method if that doesn't work:
8161.17Serh	cd usr.bin/make && cc *.c */*.c -I . -o make && mv make /usr/bin
8171.17Serh
8181.1SabsFix:	Make sure .mk files are up to date.
8191.1Sabs	cd share/mk && make install
8201.2Smrg
8211.2SmrgSymptom:Kernel `config' fails to configure any kernel, including GENERIC.
8221.142SdrochnerFix:	Rebuild usr.bin/config
8231.1Sabs
8241.1SabsSymptom:
8251.1SabsFix:	Rebuild usr.bin/yacc
8261.1Sabs
8271.1SabsSymptom:
8281.1SabsFix:	Rebuild usr.bin/lex
8291.1Sabs
8301.1SabsSymptom:
8311.1SabsFix:	rm /usr/lib/libbfd.a
8321.4Sitojun
8331.4SitojunSymptom:Obsolete intermediate files are used during compilation
8341.4SitojunFix:	Try the following sequence of commands in the directory in question.
8351.4Sitojun	make cleandir; rm `make print-objdir`; make cleandir; make obj
8361.4Sitojun	(If you built the tree without "make obj" in the past, obsolete files
8371.4Sitojun	may remain.  The command tries to clean everything up)
8381.5Swiz
8391.5SwizSymptom:.../sysinst/run.c:xx: warning: initialization from incompatible pointer type
8401.5SwizFix:	Rebuild and install usr.bin/menuc
8411.12Sitojun
8421.12SitojunSymptom:mklocale not found during build in share/locale/ctype
8431.12SitojunFix:	Build and install usr.bin/mklocale
8441.13Sdogcow
8451.86SkleinkSymptom:undefined reference to `__assert13' or `__unsetenv13'
8461.13SdogcowFix:    Rebuild and install lib/libc
8471.13Sdogcow
8481.142SdrochnerSymptom:usr.bin/config fails to build.
8491.19ScgdFix:	Try building with -DMAKE_BOOTSTRAP added to CFLAGS in Makefile.
8501.13Sdogcow
8511.19ScgdSymptom:undefined reference to `getprogname' or `setprogname'
8521.19ScgdFix:    Rebuild and install lib/libc
8531.24Sabs
8541.24SabsSymptom:lint does not understand the '-X' option
8551.24SabsFix:    May need to build & install libs with NOLINT=1 before rebuilding lint
856