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

Annotation of src/UPDATING, Revision 1.42

1.42    ! perry       1: $NetBSD: UPDATING,v 1.41 2001/10/26 13:38:52 wiz 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:
1.42    ! perry       8: Note that users of the new toolchain in many instances will not
        !             9: experience the problems listed below because their host tools are
        !            10: automatically generated for them.
        !            11:
1.1       abs        12: Recent changes:
                     13: ^^^^^^^^^^^^^^^
1.42    ! perry      14:
        !            15: 20011028:
        !            16:        src/etc/Makefile now needs install to be able to handle
        !            17:        symlinks that point to nowhere. A bug in install that
        !            18:        prevented this was corrected.
        !            19:
        !            20:        Solution: update and reinstall usr.bin/xinstall
        !            21:        Better Solution: Use the new toolchain and it will just work
        !            22:        for you.
1.40      lukem      23:
                     24: 20011006:
                     25:        /etc/mtree/NetBSD.dist has been updated to take advantage of
                     26:        absolute path support added to mtree(8). Older mtree(8)s don't
                     27:        understand the format.
                     28:
                     29:        Solution: update and reinstall usr.sbin/mtree
1.39      jmc        30:
                     31: 20011004:
                     32:
                     33:        Crunchgen has been updated to work via reach-over makefiles. Updating
                     34:        is suggested before running a snapshot build
1.36      tv         35:
                     36: 20010922:
                     37:        The new toolchain is enabled on i386.  This new build method
1.38      tron       38:        is intended to make all the upgrade issues elsewhere in UPDATING
1.36      tv         39:        obsolete (stay tuned...).
                     40:
1.37      kristerw   41:        i386 platform builds must now set TOOLDIR in mk.conf or the
1.36      tv         42:        environment in order to build the system.  This is a pathname
                     43:        where host build tools will be installed, and must NOT be
                     44:        the same as src/tools.
                     45:
                     46:        (Optionally, USETOOLS=no can be set in the environment if you
                     47:        wish to avoid using the separate host toolchain for building a
                     48:        subtree.  Otherwise, this will default to "yes" automatically.)
1.35      thorpej    49:
                     50: 20010915:
                     51:        The new "ubcperf" code committed by Chuck Silvers removed
                     52:        a header file, uvm/uvm_vnode.h.  There may be stale .depend
                     53:        files that still reference this file.
                     54:
                     55:        Solution: "make cleandir && make dependall" in affected
                     56:        directories.
1.31      enami      57:
                     58: 20010803:
                     59:        grep.info is now built from grep.texi using makeinfo.  Since it
                     60:        requires makeinfo v4.0, you need to install new texinfo before
                     61:        building gnu/usr.bin/grep.  To install new texinfo, please follow
                     62:        the instruction described in 20010726 entry.
1.30      enami      63:
                     64: 20010803:
