[BACK]Return to UPDATING CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src

Annotation of src/UPDATING, Revision 1.136

1.136   ! cube        1: $NetBSD: UPDATING,v 1.135 2005/02/11 17:50:13 jmc Exp $
1.1       abs         2:
1.123     jmc         3: This file (UPDATING) is intended to be a brief reference to recent
                      4: changes that might cause problems in the build process, and a guide for
                      5: what to do if something doesn't work.
1.1       abs         6:
1.123     jmc         7: For a more detailed description of the recommended way to build NetBSD
                      8: using build.sh, see the BUILDING file.
                      9:
                     10: Note that much of the advice in this UPDATING file was written before
                     11: build.sh existed.  Nevertheless, the advice here may be useful for
                     12: working around specific problems with build.sh.
                     13:
                     14: See also: BUILDING, build.sh, Makefile.
1.1       abs        15:
                     16: Recent changes:
                     17: ^^^^^^^^^^^^^^^
1.136   ! cube       18: 20050325:
        !            19:        pcppi(4) was separated in two devices, adding attimer(4).  Be sure
        !            20:        to add a config line for an attimer(4) device in your kernel
        !            21:        configuration, or you won't be able to set the pitch of the beep
        !            22:        with wsconsctl.  Also, it is advised to attach both devices the
        !            23:        same way (i.e., both on isa or both on acpi) or the pcppi(4) device
        !            24:        may fail to find the attimer(4) one.
        !            25:
1.135     jmc        26: 20050211:
                     27:        Fixes to tools/Makefile.gnuhost may cause UPDATE=1 builds in
                     28:        some of the cross tools to fail if they use configure. Some configure's
                     29:        cache the environment passed in and notice the new environment is
                     30:        different and abort. Doing a clean in tools/ should be enough to
                     31:        make a build continue.
                     32:
1.134     christos   33: 20050109:
                     34:        Since su is using pam by default now, make sure that you have
                     35:        /etc/pam.d populated (postinstall will do that automatically
                     36:        for you). Otherwise su will fail open (i.e. will not require
                     37:        a password).
                     38:
1.133     christos   39: 20041229:
                     40:        Make had a path resolution bug that manifested itself as not
                     41:        being able to install openpam.3. This bug has been fixed, but
                     42:        you might need to rebuild make manually first to get through
                     43:        the build.
                     44:
1.130     christos   45: 20041201:
                     46:        Userland programs have been changed to use /dev/bpf instead of
                     47:        /dev/bpfX. You need to create that device by installing a new
1.131     wiz        48:        MAKEDEV and running it, or mv /dev/bpf0 /dev/bpf && rm /dev/bpf[0-9]*
1.99      mrg        49:
1.129     jmc        50: 20041006:
                     51:
                     52:        A bug was introduced into /bin/sh (var.c rev 1.35) which causes
                     53:        variables to not export correctly to subshells in all cases. This
                     54:        will cause builds to break if that version of /bin/sh is installed
                     55:        on the system. The proper version of /bin/sh can be verified with:
                     56:
                     57:         ident /bin/sh | grep var
                     58:
                     59:        Any /bin/sh w. version 1.35 will not work and needs to be updated
                     60:        before attempting a build.
                     61:
1.127     christos   62: 20041001:
                     63:        The ipfilter kernel sources moved from sys/netinet to
                     64:        dist/sys/ipf/netinet. Due to the move some Makefile
                     65:        dependencies are now dangling requiring a make cleandir
1.128     he         66:        before they work again (kdump, ktruss, rescue, ipf, and
                     67:        ftp-proxy are the victims).
1.127     christos   68:
1.125     atatat     69: 20040715:
                     70:        The rc.d/sendmail script now uses a heuristic to determine
                     71:        if sendmail should be started at boot time.  It checks the
                     72:        contents of /etc/mailer.conf, /etc/mail/submit.cf, and the
                     73:        owner and mode of the sendmail binary to see if any changes
                     74:        to the mail infrastructure have been made.  If no changes
                     75:        are detected, it will start an SMTP listener.
                     76:
                     77:        Setting sendmail=NO in /etc/rc.conf will override this.
                     78:
                     79:        If you are only using sendmail by default and only for
                     80:        local delivery, it is important that you also update your
                     81:        sendmail.cf so that the SMTP listener only listens on the
                     82:        loopback interface.
                     83:
                     84: 20040715:
                     85:        The method by which athhal-elf.o gets pulled into i386
                     86:        kernel builds has been changed again.  The latest version
                     87:        of bsd.files.mk is no longer required.
                     88:
1.124     jmc        89: 20040621:
                     90:        Due to the recent rototill of tools/compat it's crucial one starts
                     91:        from a clean objdir under tools/*.
                     92:
                     93:        This is mostly due to generated files (yacc and lex sources) needing
1.125     atatat     94:        to be generated with new rules from bsd.hostprog.mk.
1.124     jmc        95:
                     96:        The safest course is to rm -rf all objects under tools before building.
                     97:
1.121     lukem      98: 20040516:
                     99:        The end-user modifiable X11 configuration has been moved
                    100:        from /usr/X11R6/lib/X11/<dir> to /etc/X11/<dir>.
                    101:        Ensure that src and xsrc is up to date, and run
                    102:        "make cleandir" in src/x11 before your next build.
                    103:
1.126     lukem     104:        postinstall currently doesn't migrate the files from
                    105:        /usr/X11R6/lib/X11/* to /etc/X11/* although it does
                    106:        detect that this needs to occur, so you'll have to
                    107:        manually move these files yourself.
                    108:
1.119     atatat    109: 20040426:
                    110:        Support for the original dynamic sysctl node structure has
                    111:        been removed in favor of the newer layout.  This affects
                    112:        consumers of the create and delete interface, as well as
                    113:        the dynamic discovery mechanism.  This is believed only to
                    114:        be the sysctl(8) binary itself, at this point in time, so
                    115:        the only effect of this should be that a sysctl binary
                    116:        built from sources dated between 2003/12/04 and 2004/03/24
                    117:        will not work on a kernel built from sources dated after
                    118:        2004/04/25.  If you need a new sysctl binary but build.sh
                    119:        does not work, make sure that your revision of
1.120     atatat    120:        src/sys/sys/sysctl.h is 1.112 (or later), and then the
                    121:        do the following:
1.119     atatat    122:
1.120     atatat    123:        cd /usr/src (or wherever your source tree is)
                    124:        make USETOOLS=no includes
                    125:        cd lib/libc
                    126:        make USETOOLS=no dependall install
                    127:        cd ../../sbin/sysctl
1.119     atatat    128:        make USETOOLS=no dependall install
                    129:
1.122     itojun    130:        If you are using older sysctl binary, GNU autoconf would fail to
                    131:        identify your machine architecture, and tries to build binary for
                    132:        "unknown-unknown-netbsd20F" or something like that.  if that happens,
                    133:        make sure to follow the above steps.
                    134:
1.118     dbj       135: 20040425:
                    136:        The ffs superblock issues listed below under 20040109 and 20030402
                    137:        are now automatically addressed by the /etc/rc.d/fixsb script or by
                    138:        sysinst when it checks a a filesystem. The manual fsck_ffs -b16 -c4
                    139:        invocation mentioned below will continue to work and is now
                    140:        automated by those scripts.  Note that under certain circumstances,
                    141:        affected filesystems upgraded to a -current kernel first before
                    142:        upgrading their userland with the fixsb and fsck_ffs fixes may
                    143:        encounter a 'freeing free inode' panic when writing to the affected
                    144:        filesystem, so it is a good idea to repair the filesystem as soon as
                    145:        possible.  For more details on the fixsb script, see pr install/25138.
                    146:
1.115     christos  147: 20040418:
1.121     lukem     148:        statfs(2) and friends have been replaced with statvfs(2). Before
1.115     christos  149:        installing a newly build userland make sure that you are running
                    150:        a newly built kernel with COMPAT_20 set. In addition your libc
                    151:        build might not work (undefined SYS_statfs symbol) because make
                    152:        clean does not know how to remove files it does not know about
1.116     christos  153:        anymore. Manually remove all generated .S sources and objects
                    154:        from the libc build directory.
1.115     christos  155:
1.114     jmc       156: 20040326:
                    157:        The method by which athhal-elf.o gets pulled into i386 kernel builds
1.117     jmc       158:        has been changed. The file is now stored as a uuencoded file in CVS
1.114     jmc       159:        and the generated Makefile will use the new .uue rules from bsd.file.mk
                    160:        to build it.
                    161:
                    162:        This means you must have the latest bsd.files.mk installed when
                    163:        building a kernel without USETOOLS=yes.
                    164:
1.113     dan       165: 20040318:
                    166:        A bug in the cgd(4) blowfish code was corrected, without
                    167:        provision of backwards compatibility, after several public
                    168:        notices over several months. Users of cgd with blowfish cipher
                    169:        ONLY must dump their data before updating their kernels, and
                    170:        recreate cgd's and restore data using the new kernel. See
                    171:        (recent message to current-users, URL when mail-index has updated)
                    172:
1.108     bjh21     173: 20040313:
                    174:        On acorn32, the opms and qms drivers have been withdrawn, and
                    175:        the old wsqms driver is now called qms.  Kernel config files
                    176:        will need updating.  See the ones in sys/arch/acorn32/conf
                    177:        for examples.
                    178:
1.106     bjh21     179: 20040125:
                    180:        On acorn32, the beep and sysbeep devices are no longer
                    181:        needed, and will need to be deleted from kernel configuration
                    182:        files.
1.105     bjh21     183:
1.102     dbj       184: 20040109:
                    185:        Compatibility for old ffs superblock layouts has been
                    186:        added, and the restrictive fsck checks have been reenabled
                    187:        when using those layouts.  If you have been using -current
                    188:        since 20030402, you may find that fsck again signals fatal
1.110     dbj       189:        superblock mismatches.  To repair, make sure you have
1.111     simonb    190:        an updated fsck_ffs and then you can use fsck_ffs -b 16 -c 4
1.109     dbj       191:        to complete the filesystem upgrade.  A message has
1.111     simonb    192:        been added to the kernel which should detect this problem.
                    193:        See the following discussion for more information:
1.112     keihan    194:        http://mail-index.NetBSD.org/current-users/2004/01/11/0022.html
1.102     dbj       195:
1.99      mrg       196: 20031203:
1.100     keihan    197:        New binutils builds may fail due to old dependencies.
1.99      mrg       198:        It's necessary to "make cleandir" to ensure that
                    199:        the dependencies will be rebuilt correctly.
1.98      wiz       200:
                    201: 20031111:
                    202:        A newer mkdep is needed.  Error noting that is
                    203:                cc: Ambiguous abbreviation --
1.97      lukem     204:
                    205: 20031008:
                    206:        /usr/include/sys/disklabel_mbr.h was removed.
                    207:        It's necessary to "make cleandir" to ensure that
                    208:        the dependencies will be rebuilt correctly.
1.96      christos  209:
1.109     dbj       210: 20031007:
1.111     simonb    211:        A sign exension bug was fixed which set all the high bits
                    212:        of our newly expanded ffs fs_flags.  This should only
                    213:        affect users who installed or upgraded in September of 2003.
1.109     dbj       214:        A small utility program was posted to tech-kern which
1.111     simonb    215:        should fix this problem, and a warning message was added
                    216:        to the kernel which should discover and warn about it.  See
                    217:        http://mail-index.NetBSD.org/tech-kern/2003/10/07/0005.html
1.109     dbj       218:
1.96      christos  219: 20030906:
                    220:        With the addition of siginfo support the old signal trampoline
                    221:        code has been deprecated to COMPAT_16. Make sure that your running
                    222:        kernel has COMPAT_16 enabled before building userland.
1.94      christos  223:
                    224: 20030801:
1.95      wiz       225:        With the new openssl, there is some header and library shuffling.
1.94      christos  226:        rm -f /usr/include/des.h /usr/include/kerberosIV/* /lib/libdes* \
1.95      wiz       227:        /usr/lib/libdes* before building.
1.92      wiz       228:
                    229: 20030703:
                    230:        Texinfo was updated to 4.6.  To avoid failures when trying to
                    231:        build the included texinfo files, do:
                    232:
                    233:        cd src/gnu/usr.bin/texinfo
                    234:        make MKINFO=no dependall install
1.90      wiz       235:
                    236: 20030630:
1.101     junyoung  237:        Groff was updated to 1.19; it's probably necessary to do
1.91      wiz       238:                cd share/mk && make install
1.90      wiz       239:                cd src/gnu/usr.bin/groff
                    240:                make MKMAN=no dependall install
                    241:        (untested).
1.89      christos  242:
                    243: 20030516:
                    244:        Due to bugs in the export handling code, invalid export lines
                    245:        were accepted before and caused the kernel to panic when
                    246:        mountd got restarted because it freed memory that had already
                    247:        been freed. This has been fixed and the kernel checks
                    248:        export addresses very strictly. If you upgrade your kernel,
                    249:        make sure you also upgrade mountd, because if your export
                    250:        file contains lines with an old inet4 address syntax (i.e.
                    251:        a.b.c or a.b or a), they will get rejected by the new kernel.
1.87      bjh21     252:
                    253: 20030402:
                    254:        The superblock layout for FFS was changed.  If you have 1.6
                    255:        fsck binaries, they will signal a fatal superblock mismatch
                    256:        with the first alternate, because they compare too many
                    257:        fields (even ones that aren't useful).  If possible, upgrade
                    258:        your fsck_ffs binary before using a new kernel.
                    259:        None of this signals actual filesystem damage.
1.85      atatat    260:
                    261: 20030324:
                    262:        sendmail version 8.12.8 was imported.  Since sendmail is
                    263:        now setgid to the smmsp group, and runs in "collection"
                    264:        mode for most common activities, there is a new config
                    265:        file called submit.cf that needs to live in /etc/mail.
                    266:        The generic submit.cf sample in /usr/share/sendmail/cf
                    267:        is named netbsd-msp.cf.  Upgrading your regular sendmail
                    268:        configuration file is also strongly advised.
                    269:
                    270:        See the section named "MESSAGE SUBMISSION PROGRAM" in
                    271:        the updated /usr/share/sendmail/README file for more
                    272:        information.
1.82      wiz       273:
                    274: 20030117:
                    275:        Texinfo was updated to 4.3.  To avoid failures when trying to
                    276:        build the included texinfo files, do:
                    277:
                    278:        cd src/gnu/usr.bin/texinfo
                    279:        make MKINFO=no dependall install
1.81      lukem     280:
                    281: 20021223:
                    282:        The METALOG format changed slightly, to remove the leading
                    283:        "${DESTDIR}" from path names.
                    284:        This only affects people building with UNPRIVED.
                    285:        For complete safety, remove the DESTDIR entirely and
                    286:        update tools/mtree, before running make build.
1.88      itojun    287:
                    288: 20021219:
                    289:        CVS repository layout was changed.  See the following for details
                    290:        if you are using (anonymous) cvs to update your tree.
                    291:
1.93      salo      292:        http://mail-index.NetBSD.org/netbsd-announce/2002/12/19/0000.html
1.80      lukem     293:
                    294: 20021219:
                    295:        install(1) had a '-N dbdir' option added, to specify an
                    296:        alternate location to look up users & groups (instead
                    297:        of the host system passwd(5) and group(5) databases).
                    298:
                    299:        The build system was modified to take advantage of
                    300:        this option (using ${NETBSDSRCDIR}/etc), so if you
1.83      kei       301:        use USETOOLS==no, you may have to rebuild and
1.80      lukem     302:        reinstall usr.bin/xinstall first.
1.78      lukem     303:
                    304: 20021130:
                    305:        fparseln(3) moved from libutil to libc.
                    306:        If building to DESTDIR=/, reinstall the includes
                    307:        and rebuild libc:
                    308:                make includes
                    309:                make do-lib-libc
                    310:        If using build.sh, "cd tools/compat && make clean"
                    311:        before rebuilding the tools.
1.77      lukem     312:
                    313: 20021126:
                    314:        The mk.conf(5) variable SYS_INCLUDE has been deprecated,
                    315:        including the optional "SYS_INCLUDE=symlinks" support.
                    316:        All header files, including <sys/*.h> are copied into
                    317:        /usr/include.
1.76      thorpej   318:
                    319: 20021121:
                    320:        The C run-time support files crtbegin.o and crtend.o
                    321:        (and their companions crtbeginS.o and crtendS.o) were
                    322:        split up, with new crti.o and crtn.o files resulting.
                    323:        This means that libtool needs to be rebuilt once the
                    324:        new libraries are installed.  The process of rebuilding
                    325:        libtool will cause it to automatically notice the new
                    326:        required files, but it *must* be rebuilt in order to
                    327:        do this.
                    328:
                    329:        An out-of-date libtool will result in shared libraries
                    330:        which lack _init() and _fini() routines, which means that
                    331:        their global contructors/destructors will not be invoked.
1.75      thorpej   332:
                    333: 20021121:
                    334:        A bug related to how ARM ELF objects were tagged has been
                    335:        corrected.
                    336:
                    337:        NetBSD ARM ELF uses the soft-VFP floating point model by
                    338:        default.  However, the assembler lacked support for marking
                    339:        objects as using the VFP floating point format, and the
1.79      wiz       340:        compiler was not properly passing the flag indicating "soft-VFP"
1.75      thorpej   341:        to the assembler.
                    342:
                    343:        Unfortunately, this means that the linker will now consider
                    344:        old (i.e. not marked "softvfp") NetBSD ARM ELF objects to be
                    345:        incompatible with new (properly marked) objects.
                    346:
                    347:        The problem will only manifest itself if you attempt to compile
                    348:        a new program using the fixed toolchain, and link that program
                    349:        against old libraries which do not have the proper "softvfp"
                    350:        markings.  ALL OF YOUR EXISTING BINARIES AND SHARED LIBRARIES
                    351:        WILL CONTINUE TO WORK PROPERLY.
                    352:
                    353:        The only work-around for the problem is to recompile all of
                    354:        the libraries on the system.  The easiest way to do this for
1.79      wiz       355:        system libraries is to install a binary snapshot; they are
1.93      salo      356:        generally available on releng.NetBSD.org.  Any packages you
1.75      thorpej   357:        have installed which supply libraries will have to be recompiled
                    358:        if you wish to link new programs against those libraries.
                    359:
                    360:        If you have questions about this matter, please contact
1.93      salo      361:        port-arm@NetBSD.org.
1.73      provos    362:
                    363: 20021011:
                    364:        Systrace has been improved to support privilege elevation.
                    365:        Updating the kernel requires the userland part of systrace
1.79      wiz       366:        to be rebuilt.
1.72      thorpej   367:
                    368: 20021010:
                    369:        The config(8) grammar was changed to allow options to register
                    370:        dependencies on attributes, as well as other options.  Users
                    371:        must update and reinstall usr.sbin/config before building a new
                    372:        kernel.
1.70      thorpej   373:
                    374: 20021009:
                    375:        A new attribute dependency syntax was introduced to config(8),
                    376:        which is now used by the SCSI configuration description.  Users
1.71      wiz       377:        must update and reinstall usr.sbin/config before building a new
1.70      thorpej   378:        kernel.
1.69      thorpej   379:
                    380: 20021003:
                    381:        Several changes have been made to the autoconfiguration
                    382:        framework.  Users must update and reinstall usr.sbin/config
                    383:        before building a new kernel.
1.74      jschauma  384:
                    385: 20021001:
                    386:        The i386mp branch has been merged.  To compile a kernel, users
                    387:        will need to add the option 'cpu* at mainbus?' to their configuration
                    388:        file.  Multiprocessor kernels will need
                    389:        ioapic*         at mainbus? apid ?
                    390:        options         MULTIPROCESSOR
                    391:        options         COM_MPLOCK
1.68      lukem     392:
                    393: 20020922:
                    394:        MKDYNAMICROOT=yes enabled by default, which means that
                    395:        certain shared libraries are installed into /lib, the shared
                    396:        linker is installed into /libexec, and all programs in /bin
                    397:        and /sbin are dynamically linked.
                    398:        If you do not use "make build", you should ensure that
                    399:        you have the libraries and shared linker in the new locations,
                    400:        with:
                    401:                make do-lib-csu do-lib-libc do-lib do-gnu-lib do-ld.elf_so
1.67      lukem     402:
                    403: 20020917:
                    404:        USE_NEW_TOOLCHAIN has been replaced with:
                    405:            -   TOOLCHAIN_MISSING -- set to "yes" on platforms for which
                    406:                there is no working in-tree toolchain (hppa, ns32k, sh5,
                    407:                x86_64).
                    408:            -   EXTERNAL_TOOLCHAIN -- if defined by the user, points to the
1.79      wiz       409:                root of an external toolchain (e.g. /usr/local/gnu).  This
1.67      lukem     410:                enables the cross-build framework even for TOOLCHAIN_MISSING
                    411:                platforms.
1.66      gehenna   412:
                    413: 20020906:
                    414:        gehenna-devsw has been merged into the trunk. Need to update and
1.79      wiz       415:        reinstall usr.sbin/config before building the kernel.
1.65      lukem     416:
                    417: 20020822:
                    418:        Crunched rescue tools (contents of /bin and /sbin, plus others)
                    419:        are now provided in /rescue.
                    420:
                    421:        To ensure that these are built statically linked (no matter
                    422:        what the setting of LDSTATIC is), use a crunchgen(1) built
                    423:        from sources newer than 20020820 (see the next entry).
                    424:
                    425: 20020820:
                    426:        crunchgen(1) changed to ensure that the generated program
                    427:        is statically linked.
                    428:
                    429:        Solution: update and reinstall usr.bin/crunch
1.84      grant     430:
                    431: 20020605:
                    432:        smmsp user/group has been added for sendmail.
                    433:
                    434:        Add the following into /etc/group:
                    435:
                    436:        smmsp:*:17:
                    437:
                    438:        and the following to /etc/master.passwd (via vipw):
                    439:
                    440:        smmsp:*:17:17::0:0:Sendmail Message Submission Program:/nonexistent:/sbin/nologin
1.61      itojun    441:
                    442: 20020515:
                    443:        sshd user/group has been added.  Need to hand add this in, or sshd
                    444:        will not let you log in (with default, or UsePrivlegeSeparation=yes)
                    445:
                    446:        Add the following into /etc/group:
                    447:
                    448:        sshd:*:16:
                    449:
                    450:        and the following to /etc/master.passwd (via vipw):
                    451:
1.63      enami     452:        sshd:*:16:16::0:0:& pseudo-user:/var/chroot/sshd:/sbin/nologin
1.61      itojun    453:
1.79      wiz       454:        Also /var/chroot/sshd directory needs to be present (digged as part of
                    455:        the build process).
1.60      sommerfe  456:
                    457: 20020426:
                    458:        NBUILDJOBS obsoleted in favor of just using -j.
1.59      lukem     459:
                    460: 20020426:
                    461:        etc/postinstall added, which performs various checks for
                    462:        configuration file updates and changes, and can fix most of
                    463:        the problems identified.
                    464:        This should make it much easier to upgrade a system's
                    465:        configuration from earlier systems (as far back as NetBSD 1.5).
1.56      lukem     466:
                    467: 20020320:
1.79      wiz       468:        <bsd.lib.mk> needs a new install(1) for its "-a cmd" support.
                    469:        Build and install at usr.bin/xinstall before the build.
1.56      lukem     470:
1.55      itojun    471: 20020319:
1.79      wiz       472:        Raw IPv6 socket now makes strict checking for sa_family and sa_len
                    473:        on send(2) operation.  Be sure to have sbin/rtsol and usr.sbin/rtsold
1.55      itojun    474:        newer than November 2001 when you upgrade the kernel.
                    475:
1.54      itojun    476: 20020311:
                    477:        ssh configuration files were moved from /etc to /etc/ssh.  Beware
                    478:        if you restart your machine from remote.  Note that sshd.conf needs
                    479:        to be changed (due to the use of "/etc" inside).
                    480:
                    481: 20020223:
1.53      matt      482:        Users of the VAX port will need to rebuild and install gas
                    483:        so it deal with the now present register prefix used in all
                    484:        the VAX assembly files.
                    485:
1.50      itojun    486: 20020118:
                    487:        ntpd user/group has been added.  Need to hand add this in or builds
                    488:        will break as mtree aborts early.
                    489:
                    490:        Add the following into /etc/group:
                    491:
                    492:        ntpd:*:15:
                    493:
                    494:        and the following to /etc/master.passwd (via vipw):
                    495:
                    496:        ntpd:*:15:15::0:0:Ntpd pseudo-user:/var/chroot/ntpd:/sbin/nologin
                    497:
1.49      jmc       498: 20011207:
                    499:        If you're attempting to build a snapshot on sparc64 and are getting
                    500:        reloc errors from the toolchain groff binary this means your native
                    501:        toolchain has some broken C++ bits.
                    502:
                    503:        To fix:
                    504:
                    505:        Build a new toolchain (i.e. build.sh -t)
                    506:        Use the new toolchain to build and install natively (i.e. /usr/lib)
                    507:
                    508:        gnu/lib/libgcc
1.51      pooka     509:        gnu/lib/libstdc++
1.49      jmc       510:
                    511:        After this a snapshot will be able to be built.
                    512:
1.47      jmc       513: 20011201:
                    514:        In order for a sparc64 build to work you must have a working awk. If
                    515:        you've built and installed a system with the new toolchain up to this
1.52      wiz       516:        point you do not have a working awk as its ability to do floating
1.47      jmc       517:        point is broken.
                    518:
                    519:        To build:
                    520:
                    521:        remake and install gnu/lib/libgcc
                    522:        remake and install gnu/usr.bin/gawk into /usr/bin (make sure it links
1.48      jmc       523:        against the new libgcc.a)
1.47      jmc       524:
1.46      thorpej   525: 20011128:
                    526:        Kernel config information was changed to use defflag in
                    527:        the various "files" files.  Bug fixes to config(8) are
                    528:        required in order for this to work properly.  Make sure
                    529:        to build and install in usr.sbin/config before attempting
                    530:        to build a new kernel.
                    531:
1.45      yamt      532: 20011030:
                    533:        libc/locale/wcstod.c now needs new lint(1). Update lint(1)
                    534:        before building libc.
1.43      mason     535:
1.44      tv        536: 20011029:
                    537:        The new document BUILDING.mdoc (view with nroff | more, or
                    538:        see pre-generated .txt and .html versions) describes the build
                    539:        procedure in great detail.  BUILDING, and the USE_NEW_TOOLCHAIN
                    540:        build process, are intended in the long run to replace this
                    541:        manual update log.
                    542:
                    543:        Users building a USE_NEW_TOOLCHAIN system should read the
                    544:        BUILDING document for caveats.  Generally, BUILDING supersedes
                    545:        UPDATING for these systems, as tool updating is taken care of
                    546:        by the new build system.
1.42      perry     547:
                    548: 20011028:
                    549:        src/etc/Makefile now needs install to be able to handle
                    550:        symlinks that point to nowhere. A bug in install that
                    551:        prevented this was corrected.
                    552:
                    553:        Solution: update and reinstall usr.bin/xinstall
                    554:        Better Solution: Use the new toolchain and it will just work
                    555:        for you.
1.40      lukem     556:
                    557: 20011006:
                    558:        /etc/mtree/NetBSD.dist has been updated to take advantage of
                    559:        absolute path support added to mtree(8). Older mtree(8)s don't
                    560:        understand the format.
                    561:
                    562:        Solution: update and reinstall usr.sbin/mtree
1.39      jmc       563:
                    564: 20011004:
                    565:        Crunchgen has been updated to work via reach-over makefiles. Updating
                    566:        is suggested before running a snapshot build
1.36      tv        567:
1.35      thorpej   568: 20010915:
                    569:        The new "ubcperf" code committed by Chuck Silvers removed
                    570:        a header file, uvm/uvm_vnode.h.  There may be stale .depend
                    571:        files that still reference this file.
                    572:
                    573:        Solution: "make cleandir && make dependall" in affected
                    574:        directories.
1.31      enami     575:
                    576: 20010803:
                    577:        grep.info is now built from grep.texi using makeinfo.  Since it
                    578:        requires makeinfo v4.0, you need to install new texinfo before
                    579:        building gnu/usr.bin/grep.  To install new texinfo, please follow
                    580:        the instruction described in 20010726 entry.
1.30      enami     581:
1.64      sommerfe  582: 20010803:
1.41      wiz       583:        (i386 only): i386 kernel now uses new instructions like
1.111     simonb    584:        `fxsave' which old gas doesn't understand.  To build the
1.64      sommerfe  585:        kernel successfully, you need to build and install a new toolchain,
                    586:        (i.e., build.sh -t) or  (temporarily) comment out "options I686_CPU"
                    587:        from your kernel configuration until you rebuild your userland.
                    588:        See 20011029 above and BUILDING file in this directory for more information.
                    589:        [updated 20020630 since i386 gas moved when USE_NEW_TOOLCHAIN enabled]
1.29      bjh21     590:
                    591: 20010731:
                    592:        Bootloader update on ELF platforms.  DDB in kernels from before
                    593:        this will be unable to read symbol tables provided by newer
                    594:        bootloaders.
1.27      assar     595:
                    596: 20010726:
                    597:        Texinfo was updated to 4.0.  To avoid failures when trying to
1.28      assar     598:        build the included texinfo files, do:
                    599:
                    600:        cd src/gnu/usr.bin/texinfo
                    601:        make MKINFO=no dependall install
1.25      thorpej   602:
                    603: 20010718:
                    604:        Enabled correct .init/.fini processing in crt0.  The way this
                    605:        was done was to change a -I directive to cc(1), which means
                    606:        make(1) will have a stale dependency (it will be checking the
                    607:        timestamp on the wrong "dot_init.h").
                    608:
                    609:        The symptom you will see is that new programs die with SIGSEGV
                    610:        if you have a stale dependency.
                    611:
                    612:        Solution: "make cleandir" in both lib/csu and libexec/ld.elf_so
                    613:        before starting your build.
1.26      thorpej   614:
                    615: 20010628:
                    616:        A construct was added to uvm_page.h that uncovered a bug
                    617:        in lint(1).  If you get a warning/error about a non-portable
                    618:        bitfield, update your lint(1) before proceeding.
1.21      jmc       619:
                    620: 20010226:
1.22      jmc       621:        Added named user/group to system. Need to hand add this in or builds
1.21      jmc       622:        will break as mtree aborts early.
                    623:
                    624:        To work around add by hand:
                    625:
                    626:        named:*:14:
                    627:
1.22      jmc       628:        to /etc/group and add:
                    629:
                    630:        named:*:14:14::0:0:Named pseudo-user:/var/named:/sbin/nologin
                    631:
                    632:        to master.passwd (use vipw for instance if doing by hand).
                    633:
                    634:        Now a make build should progress.
1.18      jmc       635:
                    636: 20010219:
1.52      wiz       637:        get/setprogname() added. Any hostprogs that may use this will need
1.111     simonb    638:        to be bootstrapped manually until the host system is current.
1.18      jmc       639:
1.111     simonb    640:        Known problems: sys/arch/macppc/stand/fixcoff
1.19      cgd       641:                        usr.sbin/config (adding -DMAKE_BOOTSTRAP to
                    642:                          CFLAGS and rebuilding should work)
1.20      jmc       643:                        usr.sbin/mdsetimage - Build a static copy if
1.111     simonb    644:                          building a snapshot before fully bootstrapped.
1.15      christos  645:
                    646: 20010204:
                    647:        prepare the code to compile with stricter gcc flags. in
                    648:        particular start eliminating redundant declarations. Yacc
                    649:        needs to be installed before make build.
1.10      christos  650:
                    651: 20010114:
                    652:        introduce .if commands(target) in make(1). You need to
                    653:        bring everything up-to-date first, then without installing
1.23      tron      654:        anything make and install in usr.bin/make, then proceed
1.10      christos  655:        with make build.
1.9       sommerfe  656:
                    657: 20010101:
                    658:        bsd.subdir.mk committed 20001230 had a bug which caused
                    659:        afterinstall targets to run too soon; update again.
1.8       sommerfe  660:
                    661: 20001230:
                    662:        New share/mk files needed to support .WAIT in SUBDIR variables.
                    663:        If you get make errors,
                    664:                (cd share/mk; make install)
                    665:        Also, PRINTOBJDIR has changed and is now used more heavily.
1.6       ad        666:
                    667: 20001019:
1.7       ad        668:        The `ca' device driver has been replaced by `ld'; although the
1.6       ad        669:        major and minor numbers haven't changed, you should update your /dev
                    670:        directory.
1.1       abs       671:
1.4       itojun    672: 20000929:
                    673:        The following make directives are obsoleted.
                    674:        MKCRYPTO_RSA NOCRYPTO_RSA NOCRYPTO_RC5 NOCRYPTO_IDEA
                    675:        By default, RSA is built into libcrypto.  IDEA and RC5 will not be
1.16      wiz       676:        built into libcrypto.  By using MKCRYPTO_{RC5,IDEA}, you can build
1.4       itojun    677:        additional library libcrypto_{idea,rc5}.
1.1       abs       678:
                    679:
                    680: Hints for a more successful build:
                    681: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1.123     jmc       682:     Use build.sh, but do not use its "expert mode":
1.132     jmmv      683:        This will automatically build the tools in the
1.123     jmc       684:           correct order, and it will keep the tools and the
                    685:           new build products from interfering with the running
                    686:           system.  This will allow you to ignore most of the
                    687:           other advice in this file.
1.2       mrg       688:     Build a new kernel first:
                    689:        This makes sure that any new system calls or features
                    690:           expected by the new userland will be present.  This
                    691:           helps to avoid critical errors when upgrading.
1.1       abs       692:     Use object directories:
                    693:        This helps to keep stale object
                    694:           files from polluting the build if a Makefile "forgets"
                    695:           about one.  It also makes it easier to clean up after
                    696:           a build.  It's also necessary if you want to use the
                    697:           same source tree for multiple machines.
1.123     jmc       698:           To use object directories with build.sh:
                    699:            a) invoke build.sh with the "-M" or "-O" options.
                    700:           To use object directories without using build.sh:
1.1       abs       701:            a) cd /usr/src ; make cleandir
1.2       mrg       702:            b) Add "OBJMACHINE=yes" to /etc/mk.conf
                    703:            c) Add "MKOBJDIRS=yes" to /etc/mk.conf
1.1       abs       704:            d) cd /usr/src ; make build
1.2       mrg       705:           Note that running "make obj" in a directory will create
                    706:           in obj.$MACHINE directory.
1.1       abs       707:     Build to a DESTDIR:
1.123     jmc       708:        This helps to keep old installed files (especially libraries)
                    709:           from interfering with the new build.
                    710:           To build to a DESTDIR with build.sh, use the "-D" option.
                    711:           To build to a DESTDIR without using build.sh, set the DESTDIR
                    712:           environment variable before running make build.  It should be
                    713:           set to the pathname of an initially empty directory.
                    714:           Problems: if you do not use build.sh, you might need to
                    715:                update critical utilities without using DESTDIR since
                    716:                nothing is executed from what is installed in DESTDIR.
                    717:                (See critical utils, below.)
1.1       abs       718:     Build often:
                    719:        This keeps critical utilities current enough to not choke
                    720:        on any other part of the source tree that depends on up to
1.123     jmc       721:        date functionality.  If you use build.sh, you should not have
                    722:        this problem.
1.1       abs       723:
                    724: What to do if things don't work:
                    725: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    726: When things don't work there is usually a few things that commonly
                    727: should be done.
                    728:     1) make includes
                    729:        This should be done automatically by make build.
                    730:     2)  cd share/mk && make install
                    731:        Again, automatically done by make build.
                    732:
                    733: Failsafe rebuild of a small part of the tree:
                    734: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    735: To make sure you rebuild something correctly you want to do
                    736: something like the following:
                    737:     1)  Make sure the includes and .mk files are up to date.
                    738:     2)  Make sure any program used to build the particular
                    739:        utility is up to date.  (yacc, lex, etc...)
                    740:     3)  cd ...path/to/util...
                    741:        make cleandir
                    742:        rm ...all obj directories...
                    743:        make cleandir                   # yes, again
                    744:        make obj
                    745:        make depend && make
                    746:
                    747: Failsafe rebuild of the entire tree:
                    748: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    749: If you really want to make sure the source tree is clean and
1.2       mrg       750: ready for a build try the following.  Note that sourcing /etc/mk.conf
                    751: (a make(1) Makefile) in this manner is not right, and will not work
                    752: for anyone who uses any make(1) features in /etc/mk.conf.
1.1       abs       753:
                    754: ---cut here---
                    755: #!/bin/sh
                    756: . /etc/mk.conf
                    757:
1.58      lukem     758: if [ -z $NETBSDSRCDIR ] ; then
                    759:     NETBSDSRCDIR=/usr/src
1.1       abs       760: fi
1.58      lukem     761: if [ \! -d $NETBSDSRCDIR ] ; then
1.1       abs       762:     echo Unable to find sources
                    763:     exit 1
                    764: fi
1.58      lukem     765: find $NETBSDSRCDIR -name \*.o -o -name obj.\* -o -name obj -exec rm \{\} \;
1.1       abs       766:
                    767: if [ -z $BSDOBJDIR ] ; then
                    768:     BSDOBJDIR=/usr/obj
                    769: fi
                    770: if [ -d $BSDOBJDIR ] ; then
                    771:     rm -rf $BSDOBJDIR
                    772: fi
                    773:
1.58      lukem     774: cd $NETBSDSRCDIR && make cleandir
1.1       abs       775:
                    776: ---cut here---
                    777:
                    778: Critical utilities:
                    779: ^^^^^^^^^^^^^^^^^^^
                    780:        gnu/usr.bin/egcs
1.3       itojun    781:        usr.bin/compile_et
1.1       abs       782:        usr.bin/make
                    783:        usr.bin/yacc
                    784:        usr.bin/lex
1.11      lukem     785:        usr.bin/xlint
1.2       mrg       786:        usr.sbin/config
1.1       abs       787:
1.34      simonb    788: Other problems and possible solutions:
1.1       abs       789: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    790: Symptom:Unreasonable compiler errors.
                    791: Fix:   Rebuild gnu/usr.bin/egcs
                    792:
                    793: Symptom:Complaints involving a Makefile.
1.17      erh       794: Fix:   Rebuild usr.bin/make:
                    795:        cd usr.bin/make && make && make install
1.111     simonb    796:        Or, a failsafe method if that doesn't work:
1.17      erh       797:        cd usr.bin/make && cc *.c */*.c -I . -o make && mv make /usr/bin
                    798:
1.1       abs       799: Fix:   Make sure .mk files are up to date.
                    800:        cd share/mk && make install
1.2       mrg       801:
                    802: Symptom:Kernel `config' fails to configure any kernel, including GENERIC.
                    803: Fix:   Rebuild usr.sbin/config
1.1       abs       804:
                    805: Symptom:
                    806: Fix:   Rebuild usr.bin/yacc
                    807:
                    808: Symptom:
                    809: Fix:   Rebuild usr.bin/lex
                    810:
                    811: Symptom:
                    812: Fix:   rm /usr/lib/libbfd.a
1.4       itojun    813:
                    814: Symptom:Obsolete intermediate files are used during compilation
                    815: Fix:   Try the following sequence of commands in the directory in question.
                    816:        make cleandir; rm `make print-objdir`; make cleandir; make obj
                    817:        (If you built the tree without "make obj" in the past, obsolete files
                    818:        may remain.  The command tries to clean everything up)
1.5       wiz       819:
                    820: Symptom:.../sysinst/run.c:xx: warning: initialization from incompatible pointer type
                    821: Fix:   Rebuild and install usr.bin/menuc
1.12      itojun    822:
                    823: Symptom:mklocale not found during build in share/locale/ctype
                    824: Fix:   Build and install usr.bin/mklocale
1.13      dogcow    825:
1.86      kleink    826: Symptom:undefined reference to `__assert13' or `__unsetenv13'
1.13      dogcow    827: Fix:    Rebuild and install lib/libc
                    828:
1.19      cgd       829: Symptom:usr.sbin/config fails to build.
                    830: Fix:   Try building with -DMAKE_BOOTSTRAP added to CFLAGS in Makefile.
1.13      dogcow    831:
1.19      cgd       832: Symptom:undefined reference to `getprogname' or `setprogname'
                    833: Fix:    Rebuild and install lib/libc
1.24      abs       834:
                    835: Symptom:lint does not understand the '-X' option
                    836: Fix:    May need to build & install libs with NOLINT=1 before rebuilding lint

CVSweb <webmaster@jp.NetBSD.org>