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

Annotation of src/UPDATING, Revision 1.65

1.65    ! lukem       1: $NetBSD: UPDATING,v 1.64 2002/07/01 02:12:11 sommerfeld 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.65    ! lukem      10:
        !            11: 20020822:
        !            12:        Crunched rescue tools (contents of /bin and /sbin, plus others)
        !            13:        are now provided in /rescue.
        !            14:
        !            15:        To ensure that these are built statically linked (no matter
        !            16:        what the setting of LDSTATIC is), use a crunchgen(1) built
        !            17:        from sources newer than 20020820 (see the next entry).
        !            18:
        !            19: 20020820:
        !            20:        crunchgen(1) changed to ensure that the generated program
        !            21:        is statically linked.
        !            22:
        !            23:        Solution: update and reinstall usr.bin/crunch
1.61      itojun     24:
                     25: 20020515:
                     26:        sshd user/group has been added.  Need to hand add this in, or sshd
                     27:        will not let you log in (with default, or UsePrivlegeSeparation=yes)
                     28:
                     29:        Add the following into /etc/group:
                     30:
                     31:        sshd:*:16:
                     32:
                     33:        and the following to /etc/master.passwd (via vipw):
                     34:
1.63      enami      35:        sshd:*:16:16::0:0:& pseudo-user:/var/chroot/sshd:/sbin/nologin
1.61      itojun     36:
1.62      jdolecek   37:        also /var/chroot/sshd directory needs to be present (digged as a part of
1.61      itojun     38:        build process).
1.60      sommerfe   39:
                     40: 20020426:
                     41:        NBUILDJOBS obsoleted in favor of just using -j.
1.59      lukem      42:
                     43: 20020426:
                     44:        etc/postinstall added, which performs various checks for
                     45:        configuration file updates and changes, and can fix most of
                     46:        the problems identified.
                     47:        This should make it much easier to upgrade a system's
                     48:        configuration from earlier systems (as far back as NetBSD 1.5).
1.56      lukem      49:
                     50: 20020320:
                     51:        <bsd.lib.mk> needs a new install(1) for it's "-a cmd" support.
1.57      itojun     52:        build and install at usr.bin/xinstall before the build.
1.56      lukem      53:
1.55      itojun     54: 20020319:
                     55:        raw IPv6 socket now makes strict checking for sa_family and sa_len
                     56:        on send(2) operation.  be sure to have sbin/rtsol and usr.sbin/rtsold
                     57:        newer than November 2001 when you upgrade the kernel.
                     58:
1.54      itojun     59: 20020311:
                     60:        ssh configuration files were moved from /etc to /etc/ssh.  Beware
                     61:        if you restart your machine from remote.  Note that sshd.conf needs
                     62:        to be changed (due to the use of "/etc" inside).
                     63:
                     64: 20020223:
1.53      matt       65:        Users of the VAX port will need to rebuild and install gas
                     66:        so it deal with the now present register prefix used in all
                     67:        the VAX assembly files.
                     68:
1.50      itojun     69: 20020118:
                     70:
                     71:        ntpd user/group has been added.  Need to hand add this in or builds
                     72:        will break as mtree aborts early.
                     73:
                     74:        Add the following into /etc/group:
                     75:
                     76:        ntpd:*:15:
                     77:
                     78:        and the following to /etc/master.passwd (via vipw):
                     79:
                     80:        ntpd:*:15:15::0:0:Ntpd pseudo-user:/var/chroot/ntpd:/sbin/nologin
                     81:
1.49      jmc        82: 20011207:
                     83:
                     84:        If you're attempting to build a snapshot on sparc64 and are getting
                     85:        reloc errors from the toolchain groff binary this means your native
                     86:        toolchain has some broken C++ bits.
                     87:
                     88:        To fix:
                     89:
                     90:        Build a new toolchain (i.e. build.sh -t)
                     91:        Use the new toolchain to build and install natively (i.e. /usr/lib)
                     92:
                     93:        gnu/lib/libgcc
