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

Annotation of src/UPDATING, Revision 1.66

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

CVSweb <webmaster@jp.NetBSD.org>