1.41      wiz        65:        (i386 only): i386 kernel now uses new instructions like
                     66:         `fxsave' which old gas doesn't understand.  To build the
                     67:        kernel successfuly, you need to build and install new gas
                     68:        (gnu/usr.bin/gas.new), or (temporarily) comment out
                     69:        "options I686_CPU" from your kernel configuration until you
                     70:        rebuilt your userland (and got a new gas).
1.29      bjh21      71:
                     72: 20010731:
                     73:        Bootloader update on ELF platforms.  DDB in kernels from before
                     74:        this will be unable to read symbol tables provided by newer
                     75:        bootloaders.
1.27      assar      76:
                     77: 20010726:
                     78:        Texinfo was updated to 4.0.  To avoid failures when trying to
1.28      assar      79:        build the included texinfo files, do:
                     80:
                     81:        cd src/gnu/usr.bin/texinfo
                     82:        make MKINFO=no dependall install
1.25      thorpej    83:
                     84: 20010718:
                     85:
                     86:        Enabled correct .init/.fini processing in crt0.  The way this
                     87:        was done was to change a -I directive to cc(1), which means
                     88:        make(1) will have a stale dependency (it will be checking the
                     89:        timestamp on the wrong "dot_init.h").
                     90:
                     91:        The symptom you will see is that new programs die with SIGSEGV
                     92:        if you have a stale dependency.
                     93:
                     94:        Solution: "make cleandir" in both lib/csu and libexec/ld.elf_so
                     95:        before starting your build.
1.26      thorpej    96:
                     97: 20010628:
                     98:
                     99:        A construct was added to uvm_page.h that uncovered a bug
                    100:        in lint(1).  If you get a warning/error about a non-portable
                    101:        bitfield, update your lint(1) before proceeding.
1.21      jmc       102:
                    103: 20010226:
                    104:
1.22      jmc       105:        Added named user/group to system. Need to hand add this in or builds
1.21      jmc       106:        will break as mtree aborts early.
                    107:
                    108:        To work around add by hand:
                    109:
                    110:        named:*:14:
                    111:
1.22      jmc       112:        to /etc/group and add:
                    113:
                    114:        named:*:14:14::0:0:Named pseudo-user:/var/named:/sbin/nologin
                    115:
                    116:        to master.passwd (use vipw for instance if doing by hand).
                    117:
                    118:        Now a make build should progress.
1.18      jmc       119:
                    120: 20010219:
                    121:        get/setprogname() added. Any hostprog's that may use this will need
1.20      jmc       122:         to be bootstrapped manually until the host system is current.
1.18      jmc       123:
                    124:         Known problems: sys/arch/macppc/stand/fixcoff
1.19      cgd       125:                        usr.sbin/config (adding -DMAKE_BOOTSTRAP to
                    126:                          CFLAGS and rebuilding should work)
1.20      jmc       127:                        usr.sbin/mdsetimage - Build a static copy if
                    128:                          building a snapshot before fully bootstrapped.
1.15      christos  129:
                    130: 20010204:
                    131:        prepare the code to compile with stricter gcc flags. in
                    132:        particular start eliminating redundant declarations. Yacc
                    133:        needs to be installed before make build.
1.10      christos  134:
                    135: 20010114:
                    136:        introduce .if commands(target) in make(1). You need to
                    137:        bring everything up-to-date first, then without installing
1.23      tron      138:        anything make and install in usr.bin/make, then proceed
1.10      christos  139:        with make build.
1.9       sommerfe  140:
                    141: 20010101:
                    142:        bsd.subdir.mk committed 20001230 had a bug which caused
                    143:        afterinstall targets to run too soon; update again.
1.8       sommerfe  144:
                    145: 20001230:
                    146:        New share/mk files needed to support .WAIT in SUBDIR variables.
                    147:        If you get make errors,
                    148:                (cd share/mk; make install)
                    149:        Also, PRINTOBJDIR has changed and is now used more heavily.
1.6       ad        150:
                    151: 20001019:
1.7       ad        152:        The `ca' device driver has been replaced by `ld'; although the
1.6       ad        153:        major and minor numbers haven't changed, you should update your /dev
                    154:        directory.
1.1       abs       155:
1.4       itojun    156: 20000929:
                    157:        The following make directives are obsoleted.
                    158:        MKCRYPTO_RSA NOCRYPTO_RSA NOCRYPTO_RC5 NOCRYPTO_IDEA
                    159:        By default, RSA is built into libcrypto.  IDEA and RC5 will not be
1.16      wiz       160:        built into libcrypto.  By using MKCRYPTO_{RC5,IDEA}, you can build
1.4       itojun    161:        additional library libcrypto_{idea,rc5}.
                    162:
1.1       abs       163: 20000623:
                    164:        MKCRYPTO and friends added to share/mk/bsd.own.mk.
                    165:        'cd share/mk ; make install' needed before make build.
                    166:
                    167:
                    168: Hints for a more successful build:
                    169: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1.2       mrg       170:     Build a new kernel first:
                    171:        This makes sure that any new system calls or features
                    172:           expected by the new userland will be present.  This
                    173:           helps to avoid critical errors when upgrading.
1.1       abs       174:     Use object directories:
                    175:        This helps to keep stale object
                    176:           files from polluting the build if a Makefile "forgets"
                    177:           about one.  It also makes it easier to clean up after
                    178:           a build.  It's also necessary if you want to use the
                    179:           same source tree for multiple machines.
                    180:           To use object directories:
                    181:            a) cd /usr/src ; make cleandir
1.2       mrg       182:            b) Add "OBJMACHINE=yes" to /etc/mk.conf
                    183:            c) Add "MKOBJDIRS=yes" to /etc/mk.conf
1.1       abs       184:            d) cd /usr/src ; make build
1.2       mrg       185:           Note that running "make obj" in a directory will create
                    186:           in obj.$MACHINE directory.
1.1       abs       187:     Build to a DESTDIR:
                    188:        This helps to keep old
                    189:           installed files (especially libraries) from interfering
                    190:           with the new build.
                    191:           To build to a DESTDIR, set the DESTDIR environment
1.2       mrg       192:           variable before running make build.  It should be set to
                    193:           the pathname of an initially empty directory.
1.1       abs       194:           Problems: you might need to update critical utilities
                    195:                without using DESTDIR since nothing is executed
                    196:                from what is installed in DESTDIR.
                    197:                (See critical utils, below)
                    198:     Build often:
                    199:        This keeps critical utilities current enough to not choke
                    200:        on any other part of the source tree that depends on up to
                    201:        date functionality.
                    202:
                    203: What to do if things don't work:
                    204: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    205: When things don't work there is usually a few things that commonly
                    206: should be done.
                    207:     1) make includes
                    208:        This should be done automatically by make build.
                    209:     2)  cd share/mk && make install
                    210:        Again, automatically done by make build.
                    211:
                    212: Failsafe rebuild of a small part of the tree:
                    213: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    214: To make sure you rebuild something correctly you want to do
                    215: something like the following:
                    216:     1)  Make sure the includes and .mk files are up to date.
                    217:     2)  Make sure any program used to build the particular
                    218:        utility is up to date.  (yacc, lex, etc...)
                    219:     3)  cd ...path/to/util...
                    220:        make cleandir
                    221:        rm ...all obj directories...
                    222:        make cleandir                   # yes, again
                    223:        make obj
                    224:        make depend && make
                    225:
                    226: Failsafe rebuild of the entire tree:
                    227: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    228: If you really want to make sure the source tree is clean and