1.51      pooka      94:        gnu/lib/libstdc++
1.49      jmc        95:
                     96:        After this a snapshot will be able to be built.
                     97:
1.47      jmc        98: 20011201:
                     99:        In order for a sparc64 build to work you must have a working awk. If
                    100:        you've built and installed a system with the new toolchain up to this
1.52      wiz       101:        point you do not have a working awk as its ability to do floating
1.47      jmc       102:        point is broken.
                    103:
                    104:        To build:
                    105:
                    106:        remake and install gnu/lib/libgcc
                    107:        remake and install gnu/usr.bin/gawk into /usr/bin (make sure it links
1.48      jmc       108:        against the new libgcc.a)
1.47      jmc       109:
1.46      thorpej   110: 20011128:
                    111:        Kernel config information was changed to use defflag in
                    112:        the various "files" files.  Bug fixes to config(8) are
                    113:        required in order for this to work properly.  Make sure
                    114:        to build and install in usr.sbin/config before attempting
                    115:        to build a new kernel.
                    116:
1.45      yamt      117: 20011030:
                    118:        libc/locale/wcstod.c now needs new lint(1). Update lint(1)
                    119:        before building libc.
1.43      mason     120:
1.44      tv        121: 20011029:
                    122:        The new document BUILDING.mdoc (view with nroff | more, or
                    123:        see pre-generated .txt and .html versions) describes the build
                    124:        procedure in great detail.  BUILDING, and the USE_NEW_TOOLCHAIN
                    125:        build process, are intended in the long run to replace this
                    126:        manual update log.
                    127:
                    128:        Users building a USE_NEW_TOOLCHAIN system should read the
                    129:        BUILDING document for caveats.  Generally, BUILDING supersedes
                    130:        UPDATING for these systems, as tool updating is taken care of
                    131:        by the new build system.
1.42      perry     132:
                    133: 20011028:
                    134:        src/etc/Makefile now needs install to be able to handle
                    135:        symlinks that point to nowhere. A bug in install that
                    136:        prevented this was corrected.
                    137:
                    138:        Solution: update and reinstall usr.bin/xinstall
                    139:        Better Solution: Use the new toolchain and it will just work
                    140:        for you.
1.40      lukem     141:
                    142: 20011006:
                    143:        /etc/mtree/NetBSD.dist has been updated to take advantage of
                    144:        absolute path support added to mtree(8). Older mtree(8)s don't
                    145:        understand the format.
                    146:
                    147:        Solution: update and reinstall usr.sbin/mtree
1.39      jmc       148:
                    149: 20011004:
                    150:        Crunchgen has been updated to work via reach-over makefiles. Updating
                    151:        is suggested before running a snapshot build
1.36      tv        152:
1.35      thorpej   153: 20010915:
                    154:        The new "ubcperf" code committed by Chuck Silvers removed
                    155:        a header file, uvm/uvm_vnode.h.  There may be stale .depend
                    156:        files that still reference this file.
                    157:
                    158:        Solution: "make cleandir && make dependall" in affected
                    159:        directories.
1.31      enami     160:
                    161: 20010803:
                    162:        grep.info is now built from grep.texi using makeinfo.  Since it
                    163:        requires makeinfo v4.0, you need to install new texinfo before
                    164:        building gnu/usr.bin/grep.  To install new texinfo, please follow
                    165:        the instruction described in 20010726 entry.
