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

Annotation of src/UPDATING, Revision 1.106

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

CVSweb <webmaster@jp.NetBSD.org>