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

Annotation of src/UPDATING, Revision 1.76

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

CVSweb <webmaster@jp.NetBSD.org>