1.30      enami     166:
1.64      sommerfe  167: 20010803:
1.41      wiz       168:        (i386 only): i386 kernel now uses new instructions like
                    169:         `fxsave' which old gas doesn't understand.  To build the
1.64      sommerfe  170:        kernel successfully, you need to build and install a new toolchain,
                    171:        (i.e., build.sh -t) or  (temporarily) comment out "options I686_CPU"
                    172:        from your kernel configuration until you rebuild your userland.
                    173:        See 20011029 above and BUILDING file in this directory for more information.
                    174:        [updated 20020630 since i386 gas moved when USE_NEW_TOOLCHAIN enabled]
1.29      bjh21     175:
                    176: 20010731:
                    177:        Bootloader update on ELF platforms.  DDB in kernels from before
                    178:        this will be unable to read symbol tables provided by newer
                    179:        bootloaders.
1.27      assar     180:
                    181: 20010726:
                    182:        Texinfo was updated to 4.0.  To avoid failures when trying to
1.28      assar     183:        build the included texinfo files, do:
                    184:
                    185:        cd src/gnu/usr.bin/texinfo
                    186:        make MKINFO=no dependall install
1.25      thorpej   187:
                    188: 20010718:
                    189:        Enabled correct .init/.fini processing in crt0.  The way this
                    190:        was done was to change a -I directive to cc(1), which means
                    191:        make(1) will have a stale dependency (it will be checking the
                    192:        timestamp on the wrong "dot_init.h").
                    193:
                    194:        The symptom you will see is that new programs die with SIGSEGV
                    195:        if you have a stale dependency.
                    196:
                    197:        Solution: "make cleandir" in both lib/csu and libexec/ld.elf_so
                    198:        before starting your build.
1.26      thorpej   199:
                    200: 20010628:
                    201:        A construct was added to uvm_page.h that uncovered a bug
                    202:        in lint(1).  If you get a warning/error about a non-portable
                    203:        bitfield, update your lint(1) before proceeding.
1.21      jmc       204:
                    205: 20010226:
1.22      jmc       206:        Added named user/group to system. Need to hand add this in or builds
1.21      jmc       207:        will break as mtree aborts early.
                    208:
                    209:        To work around add by hand:
                    210:
                    211:        named:*:14:
                    212:
1.22      jmc       213:        to /etc/group and add:
                    214:
                    215:        named:*:14:14::0:0:Named pseudo-user:/var/named:/sbin/nologin
                    216:
                    217:        to master.passwd (use vipw for instance if doing by hand).
                    218:
                    219:        Now a make build should progress.
1.18      jmc       220:
                    221: 20010219:
1.52      wiz       222:        get/setprogname() added. Any hostprogs that may use this will need
1.20      jmc       223:         to be bootstrapped manually until the host system is current.
1.18      jmc       224:
                    225:         Known problems: sys/arch/macppc/stand/fixcoff
1.19      cgd       226:                        usr.sbin/config (adding -DMAKE_BOOTSTRAP to
                    227:                          CFLAGS and rebuilding should work)
1.20      jmc       228:                        usr.sbin/mdsetimage - Build a static copy if
                    229:                          building a snapshot before fully bootstrapped.
1.15      christos  230:
                    231: 20010204:
                    232:        prepare the code to compile with stricter gcc flags. in
                    233:        particular start eliminating redundant declarations. Yacc
                    234:        needs to be installed before make build.
1.10      christos  235:
                    236: 20010114:
                    237:        introduce .if commands(target) in make(1). You need to
                    238:        bring everything up-to-date first, then without installing
1.23      tron      239:        anything make and install in usr.bin/make, then proceed
1.10      christos  240:        with make build.
1.9       sommerfe  241:
                    242: 20010101:
                    243:        bsd.subdir.mk committed 20001230 had a bug which caused
                    244:        afterinstall targets to run too soon; update again.
1.8       sommerfe  245:
                    246: 20001230:
                    247:        New share/mk files needed to support .WAIT in SUBDIR variables.
                    248:        If you get make errors,
                    249:                (cd share/mk; make install)
                    250:        Also, PRINTOBJDIR has changed and is now used more heavily.
1.6       ad        251:
                    252: 20001019:
1.7       ad        253:        The `ca' device driver has been replaced by `ld'; although the
1.6       ad        254:        major and minor numbers haven't changed, you should update your /dev
                    255:        directory.