1.2       mrg       229: ready for a build try the following.  Note that sourcing /etc/mk.conf
                    230: (a make(1) Makefile) in this manner is not right, and will not work
                    231: for anyone who uses any make(1) features in /etc/mk.conf.
1.1       abs       232:
                    233: ---cut here---
                    234: #!/bin/sh
                    235: . /etc/mk.conf
                    236:
                    237: if [ -z $BSDSRCDIR ] ; then
                    238:     BSDSRCDIR=/usr/src
                    239: fi
                    240: if [ \! -d $BSDSRCDIR ] ; then
                    241:     echo Unable to find sources
                    242:     exit 1
                    243: fi
                    244: find $BSDSRCDIR -name \*.o -o -name obj.\* -o -name obj -exec rm \{\} \;
                    245:
                    246: if [ -z $BSDOBJDIR ] ; then
                    247:     BSDOBJDIR=/usr/obj
                    248: fi
                    249: if [ -d $BSDOBJDIR ] ; then
                    250:     rm -rf $BSDOBJDIR
                    251: fi
                    252:
                    253: cd $BSDSRCDIR && make cleandir
                    254:
                    255: ---cut here---
                    256:
                    257: Critical utilities:
                    258: ^^^^^^^^^^^^^^^^^^^
                    259:        gnu/usr.bin/egcs
1.3       itojun    260:        usr.bin/compile_et
1.1       abs       261:        usr.bin/make
                    262:        usr.bin/yacc
                    263:        usr.bin/lex
1.11      lukem     264:        usr.bin/xlint
1.2       mrg       265:        usr.sbin/config
1.1       abs       266:
1.34      simonb    267: Other problems and possible solutions:
1.1       abs       268: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    269: Symptom:Unreasonable compiler errors.
                    270: Fix:   Rebuild gnu/usr.bin/egcs
                    271:
                    272: Symptom:Complaints involving a Makefile.
1.17      erh       273: Fix:   Rebuild usr.bin/make:
                    274:        cd usr.bin/make && make && make install
                    275:         Or, a failsafe method if that doesn't work:
                    276:        cd usr.bin/make && cc *.c */*.c -I . -o make && mv make /usr/bin
                    277:
1.1       abs       278: Fix:   Make sure .mk files are up to date.
                    279:        cd share/mk && make install
1.2       mrg       280:
                    281: Symptom:Kernel `config' fails to configure any kernel, including GENERIC.
                    282: Fix:   Rebuild usr.sbin/config
1.1       abs       283:
                    284: Symptom:
                    285: Fix:   Rebuild usr.bin/yacc
                    286:
                    287: Symptom:
                    288: Fix:   Rebuild usr.bin/lex
                    289:
                    290: Symptom:
                    291: Fix:   rm /usr/lib/libbfd.a
1.4       itojun    292:
                    293: Symptom:Obsolete intermediate files are used during compilation
                    294: Fix:   Try the following sequence of commands in the directory in question.
                    295:        make cleandir; rm `make print-objdir`; make cleandir; make obj
                    296:        (If you built the tree without "make obj" in the past, obsolete files
                    297:        may remain.  The command tries to clean everything up)
1.5       wiz       298:
                    299: Symptom:.../sysinst/run.c:xx: warning: initialization from incompatible pointer type
                    300: Fix:   Rebuild and install usr.bin/menuc
1.12      itojun    301:
                    302: Symptom:mklocale not found during build in share/locale/ctype
                    303: Fix:   Build and install usr.bin/mklocale
1.13      dogcow    304:
                    305: Symptom:undefined reference to `__assert13'
                    306: Fix:    Rebuild and install lib/libc
                    307:
1.19      cgd       308: Symptom:usr.sbin/config fails to build.
                    309: Fix:   Try building with -DMAKE_BOOTSTRAP added to CFLAGS in Makefile.
1.13      dogcow    310:
1.19      cgd       311: Symptom:undefined reference to `getprogname' or `setprogname'
                    312: Fix:    Rebuild and install lib/libc
1.24      abs       313:
                    314: Symptom:lint does not understand the '-X' option
                    315: Fix:    May need to build & install libs with NOLINT=1 before rebuilding lint

CVSweb <webmaster@jp.NetBSD.org>