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

Annotation of src/UPDATING, Revision 1.107

1.107   ! reinoud     1: $NetBSD: UPDATING,v 1.106 2004/01/25 14:13:08 bjh21 Exp $
1.1       abs         2:
                      3: This file is intended to be a brief introduction to the build
                      4: process and a reference on what to do if something doesn't work.
                      5:
                      6: For a more detailed description see Makefile.
                      7:
                      8: Recent changes:
                      9: ^^^^^^^^^^^^^^^
1.99      mrg        10:
1.107   ! reinoud    11: 20040223:
        !            12:        As stated in
        !            13:        http://mail-index.netbsd.org/current-users/2004/01/11/0022.html
        !            14:        relating to the ffs superblock layout change, it needs updating
        !            15:        fsck_ffs too or it will keep on complaining. Usings fsck without
        !            16:        flags will solve the problem when it replaces the superblocks.
        !            17:        Please do read the associated message for sure.
        !            18:
1.106     bjh21      19: 20040125:
                     20:        On acorn32, the beep and sysbeep devices are no longer
                     21:        needed, and will need to be deleted from kernel configuration
                     22:        files.
1.105     bjh21      23:
1.102     dbj        24: 20040109:
                     25:        Compatibility for old ffs superblock layouts has been
                     26:        added, and the restrictive fsck checks have been reenabled
                     27:        when using those layouts.  If you have been using -current
                     28:        since 20030402, you may find that fsck again signals fatal
                     29:        superblock mismatches.  To work around, you can use
1.104     dbj        30:        fsck_ffs -b 32 -c 4 to restore an alternate superblock
                     31:        and complete the filesystem upgrade.
1.102     dbj        32:
1.99      mrg        33: 20031203:
1.100     keihan     34:        New binutils builds may fail due to old dependencies.
1.99      mrg        35:        It's necessary to "make cleandir" to ensure that
                     36:        the dependencies will be rebuilt correctly.
1.98      wiz        37:
                     38: 20031111:
                     39:        A newer mkdep is needed.  Error noting that is
                     40:                cc: Ambiguous abbreviation --
1.97      lukem      41:
                     42: 20031008:
                     43:        /usr/include/sys/disklabel_mbr.h was removed.
                     44:        It's necessary to "make cleandir" to ensure that
                     45:        the dependencies will be rebuilt correctly.
1.96      christos   46:
                     47: 20030906:
                     48:        With the addition of siginfo support the old signal trampoline
                     49:        code has been deprecated to COMPAT_16. Make sure that your running
                     50:        kernel has COMPAT_16 enabled before building userland.
1.94      christos   51:
                     52: 20030801:
1.95      wiz        53:        With the new openssl, there is some header and library shuffling.
1.94      christos   54:        rm -f /usr/include/des.h /usr/include/kerberosIV/* /lib/libdes* \
1.95      wiz        55:        /usr/lib/libdes* before building.
1.92      wiz        56:
                     57: 20030703:
                     58:        Texinfo was updated to 4.6.  To avoid failures when trying to
                     59:        build the included texinfo files, do:
                     60:
                     61:        cd src/gnu/usr.bin/texinfo
                     62:        make MKINFO=no dependall install
1.90      wiz        63:
                     64: 20030630:
1.101     junyoung   65:        Groff was updated to 1.19; it's probably necessary to do
1.91      wiz        66:                cd share/mk && make install
1.90      wiz        67:                cd src/gnu/usr.bin/groff
                     68:                make MKMAN=no dependall install
                     69:        (untested).
1.89      christos   70:
                     71: 20030516:
                     72:        Due to bugs in the export handling code, invalid export lines
                     73:        were accepted before and caused the kernel to panic when
                     74:        mountd got restarted because it freed memory that had already
                     75:        been freed. This has been fixed and the kernel checks
                     76:        export addresses very strictly. If you upgrade your kernel,
                     77:        make sure you also upgrade mountd, because if your export
                     78:        file contains lines with an old inet4 address syntax (i.e.
                     79:        a.b.c or a.b or a), they will get rejected by the new kernel.
1.87      bjh21      80:
                     81: 20030402:
                     82:        The superblock layout for FFS was changed.  If you have 1.6
                     83:        fsck binaries, they will signal a fatal superblock mismatch
                     84:        with the first alternate, because they compare too many
                     85:        fields (even ones that aren't useful).  If possible, upgrade
                     86:        your fsck_ffs binary before using a new kernel.
                     87:        None of this signals actual filesystem damage.
1.85      atatat     88:
                     89: 20030324:
                     90:        sendmail version 8.12.8 was imported.  Since sendmail is
                     91:        now setgid to the smmsp group, and runs in "collection"
                     92:        mode for most common activities, there is a new config
                     93:        file called submit.cf that needs to live in /etc/mail.
                     94:        The generic submit.cf sample in /usr/share/sendmail/cf
                     95:        is named netbsd-msp.cf.  Upgrading your regular sendmail
                     96:        configuration file is also strongly advised.
                     97:
                     98:        See the section named "MESSAGE SUBMISSION PROGRAM" in
                     99:        the updated /usr/share/sendmail/README file for more
                    100:        information.
1.82      wiz       101:
                    102: 20030117:
                    103:        Texinfo was updated to 4.3.  To avoid failures when trying to
                    104:        build the included texinfo files, do:
                    105:
                    106:        cd src/gnu/usr.bin/texinfo
                    107:        make MKINFO=no dependall install
1.81      lukem     108:
                    109: 20021223:
                    110:        The METALOG format changed slightly, to remove the leading
                    111:        "${DESTDIR}" from path names.
                    112:        This only affects people building with UNPRIVED.
                    113:        For complete safety, remove the DESTDIR entirely and
                    114:        update tools/mtree, before running make build.
1.88      itojun    115:
                    116: 20021219:
                    117:        CVS repository layout was changed.  See the following for details
                    118:        if you are using (anonymous) cvs to update your tree.
                    119:
1.93      salo      120:        http://mail-index.NetBSD.org/netbsd-announce/2002/12/19/0000.html
1.80      lukem     121:
                    122: 20021219:
                    123:        install(1) had a '-N dbdir' option added, to specify an
                    124:        alternate location to look up users & groups (instead
                    125:        of the host system passwd(5) and group(5) databases).
                    126:
                    127:        The build system was modified to take advantage of
                    128:        this option (using ${NETBSDSRCDIR}/etc), so if you
1.83      kei       129:        use USETOOLS==no, you may have to rebuild and
1.80      lukem     130:        reinstall usr.bin/xinstall first.
1.78      lukem     131:
                    132: 20021130:
                    133:        fparseln(3) moved from libutil to libc.
                    134:        If building to DESTDIR=/, reinstall the includes
                    135:        and rebuild libc:
                    136:                make includes
                    137:                make do-lib-libc
                    138:        If using build.sh, "cd tools/compat && make clean"
                    139:        before rebuilding the tools.
1.77      lukem     140:
                    141: 20021126:
                    142:        The mk.conf(5) variable SYS_INCLUDE has been deprecated,
                    143:        including the optional "SYS_INCLUDE=symlinks" support.
                    144:        All header files, including <sys/*.h> are copied into
                    145:        /usr/include.
1.76      thorpej   146:
                    147: 20021121:
                    148:        The C run-time support files crtbegin.o and crtend.o
                    149:        (and their companions crtbeginS.o and crtendS.o) were
                    150:        split up, with new crti.o and crtn.o files resulting.
                    151:        This means that libtool needs to be rebuilt once the
                    152:        new libraries are installed.  The process of rebuilding
                    153:        libtool will cause it to automatically notice the new
                    154:        required files, but it *must* be rebuilt in order to
                    155:        do this.
                    156:
                    157:        An out-of-date libtool will result in shared libraries
                    158:        which lack _init() and _fini() routines, which means that
                    159:        their global contructors/destructors will not be invoked.
1.75      thorpej   160:
                    161: 20021121:
                    162:        A bug related to how ARM ELF objects were tagged has been
                    163:        corrected.
                    164:
                    165:        NetBSD ARM ELF uses the soft-VFP floating point model by
                    166:        default.  However, the assembler lacked support for marking
                    167:        objects as using the VFP floating point format, and the
1.79      wiz       168:        compiler was not properly passing the flag indicating "soft-VFP"
1.75      thorpej   169:        to the assembler.
                    170:
                    171:        Unfortunately, this means that the linker will now consider
                    172:        old (i.e. not marked "softvfp") NetBSD ARM ELF objects to be
                    173:        incompatible with new (properly marked) objects.
                    174:
                    175:        The problem will only manifest itself if you attempt to compile
                    176:        a new program using the fixed toolchain, and link that program
                    177:        against old libraries which do not have the proper "softvfp"
                    178:        markings.  ALL OF YOUR EXISTING BINARIES AND SHARED LIBRARIES
                    179:        WILL CONTINUE TO WORK PROPERLY.
                    180:
                    181:        The only work-around for the problem is to recompile all of
                    182:        the libraries on the system.  The easiest way to do this for
1.79      wiz       183:        system libraries is to install a binary snapshot; they are
1.93      salo      184:        generally available on releng.NetBSD.org.  Any packages you
1.75      thorpej   185:        have installed which supply libraries will have to be recompiled
                    186:        if you wish to link new programs against those libraries.
                    187:
                    188:        If you have questions about this matter, please contact
1.93      salo      189:        port-arm@NetBSD.org.
1.73      provos    190:
                    191: 20021011:
                    192:        Systrace has been improved to support privilege elevation.
                    193:        Updating the kernel requires the userland part of systrace
1.79      wiz       194:        to be rebuilt.
1.72      thorpej   195:
                    196: 20021010:
                    197:        The config(8) grammar was changed to allow options to register
                    198:        dependencies on attributes, as well as other options.  Users
                    199:        must update and reinstall usr.sbin/config before building a new
                    200:        kernel.
1.70      thorpej   201:
                    202: 20021009:
                    203:        A new attribute dependency syntax was introduced to config(8),
                    204:        which is now used by the SCSI configuration description.  Users
1.71      wiz       205:        must update and reinstall usr.sbin/config before building a new
1.70      thorpej   206:        kernel.
1.69      thorpej   207:
                    208: 20021003:
                    209:        Several changes have been made to the autoconfiguration
                    210:        framework.  Users must update and reinstall usr.sbin/config
                    211:        before building a new kernel.
1.74      jschauma  212:
                    213: 20021001:
                    214:        The i386mp branch has been merged.  To compile a kernel, users
                    215:        will need to add the option 'cpu* at mainbus?' to their configuration
                    216:        file.  Multiprocessor kernels will need
                    217:        ioapic*         at mainbus? apid ?
                    218:        options         MULTIPROCESSOR
                    219:        options         COM_MPLOCK
1.68      lukem     220:
                    221: 20020922:
                    222:        MKDYNAMICROOT=yes enabled by default, which means that
                    223:        certain shared libraries are installed into /lib, the shared
                    224:        linker is installed into /libexec, and all programs in /bin
                    225:        and /sbin are dynamically linked.
                    226:        If you do not use "make build", you should ensure that
                    227:        you have the libraries and shared linker in the new locations,
                    228:        with:
                    229:                make do-lib-csu do-lib-libc do-lib do-gnu-lib do-ld.elf_so
1.67      lukem     230:
                    231: 20020917:
                    232:        USE_NEW_TOOLCHAIN has been replaced with:
                    233:            -   TOOLCHAIN_MISSING -- set to "yes" on platforms for which
                    234:                there is no working in-tree toolchain (hppa, ns32k, sh5,
                    235:                x86_64).
                    236:            -   EXTERNAL_TOOLCHAIN -- if defined by the user, points to the
1.79      wiz       237:                root of an external toolchain (e.g. /usr/local/gnu).  This
1.67      lukem     238:                enables the cross-build framework even for TOOLCHAIN_MISSING
                    239:                platforms.
1.66      gehenna   240:
                    241: 20020906:
                    242:        gehenna-devsw has been merged into the trunk. Need to update and
1.79      wiz       243:        reinstall usr.sbin/config before building the kernel.
1.65      lukem     244:
                    245: 20020822:
                    246:        Crunched rescue tools (contents of /bin and /sbin, plus others)
                    247:        are now provided in /rescue.
                    248:
                    249:        To ensure that these are built statically linked (no matter
                    250:        what the setting of LDSTATIC is), use a crunchgen(1) built
                    251:        from sources newer than 20020820 (see the next entry).
                    252:
                    253: 20020820:
                    254:        crunchgen(1) changed to ensure that the generated program
                    255:        is statically linked.
                    256:
                    257:        Solution: update and reinstall usr.bin/crunch
1.84      grant     258:
                    259: 20020605:
                    260:        smmsp user/group has been added for sendmail.
                    261:
                    262:        Add the following into /etc/group:
                    263:
                    264:        smmsp:*:17:
                    265:
                    266:        and the following to /etc/master.passwd (via vipw):
                    267:
                    268:        smmsp:*:17:17::0:0:Sendmail Message Submission Program:/nonexistent:/sbin/nologin
1.61      itojun    269:
                    270: 20020515:
                    271:        sshd user/group has been added.  Need to hand add this in, or sshd
                    272:        will not let you log in (with default, or UsePrivlegeSeparation=yes)
                    273:
                    274:        Add the following into /etc/group:
                    275:
                    276:        sshd:*:16:
                    277:
                    278:        and the following to /etc/master.passwd (via vipw):
                    279:
1.63      enami     280:        sshd:*:16:16::0:0:& pseudo-user:/var/chroot/sshd:/sbin/nologin
1.61      itojun    281:
1.79      wiz       282:        Also /var/chroot/sshd directory needs to be present (digged as part of
                    283:        the build process).
1.60      sommerfe  284:
                    285: 20020426:
                    286:        NBUILDJOBS obsoleted in favor of just using -j.
1.59      lukem     287:
                    288: 20020426:
                    289:        etc/postinstall added, which performs various checks for
                    290:        configuration file updates and changes, and can fix most of
                    291:        the problems identified.
                    292:        This should make it much easier to upgrade a system's
                    293:        configuration from earlier systems (as far back as NetBSD 1.5).
1.56      lukem     294:
                    295: 20020320:
1.79      wiz       296:        <bsd.lib.mk> needs a new install(1) for its "-a cmd" support.
                    297:        Build and install at usr.bin/xinstall before the build.
1.56      lukem     298:
1.55      itojun    299: 20020319:
1.79      wiz       300:        Raw IPv6 socket now makes strict checking for sa_family and sa_len
                    301:        on send(2) operation.  Be sure to have sbin/rtsol and usr.sbin/rtsold
1.55      itojun    302:        newer than November 2001 when you upgrade the kernel.
                    303:
1.54      itojun    304: 20020311:
                    305:        ssh configuration files were moved from /etc to /etc/ssh.  Beware
                    306:        if you restart your machine from remote.  Note that sshd.conf needs
                    307:        to be changed (due to the use of "/etc" inside).
                    308:
                    309: 20020223:
1.53      matt      310:        Users of the VAX port will need to rebuild and install gas
                    311:        so it deal with the now present register prefix used in all
                    312:        the VAX assembly files.
                    313:
1.50      itojun    314: 20020118:
                    315:        ntpd user/group has been added.  Need to hand add this in or builds
                    316:        will break as mtree aborts early.
                    317:
                    318:        Add the following into /etc/group:
                    319:
                    320:        ntpd:*:15:
                    321:
                    322:        and the following to /etc/master.passwd (via vipw):
                    323:
                    324:        ntpd:*:15:15::0:0:Ntpd pseudo-user:/var/chroot/ntpd:/sbin/nologin
                    325:
1.49      jmc       326: 20011207:
                    327:        If you're attempting to build a snapshot on sparc64 and are getting
                    328:        reloc errors from the toolchain groff binary this means your native
                    329:        toolchain has some broken C++ bits.
                    330:
                    331:        To fix:
                    332:
                    333:        Build a new toolchain (i.e. build.sh -t)
                    334:        Use the new toolchain to build and install natively (i.e. /usr/lib)
                    335:
                    336:        gnu/lib/libgcc
1.51      pooka     337:        gnu/lib/libstdc++
1.49      jmc       338:
                    339:        After this a snapshot will be able to be built.
                    340:
1.47      jmc       341: 20011201:
                    342:        In order for a sparc64 build to work you must have a working awk. If
                    343:        you've built and installed a system with the new toolchain up to this
1.52      wiz       344:        point you do not have a working awk as its ability to do floating
1.47      jmc       345:        point is broken.
                    346:
                    347:        To build:
                    348:
                    349:        remake and install gnu/lib/libgcc
                    350:        remake and install gnu/usr.bin/gawk into /usr/bin (make sure it links
1.48      jmc       351:        against the new libgcc.a)
1.47      jmc       352:
1.46      thorpej   353: 20011128:
                    354:        Kernel config information was changed to use defflag in
                    355:        the various "files" files.  Bug fixes to config(8) are
                    356:        required in order for this to work properly.  Make sure
                    357:        to build and install in usr.sbin/config before attempting
                    358:        to build a new kernel.
                    359:
1.45      yamt      360: 20011030:
                    361:        libc/locale/wcstod.c now needs new lint(1). Update lint(1)
                    362:        before building libc.
1.43      mason     363:
1.44      tv        364: 20011029:
                    365:        The new document BUILDING.mdoc (view with nroff | more, or
                    366:        see pre-generated .txt and .html versions) describes the build
                    367:        procedure in great detail.  BUILDING, and the USE_NEW_TOOLCHAIN
                    368:        build process, are intended in the long run to replace this
                    369:        manual update log.
                    370:
                    371:        Users building a USE_NEW_TOOLCHAIN system should read the
                    372:        BUILDING document for caveats.  Generally, BUILDING supersedes
                    373:        UPDATING for these systems, as tool updating is taken care of
                    374:        by the new build system.
1.42      perry     375:
                    376: 20011028:
                    377:        src/etc/Makefile now needs install to be able to handle
                    378:        symlinks that point to nowhere. A bug in install that
                    379:        prevented this was corrected.
                    380:
                    381:        Solution: update and reinstall usr.bin/xinstall
                    382:        Better Solution: Use the new toolchain and it will just work
                    383:        for you.
1.40      lukem     384:
                    385: 20011006:
                    386:        /etc/mtree/NetBSD.dist has been updated to take advantage of
                    387:        absolute path support added to mtree(8). Older mtree(8)s don't
                    388:        understand the format.
                    389:
                    390:        Solution: update and reinstall usr.sbin/mtree
1.39      jmc       391:
                    392: 20011004:
                    393:        Crunchgen has been updated to work via reach-over makefiles. Updating
                    394:        is suggested before running a snapshot build
1.36      tv        395:
1.35      thorpej   396: 20010915:
                    397:        The new "ubcperf" code committed by Chuck Silvers removed
                    398:        a header file, uvm/uvm_vnode.h.  There may be stale .depend
                    399:        files that still reference this file.
                    400:
                    401:        Solution: "make cleandir && make dependall" in affected
                    402:        directories.
1.31      enami     403:
                    404: 20010803:
                    405:        grep.info is now built from grep.texi using makeinfo.  Since it
                    406:        requires makeinfo v4.0, you need to install new texinfo before
                    407:        building gnu/usr.bin/grep.  To install new texinfo, please follow
                    408:        the instruction described in 20010726 entry.
1.30      enami     409:
1.64      sommerfe  410: 20010803:
1.41      wiz       411:        (i386 only): i386 kernel now uses new instructions like
                    412:         `fxsave' which old gas doesn't understand.  To build the
1.64      sommerfe  413:        kernel successfully, you need to build and install a new toolchain,
                    414:        (i.e., build.sh -t) or  (temporarily) comment out "options I686_CPU"
                    415:        from your kernel configuration until you rebuild your userland.
                    416:        See 20011029 above and BUILDING file in this directory for more information.
                    417:        [updated 20020630 since i386 gas moved when USE_NEW_TOOLCHAIN enabled]
1.29      bjh21     418:
                    419: 20010731:
                    420:        Bootloader update on ELF platforms.  DDB in kernels from before
                    421:        this will be unable to read symbol tables provided by newer
                    422:        bootloaders.
1.27      assar     423:
                    424: 20010726:
                    425:        Texinfo was updated to 4.0.  To avoid failures when trying to
1.28      assar     426:        build the included texinfo files, do:
                    427:
                    428:        cd src/gnu/usr.bin/texinfo
                    429:        make MKINFO=no dependall install
1.25      thorpej   430:
                    431: 20010718:
                    432:        Enabled correct .init/.fini processing in crt0.  The way this
                    433:        was done was to change a -I directive to cc(1), which means
                    434:        make(1) will have a stale dependency (it will be checking the
                    435:        timestamp on the wrong "dot_init.h").
                    436:
                    437:        The symptom you will see is that new programs die with SIGSEGV
                    438:        if you have a stale dependency.
                    439:
                    440:        Solution: "make cleandir" in both lib/csu and libexec/ld.elf_so
                    441:        before starting your build.
1.26      thorpej   442:
                    443: 20010628:
                    444:        A construct was added to uvm_page.h that uncovered a bug
                    445:        in lint(1).  If you get a warning/error about a non-portable
                    446:        bitfield, update your lint(1) before proceeding.
1.21      jmc       447:
                    448: 20010226:
1.22      jmc       449:        Added named user/group to system. Need to hand add this in or builds
1.21      jmc       450:        will break as mtree aborts early.
                    451:
                    452:        To work around add by hand:
                    453:
                    454:        named:*:14:
                    455:
1.22      jmc       456:        to /etc/group and add:
                    457:
                    458:        named:*:14:14::0:0:Named pseudo-user:/var/named:/sbin/nologin
                    459:
                    460:        to master.passwd (use vipw for instance if doing by hand).
                    461:
                    462:        Now a make build should progress.
1.18      jmc       463:
                    464: 20010219:
1.52      wiz       465:        get/setprogname() added. Any hostprogs that may use this will need
1.20      jmc       466:         to be bootstrapped manually until the host system is current.
1.18      jmc       467:
                    468:         Known problems: sys/arch/macppc/stand/fixcoff
1.19      cgd       469:                        usr.sbin/config (adding -DMAKE_BOOTSTRAP to
                    470:                          CFLAGS and rebuilding should work)
1.20      jmc       471:                        usr.sbin/mdsetimage - Build a static copy if
                    472:                          building a snapshot before fully bootstrapped.
1.15      christos  473:
                    474: 20010204:
                    475:        prepare the code to compile with stricter gcc flags. in
                    476:        particular start eliminating redundant declarations. Yacc
                    477:        needs to be installed before make build.
1.10      christos  478:
                    479: 20010114:
                    480:        introduce .if commands(target) in make(1). You need to
                    481:        bring everything up-to-date first, then without installing
1.23      tron      482:        anything make and install in usr.bin/make, then proceed
1.10      christos  483:        with make build.
1.9       sommerfe  484:
                    485: 20010101:
                    486:        bsd.subdir.mk committed 20001230 had a bug which caused
                    487:        afterinstall targets to run too soon; update again.
1.8       sommerfe  488:
                    489: 20001230:
                    490:        New share/mk files needed to support .WAIT in SUBDIR variables.
                    491:        If you get make errors,
                    492:                (cd share/mk; make install)
                    493:        Also, PRINTOBJDIR has changed and is now used more heavily.
1.6       ad        494:
                    495: 20001019:
1.7       ad        496:        The `ca' device driver has been replaced by `ld'; although the
1.6       ad        497:        major and minor numbers haven't changed, you should update your /dev
                    498:        directory.
1.1       abs       499:
1.4       itojun    500: 20000929:
                    501:        The following make directives are obsoleted.
                    502:        MKCRYPTO_RSA NOCRYPTO_RSA NOCRYPTO_RC5 NOCRYPTO_IDEA
                    503:        By default, RSA is built into libcrypto.  IDEA and RC5 will not be
1.16      wiz       504:        built into libcrypto.  By using MKCRYPTO_{RC5,IDEA}, you can build
1.4       itojun    505:        additional library libcrypto_{idea,rc5}.
1.1       abs       506:
                    507:
                    508: Hints for a more successful build:
                    509: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1.2       mrg       510:     Build a new kernel first:
                    511:        This makes sure that any new system calls or features
                    512:           expected by the new userland will be present.  This
                    513:           helps to avoid critical errors when upgrading.
1.1       abs       514:     Use object directories:
                    515:        This helps to keep stale object
                    516:           files from polluting the build if a Makefile "forgets"
                    517:           about one.  It also makes it easier to clean up after
                    518:           a build.  It's also necessary if you want to use the
                    519:           same source tree for multiple machines.
                    520:           To use object directories:
                    521:            a) cd /usr/src ; make cleandir
1.2       mrg       522:            b) Add "OBJMACHINE=yes" to /etc/mk.conf
                    523:            c) Add "MKOBJDIRS=yes" to /etc/mk.conf
1.1       abs       524:            d) cd /usr/src ; make build
1.2       mrg       525:           Note that running "make obj" in a directory will create
                    526:           in obj.$MACHINE directory.
1.1       abs       527:     Build to a DESTDIR:
                    528:        This helps to keep old
                    529:           installed files (especially libraries) from interfering
                    530:           with the new build.
                    531:           To build to a DESTDIR, set the DESTDIR environment
1.2       mrg       532:           variable before running make build.  It should be set to
                    533:           the pathname of an initially empty directory.
1.1       abs       534:           Problems: you might need to update critical utilities
                    535:                without using DESTDIR since nothing is executed
                    536:                from what is installed in DESTDIR.
                    537:                (See critical utils, below)
                    538:     Build often:
                    539:        This keeps critical utilities current enough to not choke
                    540:        on any other part of the source tree that depends on up to
                    541:        date functionality.
                    542:
                    543: What to do if things don't work:
                    544: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    545: When things don't work there is usually a few things that commonly
                    546: should be done.
                    547:     1) make includes
                    548:        This should be done automatically by make build.
                    549:     2)  cd share/mk && make install
                    550:        Again, automatically done by make build.
                    551:
                    552: Failsafe rebuild of a small part of the tree:
                    553: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    554: To make sure you rebuild something correctly you want to do
                    555: something like the following:
                    556:     1)  Make sure the includes and .mk files are up to date.
                    557:     2)  Make sure any program used to build the particular
                    558:        utility is up to date.  (yacc, lex, etc...)
                    559:     3)  cd ...path/to/util...
                    560:        make cleandir
                    561:        rm ...all obj directories...
                    562:        make cleandir                   # yes, again
                    563:        make obj
                    564:        make depend && make
                    565:
                    566: Failsafe rebuild of the entire tree:
                    567: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    568: If you really want to make sure the source tree is clean and
1.2       mrg       569: ready for a build try the following.  Note that sourcing /etc/mk.conf
                    570: (a make(1) Makefile) in this manner is not right, and will not work
                    571: for anyone who uses any make(1) features in /etc/mk.conf.
1.1       abs       572:
                    573: ---cut here---
                    574: #!/bin/sh
                    575: . /etc/mk.conf
                    576:
1.58      lukem     577: if [ -z $NETBSDSRCDIR ] ; then
                    578:     NETBSDSRCDIR=/usr/src
1.1       abs       579: fi
1.58      lukem     580: if [ \! -d $NETBSDSRCDIR ] ; then
1.1       abs       581:     echo Unable to find sources
                    582:     exit 1
                    583: fi
1.58      lukem     584: find $NETBSDSRCDIR -name \*.o -o -name obj.\* -o -name obj -exec rm \{\} \;
1.1       abs       585:
                    586: if [ -z $BSDOBJDIR ] ; then
                    587:     BSDOBJDIR=/usr/obj
                    588: fi
                    589: if [ -d $BSDOBJDIR ] ; then
                    590:     rm -rf $BSDOBJDIR
                    591: fi
                    592:
1.58      lukem     593: cd $NETBSDSRCDIR && make cleandir
1.1       abs       594:
                    595: ---cut here---
                    596:
                    597: Critical utilities:
                    598: ^^^^^^^^^^^^^^^^^^^
                    599:        gnu/usr.bin/egcs
1.3       itojun    600:        usr.bin/compile_et
1.1       abs       601:        usr.bin/make
                    602:        usr.bin/yacc
                    603:        usr.bin/lex
1.11      lukem     604:        usr.bin/xlint
1.2       mrg       605:        usr.sbin/config
1.1       abs       606:
1.34      simonb    607: Other problems and possible solutions:
1.1       abs       608: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    609: Symptom:Unreasonable compiler errors.
                    610: Fix:   Rebuild gnu/usr.bin/egcs
                    611:
                    612: Symptom:Complaints involving a Makefile.
1.17      erh       613: Fix:   Rebuild usr.bin/make:
                    614:        cd usr.bin/make && make && make install
                    615:         Or, a failsafe method if that doesn't work:
                    616:        cd usr.bin/make && cc *.c */*.c -I . -o make && mv make /usr/bin
                    617:
1.1       abs       618: Fix:   Make sure .mk files are up to date.
                    619:        cd share/mk && make install
1.2       mrg       620:
                    621: Symptom:Kernel `config' fails to configure any kernel, including GENERIC.
                    622: Fix:   Rebuild usr.sbin/config
1.1       abs       623:
                    624: Symptom:
                    625: Fix:   Rebuild usr.bin/yacc
                    626:
                    627: Symptom:
                    628: Fix:   Rebuild usr.bin/lex
                    629:
                    630: Symptom:
                    631: Fix:   rm /usr/lib/libbfd.a
1.4       itojun    632:
                    633: Symptom:Obsolete intermediate files are used during compilation
                    634: Fix:   Try the following sequence of commands in the directory in question.
                    635:        make cleandir; rm `make print-objdir`; make cleandir; make obj
                    636:        (If you built the tree without "make obj" in the past, obsolete files
                    637:        may remain.  The command tries to clean everything up)
1.5       wiz       638:
                    639: Symptom:.../sysinst/run.c:xx: warning: initialization from incompatible pointer type
                    640: Fix:   Rebuild and install usr.bin/menuc
1.12      itojun    641:
                    642: Symptom:mklocale not found during build in share/locale/ctype
                    643: Fix:   Build and install usr.bin/mklocale
1.13      dogcow    644:
1.86      kleink    645: Symptom:undefined reference to `__assert13' or `__unsetenv13'
1.13      dogcow    646: Fix:    Rebuild and install lib/libc
                    647:
1.19      cgd       648: Symptom:usr.sbin/config fails to build.
                    649: Fix:   Try building with -DMAKE_BOOTSTRAP added to CFLAGS in Makefile.
1.13      dogcow    650:
1.19      cgd       651: Symptom:undefined reference to `getprogname' or `setprogname'
                    652: Fix:    Rebuild and install lib/libc
1.24      abs       653:
                    654: Symptom:lint does not understand the '-X' option
                    655: Fix:    May need to build & install libs with NOLINT=1 before rebuilding lint

CVSweb <webmaster@jp.NetBSD.org>