1.1       abs       256:
1.4       itojun    257: 20000929:
                    258:        The following make directives are obsoleted.
                    259:        MKCRYPTO_RSA NOCRYPTO_RSA NOCRYPTO_RC5 NOCRYPTO_IDEA
                    260:        By default, RSA is built into libcrypto.  IDEA and RC5 will not be
1.16      wiz       261:        built into libcrypto.  By using MKCRYPTO_{RC5,IDEA}, you can build
1.4       itojun    262:        additional library libcrypto_{idea,rc5}.
1.1       abs       263:
                    264:
                    265: Hints for a more successful build:
                    266: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1.2       mrg       267:     Build a new kernel first:
                    268:        This makes sure that any new system calls or features
                    269:           expected by the new userland will be present.  This
                    270:           helps to avoid critical errors when upgrading.
1.1       abs       271:     Use object directories:
                    272:        This helps to keep stale object
                    273:           files from polluting the build if a Makefile "forgets"
                    274:           about one.  It also makes it easier to clean up after
                    275:           a build.  It's also necessary if you want to use the
                    276:           same source tree for multiple machines.
                    277:           To use object directories:
                    278:            a) cd /usr/src ; make cleandir
1.2       mrg       279:            b) Add "OBJMACHINE=yes" to /etc/mk.conf
                    280:            c) Add "MKOBJDIRS=yes" to /etc/mk.conf
1.1       abs       281:            d) cd /usr/src ; make build
1.2       mrg       282:           Note that running "make obj" in a directory will create
                    283:           in obj.$MACHINE directory.
1.1       abs       284:     Build to a DESTDIR:
                    285:        This helps to keep old
                    286:           installed files (especially libraries) from interfering
                    287:           with the new build.
                    288:           To build to a DESTDIR, set the DESTDIR environment
1.2       mrg       289:           variable before running make build.  It should be set to
                    290:           the pathname of an initially empty directory.
1.1       abs       291:           Problems: you might need to update critical utilities
                    292:                without using DESTDIR since nothing is executed
                    293:                from what is installed in DESTDIR.
                    294:                (See critical utils, below)
                    295:     Build often:
                    296:        This keeps critical utilities current enough to not choke
                    297:        on any other part of the source tree that depends on up to
                    298:        date functionality.
                    299:
                    300: What to do if things don't work:
                    301: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    302: When things don't work there is usually a few things that commonly
                    303: should be done.
                    304:     1) make includes
                    305:        This should be done automatically by make build.
                    306:     2)  cd share/mk && make install
                    307:        Again, automatically done by make build.
                    308:
                    309: Failsafe rebuild of a small part of the tree:
                    310: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    311: To make sure you rebuild something correctly you want to do
                    312: something like the following:
                    313:     1)  Make sure the includes and .mk files are up to date.
                    314:     2)  Make sure any program used to build the particular
                    315:        utility is up to date.  (yacc, lex, etc...)
                    316:     3)  cd ...path/to/util...
                    317:        make cleandir
                    318:        rm ...all obj directories...
                    319:        make cleandir                   # yes, again
                    320:        make obj
                    321:        make depend && make
                    322:
                    323: Failsafe rebuild of the entire tree:
                    324: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    325: If you really want to make sure the source tree is clean and
1.2       mrg       326: ready for a build try the following.  Note that sourcing /etc/mk.conf
                    327: (a make(1) Makefile) in this manner is not right, and will not work
                    328: for anyone who uses any make(1) features in /etc/mk.conf.
1.1       abs       329:
                    330: ---cut here---
                    331: #!/bin/sh
                    332: . /etc/mk.conf
                    333:
1.58      lukem     334: if [ -z $NETBSDSRCDIR ] ; then
                    335:     NETBSDSRCDIR=/usr/src
