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

Annotation of src/UPDATING, Revision 1.61

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

CVSweb <webmaster@jp.NetBSD.org>