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

Annotation of src/UPDATING, Revision 1.135.2.2

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

CVSweb <webmaster@jp.NetBSD.org>