1.1       abs       336: fi
1.58      lukem     337: if [ \! -d $NETBSDSRCDIR ] ; then
1.1       abs       338:     echo Unable to find sources
                    339:     exit 1
                    340: fi
1.58      lukem     341: find $NETBSDSRCDIR -name \*.o -o -name obj.\* -o -name obj -exec rm \{\} \;
1.1       abs       342:
                    343: if [ -z $BSDOBJDIR ] ; then
                    344:     BSDOBJDIR=/usr/obj
                    345: fi
                    346: if [ -d $BSDOBJDIR ] ; then
                    347:     rm -rf $BSDOBJDIR
                    348: fi
                    349:
1.58      lukem     350: cd $NETBSDSRCDIR && make cleandir
1.1       abs       351:
                    352: ---cut here---
                    353:
                    354: Critical utilities:
                    355: ^^^^^^^^^^^^^^^^^^^
                    356:        gnu/usr.bin/egcs
1.3       itojun    357:        usr.bin/compile_et
1.1       abs       358:        usr.bin/make
                    359:        usr.bin/yacc
                    360:        usr.bin/lex
1.11      lukem     361:        usr.bin/xlint
1.2       mrg       362:        usr.sbin/config
1.1       abs       363:
1.34      simonb    364: Other problems and possible solutions:
1.1       abs       365: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    366: Symptom:Unreasonable compiler errors.
                    367: Fix:   Rebuild gnu/usr.bin/egcs
                    368:
                    369: Symptom:Complaints involving a Makefile.
1.17      erh       370: Fix:   Rebuild usr.bin/make:
                    371:        cd usr.bin/make && make && make install
                    372:         Or, a failsafe method if that doesn't work:
                    373:        cd usr.bin/make && cc *.c */*.c -I . -o make && mv make /usr/bin
                    374:
1.1       abs       375: Fix:   Make sure .mk files are up to date.
                    376:        cd share/mk && make install
1.2       mrg       377:
                    378: Symptom:Kernel `config' fails to configure any kernel, including GENERIC.
                    379: Fix:   Rebuild usr.sbin/config
1.1       abs       380:
                    381: Symptom:
                    382: Fix:   Rebuild usr.bin/yacc
                    383:
                    384: Symptom:
                    385: Fix:   Rebuild usr.bin/lex
                    386:
                    387: Symptom:
                    388: Fix:   rm /usr/lib/libbfd.a
1.4       itojun    389:
                    390: Symptom:Obsolete intermediate files are used during compilation
                    391: Fix:   Try the following sequence of commands in the directory in question.
                    392:        make cleandir; rm `make print-objdir`; make cleandir; make obj
                    393:        (If you built the tree without "make obj" in the past, obsolete files
                    394:        may remain.  The command tries to clean everything up)
1.5       wiz       395:
                    396: Symptom:.../sysinst/run.c:xx: warning: initialization from incompatible pointer type
                    397: Fix:   Rebuild and install usr.bin/menuc
1.12      itojun    398:
                    399: Symptom:mklocale not found during build in share/locale/ctype
                    400: Fix:   Build and install usr.bin/mklocale
1.13      dogcow    401:
                    402: Symptom:undefined reference to `__assert13'
                    403: Fix:    Rebuild and install lib/libc
                    404:
1.19      cgd       405: Symptom:usr.sbin/config fails to build.
                    406: Fix:   Try building with -DMAKE_BOOTSTRAP added to CFLAGS in Makefile.
1.13      dogcow    407:
1.19      cgd       408: Symptom:undefined reference to `getprogname' or `setprogname'
                    409: Fix:    Rebuild and install lib/libc
1.24      abs       410:
                    411: Symptom:lint does not understand the '-X' option
                    412: Fix:    May need to build & install libs with NOLINT=1 before rebuilding lint

CVSweb <webmaster@jp.NetBSD.org>