2008-08-02 18:30:37 +04:00
|
|
|
$NetBSD: UPDATING,v 1.176 2008/08/02 14:30:37 simonb Exp $
|
2000-08-18 00:17:43 +04:00
|
|
|
|
2004-06-13 12:08:43 +04:00
|
|
|
This file (UPDATING) is intended to be a brief reference to recent
|
|
|
|
changes that might cause problems in the build process, and a guide for
|
|
|
|
what to do if something doesn't work.
|
2000-08-18 00:17:43 +04:00
|
|
|
|
2004-06-13 12:08:43 +04:00
|
|
|
For a more detailed description of the recommended way to build NetBSD
|
|
|
|
using build.sh, see the BUILDING file.
|
|
|
|
|
|
|
|
Note that much of the advice in this UPDATING file was written before
|
|
|
|
build.sh existed. Nevertheless, the advice here may be useful for
|
|
|
|
working around specific problems with build.sh.
|
|
|
|
|
|
|
|
See also: BUILDING, build.sh, Makefile.
|
2000-08-18 00:17:43 +04:00
|
|
|
|
|
|
|
Recent changes:
|
|
|
|
^^^^^^^^^^^^^^^
|
2005-04-18 03:12:40 +04:00
|
|
|
|
2008-08-01 11:34:57 +04:00
|
|
|
20080731:
|
|
|
|
WAPBL (metadata journaling support) has been added, but at this
|
|
|
|
time isn't backwards compatible with pre-WAPBL aware kernels
|
|
|
|
and userland (fsck_ffs in particular). Please make sure you
|
|
|
|
don't use a journaled filesystem with an older kernel/userland,
|
2008-08-02 18:30:37 +04:00
|
|
|
especially an uncleanly mounted journaled filesystem. WAPBL
|
|
|
|
also requires the super block to be in the UFS2 format. You
|
|
|
|
can use fsck_ffs -c 4 to update the superblock format.
|
2008-08-01 11:34:57 +04:00
|
|
|
|
2008-07-23 04:29:35 +04:00
|
|
|
20080721:
|
|
|
|
Assembler warnings are now fatal if $WARNS>0 and $NOGCCERROR
|
|
|
|
isn't defined.
|
|
|
|
|
2008-05-31 17:24:57 +04:00
|
|
|
20080531:
|
|
|
|
The ioctl number of DRVSUSPENDDEV command on /dev/drvctl changed
|
|
|
|
from 125 (conflicted with DRVCTLCOMMAND) to 129. The drvctl(8)
|
|
|
|
utility needs to be rebuilt and reinstalled as older binaries
|
|
|
|
won't work correctly. The following sequence of commands:
|
|
|
|
|
|
|
|
$ (cd sys/sys/ && nbmake-$arch includes)
|
|
|
|
$ (cd sbin/drvctl/ && nbmake-$arch clean)
|
|
|
|
$ (cd sbin/drvctl/ && nbmake-$arch all)
|
|
|
|
|
|
|
|
leaves new drvctl utility in sbin/drvctl build directory.
|
|
|
|
|
2008-05-31 13:47:23 +04:00
|
|
|
20080503:
|
|
|
|
The <bsd.lib.mk> variable MKPRIVATELIB was renamed to LIBISPRIVATE.
|
|
|
|
|
2008-05-22 00:01:37 +04:00
|
|
|
20080521:
|
|
|
|
For a while, unprivileged UPDATE builds would fail to
|
|
|
|
succeed at the checkflist stage, complaining that
|
|
|
|
${DESTDIR}/stand/<arch>/ did not exist. A fix for this
|
|
|
|
problem was committed to share/mk/bsd.kmodule.mk, revision 1.9.
|
|
|
|
If you already hit this problem, update the .mk file,
|
|
|
|
remove ${DESTDIR}/stand/<arch>, and re-run the build.
|
|
|
|
|
2008-07-23 04:29:35 +04:00
|
|
|
20080303:
|
|
|
|
Linker warnings are now fatal if $WARNS>0.
|
|
|
|
|
2008-01-28 06:30:26 +03:00
|
|
|
20080126:
|
|
|
|
The posix_fadvise system call has been changed from an assembly
|
|
|
|
stub, to a c file that calls an assembly stub. You need to
|
|
|
|
'rm -f posix_fadvise.* .depend' in the libc build directory to
|
|
|
|
avoid using the old assembly stub.
|
|
|
|
|
2007-12-17 17:38:40 +03:00
|
|
|
20071209:
|
|
|
|
The acpiec(4) driver has been split into two attachments. If you
|
|
|
|
get ACPI errors before the attachment, please update your kernel
|
2007-12-18 02:59:41 +03:00
|
|
|
configuration file appropriately or see GENERIC for more details.
|
2007-12-17 17:38:40 +03:00
|
|
|
|
2007-11-15 15:53:40 +03:00
|
|
|
20071115:
|
|
|
|
The it(4) driver has been renamed to itesio(4) and the old port
|
|
|
|
argument specified in the kernel configuration file is not valid
|
|
|
|
anymore. The itesio(4) driver now uses the Super I/O address port
|
|
|
|
rather than the EC address port. Please update your kernel
|
2007-11-17 12:53:16 +03:00
|
|
|
configuration file appropriately or see GENERIC for more details.
|
2007-11-15 15:53:40 +03:00
|
|
|
|
2007-10-28 21:13:38 +03:00
|
|
|
20071028:
|
|
|
|
The pccons(4) driver has been removed from the NetBSD/shark port.
|
|
|
|
You need to update any custom kernel configuration file you have
|
|
|
|
to remove any references to pccons (which includes removing the
|
|
|
|
now useless XSERVER option) and replace them with the correct
|
|
|
|
entries for the wscons driver. See the GENERIC configuration file
|
|
|
|
for more details.
|
|
|
|
|
2007-10-02 16:45:51 +04:00
|
|
|
20070913:
|
|
|
|
A latent bug in dhclient/dhcpd that caused it to be unable to
|
|
|
|
enumerate interfaces was fixed. The bug began to cause
|
|
|
|
problems after 20070911 when the kernel's SIOCGIFCONF
|
|
|
|
implementation was repaired. From 20070529 to 20070911 racoon
|
|
|
|
could not enumerate interfaces. (These are noted because
|
|
|
|
normal kernel/userspace version matching hygiene is not
|
|
|
|
sufficient to avoid this problem.) Ensure that both kernel
|
|
|
|
and userland are from after 20070913.
|
|
|
|
|
2007-07-03 20:35:47 +04:00
|
|
|
20070703:
|
|
|
|
nbinstall has been renamed as it calls the target specific and
|
|
|
|
the logic to pass down STRIP from mk been removed. This forces
|
|
|
|
a re-installation of tools.
|
|
|
|
|
2007-05-01 00:50:20 +04:00
|
|
|
20070422:
|
|
|
|
The way OS emulations lookup filenames inside the emulation root
|
|
|
|
has been changed. Rather than modify the pathname (and copy back
|
|
|
|
to userspace) namei() and lookup() directly check the emulation
|
|
|
|
root. One side effect is that absolute symlinks inside the emulated
|
2007-11-17 12:53:16 +03:00
|
|
|
root file system will be relative to that file system - unless they
|
2007-05-01 00:50:20 +04:00
|
|
|
start /../ this is useful when the emulated root is a real install
|
|
|
|
that has such links.
|
|
|
|
This might affect symlinks that have been added to reference outside
|
|
|
|
the emulated root.
|
|
|
|
|
2007-04-12 17:17:56 +04:00
|
|
|
20070412:
|
|
|
|
The pckbc driver on sgimips IP32 has been removed. Use macekbc
|
|
|
|
instead. See the GENERIC32_IP3x kernel configuration for an
|
|
|
|
example.
|
|
|
|
|
2007-03-25 20:23:04 +04:00
|
|
|
20070319:
|
|
|
|
src/lib/libc/Makefile revision 1.129 broke libc and ld.elf_so
|
|
|
|
on many platforms due to incorrect flags settings. If you
|
|
|
|
updated and built after about 20070315, do "nbmake-$arch
|
|
|
|
cleandir" in src/lib/libc and src/libexec/ld.elf_so to force a
|
|
|
|
rebuild of object files that might have been built
|
|
|
|
incorrectly, and ensure that you have at least
|
|
|
|
src/lib/libc/Makefile 1.130.
|
|
|
|
|
2007-03-10 03:10:15 +03:00
|
|
|
20070210:
|
|
|
|
src/sys/sys/{sa.h,savar.h} were removed.
|
|
|
|
find ${OBJDIR} \( -name .depend -o -name '*.d' \) -print \
|
|
|
|
| xargs egrep -l '/sa.h|/savar.h' | xargs rm
|
|
|
|
will allow dependencies on those files to get get rebuilt
|
|
|
|
|
2007-02-27 16:42:35 +03:00
|
|
|
20070209:
|
|
|
|
The threading model was changed when the newlock2 branch
|
|
|
|
was merged to NetBSD-current. If you boot with a new
|
|
|
|
kernel (version 4.99.10), then you also need a new pthread
|
|
|
|
library (/usr/lib/libpthread.so.0.7). If you boot with
|
|
|
|
an old kernel, then you need the old pthread library
|
|
|
|
(/usr/lib/libpthread.so.0.6). Provided you keep the kernel and
|
|
|
|
the pthread library in sync, old threaded applications should
|
|
|
|
continue to work with an old or new kernel. Note that named(8)
|
|
|
|
is the only threaded application in the base system.
|
|
|
|
|
2006-12-14 23:15:32 +03:00
|
|
|
20061214:
|
|
|
|
Following the move of string_to_flags() and flags_to_string()
|
|
|
|
from the bin/ls/ sources to libutil, users doing UPDATE builds
|
|
|
|
will need to do a "make cleandir" in
|
|
|
|
tools/mtree/, tools/makefs/, tools/binstall/, tools/pax/,
|
|
|
|
bin/pax/, bin/ls/, usr.sbin/mtree/, usr.sbin/makefs/,
|
2006-12-15 17:18:38 +03:00
|
|
|
usr.bin/xinstall/, libexec/ftpd/, rescue/, as well
|
|
|
|
as the installation images in distrib/
|
2006-12-14 23:15:32 +03:00
|
|
|
in order to excise stale references to the old stat_flags.h header
|
|
|
|
file in the ls sources -- stat_flags.h has been removed.
|
|
|
|
|
2006-11-09 21:20:59 +03:00
|
|
|
20061108:
|
|
|
|
The configure script used in the src/tools/gcc compiler has been
|
|
|
|
changed to indicate that our libc has ssp support built-in and
|
|
|
|
does not depend on -lssp and -lssp-nonshared. You'll need to
|
|
|
|
make clean in src/tools/gcc first to rebuild the compiler.
|
|
|
|
|
2006-10-09 22:57:30 +04:00
|
|
|
20061009:
|
|
|
|
The sysctl variables net.inet{,6}.tcp{,6}.newreno are no longer
|
|
|
|
available. Use net.inet{,6}.tcp{,6}.congctl.selected instead.
|
|
|
|
|
2006-08-16 00:48:01 +04:00
|
|
|
20060814:
|
|
|
|
The vt, vidcconsole, kbd, and rpckbd drivers on acorn32 have been
|
|
|
|
withdrawn. Use vidcvideo and pckbd instead. See the GENERIC
|
|
|
|
kernel configuration for an example. X servers from the last
|
|
|
|
few years should cope.
|
|
|
|
|
2006-07-04 04:40:43 +04:00
|
|
|
20060703:
|
|
|
|
MPACPI is no more. We always configure PCI interrupts using ACPI
|
|
|
|
if we have an ACPI kernel. The option MPACPI_SCANPCI has been renamed
|
|
|
|
to ACPI_SCANPCI. Thanks to work from fvdl.
|
|
|
|
|
2006-06-28 01:14:11 +04:00
|
|
|
20060627:
|
|
|
|
socket(2) has changed, and its system call has been versioned.
|
|
|
|
For userlands with the old version of socket(2), make sure that
|
|
|
|
your kernel has 'options COMPAT_30' set, or else 'bad system call'
|
|
|
|
errors will result.
|
|
|
|
|
2000-08-18 00:17:43 +04:00
|
|
|
Hints for a more successful build:
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2004-06-13 12:08:43 +04:00
|
|
|
Use build.sh, but do not use its "expert mode":
|
2005-01-04 22:14:00 +03:00
|
|
|
This will automatically build the tools in the
|
2004-06-13 12:08:43 +04:00
|
|
|
correct order, and it will keep the tools and the
|
|
|
|
new build products from interfering with the running
|
|
|
|
system. This will allow you to ignore most of the
|
|
|
|
other advice in this file.
|
2000-08-20 19:43:43 +04:00
|
|
|
Build a new kernel first:
|
|
|
|
This makes sure that any new system calls or features
|
|
|
|
expected by the new userland will be present. This
|
|
|
|
helps to avoid critical errors when upgrading.
|
2000-08-18 00:17:43 +04:00
|
|
|
Use object directories:
|
|
|
|
This helps to keep stale object
|
|
|
|
files from polluting the build if a Makefile "forgets"
|
|
|
|
about one. It also makes it easier to clean up after
|
|
|
|
a build. It's also necessary if you want to use the
|
|
|
|
same source tree for multiple machines.
|
2004-06-13 12:08:43 +04:00
|
|
|
To use object directories with build.sh:
|
|
|
|
a) invoke build.sh with the "-M" or "-O" options.
|
|
|
|
To use object directories without using build.sh:
|
2000-08-18 00:17:43 +04:00
|
|
|
a) cd /usr/src ; make cleandir
|
2000-08-20 19:43:43 +04:00
|
|
|
b) Add "OBJMACHINE=yes" to /etc/mk.conf
|
|
|
|
c) Add "MKOBJDIRS=yes" to /etc/mk.conf
|
2000-08-18 00:17:43 +04:00
|
|
|
d) cd /usr/src ; make build
|
2000-08-20 19:43:43 +04:00
|
|
|
Note that running "make obj" in a directory will create
|
|
|
|
in obj.$MACHINE directory.
|
2000-08-18 00:17:43 +04:00
|
|
|
Build to a DESTDIR:
|
2004-06-13 12:08:43 +04:00
|
|
|
This helps to keep old installed files (especially libraries)
|
|
|
|
from interfering with the new build.
|
|
|
|
To build to a DESTDIR with build.sh, use the "-D" option.
|
|
|
|
To build to a DESTDIR without using build.sh, set the DESTDIR
|
|
|
|
environment variable before running make build. It should be
|
|
|
|
set to the pathname of an initially empty directory.
|
|
|
|
Problems: if you do not use build.sh, you might need to
|
|
|
|
update critical utilities without using DESTDIR since
|
|
|
|
nothing is executed from what is installed in DESTDIR.
|
|
|
|
(See critical utils, below.)
|
2000-08-18 00:17:43 +04:00
|
|
|
Build often:
|
|
|
|
This keeps critical utilities current enough to not choke
|
|
|
|
on any other part of the source tree that depends on up to
|
2004-06-13 12:08:43 +04:00
|
|
|
date functionality. If you use build.sh, you should not have
|
|
|
|
this problem.
|
2000-08-18 00:17:43 +04:00
|
|
|
|
|
|
|
What to do if things don't work:
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
When things don't work there is usually a few things that commonly
|
|
|
|
should be done.
|
|
|
|
1) make includes
|
|
|
|
This should be done automatically by make build.
|
|
|
|
2) cd share/mk && make install
|
|
|
|
Again, automatically done by make build.
|
|
|
|
|
|
|
|
Failsafe rebuild of a small part of the tree:
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
To make sure you rebuild something correctly you want to do
|
|
|
|
something like the following:
|
|
|
|
1) Make sure the includes and .mk files are up to date.
|
|
|
|
2) Make sure any program used to build the particular
|
|
|
|
utility is up to date. (yacc, lex, etc...)
|
|
|
|
3) cd ...path/to/util...
|
|
|
|
make cleandir
|
|
|
|
rm ...all obj directories...
|
|
|
|
make cleandir # yes, again
|
|
|
|
make obj
|
|
|
|
make depend && make
|
|
|
|
|
|
|
|
Failsafe rebuild of the entire tree:
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
If you really want to make sure the source tree is clean and
|
2000-08-20 19:43:43 +04:00
|
|
|
ready for a build try the following. Note that sourcing /etc/mk.conf
|
|
|
|
(a make(1) Makefile) in this manner is not right, and will not work
|
|
|
|
for anyone who uses any make(1) features in /etc/mk.conf.
|
2000-08-18 00:17:43 +04:00
|
|
|
|
|
|
|
---cut here---
|
|
|
|
#!/bin/sh
|
|
|
|
. /etc/mk.conf
|
|
|
|
|
2002-04-26 19:54:41 +04:00
|
|
|
if [ -z $NETBSDSRCDIR ] ; then
|
|
|
|
NETBSDSRCDIR=/usr/src
|
2000-08-18 00:17:43 +04:00
|
|
|
fi
|
2002-04-26 19:54:41 +04:00
|
|
|
if [ \! -d $NETBSDSRCDIR ] ; then
|
2000-08-18 00:17:43 +04:00
|
|
|
echo Unable to find sources
|
|
|
|
exit 1
|
|
|
|
fi
|
2002-04-26 19:54:41 +04:00
|
|
|
find $NETBSDSRCDIR -name \*.o -o -name obj.\* -o -name obj -exec rm \{\} \;
|
2000-08-18 00:17:43 +04:00
|
|
|
|
|
|
|
if [ -z $BSDOBJDIR ] ; then
|
|
|
|
BSDOBJDIR=/usr/obj
|
|
|
|
fi
|
|
|
|
if [ -d $BSDOBJDIR ] ; then
|
|
|
|
rm -rf $BSDOBJDIR
|
|
|
|
fi
|
|
|
|
|
2002-04-26 19:54:41 +04:00
|
|
|
cd $NETBSDSRCDIR && make cleandir
|
2000-08-18 00:17:43 +04:00
|
|
|
|
|
|
|
---cut here---
|
|
|
|
|
|
|
|
Critical utilities:
|
|
|
|
^^^^^^^^^^^^^^^^^^^
|
2000-08-20 23:51:24 +04:00
|
|
|
usr.bin/compile_et
|
2000-08-18 00:17:43 +04:00
|
|
|
usr.bin/make
|
|
|
|
usr.bin/yacc
|
|
|
|
usr.bin/lex
|
2001-01-22 17:24:53 +03:00
|
|
|
usr.bin/xlint
|
2005-08-25 20:01:14 +04:00
|
|
|
usr.bin/config
|
2000-08-18 00:17:43 +04:00
|
|
|
|
2001-09-15 17:59:29 +04:00
|
|
|
Other problems and possible solutions:
|
2000-08-18 00:17:43 +04:00
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
Symptom:Complaints involving a Makefile.
|
2001-02-18 22:13:58 +03:00
|
|
|
Fix: Rebuild usr.bin/make:
|
|
|
|
cd usr.bin/make && make && make install
|
2004-03-15 00:08:10 +03:00
|
|
|
Or, a failsafe method if that doesn't work:
|
2001-02-18 22:13:58 +03:00
|
|
|
cd usr.bin/make && cc *.c */*.c -I . -o make && mv make /usr/bin
|
|
|
|
|
2000-08-18 00:17:43 +04:00
|
|
|
Fix: Make sure .mk files are up to date.
|
|
|
|
cd share/mk && make install
|
|
|
|
|
2000-08-20 19:43:43 +04:00
|
|
|
Symptom:Kernel `config' fails to configure any kernel, including GENERIC.
|
2005-08-25 20:01:14 +04:00
|
|
|
Fix: Rebuild usr.bin/config
|
2000-08-20 19:43:43 +04:00
|
|
|
|
2000-08-18 00:17:43 +04:00
|
|
|
Symptom:
|
|
|
|
Fix: Rebuild usr.bin/yacc
|
|
|
|
|
|
|
|
Symptom:
|
|
|
|
Fix: Rebuild usr.bin/lex
|
|
|
|
|
|
|
|
Symptom:
|
|
|
|
Fix: rm /usr/lib/libbfd.a
|
2000-10-02 10:19:17 +04:00
|
|
|
|
|
|
|
Symptom:Obsolete intermediate files are used during compilation
|
|
|
|
Fix: Try the following sequence of commands in the directory in question.
|
|
|
|
make cleandir; rm `make print-objdir`; make cleandir; make obj
|
|
|
|
(If you built the tree without "make obj" in the past, obsolete files
|
|
|
|
may remain. The command tries to clean everything up)
|
2000-10-14 05:06:55 +04:00
|
|
|
|
|
|
|
Symptom:.../sysinst/run.c:xx: warning: initialization from incompatible pointer type
|
|
|
|
Fix: Rebuild and install usr.bin/menuc
|
2001-01-24 15:35:48 +03:00
|
|
|
|
|
|
|
Symptom:mklocale not found during build in share/locale/ctype
|
|
|
|
Fix: Build and install usr.bin/mklocale
|
2001-01-26 04:31:38 +03:00
|
|
|
|
2003-04-10 12:12:29 +04:00
|
|
|
Symptom:undefined reference to `__assert13' or `__unsetenv13'
|
2001-01-26 04:31:38 +03:00
|
|
|
Fix: Rebuild and install lib/libc
|
|
|
|
|
2005-08-25 20:01:14 +04:00
|
|
|
Symptom:usr.bin/config fails to build.
|
2001-02-24 04:05:04 +03:00
|
|
|
Fix: Try building with -DMAKE_BOOTSTRAP added to CFLAGS in Makefile.
|
2001-01-26 04:31:38 +03:00
|
|
|
|
2001-02-24 04:05:04 +03:00
|
|
|
Symptom:undefined reference to `getprogname' or `setprogname'
|
|
|
|
Fix: Rebuild and install lib/libc
|
2001-05-28 03:34:22 +04:00
|
|
|
|
|
|
|
Symptom:lint does not understand the '-X' option
|
|
|
|
Fix: May need to build & install libs with NOLINT=1 before rebuilding lint
|